diff --git a/platypush/backend/http/webapp/src/assets/icons.json b/platypush/backend/http/webapp/src/assets/icons.json index d6a572e54..66088d517 100644 --- a/platypush/backend/http/webapp/src/assets/icons.json +++ b/platypush/backend/http/webapp/src/assets/icons.json @@ -29,6 +29,9 @@ }, "zigbee.mqtt": { "imgUrl": "/icons/zigbee.svg" + }, + "zwave": { + "imgUrl": "/icons/z-wave.png" } } } diff --git a/platypush/backend/http/webapp/src/components/panels/Zwave/Group.vue b/platypush/backend/http/webapp/src/components/panels/Zwave/Group.vue new file mode 100644 index 000000000..f0f213c98 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Zwave/Group.vue @@ -0,0 +1,102 @@ + + + + + + + + Nodes + + + + + + + + + + + + + + + + + + + + + + Parameters + + + + + Index + + + + + Max associations + + + + + + + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Zwave/Index.vue b/platypush/backend/http/webapp/src/components/panels/Zwave/Index.vue new file mode 100644 index 000000000..f1e7c8f8d --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Zwave/Index.vue @@ -0,0 +1,723 @@ + + + + + + + + + State + + + + + Device + + + + + + Statistics + + + + + + + + + + + + + + + + + + + Select nodes to add + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No nodes available on the network + + + + + + + + + No groups available on the network + + + + + + + + + No scenes configured on the network + + + + + + + + Activate + + + + + + + + Actions + + + + + Remove Scene + + + + + + + Rename Scene + + + + + + + + + + + + + + + + + + + + No nodes found on the network + + + + + + + + + + + + + + + + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Zwave/Node.vue b/platypush/backend/http/webapp/src/components/panels/Zwave/Node.vue new file mode 100644 index 000000000..7e96fe6fc --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Zwave/Node.vue @@ -0,0 +1,373 @@ + + + + + + + Name + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Location + + + + + Type + + + + + Role + + + + + Node ID + + + + + Neighbours + + + + + + + Is Ready + + + + + Is Failed + + + + + Product ID + + + + + Product Type + + + + + Product Name + + + + + Manufacturer ID + + + + + Manufacturer Name + + + + + Capabilities + + + + + Command Classes + + + + + Groups + + + + + Home ID + + + + + Is Awake + + + + + Is Locked + + + + + Last Update + + + + + Max Baud Rate + + + + + + Actions + + + + + Remove Failed Node + + + + + + + Replace Failed Node + + + + + + + Heal Node + + + + + + + Replicate info to secondary controller + + + + + + + Request network update + + + + + + + Request neighbours update + + + + + + + + + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Zwave/Value.vue b/platypush/backend/http/webapp/src/components/panels/Zwave/Value.vue new file mode 100644 index 000000000..5df9497db --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Zwave/Value.vue @@ -0,0 +1,224 @@ + + + + + + + + {{ value.label }} + + + + + + Value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove From Scene + + + + + + + Add To Scene + + + + + + + + + Help + + + + + Value ID + + + + + ID on Network + + + + + Command Class + + + + + Last Update + + + + + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Zwave/common.scss b/platypush/backend/http/webapp/src/components/panels/Zwave/common.scss new file mode 100644 index 000000000..c57139467 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Zwave/common.scss @@ -0,0 +1,225 @@ +@import "vars"; + +.zwave-container { + .no-items { + padding: 2em; + font-size: 1.5em; + color: $no-items-color; + display: flex; + align-items: center; + justify-content: center; + } + + .node, .scene { + .actions { + .row { + cursor: pointer; + } + } + + form { + margin-bottom: 0; + } + } + + .params { + background: $params-bg; + padding-bottom: 1em; + + .section { + display: flex; + flex-direction: column; + padding: 0 1em; + + &:not(:first-child) { + padding-top: 1em; + } + + .header { + display: flex; + align-items: center; + font-weight: bold; + border-bottom: $param-section-header-border; + } + } + + .row { + display: flex; + align-items: center; + border-radius: 1em; + padding: .3em; + + &:nth-child(even) { + background: $param-even-row-bg; + } + + &:nth-child(odd) { + background: $param-odd-row-bg; + } + + &:hover { + background: $hover-bg; + } + } + + .param-name { + display: inline-flex; + width: 40%; + margin-left: 1%; + vertical-align: top; + letter-spacing: .04em; + } + + .param-value { + display: inline-block; + width: 58%; + text-align: right; + + .value-edit { + display: flex; + align-items: center; + } + + .value-data { + display: inline-block; + font-weight: bold; + } + + .slider-container { + display: flex; + align-items: center; + } + + .unit { + font-size: .8em; + margin-left: 1em; + display: inline; + } + + select { + width: 100%; + border-radius: 2em; + } + + .numeric { + input.slider { + text-align: left; + } + + input[type=text] { + text-align: right; + width: 100%; + } + + .row { + background: none; + &:hover { + background: none; + } + } + + .value-min, .value-max { + width: 50%; + font-size: .85em; + opacity: .75; + } + + .value-min { + text-align: left; + } + + .value-max { + text-align: right; + } + } + } + } + + .btn-default { + border: 0; + padding: 0 1em; + + &:hover { + border: $default-border-2; + border-radius: 1em; + } + } + + .buttons { + text-align: right; + } + + .view { + min-width: 400pt; + max-width: 750pt; + background: $view-bg; + border: $view-border; + border-radius: 1.5em; + box-shadow: $view-box-shadow; + } + + .item { + &.selected { + box-shadow: $selected-item-box-shadow; + } + + .name { + padding: 1em; + cursor: pointer; + text-transform: uppercase; + letter-spacing: .06em; + + &.selected { + border-radius: 1.5em; + } + } + + &:hover { + background: $hover-bg; + } + + &:not(:last-child) { + border-bottom: $item-border; + } + + &:first-child { + border-radius: 1.5em 1.5em 0 0; + } + + &:last-child { + border-radius: 0 0 1.5em 1.5em; + } + } + + .btn-value-name-edit { + padding: 0; + } + + .modal { + .section { + .header { + background: none; + padding: .5em 0; + } + + .body { + padding: 0; + } + } + + .network-info { + min-width: 600pt; + } + } + + .error { + color: $error-color; + } + + form { + border: none; + box-shadow: none; + padding: 0; + margin: 0; + } +} diff --git a/platypush/backend/http/webapp/src/components/panels/Zwave/vars.scss b/platypush/backend/http/webapp/src/components/panels/Zwave/vars.scss new file mode 100644 index 000000000..592fa886f --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Zwave/vars.scss @@ -0,0 +1,12 @@ +$container-bg: #f1f1f1; +$view-bg: white; +$view-border: 1px solid #d8d8d8; +$view-box-shadow: 1px 2px 2px #ccc; +$item-border: 1px solid #dddddd; +$no-items-color: #555555; +$params-bg: white; +$param-even-row-bg: #ededed; +$param-odd-row-bg: white; +$param-section-header-border: 1px solid #e8e8e8; +$selected-item-box-shadow: 0 2px 4px 0 #bbb; +$error-color: #aa0000;