From 4a80ce423051fcae3ee946437c89202eae3a99ff Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 13 Aug 2015 16:29:01 -0500 Subject: [PATCH] Add view setup for angular and pages. --- README.md | 2 +- src/main/resources/public/index.html | 281 +----------------- .../resources/public/js/angular-route.min.js | 15 + src/main/resources/public/scripts/app.js | 44 ++- .../resources/public/views/configuration.html | 101 +++++++ src/main/resources/public/views/editor.html | 163 ++++++++++ 6 files changed, 328 insertions(+), 278 deletions(-) create mode 100644 src/main/resources/public/js/angular-route.min.js create mode 100644 src/main/resources/public/views/configuration.html create mode 100644 src/main/resources/public/views/editor.html diff --git a/README.md b/README.md index b42bcc4..aac6a39 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Then locate the jar and start the server with: ``` java -jar -Dvera.address=192.168.X.Y ha-bridge-0.X.Y.jar ``` -The argument for the vera address should be given as it the system does nto have a way to find the address. Suppply -Dvera.address=X.Y.Z.A on the command line to provide it. +The argument for the vera address should be given as it the system does not have a way to find the address. Supply -Dvera.address=X.Y.Z.A on the command line to provide it. The server defaults to the first available address on the host. Replace the -Dupnp.config.address= value with the server ipv4 address you would like to use. diff --git a/src/main/resources/public/index.html b/src/main/resources/public/index.html index 3c69223..c5af882 100644 --- a/src/main/resources/public/index.html +++ b/src/main/resources/public/index.html @@ -1,5 +1,5 @@ - + @@ -17,22 +17,16 @@ - - - - - - + -
-
+
+ + +
- -
-

Bridge settings

-
- -
-
- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingValue
upnp.config.address{{bridge.upnpconfigaddress}}
server.port{{bridge.serverport}}
upnp.devices.db{{bridge.upnpdevicedb}}
upnp.response.port{{bridge.upnpresponseport}}
vera.address{{bridge.veraaddress}}
-
-
- -
- -
- -
-

Current devices

- - - - - - - - - - - - - - - -
IDNameTypeActions
{{device.id}}{{device.name}}{{device.deviceType}} - - - - -
-
- -
- -
-
-

Vera Device List

-
-
    -
  • -

    You can select a Vera device and - generate the add device box selections automatically.

    - - - - - - - - - - - - - - - - - - -
    NameIdCategoryRoomActions
    {{veradevice.name}}{{veradevice.id}}{{veradevice.category}}{{veradevice.room}} - -
    -
  • -
-
-
-
-

Vera Scene List

-
-
    -
  • -

    You can select a Vera scene and - generate the add device box selections automatically.

    - - - - - - - - - - - - - - - - -
    NameIdRoomActions
    {{verascene.name}}{{verascene.id}}{{verascene.room}} - -
    -
  • -
-
-
-
-

Generate a new device

-
-
    -
  • -

    You can generate on/off URLs by filling in the Vera server URL, port, and - device ID; or you can fill them out manually in the lower section.

    - -
    -
    - - -
    - -
    - -
    -
    - - -
    - -
    - - - -
    - -
    - -
    -
    -
  • -
-
-
-
-

Add a new device

-
-
    -
  • -
    -
    - - -
    - -
    - -
    -
    - - -
    - -
    - -
    -
    - - -
    - -
    - -
    -
    -
  • -
-
-
-
-
+ + + + + \ No newline at end of file diff --git a/src/main/resources/public/js/angular-route.min.js b/src/main/resources/public/js/angular-route.min.js new file mode 100644 index 0000000..4634fdb --- /dev/null +++ b/src/main/resources/public/js/angular-route.min.js @@ -0,0 +1,15 @@ +/* + AngularJS v1.4.3 + (c) 2010-2015 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(p,c,C){'use strict';function v(r,h,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,d,y){function z(){k&&(g.cancel(k),k=null);l&&(l.$destroy(),l=null);m&&(k=g.leave(m),k.then(function(){k=null}),m=null)}function x(){var b=r.current&&r.current.locals;if(c.isDefined(b&&b.$template)){var b=a.$new(),d=r.current;m=y(b,function(b){g.enter(b,null,m||f).then(function(){!c.isDefined(t)||t&&!a.$eval(t)||h()});z()});l=d.scope=b;l.$emit("$viewContentLoaded"); +l.$eval(w)}else z()}var l,m,k,t=b.autoscroll,w=b.onload||"";a.$on("$routeChangeSuccess",x);x()}}}function A(c,h,g){return{restrict:"ECA",priority:-400,link:function(a,f){var b=g.current,d=b.locals;f.html(d.$template);var y=c(f.contents());b.controller&&(d.$scope=a,d=h(b.controller,d),b.controllerAs&&(a[b.controllerAs]=d),f.data("$ngControllerController",d),f.children().data("$ngControllerController",d));y(a)}}}p=c.module("ngRoute",["ng"]).provider("$route",function(){function r(a,f){return c.extend(Object.create(a), +f)}function h(a,c){var b=c.caseInsensitiveMatch,d={originalPath:a,regexp:a},g=d.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,c,b,d){a="?"===d?d:null;d="*"===d?d:null;g.push({name:b,optional:!!a});c=c||"";return""+(a?"":c)+"(?:"+(a?c:"")+(d&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");d.regexp=new RegExp("^"+a+"$",b?"i":"");return d}var g={};this.when=function(a,f){var b=c.copy(f);c.isUndefined(b.reloadOnSearch)&&(b.reloadOnSearch=!0); +c.isUndefined(b.caseInsensitiveMatch)&&(b.caseInsensitiveMatch=this.caseInsensitiveMatch);g[a]=c.extend(b,a&&h(a,b));if(a){var d="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";g[d]=c.extend({redirectTo:a},h(d,b))}return this};this.caseInsensitiveMatch=!1;this.otherwise=function(a){"string"===typeof a&&(a={redirectTo:a});this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(a,f,b,d,h,p,x){function l(b){var e=s.current; +(v=(n=k())&&e&&n.$$route===e.$$route&&c.equals(n.pathParams,e.pathParams)&&!n.reloadOnSearch&&!w)||!e&&!n||a.$broadcast("$routeChangeStart",n,e).defaultPrevented&&b&&b.preventDefault()}function m(){var u=s.current,e=n;if(v)u.params=e.params,c.copy(u.params,b),a.$broadcast("$routeUpdate",u);else if(e||u)w=!1,(s.current=e)&&e.redirectTo&&(c.isString(e.redirectTo)?f.path(t(e.redirectTo,e.params)).search(e.params).replace():f.url(e.redirectTo(e.pathParams,f.path(),f.search())).replace()),d.when(e).then(function(){if(e){var a= +c.extend({},e.resolve),b,f;c.forEach(a,function(b,e){a[e]=c.isString(b)?h.get(b):h.invoke(b,null,null,e)});c.isDefined(b=e.template)?c.isFunction(b)&&(b=b(e.params)):c.isDefined(f=e.templateUrl)&&(c.isFunction(f)&&(f=f(e.params)),c.isDefined(f)&&(e.loadedTemplateUrl=x.valueOf(f),b=p(f)));c.isDefined(b)&&(a.$template=b);return d.all(a)}}).then(function(f){e==s.current&&(e&&(e.locals=f,c.copy(e.params,b)),a.$broadcast("$routeChangeSuccess",e,u))},function(b){e==s.current&&a.$broadcast("$routeChangeError", +e,u,b)})}function k(){var a,b;c.forEach(g,function(d,g){var q;if(q=!b){var h=f.path();q=d.keys;var l={};if(d.regexp)if(h=d.regexp.exec(h)){for(var k=1,m=h.length;kConfiguration Editor + + +
+
+

Bridge settings

+
+
+ +
+
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
SettingValue
upnp.config.address{{bridge.upnpconfigaddress}}
server.port{{bridge.serverport}}
upnp.devices.db{{bridge.upnpdevicedb}}
upnp.response.port{{bridge.upnpresponseport}}
vera.address{{bridge.veraaddress}}
+
+
+ +
+ +
+ +
+
+

Current devices

+
+ + + + + + + + + + + + + + + +
IDNameTypeActions
{{device.id}}{{device.name}}{{device.deviceType}} + + + + +
+
\ No newline at end of file diff --git a/src/main/resources/public/views/editor.html b/src/main/resources/public/views/editor.html new file mode 100644 index 0000000..6547063 --- /dev/null +++ b/src/main/resources/public/views/editor.html @@ -0,0 +1,163 @@ +

+ Editor + Configuration +

+ +
+
+

Vera Device List

+
+
    +
  • +

    You can select a Vera device and generate + the add device box selections automatically.

    + + + + + + + + + + + + + + + + + + +
    NameIdCategoryRoomActions
    {{veradevice.name}}{{veradevice.id}}{{veradevice.category}}{{veradevice.room}} + +
    +
  • +
+
+
+
+

Vera Scene List

+
+
    +
  • +

    You can select a Vera scene and generate + the add device box selections automatically.

    + + + + + + + + + + + + + + + + +
    NameIdRoomActions
    {{verascene.name}}{{verascene.id}}{{verascene.room}} + +
    +
  • +
+
+
+
+

Generate a new device

+
+
    +
  • +

    You can generate on/off URLs by filling in + the Vera server URL, port, and device ID; or you can fill them out + manually in the lower section.

    + +
    +
    + + +
    + +
    + +
    +
    + + +
    + +
    + + + +
    + +
    + +
    +
    +
  • +
+
+
+
+

Add a new device

+
+
    +
  • +
    +
    + + +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
  • +
+