working on editor

This commit is contained in:
bwssystems
2017-01-08 18:24:16 -06:00
parent 010260429e
commit 4744a68906
16 changed files with 538 additions and 530 deletions

View File

@@ -5,7 +5,7 @@
<groupId>com.bwssystems.HABridge</groupId> <groupId>com.bwssystems.HABridge</groupId>
<artifactId>ha-bridge</artifactId> <artifactId>ha-bridge</artifactId>
<version>4beta2.7</version> <version>4beta2.8</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>HA Bridge</name> <name>HA Bridge</name>

View File

@@ -10,9 +10,6 @@ app.config (function ($routeProvider) {
}).when ('/logs', { }).when ('/logs', {
templateUrl: 'views/logs.html', templateUrl: 'views/logs.html',
controller: 'LogsController' controller: 'LogsController'
}).when ('/editor', {
templateUrl: 'views/editor.html',
controller: 'EditController'
}).when ('/editdevice', { }).when ('/editdevice', {
templateUrl: 'views/editdevice.html', templateUrl: 'views/editdevice.html',
controller: 'EditController' controller: 'EditController'
@@ -2079,6 +2076,8 @@ app.controller('EditController', function ($scope, $location, $http, bridgeServi
$scope.clearDevice = function () { $scope.clearDevice = function () {
bridgeService.clearDevice(); bridgeService.clearDevice();
$scope.onDevices = null; $scope.onDevices = null;
$scope.dimDevices = null;
$scope.offDevices = null;
}; };
$scope.addDevice = function () { $scope.addDevice = function () {

View File

@@ -19,7 +19,7 @@
href="#/haldevices">HAL Devices</a></li> href="#/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li role="presentation"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -15,11 +15,11 @@
href="#/huedevices">Hue Devices</a></li> href="#/huedevices">Hue Devices</a></li>
<li ng-if="bridge.showHal" role="presentation"><a <li ng-if="bridge.showHal" role="presentation"><a
href="#/haldevices">HAL Devices</a></li> href="#/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> href="#/mqttmessages">MQTT Messages</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li ng-if="bridge.showHass" role="presentation"><a
<li role="presentation" class="active"><a href="#/editdevice">Edit href="#/hassdevices">HomeAssistant Devices</a></li>
Device</a></li> <li role="presentation" class="active"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">
@@ -31,38 +31,49 @@
fields the bridge uses. Please use care when updating these fields as fields the bridge uses. Please use care when updating these fields as
you may break the settings used by the bridge to call a specific end you may break the settings used by the bridge to call a specific end
point device.</p> point device.</p>
<p class="text-muted">This area allows you to create any http or
udp call to an endpoint. You can use the default GET or select the
http verb type below and configure a payload for either on, dim or
off methods. For Execution of a
script or program, plese fill in the path. All manually entered calls
can use Json notation of array with [{&quot;item&quot;:&quot;the
payload&quot;},{&quot;item&quot;:&quot;another payload&quot;}] to
execute multiple entries. Adding the value replacements
(${intensity..byte},${intensity.percent},${intensity.math(X*1)}) will
also work.</p>
<p>When copying, update the name and select the "Add Bridge <p>When copying, update the name and select the "Add Bridge
Device" Button.</p> Device" Button.</p>
<form name="form"> <form name="form">
<p> <p>
<button class="btn btn-primary" ng-click="copyDevice()">Add Bridge Device</button> <button class="btn btn-primary" ng-click="copyDevice()">Add
<button type="submit" class="col-xs-4 col-sm-2 btn btn-success" ng-click="addDevice()">Update Bridge Device</button> Bridge Device</button>
<button class="btn btn-danger" ng-click="clearDevice()">Clear Device</button> <button type="submit" class="col-xs-4 col-sm-2 btn btn-success"
ng-click="addDevice()">Update Bridge Device</button>
<button class="btn btn-danger" ng-click="clearDevice()">Clear
Device</button>
</p> </p>
<table class="table table-bordered table-striped table-hover"> <table class="table table-bordered table-striped table-hover">
<tr> <tr>
<td><label class="col-xs-12 col-sm-2 control-label" for="device-name">Name</label></td> <td><label class="col-xs-12 col-sm-2 control-label"
for="device-name">Name</label></td>
<td> <td><input type="text" class="form-control" id="device-name"
<input type="text" class="form-control" id="device-name" ng-model="device.name" placeholder="Device Name"></td>
ng-model="device.name" placeholder="Device Name">
</td>
</tr> </tr>
<tr> <tr>
<td><label class="col-xs-12 col-sm-2 control-label" for="device-target">Target</label></td> <td><label class="col-xs-12 col-sm-2 control-label"
for="device-target">Target</label></td>
<td> <td><input type="text" class="form-control" id="device-target"
<input type="text" class="form-control" id="device-target" ng-model="device.targetDevice" placeholder="default"></td>
ng-model="device.targetDevice" placeholder="default">
</td>
</tr> </tr>
<tr> <tr>
<td><label class="col-xs-12 col-sm-2 control-label" for="device-type">Device Type</label></td> <td><label class="col-xs-12 col-sm-2 control-label"
for="device-type">Device Type</label></td>
<td> <td><select name="device-type" id="device-type"
<select name="device-type" id="device-type"
ng-model="device.deviceType"> ng-model="device.deviceType">
<option value="">---Types if needed---</option> <option value="">---Types if needed---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
@@ -78,38 +89,36 @@
<option value="button">Button</option> <option value="button">Button</option>
<option value="thermo">Thermo</option> <option value="thermo">Thermo</option>
<option value="passthru">Pass Thru</option> <option value="passthru">Pass Thru</option>
</select> </select></td>
</td>
</tr> </tr>
<tr> <tr>
<td><label class="col-xs-12 col-sm-2 control-label" <td><label class="col-xs-12 col-sm-2 control-label"
for="device-map-type">Map Type</label></td> for="device-map-type">Map Type</label></td>
<td> <td><select
<select ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]" ng-model="mapTypeSelected"></select> ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]"
</td> ng-model="mapTypeSelected"></select></td>
</tr> </tr>
<tr> <tr>
<td><label class="col-xs-12 col-sm-2 control-label" for="device-unique-id">Unique Id (used for Hue responses)</label></td> <td><label class="col-xs-12 col-sm-2 control-label"
for="device-unique-id">Unique Id (used for Hue responses)</label></td>
<td> <td><input type="text" class="form-control"
<input type="text" class="form-control" id="device-unique-id" id="device-unique-id" ng-model="device.uniqueid"
ng-model="device.uniqueid" placeholder="AA:BB:CC:DD:EE:FF-XX" readonly> placeholder="AA:BB:CC:DD:EE:FF-XX" readonly></td>
</td>
</tr> </tr>
<tr> <tr>
<td><label class="col-xs-12 col-sm-2 control-label" for="device-map-id">Map ID</label></td> <td><label class="col-xs-12 col-sm-2 control-label"
for="device-map-id">Map ID</label></td>
<td> <td><input type="text" class="form-control" id="device-map-id"
<input type="text" class="form-control" id="device-map-id" ng-model="device.mapId" placeholder="1111"></td>
ng-model="device.mapId" placeholder="1111">
</td>
</tr> </tr>
<tr> <tr>
<td><label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On Items</label></td> <td><label class="col-xs-12 col-sm-2 control-label"
for="device-on-url">On Items</label></td>
<td> <td><scrollable-table watch="onDevices">
<scrollable-table watch="onDevices">
<table class="table table-bordered table-striped table-hover"> <table class="table table-bordered table-striped table-hover">
<thead> <thead>
<tr> <tr>
@@ -126,32 +135,33 @@
</tr> </tr>
</thead> </thead>
<tr ng-repeat="onItem in onDevices"> <tr ng-repeat="onItem in onDevices">
<td> <td><select
<select ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]" ng-model="onItem.type"></select> ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]"
</td> ng-model="onItem.type"></select></td>
<td><textarea rows="1" cols="20" class="form-control" id="item-target" <td><textarea rows="1" cols="20" class="form-control"
ng-model="onItem.item" placeholder="The Call"></textarea></td> id="item-target" ng-model="onItem.item" placeholder="The Call"></textarea></td>
<td><textarea rows="1" cols="4" class="form-control" id="item-delay" <td><textarea rows="1" cols="4" class="form-control"
ng-model="onItem.delay" placeholder="millis"></textarea></td> id="item-delay" ng-model="onItem.delay" placeholder="millis"></textarea></td>
<td><textarea rows="1" cols="2" class="form-control" id="item-count" <td><textarea rows="1" cols="2" class="form-control"
ng-model="onItem.count" placeholder="number"></textarea></td> id="item-count" ng-model="onItem.count" placeholder="number"></textarea></td>
<td><textarea rows="1" cols="16"class="form-control" id="item-filterIPs" <td><textarea rows="1" cols="16" class="form-control"
ng-model="onItem.filterIPs" placeholder="restrict IPs"></textarea></td> id="item-filterIPs" ng-model="onItem.filterIPs"
<td> placeholder="restrict IPs"></textarea></td>
<select name="item-http-verb" id="item-http-verb" ng-model="onItem.httpVerb"> <td><select name="item-http-verb" id="item-http-verb"
ng-model="onItem.httpVerb">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
<option value="GET">GET</option> <option value="GET">GET</option>
<option value="PUT">PUT</option> <option value="PUT">PUT</option>
<option value="POST">POST</option> <option value="POST">POST</option>
</select> </select></td>
</td> <td><textarea rows="1" cols="16" class="form-control"
<td><textarea rows="1" cols="16" class="form-control" id="item-httpBody" id="item-httpBody" ng-model="onItem.httpBody"
ng-model="onItem.httpBody" placeholder="body args"></textarea></td> placeholder="body args"></textarea></td>
<td><textarea rows="1" cols="16" class="form-control" id="item-httpHeaders" <td><textarea rows="1" cols="16" class="form-control"
ng-model="onItem.httpHeaders" placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea></td> id="item-httpHeaders" ng-model="onItem.httpHeaders"
<td> placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea></td>
<select name="item-content-type" id="item-content-type" <td><select name="item-content-type" id="item-content-type"
ng-model="onItem.contentType"> ng-model="onItem.contentType">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
@@ -168,38 +178,41 @@
<option value="text/plain">text/plain</option> <option value="text/plain">text/plain</option>
<option value="text/xml">text/xml</option> <option value="text/xml">text/xml</option>
<option value="*/*">*/*</option> <option value="*/*">*/*</option>
</select> </select></td>
</td>
<td><button class="btn btn-danger" type="submit" <td><button class="btn btn-danger" type="submit"
ng-click="removeItemOn(onItem)">Del</button></td> ng-click="removeItemOn(onItem)">Del</button></td>
</tr> </tr>
<tr> <tr>
<td> <td><select
<select ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]" ng-model="newOnItem.type"></select> ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]"
</td> ng-model="newOnItem.type"></select></td>
<td><textarea rows="1" cols="20" class="form-control" id="item-target" <td><textarea rows="1" cols="20" class="form-control"
ng-model="newOnItem.item" placeholder="The Call"></textarea></td> id="item-target" ng-model="newOnItem.item"
<td><textarea rows="1" cols="4" class="form-control" id="item-delay" placeholder="The Call"></textarea></td>
ng-model="newOnItem.delay" placeholder="millis"></textarea></td> <td><textarea rows="1" cols="4" class="form-control"
<td><textarea rows="1" cols="2" class="form-control" id="item-count" id="item-delay" ng-model="newOnItem.delay"
ng-model="newOnItem.count" placeholder="number"></textarea></td> placeholder="millis"></textarea></td>
<td><textarea rows="1" cols="16" class="form-control" id="item-filterIPs" <td><textarea rows="1" cols="2" class="form-control"
ng-model="newOnItem.filterIPs" placeholder="restrict IPs"></textarea></td> id="item-count" ng-model="newOnItem.count"
<td> placeholder="number"></textarea></td>
<select name="item-http-verb" id="item-http-verb" ng-model="newOnItem.httpVerb"> <td><textarea rows="1" cols="16" class="form-control"
id="item-filterIPs" ng-model="newOnItem.filterIPs"
placeholder="restrict IPs"></textarea></td>
<td><select name="item-http-verb" id="item-http-verb"
ng-model="newOnItem.httpVerb">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
<option value="GET">GET</option> <option value="GET">GET</option>
<option value="PUT">PUT</option> <option value="PUT">PUT</option>
<option value="POST">POST</option> <option value="POST">POST</option>
</select> </select></td>
</td> <td><textarea rows="1" cols="16" class="form-control"
<td><textarea rows="1" cols="16" class="form-control" id="item-httpBody" id="item-httpBody" ng-model="newOnItem.httpBody"
ng-model="newOnItem.httpBody" placeholder="body args"></textarea></td> placeholder="body args"></textarea></td>
<td><textarea rows="1" cols="16" class="form-control" id="item-httpHeaders" <td><textarea rows="1" cols="16" class="form-control"
ng-model="newOnItem.httpHeaders" placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea></td> id="item-httpHeaders" ng-model="newOnItem.httpHeaders"
<td> placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea></td>
<select name="item-content-type" id="item-content-type" <td><select name="item-content-type" id="item-content-type"
ng-model="newOnItem.contentType"> ng-model="newOnItem.contentType">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
@@ -216,20 +229,18 @@
<option value="text/plain">text/plain</option> <option value="text/plain">text/plain</option>
<option value="text/xml">text/xml</option> <option value="text/xml">text/xml</option>
<option value="*/*">*/*</option> <option value="*/*">*/*</option>
</select> </select></td>
</td>
<td><button class="btn btn-success" type="submit" <td><button class="btn btn-success" type="submit"
ng-click="addItemOn(newOnItem)">Add</button></td> ng-click="addItemOn(newOnItem)">Add</button></td>
</tr> </tr>
</table> </table>
</scrollable-table> </scrollable-table></td>
</td>
</tr> </tr>
<tr> <tr>
<td><label class="col-xs-12 col-sm-2 control-label" for="device-dim-url">Dim Items</label></td> <td><label class="col-xs-12 col-sm-2 control-label"
for="device-dim-url">Dim Items</label></td>
<td> <td><scrollable-table watch="dimDevices">
<scrollable-table watch="dimDevices">
<table class="table table-bordered table-striped table-hover"> <table class="table table-bordered table-striped table-hover">
<thead> <thead>
<tr> <tr>
@@ -246,32 +257,34 @@
</tr> </tr>
</thead> </thead>
<tr ng-repeat="dimItem in dimDevices"> <tr ng-repeat="dimItem in dimDevices">
<td> <td><select
<select ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]" ng-model="dimItem.type"></select> ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]"
</td> ng-model="dimItem.type"></select></td>
<td><textarea rows="1" cols="20" class="form-control" id="item-target" <td><textarea rows="1" cols="20" class="form-control"
ng-model="dimItem.item" placeholder="The Call"></textarea></td> id="item-target" ng-model="dimItem.item"
<td><textarea rows="1" cols="4" class="form-control" id="item-delay" placeholder="The Call"></textarea></td>
ng-model="dimItem.delay" placeholder="millis"></textarea></td> <td><textarea rows="1" cols="4" class="form-control"
<td><textarea rows="1" cols="2" class="form-control" id="item-count" id="item-delay" ng-model="dimItem.delay" placeholder="millis"></textarea></td>
ng-model="dimItem.count" placeholder="number"></textarea></td> <td><textarea rows="1" cols="2" class="form-control"
<td><textarea rows="1" cols="16" class="form-control" id="item-filterIPs" id="item-count" ng-model="dimItem.count" placeholder="number"></textarea></td>
ng-model="dimItem.filterIPs" placeholder="restrict IPs"></textarea></td> <td><textarea rows="1" cols="16" class="form-control"
<td> id="item-filterIPs" ng-model="dimItem.filterIPs"
<select name="item-http-verb" id="item-http-verb" ng-model="dimItem.httpVerb"> placeholder="restrict IPs"></textarea></td>
<td><select name="item-http-verb" id="item-http-verb"
ng-model="dimItem.httpVerb">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
<option value="GET">GET</option> <option value="GET">GET</option>
<option value="PUT">PUT</option> <option value="PUT">PUT</option>
<option value="POST">POST</option> <option value="POST">POST</option>
</select> </select></td>
</td> <td><textarea rows="1" cols="16" class="form-control"
<td><textarea rows="1" cols="16" class="form-control" id="item-httpBody" id="item-httpBody" ng-model="dimItem.httpBody"
ng-model="dimItem.httpBody" placeholder="body args"></textarea></td> placeholder="body args"></textarea></td>
<td><textarea rows="1" cols="16" class="form-control" id="item-httpHeaders" <td><textarea rows="1" cols="16" class="form-control"
ng-model="dimItem.httpHeaders" placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea></td> id="item-httpHeaders" ng-model="dimItem.httpHeaders"
<td> placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea></td>
<select name="item-content-type" id="item-content-type" <td><select name="item-content-type" id="item-content-type"
ng-model="dimItem.contentType"> ng-model="dimItem.contentType">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
@@ -288,38 +301,41 @@
<option value="text/plain">text/plain</option> <option value="text/plain">text/plain</option>
<option value="text/xml">text/xml</option> <option value="text/xml">text/xml</option>
<option value="*/*">*/*</option> <option value="*/*">*/*</option>
</select> </select></td>
</td>
<td><button class="btn btn-danger" type="submit" <td><button class="btn btn-danger" type="submit"
ng-click="removeItemDim(dimItem)">Del</button></td> ng-click="removeItemDim(dimItem)">Del</button></td>
</tr> </tr>
<tr> <tr>
<td> <td><select
<select ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]" ng-model="newDimItem.type"></select> ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]"
</td> ng-model="newDimItem.type"></select></td>
<td><textarea rows="1" cols="20" class="form-control" id="item-target" <td><textarea rows="1" cols="20" class="form-control"
ng-model="newDimItem.item" placeholder="The Call"></textarea></td> id="item-target" ng-model="newDimItem.item"
<td><textarea rows="1" cols="4" class="form-control" id="item-delay" placeholder="The Call"></textarea></td>
ng-model="newDimItem.delay" placeholder="millis"></textarea></td> <td><textarea rows="1" cols="4" class="form-control"
<td><textarea rows="1" cols="2" class="form-control" id="item-count" id="item-delay" ng-model="newDimItem.delay"
ng-model="newDimItem.count" placeholder="number"></textarea></td> placeholder="millis"></textarea></td>
<td><textarea rows="1" cols="16" class="form-control" id="item-filterIPs" <td><textarea rows="1" cols="2" class="form-control"
ng-model="newDimItem.filterIPs" placeholder="restrict IPs"></textarea></td> id="item-count" ng-model="newDimItem.count"
<td> placeholder="number"></textarea></td>
<select name="item-http-verb" id="item-http-verb" ng-model="newDimItem.httpVerb"> <td><textarea rows="1" cols="16" class="form-control"
id="item-filterIPs" ng-model="newDimItem.filterIPs"
placeholder="restrict IPs"></textarea></td>
<td><select name="item-http-verb" id="item-http-verb"
ng-model="newDimItem.httpVerb">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
<option value="GET">GET</option> <option value="GET">GET</option>
<option value="PUT">PUT</option> <option value="PUT">PUT</option>
<option value="POST">POST</option> <option value="POST">POST</option>
</select> </select></td>
</td> <td><textarea rows="1" cols="16" class="form-control"
<td><textarea rows="1" cols="16" class="form-control" id="item-httpBody" id="item-httpBody" ng-model="newDimItem.httpBody"
ng-model="newDimItem.httpBody" placeholder="body args"></textarea></td> placeholder="body args"></textarea></td>
<td><textarea rows="1" cols="16" class="form-control" id="item-httpHeaders" <td><textarea rows="1" cols="16" class="form-control"
ng-model="newDimItem.httpHeaders" placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea></td> id="item-httpHeaders" ng-model="newDimItem.httpHeaders"
<td> placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea></td>
<select name="item-content-type" id="item-content-type" <td><select name="item-content-type" id="item-content-type"
ng-model="newDimItem.contentType"> ng-model="newDimItem.contentType">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
@@ -336,20 +352,18 @@
<option value="text/plain">text/plain</option> <option value="text/plain">text/plain</option>
<option value="text/xml">text/xml</option> <option value="text/xml">text/xml</option>
<option value="*/*">*/*</option> <option value="*/*">*/*</option>
</select> </select></td>
</td>
<td><button class="btn btn-success" type="submit" <td><button class="btn btn-success" type="submit"
ng-click="addItemDim(newDimItem)">Add</button></td> ng-click="addItemDim(newDimItem)">Add</button></td>
</tr> </tr>
</table> </table>
</scrollable-table> </scrollable-table></td>
</td>
</tr> </tr>
<tr> <tr>
<td><label class="col-xs-12 col-sm-2 control-label" for="device-off-url">Off Items</label></td> <td><label class="col-xs-12 col-sm-2 control-label"
for="device-off-url">Off Items</label></td>
<td> <td><scrollable-table watch="offDevices">
<scrollable-table watch="offDevices">
<table class="table table-bordered table-striped table-hover"> <table class="table table-bordered table-striped table-hover">
<thead> <thead>
<tr> <tr>
@@ -366,32 +380,34 @@
</tr> </tr>
</thead> </thead>
<tr ng-repeat="offItem in offDevices"> <tr ng-repeat="offItem in offDevices">
<td> <td><select
<select ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]" ng-model="offItem.type"></select> ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]"
</td> ng-model="offItem.type"></select></td>
<td><textarea rows="1" cols="20" class="form-control" id="item-target" <td><textarea rows="1" cols="20" class="form-control"
ng-model="offItem.item" placeholder="The Call"></textarea></td> id="item-target" ng-model="offItem.item"
<td><textarea rows="1" cols="4" class="form-control" id="item-delay" placeholder="The Call"></textarea></td>
ng-model="offItem.delay" placeholder="millis"></textarea></td> <td><textarea rows="1" cols="4" class="form-control"
<td><textarea rows="1" cols="2" class="form-control" id="item-count" id="item-delay" ng-model="offItem.delay" placeholder="millis"></textarea></td>
ng-model="offItem.count" placeholder="number"></textarea></td> <td><textarea rows="1" cols="2" class="form-control"
<td><textarea rows="1" cols="16" class="form-control" id="item-filterIPs" id="item-count" ng-model="offItem.count" placeholder="number"></textarea></td>
ng-model="offItem.filterIPs" placeholder="restrict IPs"></textarea></td> <td><textarea rows="1" cols="16" class="form-control"
<td> id="item-filterIPs" ng-model="offItem.filterIPs"
<select name="item-http-verb" id="item-http-verb" ng-model="offItem.httpVerb"> placeholder="restrict IPs"></textarea></td>
<td><select name="item-http-verb" id="item-http-verb"
ng-model="offItem.httpVerb">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
<option value="GET">GET</option> <option value="GET">GET</option>
<option value="PUT">PUT</option> <option value="PUT">PUT</option>
<option value="POST">POST</option> <option value="POST">POST</option>
</select> </select></td>
</td> <td><textarea rows="1" cols="16" class="form-control"
<td><textarea rows="1" cols="16" class="form-control" id="item-httpBody" id="item-httpBody" ng-model="offItem.httpBody"
ng-model="offItem.httpBody" placeholder="body args"></textarea></td> placeholder="body args"></textarea></td>
<td><textarea rows="1" cols="16" class="form-control" id="item-httpHeaders" <td><textarea rows="1" cols="16" class="form-control"
ng-model="offItem.httpHeaders" placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea></td> id="item-httpHeaders" ng-model="offItem.httpHeaders"
<td> placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea></td>
<select name="item-content-type" id="item-content-type" <td><select name="item-content-type" id="item-content-type"
ng-model="offItem.contentType"> ng-model="offItem.contentType">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
@@ -408,38 +424,41 @@
<option value="text/plain">text/plain</option> <option value="text/plain">text/plain</option>
<option value="text/xml">text/xml</option> <option value="text/xml">text/xml</option>
<option value="*/*">*/*</option> <option value="*/*">*/*</option>
</select> </select></td>
</td>
<td><button class="btn btn-danger" type="submit" <td><button class="btn btn-danger" type="submit"
ng-click="removeItemOff(offItem)">Del</button></td> ng-click="removeItemOff(offItem)">Del</button></td>
</tr> </tr>
<tr> <tr>
<td> <td><select
<select ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]" ng-model="newOffItem.type"></select> ng-options="mapType as mapType[1] for mapType in bridge.mapTypes track by mapType[0]"
</td> ng-model="newOffItem.type"></select></td>
<td><textarea rows="1" cols="20" class="form-control" id="item-target" <td><textarea rows="1" cols="20" class="form-control"
ng-model="newOffItem.item" placeholder="The Call"></textarea></td> id="item-target" ng-model="newOffItem.item"
<td><textarea rows="1" cols="4" class="form-control" id="item-delay" placeholder="The Call"></textarea></td>
ng-model="newOffItem.delay" placeholder="millis"></textarea></td> <td><textarea rows="1" cols="4" class="form-control"
<td><textarea rows="1" cols="2" class="form-control" id="item-count" id="item-delay" ng-model="newOffItem.delay"
ng-model="newOffItem.count" placeholder="number"></textarea></td> placeholder="millis"></textarea></td>
<td><textarea rows="1" cols="16" class="form-control" id="item-filterIPs" <td><textarea rows="1" cols="2" class="form-control"
ng-model="newOffItem.filterIPs" placeholder="restrict IPs"></textarea></td> id="item-count" ng-model="newOffItem.count"
<td> placeholder="number"></textarea></td>
<select name="item-http-verb" id="item-http-verb" ng-model="newOffItem.httpVerb"> <td><textarea rows="1" cols="16" class="form-control"
id="item-filterIPs" ng-model="newOffItem.filterIPs"
placeholder="restrict IPs"></textarea></td>
<td><select name="item-http-verb" id="item-http-verb"
ng-model="newOffItem.httpVerb">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
<option value="GET">GET</option> <option value="GET">GET</option>
<option value="PUT">PUT</option> <option value="PUT">PUT</option>
<option value="POST">POST</option> <option value="POST">POST</option>
</select> </select></td>
</td> <td><textarea rows="1" cols="16" class="form-control"
<td><textarea rows="1" cols="16" class="form-control" id="item-httpBody" id="item-httpBody" ng-model="newOffItem.httpBody"
ng-model="newOffItem.httpBody" placeholder="body args"></textarea></td> placeholder="body args"></textarea></td>
<td><textarea rows="1" cols="16" class="form-control" id="item-httpHeaders" <td><textarea rows="1" cols="16" class="form-control"
ng-model="newOffItem.httpHeaders" placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea></td> id="item-httpHeaders" ng-model="newOffItem.httpHeaders"
<td> placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea></td>
<select name="item-content-type" id="item-content-type" <td><select name="item-content-type" id="item-content-type"
ng-model="newOffItem.contentType"> ng-model="newOffItem.contentType">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
@@ -456,21 +475,19 @@
<option value="text/plain">text/plain</option> <option value="text/plain">text/plain</option>
<option value="text/xml">text/xml</option> <option value="text/xml">text/xml</option>
<option value="*/*">*/*</option> <option value="*/*">*/*</option>
</select> </select></td>
</td>
<td><button class="btn btn-success" type="submit" <td><button class="btn btn-success" type="submit"
ng-click="addItemOff(newOffItem)">Add</button></td> ng-click="addItemOff(newOffItem)">Add</button></td>
</tr> </tr>
</table> </table>
</scrollable-table> </scrollable-table></td>
</td>
</tr> </tr>
<tr> <tr>
<td><label class="col-xs-12 col-sm-2 control-label" for="device-headers">HTTP Headers</label></td> <td><label class="col-xs-12 col-sm-2 control-label"
for="device-headers">HTTP Headers</label></td>
<td> <td><textarea rows="3" class="form-control"
<textarea rows="3" class="form-control" id="device-headers" id="device-headers" ng-model="device.headers"
ng-model="device.headers"
placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea> placeholder="format like: [{&quot;name&quot;:&quot;A name&quot;,&quot;value&quot;:&quot;a value&quot;}]"></textarea>
</td> </td>
</tr> </tr>
@@ -478,24 +495,21 @@
<td><label class="col-xs-12 col-sm-2 control-label" <td><label class="col-xs-12 col-sm-2 control-label"
for="device-http-verb">Http Verb</label></td> for="device-http-verb">Http Verb</label></td>
<td> <td><select name="device-http-verb" id="device-http-verb"
<select name="device-http-verb" id="device-http-verb"
ng-model="device.httpVerb"> ng-model="device.httpVerb">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
<option value="GET">GET</option> <option value="GET">GET</option>
<option value="PUT">PUT</option> <option value="PUT">PUT</option>
<option value="POST">POST</option> <option value="POST">POST</option>
</select> </select></td>
</td>
</tr> </tr>
<tr> <tr>
<td><label class="col-xs-12 col-sm-2 control-label" <td><label class="col-xs-12 col-sm-2 control-label"
for="device-content-type">Content Type</label></td> for="device-content-type">Content Type</label></td>
<td> <td><select name="device-content-type"
<select name="device-content-type" id="device-content-type" id="device-content-type" ng-model="device.contentType">
ng-model="device.contentType">
<option value="">---Please select---</option> <option value="">---Please select---</option>
<!-- not selected / blank option --> <!-- not selected / blank option -->
<option value="application/atom+xml">application/atom+xml</option> <option value="application/atom+xml">application/atom+xml</option>
@@ -511,16 +525,14 @@
<option value="text/plain">text/plain</option> <option value="text/plain">text/plain</option>
<option value="text/xml">text/xml</option> <option value="text/xml">text/xml</option>
<option value="*/*">*/*</option> <option value="*/*">*/*</option>
</select> </select></td>
</td>
</tr> </tr>
<tr> <tr>
<td><label class="col-xs-12 col-sm-2 control-label" <td><label class="col-xs-12 col-sm-2 control-label"
for="device-content-body">Content Body On</label></td> for="device-content-body">Content Body On</label></td>
<td> <td><textarea rows="3" class="form-control"
<textarea rows="3" class="form-control" id="device-content-body" id="device-content-body" ng-model="device.contentBody"
ng-model="device.contentBody"
placeholder="Content Body On for specific GET/PUT/POST type"></textarea> placeholder="Content Body On for specific GET/PUT/POST type"></textarea>
</td> </td>
</tr> </tr>
@@ -528,9 +540,8 @@
<td><label class="col-xs-12 col-sm-2 control-label" <td><label class="col-xs-12 col-sm-2 control-label"
for="device-content-body-dim">Content Body Dim</label></td> for="device-content-body-dim">Content Body Dim</label></td>
<td> <td><textarea rows="3" class="form-control"
<textarea rows="3" class="form-control" id="device-content-body-dim" id="device-content-body-dim" ng-model="device.contentBodyDim"
ng-model="device.contentBodyDim"
placeholder="Content Body Dim for specific GET/PUT/POST type"></textarea> placeholder="Content Body Dim for specific GET/PUT/POST type"></textarea>
</td> </td>
</tr> </tr>
@@ -538,8 +549,7 @@
<td><label class="col-xs-12 col-sm-2 control-label" <td><label class="col-xs-12 col-sm-2 control-label"
for="device-content-body-off">Content Body Off</label></td> for="device-content-body-off">Content Body Off</label></td>
<td> <td><textarea rows="3" class="form-control"
<textarea rows="3" class="form-control"
id="device-content-body-off" ng-model="device.contentBodyOff" id="device-content-body-off" ng-model="device.contentBodyOff"
placeholder="Content Body Off for specific GET/PUT/POST type"></textarea> placeholder="Content Body Off for specific GET/PUT/POST type"></textarea>
</td> </td>

View File

@@ -17,8 +17,7 @@
href="#/haldevices">HAL Devices</a></li> href="#/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation" class="active"><a href="#/editor">Manual <li role="presentation" class="active"><a href="#/editdevice">Add/Edit</a></li>
Add</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -16,7 +16,7 @@
Devices</a></li> Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li role="presentation"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -17,7 +17,7 @@
href="#/haldevices">HAL Devices</a></li> href="#/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li role="presentation"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -17,7 +17,7 @@
href="#/haldevices">HAL Devices</a></li> href="#/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li role="presentation"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -17,7 +17,7 @@
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
<li role="presentation" class="active"><a href="#/hassdevices">HomeAssistant <li role="presentation" class="active"><a href="#/hassdevices">HomeAssistant
Devices</a></li> Devices</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li role="presentation"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -17,7 +17,7 @@
href="#/haldevices">HAL Devices</a></li> href="#/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li role="presentation"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -17,7 +17,7 @@
href="#/haldevices">HAL Devices</a></li> href="#/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li role="presentation"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -11,7 +11,7 @@
<li ng-if="bridge.showHal" role="presentation"><a href="#/haldevices">HAL Devices</a></li> <li ng-if="bridge.showHal" role="presentation"><a href="#/haldevices">HAL Devices</a></li>
<li role="presentation" class="active"><a href="#/mqttmessages">MQTT Messages</a></li> <li role="presentation" class="active"><a href="#/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li role="presentation"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -17,7 +17,7 @@
href="#/haldevices">HAL Devices</a></li> href="#/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li role="presentation"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -18,7 +18,7 @@
href="#/haldevices">HAL Devices</a></li> href="#/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li role="presentation"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -16,7 +16,7 @@
href="#/haldevices">HAL Devices</a></li> href="#/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li role="presentation"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -16,7 +16,7 @@
href="#/haldevices">HAL Devices</a></li> href="#/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation"><a href="#/editor">Manual Add</a></li> <li role="presentation"><a href="#/editdevice">Add/Edit</a></li>
</ul> </ul>
<div class="panel panel-default"> <div class="panel panel-default">