From 754851249b5722222a84e5a821f6edea095e72e7 Mon Sep 17 00:00:00 2001 From: Steven Saunders Date: Wed, 16 Dec 2015 14:31:40 -0700 Subject: make create, delete, get work with new topology based REST calls Change-Id: Iad6fa28971ad61003d34ed38ab2e2d8647dc31bd Signed-off-by: Steven Saunders --- demo-ui/app/config.json | 20 +++++--------------- demo-ui/app/controllers/MefController.js | 6 +++--- demo-ui/app/services/mefServices.js | 4 ++-- demo-ui/app/views/css/vcpe.css | 12 ++++++------ demo-ui/app/views/mef-panel.html | 32 ++++++++++++++++---------------- 5 files changed, 32 insertions(+), 42 deletions(-) (limited to 'demo-ui/app') diff --git a/demo-ui/app/config.json b/demo-ui/app/config.json index 56c74c6..05e2f47 100644 --- a/demo-ui/app/config.json +++ b/demo-ui/app/config.json @@ -9,24 +9,14 @@ "uniList" : [ { - "ip" : "10.1.1.11", - "mac" : "00:11:11:11:11:11", - "address" : "Denver" + "ip" : "10.36.0.21", + "mac" : "00:21:21:21:21:21", + "address" : "pi-left" }, { - "ip" : "10.1.1.12", + "ip" : "10.36.0.22", "mac" : "00:22:22:22:22:22", - "address" : "Paris" - }, - { - "ip" : "10.1.1.13", - "mac" : "00:33:33:33:33:33", - "address" : "Tokyo" - }, - { - "ip" : "10.1.1.14", - "mac" : "00:44:44:44:44:44", - "address" : "Quebec" + "address" : "pi-right" } ] } \ No newline at end of file diff --git a/demo-ui/app/controllers/MefController.js b/demo-ui/app/controllers/MefController.js index 9d89589..fd615de 100644 --- a/demo-ui/app/controllers/MefController.js +++ b/demo-ui/app/controllers/MefController.js @@ -31,11 +31,11 @@ var MefController = function($scope, $log, mefServices, model, dbg ) { $scope.uniToSpeedString = function(uni) { if (uni) { - speed = uni.uni[0].speed; - return Object.getOwnPropertyNames(speed)[0];s + speed = uni.node[0]["cl-unimgr-mef:speed"]; + return Object.getOwnPropertyNames(speed)[0]; } else - return ""; + return "error: no uni supplied"; } // // HTTP Response Handlers diff --git a/demo-ui/app/services/mefServices.js b/demo-ui/app/services/mefServices.js index 0ecfb6a..6bbe8e3 100644 --- a/demo-ui/app/services/mefServices.js +++ b/demo-ui/app/services/mefServices.js @@ -14,10 +14,10 @@ var _evcBasePath = "/evcmgr/webapi/evc" var _evcUrl = "unset"; - var _uniBasePath = "/restconf/operational/cl-vcpe-mef:unis/uni" + var _uniBasePath = "/restconf/config/network-topology:network-topology/topology/unimgr:uni/node" var _uniUrl = "unset"; - var _evcPathBasePath = "/restconf/operational/cl-vcpe-mef:evcs" + var _evcPathBasePath = "/restconf/config/network-topology:network-topology/topology/unimgr:evc/link" var _evcPathUrl = "unset"; // diff --git a/demo-ui/app/views/css/vcpe.css b/demo-ui/app/views/css/vcpe.css index 0d08734..4e81462 100644 --- a/demo-ui/app/views/css/vcpe.css +++ b/demo-ui/app/views/css/vcpe.css @@ -26,7 +26,7 @@ input[type='number'] { background-color: none; } .selected-item-idle { - background-color: #e3e3e3; + background-color: #E3E3E3; } .selected-item-delete { background-color: #FFE4E1; @@ -36,7 +36,7 @@ input[type='number'] { } .primary-container { border: 3px solid black; - background-color: #e3e3e3; + background-color: #E3E3E3; border-radius: 15px; padding: 10px; height: 400px; @@ -169,7 +169,7 @@ input[type='number'] { } .frame .content .action-container .cos-container { border: 3px solid black; - background-color: #e3e3e3; + background-color: #E3E3E3; border-radius: 15px; padding: 10px; height: 400px; @@ -206,7 +206,7 @@ input[type='number'] { } .frame .content .action-container .epl-container { border: 3px solid black; - background-color: #e3e3e3; + background-color: #E3E3E3; border-radius: 15px; padding: 10px; height: 400px; @@ -243,7 +243,7 @@ input[type='number'] { } .frame .content .monitor-container .mef-container { border: 3px solid black; - background-color: #e3e3e3; + background-color: #E3E3E3; border-radius: 15px; padding: 10px; height: 400px; @@ -266,7 +266,7 @@ input[type='number'] { font-size: small; font-weight: bold; text-align: center; - background-color: #e3e3e3; + background-color: #E3E3E3; } .frame .content .monitor-container .mef-container .mef-data-label { color: purple; diff --git a/demo-ui/app/views/mef-panel.html b/demo-ui/app/views/mef-panel.html index df9f60b..9a88e88 100644 --- a/demo-ui/app/views/mef-panel.html +++ b/demo-ui/app/views/mef-panel.html @@ -27,7 +27,7 @@ To Do
Uni ID:
- {{ currentEvcUnis[0].uni[0]["id"] }} + {{ currentEvcUnis[0].node[0]["node-id"] }}
@@ -36,7 +36,7 @@ To Do
IP Address:
- {{ currentEvcUnis[0].uni[0]["ip-address"] }} + {{ currentEvcUnis[0].node[0]["cl-unimgr-mef:ip-address"] }}
@@ -45,7 +45,7 @@ To Do
MAC Address:
- {{ currentEvcUnis[0].uni[0]["mac-address"] }} + {{ currentEvcUnis[0].node[0]["cl-unimgr-mef:mac-address"] }}
@@ -63,7 +63,7 @@ To Do
Mac Layer:
- {{ currentEvcUnis[0].uni[0]["mac-layer"] }} + {{ currentEvcUnis[0].node[0]["cl-unimgr-mef:mac-layer"] }}
@@ -72,7 +72,7 @@ To Do
Phys Medium:
- {{ currentEvcUnis[0].uni[0]["physical-medium"] }} + {{ currentEvcUnis[0].node[0]["cl-unimgr-mef:physical-medium"] }}
@@ -81,7 +81,7 @@ To Do
MTU Size:
- {{ currentEvcUnis[0].uni[0]["mtu-size"] }} + {{ currentEvcUnis[0].node[0]["cl-unimgr-mef:mtu-size"] }}
@@ -90,7 +90,7 @@ To Do
Mode:
- {{ currentEvcUnis[0].uni[0]["mode"] }} + {{ currentEvcUnis[0].node[0]["cl-unimgr-mef:mode"] }}
@@ -99,7 +99,7 @@ To Do
Type:
- {{ currentEvcUnis[0].uni[0]["type"] }} + {{ currentEvcUnis[0].node[0]["cl-unimgr-mef:type"] }}
@@ -289,7 +289,7 @@ To Do
Uni ID:
- {{ currentEvcUnis[1].uni[0]["id"] }} + {{ currentEvcUnis[1].node[0]["node-id"] }}
@@ -298,7 +298,7 @@ To Do
IP Address:
- {{ currentEvcUnis[1].uni[0]["ip-address"] }} + {{ currentEvcUnis[1].node[0]["cl-unimgr-mef:ip-address"] }}
@@ -307,7 +307,7 @@ To Do
MAC Address:
- {{ currentEvcUnis[1].uni[0]["mac-address"] }} + {{ currentEvcUnis[1].node[0]["cl-unimgr-mef:mac-address"] }}
@@ -325,7 +325,7 @@ To Do
Mac Layer:
- {{ currentEvcUnis[1].uni[0]["mac-layer"] }} + {{ currentEvcUnis[1].node[0]["cl-unimgr-mef:mac-layer"] }}
@@ -334,7 +334,7 @@ To Do
Phys Medium:
- {{ currentEvcUnis[1].uni[0]["physical-medium"] }} + {{ currentEvcUnis[1].node[0]["cl-unimgr-mef:physical-medium"] }}
@@ -343,7 +343,7 @@ To Do
MTU Size:
- {{ currentEvcUnis[0].uni[0]["mtu-size"] }} + {{ currentEvcUnis[1].node[0]["cl-unimgr-mef:mtu-size"] }}
@@ -352,7 +352,7 @@ To Do
Mode:
- {{ currentEvcUnis[1].uni[0]["mode"] }} + {{ currentEvcUnis[1].node[0]["cl-unimgr-mef:mode"] }}
@@ -361,7 +361,7 @@ To Do
Type:
- {{ currentEvcUnis[1].uni[0]["type"] }} + {{ currentEvcUnis[1].node[0]["cl-unimgr-mef:type"] }}
-- cgit 1.2.3-korg