diff --git a/platypush/backend/http/webapp/src/components/panels/Execute/Argdoc.vue b/platypush/backend/http/webapp/src/components/panels/Execute/Argdoc.vue new file mode 100644 index 0000000000..d8a9eeef01 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Execute/Argdoc.vue @@ -0,0 +1,96 @@ + + + + Argument: + [Required] + [Optional] + + + + + + + + Type: {{ args.type }} + + + + + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Execute/Index.vue b/platypush/backend/http/webapp/src/components/panels/Execute/Index.vue index 9550c71e5b..fc58135cc7 100644 --- a/platypush/backend/http/webapp/src/components/panels/Execute/Index.vue +++ b/platypush/backend/http/webapp/src/components/panels/Execute/Index.vue @@ -1,9 +1,12 @@ - - Execute Action + + + Execute Action + + Structured @@ -14,15 +17,18 @@ - - - + + + + + + - + - - + + + Action documentation - + - + - + - + Arguments - + - - + - + + - + + * - - - Attribute: - - - - - - - + - - + + + - - - + - - + + - - - Attribute: - - - - - - - + - + - - - + + + - + - + - + + @@ -140,24 +148,25 @@ - - - + + + - + - + - + + - Execute Procedure + Execute Procedure @@ -171,12 +180,12 @@ - - + - @@ -188,6 +197,7 @@ diff --git a/platypush/backend/http/webapp/src/components/panels/Execute/common.scss b/platypush/backend/http/webapp/src/components/panels/Execute/common.scss new file mode 100644 index 0000000000..c7b87bc383 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Execute/common.scss @@ -0,0 +1,236 @@ +@import "vars.scss"; + +hgroup { + flex-grow: 1; + + button { + background: none; + border: none; + box-shadow: none; + + &:hover { + color: $default-hover-fg; + } + } +} + +h1 { + background: $header-bg; + padding: .75em .5em; + box-shadow: $title-shadow; + font-size: 1.1em; + margin-bottom: 0 !important; + + @include from($desktop) { + border-radius: 0.5em 0.5em 0 0; + } +} + +h2 { + @include header; +} + +section { + max-height: 50vh; + display: flex; + flex-direction: column; + margin-top: .5em; + + &.response { + flex-grow: 1; + } + + &.args { + margin-top: .5em; + padding-top: .5em; + } + + .response { + background: $response-bg; + box-shadow: $response-shadow; + } + + .error { + background: $error-bg; + padding: 1em; + box-shadow: $error-shadow; + } +} + +.buttons { + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 0.25em; + flex-grow: 1; + + button { + background: none; + + &:hover { + color: $default-hover-fg; + } + } +} + +header { + width: 100%; + display: flex; + align-items: center; + + .autocomplete-container { + width: calc(100% - $request-headers-btn-width); + flex-grow: 1; + } + + .buttons { + width: $request-headers-btn-width; + display: inline-flex; + justify-content: flex-end; + margin-right: 0.5em; + } +} + +.doc { + height: 100%; + background: $doc-bg; + padding: 1em; + border-radius: 1em; + overflow: auto; + margin-top: 0.1em; + box-shadow: $doc-shadow; +} + +:deep(.doc) { + blockquote { + margin-left: 0; + } +} + +pre { + background: none; +} + +textarea { + width: 100%; + height: 10em; + margin-bottom: .5em; + padding: .5em; + border: $default-border-2; + border-radius: 1em; + box-shadow: $border-shadow-bottom-right; + outline: none; + + &:hover { + border: 1px solid $default-hover-fg-2; + } + + &:focus { + border: 1px solid $selected-fg; + } +} + +form { + background: $default-bg-2; + margin: 0; + border-radius: 0; + border: none; + padding: 1em .5em; + margin-bottom: 0 !important; +} + +.raw .first-row { + @include until($tablet) { + width: 100%; + } + + @include from($tablet) { + width: 80%; + max-width: 60em; + } + + display: flex; + flex-direction: column; + + button { + margin-left: 0; + } +} + +.args-list { + padding-top: 0.5em; + + @include until($tablet) { + width: 100%; + } + + @include from($tablet) { + width: $params-tablet-width; + margin-right: 1.5em; + } + + @include from($desktop) { + width: $params-desktop-width; + } + + .arg { + margin-bottom: .25em; + @include until($tablet) { + width: 100%; + } + + .required-flag { + width: 1.25em; + font-weight: bold; + margin-left: 0.25em; + } + + input { + width: calc(100% - 1.5em); + } + } + + .action-arg-value { + width: 100%; + } +} + +.args-body { + display: flex; + margin-top: 0.15em; + margin-bottom: 1.5em; + + @include until($tablet) { + flex-direction: column; + } +} + +.add-arg { + width: 100%; + + button { + width: 100%; + background: $extra-params-btn-bg; + border: $title-border; + } +} + +.extra-arg { + display: flex; + margin-bottom: .5em; + + label { + margin-left: 0.25em; + } + + .action-extra-arg-del { + border: 0; + text-align: right; + padding: 0 .5em; + } + + input[type=text] { + width: 100%; + } +} + diff --git a/platypush/backend/http/webapp/src/components/panels/Execute/vars.scss b/platypush/backend/http/webapp/src/components/panels/Execute/vars.scss index 31593ee13f..da12ee719f 100644 --- a/platypush/backend/http/webapp/src/components/panels/Execute/vars.scss +++ b/platypush/backend/http/webapp/src/components/panels/Execute/vars.scss @@ -11,3 +11,6 @@ $doc-shadow: 0 1px 3px 1px #d7d3c0, inset 0 1px 1px 0 #d7d3c9; $response-shadow: $doc-shadow; $procedure-submit-btn-bg: #ebffeb; $section-title-bg: rgba(0, 0, 0, .04); +$params-desktop-width: 30em; +$params-tablet-width: 20em; +$request-headers-btn-width: 7.5em; diff --git a/platypush/backend/http/webapp/src/style/mixins.scss b/platypush/backend/http/webapp/src/style/mixins.scss index 63906a3965..c11b8cff11 100644 --- a/platypush/backend/http/webapp/src/style/mixins.scss +++ b/platypush/backend/http/webapp/src/style/mixins.scss @@ -34,3 +34,18 @@ #{$property}: -moz-calc( #{$expression} ); #{$property}: calc( #{$expression} ); } + +@mixin header { + width: 100%; + display: flex; + background: $header-bg-2; + align-items: center; + padding: 0.5em; + margin-bottom: 0.1em; + border: $title-border; + border-radius: 1em; + box-shadow: $title-shadow; + font-weight: normal; + font-size: 1em; +} +