From 010260429ea62d1481bb0daab0d03fb7a7921630 Mon Sep 17 00:00:00 2001 From: Admin Date: Fri, 6 Jan 2017 17:13:37 -0600 Subject: [PATCH] New edit device in testing --- pom.xml | 2 +- src/main/resources/public/scripts/app.js | 72 ++- .../resources/public/views/editdevice.html | 519 +++++++++++++----- 3 files changed, 458 insertions(+), 135 deletions(-) diff --git a/pom.xml b/pom.xml index 1eec431..093c65b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.bwssystems.HABridge ha-bridge - 4beta2.6 + 4beta2.7 jar HA Bridge diff --git a/src/main/resources/public/scripts/app.js b/src/main/resources/public/scripts/app.js index d7ce81d..f7ecc83 100644 --- a/src/main/resources/public/scripts/app.js +++ b/src/main/resources/public/scripts/app.js @@ -408,6 +408,20 @@ app.service ('bridgeService', function ($http, $window, ngToast) { return newDevices } + this.updateCallObjectsType = function (theDevices) { + var i, s, type, len = theDevices.length + for (i=0; i= 0; i--) { + if($scope.onDevices[i].item === anItem.item && $scope.onDevices[i].type === anItem.type) { + $scope.onDevices.splice(i, 1); + } + } + }; + $scope.addItemDim = function (anItem) { + if (anItem.item === null || anItem.item === "") + return; + var newitem = { item: anItem.item, type: anItem.type, delay: anItem.delay, count: anItem.count, filterIPs: anItem.filterIPs, httpVerb: anItem.httpVerb, httpBody: anItem.httpBody, httpHeaders: anItem.httpHeaders, contentType: anItem.contentType }; + $scope.dimDevices.push(newitem); + $scope.newDimItem = []; + }; + $scope.removeItemDim = function (anItem) { + for(var i = $scope.dimDevices.length - 1; i >= 0; i--) { + if($scope.dimDevices[i].item === anItem.item && $scope.dimDevices[i].type === anItem.type) { + $scope.dimDevices.splice(i, 1); + } + } + }; + + $scope.addItemOff = function (anItem) { + if (anItem.item === null || anItem.item === "") + return; + var newitem = { item: anItem.item, type: anItem.type, delay: anItem.delay, count: anItem.count, filterIPs: anItem.filterIPs, httpVerb: anItem.httpVerb, httpBody: anItem.httpBody, httpHeaders: anItem.httpHeaders, contentType: anItem.contentType }; + $scope.offDevices.push(newitem); + $scope.newOffItem = []; + }; + $scope.removeItemOff = function (anItem) { + for(var i = $scope.offDevices.length - 1; i >= 0; i--) { + if($scope.offDevices[i].item === anItem.item && $scope.offDevices[i].type === anItem.type) { + $scope.offDevices.splice(i, 1); + } + } + }; }); app.filter('availableHarmonyActivityId', function(bridgeService) { diff --git a/src/main/resources/public/views/editdevice.html b/src/main/resources/public/views/editdevice.html index 2fde780..6ea8b00 100644 --- a/src/main/resources/public/views/editdevice.html +++ b/src/main/resources/public/views/editdevice.html @@ -33,32 +33,35 @@ point device.

When copying, update the name and select the "Add Bridge Device" Button.

- -
-
- -
+ +

+ + + +

+ + + + + + + + + -
+
+ + + -
+
+ + + -
+
+ + + -
+
+ + + -
+
+ + + -
+
+ + + -
- -
- - -
-
- +
+ + + -
- -
- - -
-
- +
+ + + -
+
+ + + -
+
+ + + -
+
+ + + -
+
+ + + -
+
+ + + -
+
+ +
- - - -
- +
- - - -
-
- +
- - - -
-
- +
- - - - -
- +
- - -
- +
- - -
-
- +
@@ -124,22 +122,23 @@ + - + - - - - + + + + - - + + + + + + + + + + + + + + +
Http Body Http Headers Content TypeManage
- + - @@ -147,13 +146,13 @@
+ + + + + +
- - - -
-
- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeTarget ItemDelayCountFilter IPsHttp VerbHttp BodyHttp HeadersContent TypeManage
+ + + + + +
+ + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeTarget ItemDelayCountFilter IPsHttp VerbHttp BodyHttp HeadersContent TypeManage
+ + + + + +
+ + + + + +
+
+
- - - -
-
- +
- - - -
-
- +
- - - -
-
- +
- -
- - -
-
- +
- -
- - -
-
- +
- -
- - +
+
\ No newline at end of file