summaryrefslogtreecommitdiffstats
path: root/ccsdk-app-overlay/src/main/webapp/app
diff options
context:
space:
mode:
authorKotagiri, Ramprasad (rp5662) <rp5662@att.com>2019-03-21 17:37:42 -0400
committerKotagiri, Ramprasad (rp5662) <rp5662@att.com>2019-03-21 18:19:12 -0400
commitf4231f30d53e192e15906245a8dd0e6ef42198e1 (patch)
tree34ae86589199c2b1056efb5b2049011d5b65fd75 /ccsdk-app-overlay/src/main/webapp/app
parentb46d863e9e5db30291034e8740291c70875f1f5f (diff)
Java unit test code
This change contains the following: 1) Added Junit classes for java unit testing and code coverage 2) Refactored code to use Spring autowiring of service class instances 3) Updated icons to match the available font icons library 4) Added back ccsdk-app-os module in the parent POM Change-Id: I545202357eb1c8257ee29e0f5a02aa37991b2673 Issue-ID: CCSDK-1011 Signed-off-by: ramprasad kotagiri <rp5662@att.com>
Diffstat (limited to 'ccsdk-app-overlay/src/main/webapp/app')
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter-health-service.js23
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter-table-controller.js21
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter_table.html2
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-health-service.js56
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-services-controller.js31
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-table-controller.js70
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node_popups.html5
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node_table.html17
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service-controllers.js87
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service-health-service.js51
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service_health_table.html40
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service_popups.html14
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/executions-view-controller.js402
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_blueprint_table.html32
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_deployment_table.html24
-rw-r--r--ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_execution_popups.html4
16 files changed, 238 insertions, 641 deletions
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter-health-service.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter-health-service.js
index 64618c1..20fe6d3 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter-health-service.js
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter-health-service.js
@@ -1,24 +1,3 @@
-/*******************************************************************************
- * =============LICENSE_START=========================================================
- *
- * =================================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *******************************************************************************/
appDS2.factory('DatacenterHealthService', function ($http, $q, $log) {
return {
/**
@@ -45,7 +24,7 @@ appDS2.factory('DatacenterHealthService', function ($http, $q, $log) {
$log.error('DatacenterService.getDatacentersHealth failed: ' + JSON.stringify(error));
return $q.reject(error.statusText);
});
- }
+ },
};
});
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter-table-controller.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter-table-controller.js
index f1c8820..9ac13c2 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter-table-controller.js
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter-table-controller.js
@@ -1,24 +1,3 @@
-/*******************************************************************************
- * =============LICENSE_START=========================================================
- *
- * =================================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *******************************************************************************/
appDS2.controller('datacenterTableController', function($scope, $log, $modal, DatacenterHealthService) {
'use strict';
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter_table.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter_table.html
index 73a1b82..cb8e95a 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter_table.html
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/datacenter_table.html
@@ -5,7 +5,7 @@
<!-- show progress indicator -->
<div ng-show="ecdapp.isDataLoading">
<div class="span" style="margin-bottom:20px;">
- <i class="icon-primary-spinner small" role="img" aria-label="Please wait while the content loads"></i>
+ <i class="icon-spinner small" role="img" aria-label="Please wait while the content loads"></i>
Please wait while the content loads.
</div>
</div>
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-health-service.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-health-service.js
index 18fc30b..ae1dbb5 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-health-service.js
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-health-service.js
@@ -1,36 +1,38 @@
-/*******************************************************************************
- * =============LICENSE_START=========================================================
- *
- * =================================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *******************************************************************************/
appDS2.factory('NodeHealthService', function ($http, $q, $log) {
return {
/**
+ * Get all the datacenter names
+ */
+ getDatacentersHealth: function(pageNum,viewPerPage) {
+ // cache control for IE
+ var cc = "&cc=" + new Date().getTime().toString();
+ return $http({
+ method: 'GET',
+ url: 'healthservices/datacenters',
+ cache: false,
+ responseType: 'json'
+ }).then(function(response) {
+ if (response.data == null || typeof response.data != 'object')
+ return $q.reject('DatacentersService.getDatacentersHealth: response.data null or not object');
+ else
+ return response.data;
+ },
+ function(error) {
+ $log.error('DatacenterService.getDatacentersHealth failed: ' + JSON.stringify(error));
+ return $q.reject(error.statusText);
+ });
+ },
+ /**
* Gets one page of objects.
* @param {Number} pageNum - page number; e.g., 1
* @param {Number} viewPerPage - number of items per page; e.g., 25
* @return {JSON} Response object from remote side
*/
- getNodesHealth: function(pageNum,viewPerPage) {
+ getNodesHealth: function(pageNum,viewPerPage, dc) {
// cache control for IE
let cc = "&cc=" + new Date().getTime().toString();
- let url = 'healthservices/nodes?pageNum=' + pageNum + '&viewPerPage=' + viewPerPage + cc;
+ let url = 'healthservices/nodes?pageNum=' + pageNum + '&viewPerPage=' + viewPerPage +
+ '&dc=' + dc +cc;
return $http({
method: 'GET',
url: url,
@@ -53,10 +55,8 @@ appDS2.factory('NodeHealthService', function ($http, $q, $log) {
* @param {nodeName} node name (not the UUID)
* @return {JSON} Response object from remote side
*/
- getNodeServicesHealth: function(nodeName) {
- // cache control for IE
- let cc = "?cc=" + new Date().getTime().toString();
- let url = 'healthservices/nodes/' + nodeName + cc;
+ getNodeServicesHealth: function(nodeName, dc) {
+ let url = 'healthservices/nodes/' + nodeName + '?dc=' + dc;
return $http({
method: 'GET',
url: url,
@@ -72,7 +72,7 @@ appDS2.factory('NodeHealthService', function ($http, $q, $log) {
$log.error('serviceHealthService.getNodeServicesHealth failed: ' + JSON.stringify(error));
return $q.reject(error.statusText);
});
- }
+ },
};
});
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-services-controller.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-services-controller.js
index b82ba40..f0820be 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-services-controller.js
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-services-controller.js
@@ -1,24 +1,3 @@
-/*******************************************************************************
- * =============LICENSE_START=========================================================
- *
- * =================================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *******************************************************************************/
appDS2.controller('nodeServicesCtrl', function($scope, $log, message, NodeHealthService) {
'use strict';
@@ -32,15 +11,16 @@ appDS2.controller('nodeServicesCtrl', function($scope, $log, message, NodeHealth
// this object holds all app data and functions
$scope.ecdapp = {};
$scope.ecdapp.label = 'Services on Node ' + message.node;
-
+ $scope.ecdapp.activeImg = "static/fusion/images/active.png";
+ $scope.ecdapp.inactiveImg = "static/fusion/images/inactive.png";
/**
* Loads the table of services for the specified node.
*/
- $scope.ecdapp.loadTable = function(nodeName) {
+ $scope.ecdapp.loadTable = function(nodeName, dc) {
$scope.ecdapp.isDataLoading = true;
if (debug)
$log.debug('nodeServicesCtrl: loading data for ' + nodeName);
- NodeHealthService.getNodeServicesHealth(nodeName).then(
+ NodeHealthService.getNodeServicesHealth(nodeName, dc).then(
function(jsonObj) {
if (debug)
$log.debug('nodeServicesCtrl: response is ' + JSON.stringify(jsonObj));
@@ -72,6 +52,7 @@ appDS2.controller('nodeServicesCtrl', function($scope, $log, message, NodeHealth
// Show services for the requested node
if (debug)
$log.debug('nodeServicesCtrl: requesting services for node ' + message.node);
- $scope.ecdapp.loadTable(message.node);
+ $scope.ecdapp.loadTable(message.node, message.dc);
+
});
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-table-controller.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-table-controller.js
index 61ececb..992caeb 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-table-controller.js
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node-table-controller.js
@@ -1,24 +1,3 @@
-/*******************************************************************************
- * =============LICENSE_START=========================================================
- *
- * =================================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *******************************************************************************/
appDS2.controller('nodeTableController', function($scope, $log, $modal, NodeHealthService) {
'use strict';
@@ -31,9 +10,42 @@ appDS2.controller('nodeTableController', function($scope, $log, $modal, NodeHeal
$scope.ecdapp.viewPerPage = 10;
// other
$scope.ecdapp.errMsg = null;
- $scope.ecdapp.isDataLoading = true;
+ $scope.ecdapp.isDataLoading = false;
$scope.ecdapp.isRequestFailed = false;
+ $scope.ecdapp.isDcLoaded = false;
+ $scope.ecdapp.activeImg = "static/fusion/images/active.png";
+ $scope.ecdapp.inactiveImg = "static/fusion/images/inactive.png";
+ $scope.ecdapp.datacenter = "";
+ $scope.ecdapp.datacenters = [];
+ var getDataCenters = function() {
+ NodeHealthService.getDatacentersHealth().then(
+ function(jsonObj) {
+ if (jsonObj.error) {
+ $log.error("datacentersController.loadTable failed: "
+ + jsonObj.error);
+ $scope.ecdapp.isRequestFailed = true;
+ $scope.ecdapp.errMsg = jsonObj.error;
+ $scope.ecdapp.tableData = [];
+ } else {
+ // $log.debug("datacentersController.loadTable
+ // succeeded, size " + jsonObj.data.length);
+ $scope.ecdapp.errMsg = null;
+ $scope.ecdapp.datacenters = jsonObj.items;
+ $scope.ecdapp.datacenter = $scope.ecdapp.datacenters[0].name;
+ $scope.ecdapp.isDcLoaded = true;
+ $scope.ecdapp.isRequestFailed = false;
+ $scope.pageChangeHandler(1);
+ }
+ },
+ function(error) {
+ $log.error("datacentersController.loadTable failed: "
+ + error);
+ $scope.ecdapp.isRequestFailed = true;
+ $scope.ecdapp.errMsg = error;
+ $scope.ecdapp.tableData = [];
+ });
+ };
/**
* Answers an array of the specified size - makes Angular iteration easy.
*/
@@ -48,9 +60,10 @@ appDS2.controller('nodeTableController', function($scope, $log, $modal, NodeHeal
* tableData, or an error to be shown.
*/
$scope.ecdapp.loadTable = function() {
+ if ($scope.ecdapp.datacenter != 'Select Datacenter') {
$scope.ecdapp.isDataLoading = true;
NodeHealthService.getNodesHealth($scope.ecdapp.currentPageNum,
- $scope.ecdapp.viewPerPage).then(
+ $scope.ecdapp.viewPerPage, $scope.ecdapp.datacenter).then(
function(jsonObj) {
if (jsonObj.error) {
$log.error("nodeHealthController.loadTable failed: "
@@ -76,6 +89,7 @@ appDS2.controller('nodeTableController', function($scope, $log, $modal, NodeHeal
$scope.ecdapp.tableData = [];
$scope.ecdapp.isDataLoading = false;
});
+ }
};
/**
@@ -86,19 +100,22 @@ appDS2.controller('nodeTableController', function($scope, $log, $modal, NodeHeal
// console.log('pageChangeHandler: current is ' +
// $scope.ecdapp.currentPageNum + ' new is ' + page);
$scope.ecdapp.currentPageNum = page;
- $scope.ecdapp.loadTable();
+ if ($scope.ecdapp.isDcLoaded) {
+ $scope.ecdapp.loadTable();
+ }
}
/**
* Shows a modal pop-up with services on this node.
*/
- $scope.ecdapp.viewServicesModalPopup = function(nodeInfo) {
+ $scope.ecdapp.viewServicesModalPopup = function(nodeInfo, dc) {
+ nodeInfo.dc = dc;
var modalInstance = $modal.open({
templateUrl : 'node_services_popup.html',
controller : 'nodeServicesCtrl',
windowClass: 'modal-docked',
- sizeClass: 'modal-large',
+ sizeClass: 'modal-jumbo',
resolve : {
message : function() {
return nodeInfo ;
@@ -115,4 +132,5 @@ appDS2.controller('nodeTableController', function($scope, $log, $modal, NodeHeal
// Do not call this here to avoid double load:
// $scope.ecdapp.loadTable();
+ getDataCenters();
});
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node_popups.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node_popups.html
index 63b5e5f..6148f8c 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node_popups.html
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node_popups.html
@@ -7,11 +7,13 @@
ng-click="$dismiss('cancel')"></button>
</div>
</div>
+ <div class="b2b-modal-body ng-scope ng-isolate-scope" tabindex="0"
+ role="region" aria-label="Modal body content">
<!-- show progress indicator -->
<div ng-show="ecdapp.isDataLoading">
<div class="span" style="margin-bottom: 20px;">
- <i class="icon-primary-spinner small" role="img"
+ <i class="icon-spinner small" role="img"
aria-label="Please wait while the content loads"></i> Please wait
while the content loads.
</div>
@@ -54,6 +56,7 @@
</div> <!--table-->
</div> <!--failed-->
</div> <!--hide-->
+ </div>
<div class="b2b-modal-footer ng-scope ng-isolate-scope">
<div class="cta-button-group in">
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node_table.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node_table.html
index 231d331..670fa6a 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node_table.html
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/node_table.html
@@ -1,11 +1,18 @@
<div id="page-content">
-
+ <div style="float: right;" ng-show="ecdapp.isDcLoaded">
+ <div class="field-group span10">
+ <label for="dc">*Datacenters</label>
+ <select id="dc" name="dc" b2b-dropdown class="span8" placeholder-text="Select Datacenter" data-ng-model="ecdapp.datacenter" ng-change="ecdapp.loadTable()" required>
+ <option b2b-dropdown-list option-repeat="d in ecdapp.datacenters" value="{{d.name}}">{{d.name}}</option>
+ </select>
+ </div>
+ </div>
<h1 class="heading-page" id="consul_nodes">Monitored Nodes</h1>
<!-- show progress indicator -->
<div ng-show="ecdapp.isDataLoading">
<div class="span" style="margin-bottom: 20px;">
- <i class="icon-primary-spinner small" role="img"
+ <i class="icon-spinner small" role="img"
aria-label="Please wait while the content loads"></i> Please wait
while the content loads.
</div>
@@ -40,7 +47,7 @@
<th b2b-table-header key="node">Node Name</th>
<th b2b-table-header key="id">Node ID</th>
<th b2b-table-header key="address">Address</th>
- <th b2b-table-header sortable="false"><i class="icon-controls-gear ecd-icon-display"></i></th>
+ <th b2b-table-header sortable="false"><i class="icon-settings ecd-icon-display"></i></th>
</tr>
</thead>
@@ -51,8 +58,8 @@
<td b2b-table-body ng-bind="rowData.id" />
<td b2b-table-body ng-bind="rowData.address" />
<td b2b-table-body>
- <div ng-click="ecdapp.viewServicesModalPopup(rowData);">
- <a href="" title="View node services" class="icon-people-preview ecd-icon-action"></a>
+ <div ng-click="ecdapp.viewServicesModalPopup(rowData, ecdapp.datacenter);">
+ <a href="" title="View node services" class="icon-overview ecd-icon-action"></a>
</div>
</td>
</tr>
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service-controllers.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service-controllers.js
index 339c436..6463bac 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service-controllers.js
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service-controllers.js
@@ -1,24 +1,3 @@
-/*******************************************************************************
- * =============LICENSE_START=========================================================
- *
- * =================================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *******************************************************************************/
appDS2.controller('serviceHealthTableController', function($scope, $log, $modal, modalService, ServiceHealthService) {
'use strict';
@@ -31,18 +10,55 @@ appDS2.controller('serviceHealthTableController', function($scope, $log, $modal,
$scope.ecdapp.viewPerPage = 100;
// other
$scope.ecdapp.errMsg = null;
- $scope.ecdapp.isDataLoading = true;
+ $scope.ecdapp.isDataLoading = false;
+ $scope.ecdapp.isDcLoaded = false;
+ $scope.ecdapp.isDcAvail = false;
$scope.ecdapp.isRequestFailed = false;
+ $scope.ecdapp.activeImg = "static/fusion/images/active.png";
+ $scope.ecdapp.inactiveImg = "static/fusion/images/inactive.png";
+ $scope.ecdapp.datacenter = "";
+ $scope.ecdapp.datacenters = [];
+
+ var getDataCenters = function() {
+ ServiceHealthService.getDatacentersHealth().then(
+ function(jsonObj) {
+ if (jsonObj.error) {
+ $log.error("datacentersController.loadTable failed: "
+ + jsonObj.error);
+ $scope.ecdapp.isRequestFailed = true;
+ $scope.ecdapp.errMsg = jsonObj.error;
+ $scope.ecdapp.tableData = [];
+ } else {
+ // $log.debug("datacentersController.loadTable
+ // succeeded, size " + jsonObj.data.length);
+ $scope.ecdapp.errMsg = null;
+ //$scope.ecdapp.totalPages = jsonObj.totalPages;
+ $scope.ecdapp.datacenters = jsonObj.items;
+ $scope.ecdapp.datacenter = $scope.ecdapp.datacenters[0].name;
+ $scope.ecdapp.isDcLoaded = true;
+ $scope.ecdapp.isRequestFailed = false;
+ $scope.pageChangeHandler(1);
+ }
+ },
+ function(error) {
+ $log.error("datacentersController.loadTable failed: "
+ + error);
+ $scope.ecdapp.isRequestFailed = true;
+ $scope.ecdapp.errMsg = error;
+ $scope.ecdapp.tableData = [];
+ });
+ };
/**
* Loads the table. Interprets the remote controller's response and copies
* to scope variables. The response is either list to be assigned to
* tableData, or an error to be shown.
*/
$scope.ecdapp.loadTable = function() {
+ if ($scope.ecdapp.datacenter != 'Select Datacenter') {
$scope.ecdapp.isDataLoading = true;
ServiceHealthService.getServicesHealth($scope.ecdapp.currentPageNum,
- $scope.ecdapp.viewPerPage).then(
+ $scope.ecdapp.viewPerPage, $scope.ecdapp.datacenter).then(
function(jsonObj) {
if (jsonObj.error) {
$log.error("serviceHealthTableController.loadTable failed: "
@@ -68,6 +84,7 @@ appDS2.controller('serviceHealthTableController', function($scope, $log, $modal,
$scope.ecdapp.tableData = [];
$scope.ecdapp.isDataLoading = false;
});
+ }
};
/**
@@ -78,7 +95,9 @@ appDS2.controller('serviceHealthTableController', function($scope, $log, $modal,
// console.log('pageChangeHandler: current is ' +
// $scope.ecdapp.currentPageNum + ' new is ' + page);
$scope.ecdapp.currentPageNum = page;
+ if ($scope.ecdapp.isDcLoaded) {
$scope.ecdapp.loadTable();
+ }
}
/**
@@ -103,8 +122,8 @@ appDS2.controller('serviceHealthTableController', function($scope, $log, $modal,
}
else {
if (response.error != null) {
- $log.error('uploadBlueprintModalPopup failed: ' + response.error);
- alert('Failed to upload blueprint:\n' + response.error);
+ $log.error('registerServiceModalPopup failed: ' + response.error);
+ alert('Failed to register service:\n' + response.error);
}
else {
// success, get the updated list.
@@ -172,6 +191,7 @@ appDS2.controller('serviceHealthTableController', function($scope, $log, $modal,
})
};
+ getDataCenters();
// Populate the table on load. Note that the b2b selector code
// sets the page-number value, and the change event calls load table.
// Do not call this here to avoid double load:
@@ -180,13 +200,13 @@ appDS2.controller('serviceHealthTableController', function($scope, $log, $modal,
});
-appDS2.controller('serviceRegisterCtrl', function($scope, $log, message, ServiceHealthService) {
+appDS2.controller('serviceRegisterCtrl', function($scope, $log, $modalInstance, message, ServiceHealthService) {
'use strict';
// this object holds all app data and functions
$scope.ecdapp = {};
-
+ $scope.ecdapp.uploadInProgress = false;
$scope.ecdapp.label = 'Register Service';
// Model the data simply here.
// Build the complex request later.
@@ -228,6 +248,7 @@ appDS2.controller('serviceRegisterCtrl', function($scope, $log, message, Service
}
$scope.ecdapp.registerService = function(edit_req) {
+ $scope.ecdapp.uploadInProgress = true;
var validateMsg = $scope.ecdapp.validateRequest(edit_req);
if (validateMsg != null) {
alert('Invalid registration request:\n' + validateMsg);
@@ -244,9 +265,9 @@ appDS2.controller('serviceRegisterCtrl', function($scope, $log, message, Service
tags: [ ],
checks : [
{
- endpoint : edit_req.check_endoint,
+ endpoint : edit_req.check_endpoint,
interval : edit_req.check_interval,
- description : edit_req.description,
+ description : edit_req.check_description,
name : edit_req.check_name
}
]
@@ -256,11 +277,16 @@ appDS2.controller('serviceRegisterCtrl', function($scope, $log, message, Service
ServiceHealthService.registerService(request)
.then(function(response) {
- if (response.error)
+ if (response && response.error) {
alert('Failed to register service:\n' + response.error);
+ } else {
+ $modalInstance.close("success");
+ }
+ $scope.ecdapp.uploadInProgress = false;
},
function (error) {
$log.error('serviceRegisterCtrl: error while registering: ' + error);
+ $scope.ecdapp.uploadInProgress = false;
alert('Server rejected registration request:\n' + error);
}
);
@@ -363,4 +389,5 @@ appDS2.controller('serviceHistoryCtlr', function($scope, $log, $modal, message,
});
};
+
});
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service-health-service.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service-health-service.js
index 1a60b21..f87d1b3 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service-health-service.js
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service-health-service.js
@@ -1,27 +1,27 @@
-/*******************************************************************************
- * =============LICENSE_START=========================================================
- *
- * =================================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *******************************************************************************/
appDS2.factory('ServiceHealthService', function ($http, $q, $log) {
return {
-
+ /**
+ * Get all the datacenter names
+ */
+ getDatacentersHealth: function() {
+ // cache control for IE
+ var cc = "&cc=" + new Date().getTime().toString();
+ return $http({
+ method: 'GET',
+ url: 'healthservices/datacenters',
+ cache: false,
+ responseType: 'json'
+ }).then(function(response) {
+ if (response.data == null || typeof response.data != 'object')
+ return $q.reject('DatacentersService.getDatacentersHealth: response.data null or not object');
+ else
+ return response.data;
+ },
+ function(error) {
+ $log.error('DatacenterService.getDatacentersHealth failed: ' + JSON.stringify(error));
+ return $q.reject(error.statusText);
+ });
+ },
/**
* Gets information on all services.
*/
@@ -51,10 +51,11 @@ appDS2.factory('ServiceHealthService', function ($http, $q, $log) {
* @param {Number} viewPerPage - number of items per page; e.g., 25
* @return {JSON} Response object from remote side
*/
- getServicesHealth: function(pageNum, viewPerPage) {
+ getServicesHealth: function(pageNum, viewPerPage, dc) {
// cache control for IE
let cc = "&cc=" + new Date().getTime().toString();
- let url = 'healthservices/serviceshealth?pageNum=' + pageNum + '&viewPerPage=' + viewPerPage + cc;
+ let url = 'healthservices/serviceshealth?pageNum=' + pageNum + '&viewPerPage=' + viewPerPage +
+ '&dc=' + dc + cc;
return $http({
method: 'GET',
url: url,
@@ -139,7 +140,7 @@ appDS2.factory('ServiceHealthService', function ($http, $q, $log) {
$log.error('ServiceHealthService.deregisterService failed: ' + JSON.stringify(error));
return $q.reject(error.statusText);
});
- }
+ },
};
});
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service_health_table.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service_health_table.html
index b6a4557..40e8d95 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service_health_table.html
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service_health_table.html
@@ -1,18 +1,27 @@
<div id="page-content">
+ <div style="float: right;" ng-show="ecdapp.isDcLoaded">
+ <div class="field-group span10">
+ <label for="dc">*Datacenters</label>
+ <select id="dc" name="dc" b2b-dropdown class="span8" placeholder-text="Select Datacenter" data-ng-model="ecdapp.datacenter" ng-change="ecdapp.loadTable()" required>
+ <option b2b-dropdown-list option-repeat="d in ecdapp.datacenters" value="{{d.name}}">{{d.name}}</option>
+ </select>
+ </div>
+ </div>
<h1 class="heading-page" id="consul_services">Monitored Services</h1>
<!-- show progress indicator -->
<div ng-show="ecdapp.isDataLoading">
<div class="span" style="margin-bottom: 20px;">
- <i class="icon-primary-spinner small" role="img"
+ <i class="icon-spinner small" role="img"
aria-label="Please wait while the content loads"></i> Please wait
while the content loads.
</div>
</div>
-
- <div ng-hide="ecdapp.isDataLoading">
-
+ <div ng-show="ecdapp.isRequestFailed">
+ <span class="ecd-error-message">{{ecdapp.errMsg}}</span>
+ </div>
+ <div ng-hide="ecdapp.isDataLoading" style="margin-top: 10px;">
<div id="button-search-row">
<button class="btn btn-alt btn-small"
type="submit"
@@ -27,10 +36,6 @@
</div>
</div>
- <div ng-show="ecdapp.isRequestFailed">
- <span class="ecd-error-message">{{ecdapp.errMsg}}</span>
- </div>
-
<div ng-hide="ecdapp.isRequestFailed">
<div b2b-table id="consul-services-table" class="b2b-table-div"
@@ -39,16 +44,15 @@
next-sort="ecdapp.nextSortIgnored">
<table>
-
<thead b2b-table-row type="header">
<tr id="th-header-row">
<th b2b-table-header key="serviceName">Service Name</th>
- <th b2b-table-header key="serviceID">Service ID</th>
- <th b2b-table-header key="node">Node Name</th>
<th b2b-table-header key="status">Status</th>
+ <th b2b-table-header key="node">Node Name</th>
+ <th b2b-table-header key="serviceID">Service ID</th>
<th b2b-table-header key="notes">Notes</th>
<th b2b-table-header key="output">Output</th>
- <th b2b-table-header sortable="false"><i class="icon-controls-gear ecd-icon-display"></i></th>
+ <th b2b-table-header sortable="false"><i class="icon-settings ecd-icon-display"></i></th>
</tr>
</thead>
@@ -56,14 +60,20 @@
row-repeat="rowData in ecdapp.tableData">
<tr id="tr-rowData">
<td b2b-table-body ng-bind="rowData.serviceName" />
- <td b2b-table-body ng-bind="rowData.serviceID" />
+ <td b2b-table-body>
+ <!-- <span>{{rowData.status}}</span> -->
+ <span ng-if="rowData.status === 'passing'"><img ng-src="{{ecdapp.activeImg}}" title="{{rowData.status}}"/>
+ </span>
+ <span ng-if="rowData.status != 'passing'"><img ng-src="{{ecdapp.inactiveImg}}" title="{{rowData.status}}"/>
+ </span>
+ </td>
<td b2b-table-body ng-bind="rowData.node" />
- <td b2b-table-body ng-bind="rowData.status" />
+ <td b2b-table-body ng-bind="rowData.serviceID" />
<td b2b-table-body ng-bind="rowData.notes" />
<td b2b-table-body ng-bind="rowData.output" />
<td b2b-table-body>
<div ng-click="ecdapp.viewHealthHistoryModalPopup(rowData);">
- <a href="" title="View history" class="icon-datanetwork-history ecd-icon-action"></a>
+ <a href="" title="View history" class="icoDocuments-bookmarks ecd-icon-action"></a>
</div>
<div ng-click="ecdapp.deregisterServiceModalPopup(rowData);">
<a href="" title="Deregister service" class="icon-misc-trash ecd-icon-action"></a>
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service_popups.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service_popups.html
index 8fd92b3..0453f8b 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service_popups.html
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/consul/service_popups.html
@@ -10,7 +10,11 @@
<div class="b2b-modal-body ng-scope ng-isolate-scope" tabindex="0"
role="region" aria-label="Modal body content">
-
+ <div ng-show="ecdapp.uploadInProgress" class="row-nowrap">
+ <div class="span" style="margin-bottom:10px;">
+ <i class="icon-spinner small" role="img" aria-label="Please wait while request is in progress"></i>
+ </div>
+ </div>
<div class="row-nowrap">
<div class="span12">
<div class="form-row">
@@ -86,7 +90,11 @@
</div>
</div>
</div>
-
+ <div ng-show="ecdapp.uploadInProgress" class="row-nowrap">
+ <div class="span" style="margin-bottom:10px;">
+ <i class="icon-spinner small" role="img" aria-label="Please wait while request is in progress"></i>
+ </div>
+ </div>
</div>
<div class="b2b-modal-footer ng-scope ng-isolate-scope">
@@ -157,7 +165,7 @@
<!-- show progress indicator -->
<div ng-show="ecdapp.isDataLoading">
<div class="span" style="margin-bottom: 20px;">
- <i class="icon-primary-spinner small" role="img"
+ <i class="icon-spinner small" role="img"
aria-label="Please wait while the content loads"></i> Please wait
while the content loads.
</div>
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/executions-view-controller.js b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/executions-view-controller.js
index f3d5393..2491e50 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/executions-view-controller.js
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/home/executions-view-controller.js
@@ -4,289 +4,10 @@ appDS2.controller('executionsViewController', function($scope, $rootScope, Contr
$scope.ecdapp = {};
$scope.ecdapp.isDataLoading = false;
$scope.ecdapp.appLabel = "";
- $scope.controllersList = [];
- $scope.controllerCall;
$rootScope.tenantList = {
tenant: '',
data: {}
};
- $rootScope.cardData = [
- {
- "cardHeading": "Applications",
- "cardContent": "Applications managed by ECOMP Controller",
- "cardFooterFlyout": "Some Flyout Content",
- "flyout":"false"
- },
- {
- "cardHeading": "Tenants",
- "cardContent": "Tenants where applications are deployed ",
- "cardFooterFlyout": "Some Flyout Content",
- "flyout":"false"
- },
- {
- "cardHeading": "Blueprints",
- "cardContent": "Blueprints data from ECOMPC Inventory",
- "cardFooterFlyout": "Some Flyout Content",
- "flyout":"false"
- },
- {
- "cardHeading": "Deployments",
- "cardContent": "Deployments done using the blueprints",
- "cardFooterFlyout": "Some Flyout Content",
- "flyout":"false"
- }
- ];
- /* events fired on the drop targets */
- document.addEventListener("dragover", function( event ) {
- // prevent default to allow drop
- event.preventDefault();
- }, false);
-
-
-
- $scope.horizontalPositions = [
- { value: 'center', text: 'Center' },
- { value: 'left', text: 'Left' },
- { value: 'right', text: 'Right' },
- ];
- $scope.horizontalPosition = $scope.horizontalPositions[0];
- $scope.verticalPositions = [
- { value: 'below', text: 'Below' },
- { value: 'above', text: 'Above' },
- ];
- $scope.ddOption1 = [
- { value: '', text: 'Actions' },
- { value: '1', text: 'Option 1' },
- { value: '2', text: 'Option 2' },
- { value: '3', text: 'Option 3' }
- ];
-
- $scope.ddOptionValue1 = {};
- $scope.ddOptionValue1.value = $scope.ddOption1[0].value;
-
- /* This showcases having an expander default expanded */
- $scope.testmpc = true;
- $scope.testmpc6 = true;
- $scope.testmpc14 = true;
- $scope.verticalPosition = $scope.verticalPositions[0];
-
- $scope.concurrent = [10, 20, 30];
- $scope.concurrentValue = $scope.concurrent[0];
-
- $scope.flyoutContent = {};
- $scope.flyoutContent.contentUpdated = false;
- $scope.flyoutContent.enableSave = false;
- $scope.flyoutContent.concurrentCalls = 0;
- $scope.enableSaveFun = function () {
- if ($scope.flyoutContent.concurrentCalls !== 0 || $scope.concurrentValue != $scope.concurrent[0]) {
- $scope.flyoutContent.enableSave = true;
- $scope.flyoutContent.contentUpdated = true;
- } else {
- $scope.flyoutContent.enableSave = false;
- $scope.flyoutContent.contentUpdated = true;
- }
- };
-
- $scope.ecdapp.opsUrls = [];
- $rootScope.gTabs = [];
- $rootScope.menuKeys = [];
- $rootScope.opsMenu = [
- {
- title: 'Cloudify',
- id: 'cfy',
- uniqueId: 'uniqueTab1x',
- tabPanelId: 'threetab1x',
- url: ''
- }, {
- title: 'Grafana',
- id: 'grf',
- uniqueId: 'uniqueTab2x',
- tabPanelId: 'threetab2x',
- url: ''
- }, {
- title: 'Consul',
- id: 'cnsl',
- uniqueId: 'uniqueTab3x',
- tabPanelId: 'threetab3x',
- url: ''
- }, {
- title: 'Kubernetes',
- id: 'k8s',
- uniqueId: 'uniqueTab4x',
- tabPanelId: 'threetab4x',
- url: ''
- }, {
- title: 'Prometheus',
- id: 'prom',
- uniqueId: 'uniqueTab5x',
- tabPanelId: 'threetab5x',
- url: ''
- }, {
- title: 'DBCL',
- id: 'dbcl',
- uniqueId: '',
- tabPanelId: '',
- url: ''
- }
- ];
-
- $rootScope.tenant_cluster_map =
- [
- {
- tenant: 'dyh1b1902',
- cluster: ['platform', 'component']
- },
- {
- tenant: 'DCAE-24256-D-04Central',
- cluster: ['component']
- },
- {
- tenant: 'DCAE-24256-D-04Edge',
- cluster: ['component']
- }
- ];
-
- $rootScope.site_tenant_cluster_list =
- [
- {site: 'dyh1b1902',
- cfy_url: 'https://ecompc-orcl-dev-s1.ecomp.idns.cip.att.com/console/login',
- cnsl_url: 'https://http://ecompc-cnsl-dev-s5.ecomp.idns.cip.att.com:8500/ui/',
- tenant_cluster_map:
- [
- {
- tenant: 'dyh1b1902',
- k8_ip: '32.68.214.62',
- cluster: 'platform',
- k8_url: 'https://32.68.214.62:6443/ui',
- prom_url: 'https://32.68.214.62:30102/graph',
- grf_url: 'https://32.68.214.62:30101/login'
- },
- {
- tenant: 'dyh1b1902',
- k8_ip: '32.68.214.62',
- cluster: 'component',
- k8_url: 'https://32.68.214.62:6443/ui',
- prom_url: 'https://32.68.214.62:30102/graph',
- grf_url: 'https://32.68.214.62:30101/login'
- },
- {
- tenant: 'DCAE-24256-D-04Central',
- k8_ip: '32.68.192.81',
- cluster: 'component',
- k8_url: 'https://32.68.192.81:6443/ui',
- prom_url: 'https://32.68.192.81:30102/graph',
- grf_url: 'https://32.68.192.81:30101/login'
- },
- {
- tenant: 'DCAE-24256-D-04Edge',
- k8_ip: '32.68.194.92',
- cluster: 'component',
- k8_url: 'https://32.68.194.92:6443/ui',
- prom_url: 'https://32.68.194.92:30102/graph',
- grf_url: 'https://32.68.194.92:30101/login'
- }
- ]
- },
- {site: 'mtn23b',
- cfy_url: 'https://ecompc-orcl-dev-s2.ecomp.idns.cip.att.com/console/login',
- cnsl_url: 'https://ecompc-cnsl-dev-s2.ecomp.idns.cip.att.com:8500/ui/',
- tenant_cluster_map:
- [
- {
- tenant: 'mtn23b',
- k8_ip: '32.68.214.62',
- cluster: 'platform',
- k8: 'https://32.68.214.62:6443/ui',
- prom: 'https://32.68.214.62:30102/graph',
- grf: 'https://32.68.214.62:30101/login'
- },
- {
- tenant: 'mtn23b',
- k8_ip: '32.68.214.62',
- cluster: 'component',
- k8: 'https://32.68.214.62:6443/ui',
- prom: 'https://32.68.214.62:30102/graph',
- grf: 'https://32.68.214.62:30101/login'
- },
- {
- tenant: 'DCAE-24256-D-04Central',
- k8_ip: '32.68.192.81',
- cluster: 'component',
- k8: 'https://32.68.192.81:6443/ui',
- prom: 'https://32.68.192.81:30102/graph',
- grf: 'https://32.68.192.81:30101/login'
- },
- {
- tenant: 'DCAE-24256-D-04Edge',
- k8_ip: '32.68.194.92',
- cluster: 'component',
- k8: 'https://32.68.194.92:6443/ui',
- prom: 'https://32.68.194.92:30102/graph',
- grf: 'https://32.68.194.92:30101/login'
- }
- ]
- }
- ];
-
- $rootScope.tenant_cluster_apps_map =
- [
- {
- tenant: 'dyh1b1902',
- k8_ip: '32.68.214.62',
- cluster: 'platform',
- k8: 'https://32.68.214.62:6443/ui',
- prom: 'https://32.68.214.62:30102/graph',
- grf: 'https://32.68.214.62:30101/login'
- },
- {
- tenant: 'dyh1b1902',
- k8_ip: '32.68.214.62',
- cluster: 'component',
- k8: 'https://32.68.214.62:6443/ui',
- prom: 'https://32.68.214.62:30102/graph',
- grf: 'https://32.68.214.62:30101/login'
- },
- {
- tenant: 'DCAE-24256-D-04Central',
- k8_ip: '32.68.192.81',
- cluster: 'component',
- k8: 'https://32.68.192.81:6443/ui',
- prom: 'https://32.68.192.81:30102/graph',
- grf: 'https://32.68.192.81:30101/login'
- },
- {
- tenant: 'DCAE-24256-D-04Edge',
- k8_ip: '32.68.194.92',
- cluster: 'component',
- k8: 'https://32.68.194.92:6443/ui',
- prom: 'https://32.68.194.92:30102/graph',
- grf: 'https://32.68.194.92:30101/login'
- }
- ];
-
- $rootScope.site_cfy_cnsl_map =
- [
- {site: 'dyh1b1902',
- cfy: 'https://ecompc-orcl-dev-s1.ecomp.idns.cip.att.com/console/login',
- cnsl: 'https://http://ecompc-cnsl-dev-s5.ecomp.idns.cip.att.com:8500/ui/'
- },
- {site: 'mtn23b',
- cfy: 'https://ecompc-orcl-dev-s2.ecomp.idns.cip.att.com/console/login',
- cnsl: 'https://ecompc-cnsl-dev-s2.ecomp.idns.cip.att.com:8500/ui/'
- }
- ]
-
- //$rootScope.cfyUrl = $rootScope.site_cfy_map[1].cfy;
-
- $rootScope.site_tenant_map =
- [
- {site: 'dyh1b1902',
- tenant: ['dyh1b1902','DCAE-24256-D-04Central','DCAE-24256-D-04Edge']
- },
- {site: 'mtn23b',
- tenant: ['MTN23b-ECOMP-DEV-S1','DYH1b-FTL3F-DCAE-24256-D-03Central','DYH1b-FTL3F-DCAE-24256-D-03Edge']
- }
- ]
var debug = false;
var getTenants = function() {
@@ -308,124 +29,6 @@ appDS2.controller('executionsViewController', function($scope, $rootScope, Contr
});
};
- var getControllers = function(){
- $scope.ecdapp.isDataLoading = true;
- ControllerService.getControllers().then(function(jsonObj) {
- if (debug)
- $log.debug("verticalComponentController.getControllers succeeded: " + JSON.stringify(jsonObj));
- // Empty
- $scope.controllersList.length = 0;
- // Refill
- jsonObj.filter(function(d) {
- $scope.controllersList.push(d);
- if (d.selected){
- $scope.parent.blueprint_id = d.name;
- $scope.controllerCallDone = true;
- }
- return;
- });
- $scope.ecdapp.isDataLoading = false;
- }, function(error) {
- $scope.ecdapp.isDataLoading = false;
- alert('Failed to load controllers. Please retry.');
- $log.error("verticalComponentController.getControllers failed: " + error);
- });
- };
-
- $rootScope.$on('controllerChange', function(e, d){
- $scope.parent.blueprint_id = d.name;
- });
-
- $scope.ecdapp.loadTable = function(status) {
- $scope.ecdapp.isDataLoading = true;
-
- // Empty list and create the root controller item
- $scope.orgChartData = [];
-
- ExecutionService.getExecutionsByStatus(status).then(
- function(jsonObj) {
- if (jsonObj.error) {
- $log.error("verticalComponentController.loadTable failed: "
- + jsonObj.error);
- $scope.ecdapp.isRequestFailed = true;
- $scope.ecdapp.errMsg = jsonObj.error;
- } else {
- $scope.ecdapp.isRequestFailed = false;
- $scope.ecdapp.errMsg = null;
- for (var i=0; i < jsonObj.items.length; i++) {
- $scope.orgChartData.push(jsonObj.items[i]);
- }
- $scope.$broadcast('listenEvent', {data: $scope.orgChartData} );
- setTimeout(function(){$('.child-item').popover()}, 0);
- }
- $scope.status = status;
- $scope.ecdapp.isDataLoading = false;
- },
- function(error) {
- $log.error("verticalComponentController.loadTable failed: "
- + error);
- $scope.ecdapp.isRequestFailed = true;
- $scope.ecdapp.errMsg = error;
- $scope.ecdapp.isDataLoading = false;
- });
- };
-
- $scope.showEcompCInstancesModalPopup = function() {
- var modalInstance = $modal.open({
- templateUrl : 'ecompc_instances_popup.html',
- controller : 'selectEcompcController',
- windowClass: 'modal-docked',
- sizeClass: 'modal-medium',
- resolve : {
- message : function() {
- return { items: $scope.controllersList }
- }
- }
- });
- };
-
- $scope.showsubDropdown = function(e){
- $('#submenu').toggle();
- e.stopPropagation();
- e.preventDefault();
- }
-
- $scope.closeSubMenu = function(){
- $('#submenu').css({display:'none'})
- }
-
- var getOpsUrls = function() {
- ControllerService.getOpsUrls().then(function(jsonObj) {
- if (jsonObj.error) {
- $log.error("executionsViewController.getOpsUrls failed: " + jsonObj.error);
- } else {
- //$scope.ecdapp.opsUrls = jsonObj;
- angular.forEach(jsonObj, function(value, key) {
- var found = false;
- angular.forEach($rootScope.opsMenu, function(val2, key2, item) {
- if (!found) {
- if (val2.id === value.id) {
- val2.url = value.url;
- found = true;
- }
- }
- });
- });
- }
- }, function(error) {
- $log.error("executionsViewController.getOpsUrls failed: " + error);
- });
- /*
- $scope.ecdapp.opsUrls = [
- {id: 'cfy', url: 'https://ecompc-orcl-dev-s1.ecomp.idns.cip.att.com/console/login'},
- {id: 'grf', url: 'http://ecompc-grfn-dev-s1.ecomp.idns.cip.att.com:30101/login'},
- {id: 'cnsl', url: 'http://ecompc-cnsl-dev-s1.ecomp.idns.cip.att.com:8500/ui/'},
- {id: 'k8s', url: 'https://zldcmtn23aecc1kpma00.809a89.mtn23a.tci.att.com:6443/ui'},
- {id: 'prom', url: 'http://zldcmtn23aecc1kpma00.809a89.mtn23a.tci.att.com:30102/graph'},
- {id: 'dbcl', url: 'http://zldcdyh1bdcc2dokr04.707507.dyh1b.tci.att.com:8080/dmaap-bc-app/login.htm'}];
- */
- };
-
var getAppLabel = function() {
ControllerService.getAppLabel().then(function(jsonObj) {
if (debug)
@@ -438,10 +41,5 @@ appDS2.controller('executionsViewController', function($scope, $rootScope, Contr
// Initialize the page
getAppLabel();
getTenants();
- //getControllers();
- getOpsUrls();
- //$scope.ecdapp.loadTable('active');
- //$scope.showOrgTable = true;
- //$rootScope.activeTabsId = 'cfy';
});
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_blueprint_table.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_blueprint_table.html
index 687c304..3c09687 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_blueprint_table.html
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_blueprint_table.html
@@ -1,6 +1,6 @@
<div id="page-content">
- <h1 class="heading-page" id="blueprints">EOM Inventory > Blueprints</h1>
+ <h1 class="heading-page" id="blueprints">Inventory > Blueprints</h1>
<!-- show progress indicator -->
<div ng-show="ecdapp.isDataLoading">
<div class="span" style="margin-bottom:20px;">
@@ -17,13 +17,6 @@
Create
<span class="arrow"></span>
</a>
- <!--
- <button class="btn btn-alt btn-small tooltip-element" data-placement="right"
- type="submit"
- ng-click="ecdapp.uploadBlueprintModalPopup();">
- Create
- <span class="arrow"></span>
- </button>-->
<span class="tooltip-wrapper">
<span class="tooltip-size-control">
<span id="tooltiptextBtn" role="tooltip" aria-live="polite" aria-hidden="true" class="helpertext" tabindex="-1">
@@ -38,9 +31,9 @@
</span>
<div style="float:right;">
<div class="group">
- <button tabindex="-1" class="btn btn-small" title="Reset Filters" type="button" ng-click="ecdapp.loadTable()"><i class="icon-arrows-update&#45;refresh&#45;sync"></i></button>
+ <button tabindex="-1" class="btn btn-small" title="Reset Filters" type="button" ng-click="ecdapp.loadTable()"><i class="icon-arrows-replay-restart"></i></button>
<input tabindex="0" class="btn btn-small" type="text" placeholder="Search Blueprints" ng-model="ecdapp.searchBy"></input>
- <button tabindex="1" class="btn btn-small" title="Search" type="button" ng-click="ecdapp.searchTable(ecdapp.searchBy)"><i class="icon-controls-magnifyingglass"></i></button>
+ <button tabindex="1" class="btn btn-small" title="Search" type="button" ng-click="ecdapp.searchTable(ecdapp.searchBy)"><i class="ion-search"></i></button>
</div>
</div>
</div>
@@ -70,7 +63,7 @@
<th b2b-table-header sortable="false" key="created_at" ng-click="ecdapp.sortTable('created')">Created Date</th>
<th b2b-table-header sortable="false" key="deployment_ref">Deployments
<button style="margin-bottom:-5px; box-shadow:0 0 0 0 rgba(0, 0, 0, 0.15); min-width:0;" tabindex="1" class="btn btn-small" title="Refresh Deployments" type="button" ng-click="ecdapp.updateTable()">
- <i class="icon-arrows-update&#45;refresh&#45;sync"></i>
+ <i class="icon-arrows-replay-restart"></i>
</button>
<div ng-show="ecdapp.isSrvcDataLoading">
<div class="span" style="margin-bottom:5px;">
@@ -79,13 +72,6 @@
</div>
</div>
</th>
- <!--
- <th b2b-table-header sortable="false" key="deployment_info" style="margin-left:-10px;">Deployments
- <button style="margin-bottom:-5px; box-shadow:0 0 0 0 rgba(0, 0, 0, 0.15); min-width:0;" tabindex="1" class="btn btn-small" title="Refresh Deployments" type="button" ng-click="ecdapp.updateTable()">
- <i class="icon-arrows-update&#45;refresh&#45;sync"></i>
- </button>
- </th>
- -->
<th b2b-table-header sortable="false">Actions</th>
<th b2b-table-header sortable="false" key="owner" ng-click="ecdapp.sortTable('owner')">Owner</th>
<th b2b-table-header sortable="false" key="type_id" ng-click="ecdapp.sortTable('typeId')">ID</th>
@@ -114,26 +100,26 @@
</td>
<td b2b-table-body >
<div class="btn-group btn-actions" style="margin-bottom:0;box-shadow:none;">
- <button type="button" class="btn dropdown-toggle" data-toggle="dropdown" title="More Actions"><i class="icon-controls-moreapplications"></i></button>
+ <button type="button" class="btn dropdown-toggle" data-toggle="dropdown" title="More Actions"><i class="icon-apps-marketplace"></i></button>
<ul class="dropdown-menu">
<li>
<div ng-click="ecdapp.viewBlueprintModalPopup(rowData);">
- <i class="icon-people-preview ecd-icon-action"></i><a href="">View</a>
+ <i class="icon-documents-book ecd-icon-action"></i><a href="">View</a>
</div>
</li>
<li>
<div ng-click="ecdapp.exportJson(rowData);">
- <i class="icon-people-preview ecd-icon-action"></i><a href="">Export</a>
+ <i class="icon-documents-copy ecd-icon-action"></i><a href="">Export</a>
</div>
</li>
<li>
<div ng-show="rowData.canDeploy && rowData.deployments.totalCount === 0" ng-click="ecdapp.updateBlueprintModalPopup(rowData);">
- <i class="icon-misc-trash ecd-icon-action"></i><a href="">Update</a>
+ <i class="icon-misc-pen ecd-icon-action"></i><a href="">Update</a>
</div>
</li>
<li>
<div ng-show="rowData.canDeploy" ng-click="ecdapp.deployBlueprintModalPopup(rowData);">
- <i class="icon-datanetwork-cloudupload ecd-icon-action"></i><a href="">Deploy</a>
+ <i class="icon-arrows-download ecd-icon-action"></i><a href="">Deploy</a>
</div>
</li>
<li>
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_deployment_table.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_deployment_table.html
index 3e404b5..5d76bb4 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_deployment_table.html
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_deployment_table.html
@@ -1,6 +1,6 @@
<div id="page-content">
- <h1 class="heading-page" id="deployments-page">EOM Inventory > Deployments</h1>
+ <h1 class="heading-page" id="deployments-page">Inventory > Deployments</h1>
<!-- show progress indicator -->
<div ng-show="ecdapp.isDataLoading">
@@ -14,9 +14,9 @@
<div id="button-search-row">
<div style="float:right;">
<div class="group">
- <button tabindex="-1" class="btn btn-small" title="Reset Filters" type="button" ng-click="ecdapp.loadTable()"><i class="icon-arrows-update&#45;refresh&#45;sync"></i></button>
+ <button tabindex="-1" class="btn btn-small" title="Reset Filters" type="button" ng-click="ecdapp.loadTable()"><i class="icon-arrows-replay-restart"></i></button>
<input tabindex="0" class="btn btn-small" type="text" placeholder="Search Deployments" ng-model="ecdapp.searchBy"></input>
- <button tabindex="1" class="btn btn-small" type="button" ng-click="ecdapp.searchTable(ecdapp.searchBy)"><i class="icon-controls-magnifyingglass"></i></button>
+ <button tabindex="1" class="btn btn-small" type="button" ng-click="ecdapp.searchTable(ecdapp.searchBy)"><i class="ion-search"></i></button>
</div>
</div>
</div>
@@ -41,7 +41,7 @@
<th b2b-table-header sortable="false" key="updated" ng-click="ecdapp.sortTable('modified')">Modified</th>
<th b2b-table-header sortable="false" key="tenant" style="background-color:#dbefef;">Tenant
<button style="margin-bottom:-5px; box-shadow:0 0 0 0 rgba(0, 0, 0, 0.15); min-width:0;" tabindex="1" class="btn btn-small" title="Refresh Tenant and Status" type="button" ng-click="ecdapp.updateTable()">
- <i class="icon-arrows-update&#45;refresh&#45;sync"></i>
+ <i class="icon-arrows-replay-restart"></i>
</button>
<div ng-show="ecdapp.isSrvcDataLoading">
<div class="span" style="margin-bottom:5px;">
@@ -76,26 +76,26 @@
</td>
<td b2b-table-body ng-class="{'td-error' : rowData.statusInfo === undefined}">
<div class="btn-group btn-actions" style="margin-bottom:0;box-shadow:none;">
- <button type="button" class="btn dropdown-toggle" data-toggle="dropdown" title="More Actions"><i class="icon-controls-moreapplications"></i></button>
+ <button type="button" class="btn dropdown-toggle" data-toggle="dropdown" title="More Actions"><i class="icon-apps-marketplace"></i></button>
<ul class="dropdown-menu">
<li>
<div ng-click="ecdapp.viewBlueprintDataModal(rowData);">
- <i class="icon-documents-document ecd-icon-action"></i><a href="">View blueprint</a>
+ <i class="icon-documents-book ecd-icon-action"></i><a href="">View blueprint</a>
</div>
</li>
<li>
<div ng-click="ecdapp.viewDeploymentInputsModalPopup(rowData);">
- <i class="icon-misc-operations ecd-icon-action"></i><a href="">View Inputs</a>
+ <i class="icoDocuments-report ecd-icon-action"></i><a href="">View Inputs</a>
</div>
</li>
<li>
<div ng-click="ecdapp.viewDeploymentExecutionsModalPopup(rowData);">
- <i class="icon-people-preview ecd-icon-action"></i><a href="">View executions</a>
+ <i class="icon-overview ecd-icon-action"></i><a href="">View executions</a>
</div>
</li>
<li>
<div ng-show="rowData.canDeploy && rowData.statusInfo.status === 'completed'" ng-click="ecdapp.updateDeploymentModalPopup(rowData);">
- <i class="icon-misc-operations ecd-icon-action"></i><a href="">Update deployment</a>
+ <i class="icon-misc-pen ecd-icon-action"></i><a href="">Update deployment</a>
</div>
</li>
<li>
@@ -105,17 +105,17 @@
</li>
<li>
<div ng-show="rowData.statusInfo.is_helm && rowData.statusInfo.helm_status && rowData.statusInfo.status === 'completed'" ng-click="ecdapp.checkHelmStatus(rowData);">
- <i class="icon-misc-operations ecd-icon-action"></i><a href="">Helm Status</a>
+ <i class="icoDocuments-report ecd-icon-action"></i><a href="">Helm Status</a>
</div>
</li>
<li>
<div ng-show="rowData.canDeploy && rowData.statusInfo.is_helm && rowData.statusInfo.status === 'completed'" ng-click="ecdapp.upgradeDeploymentModalPopup(rowData);">
- <i class="icon-datanetwork-contentdelivery ecd-icon-action"></i><a href="#">Helm upgrade deployment</a>
+ <i class="icon-controls-down ecd-icon-action"></i><a href="#">Helm upgrade deployment</a>
</div>
</li>
<li>
<div ng-show="rowData.canDeploy && rowData.statusInfo.is_helm && rowData.statusInfo.status === 'completed'" ng-click="ecdapp.rollbackDeploymentModalPopup(rowData);">
- <i class="icon-datanetwork-software ecd-icon-action"></i><a href="#">Helm rollback deployment</a>
+ <i class="icon-controls-up"></i><a href="#">Helm rollback deployment</a>
</div>
</li>
<li>
diff --git a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_execution_popups.html b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_execution_popups.html
index 7fa380c..4b870dc 100644
--- a/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_execution_popups.html
+++ b/ccsdk-app-overlay/src/main/webapp/app/ccsdk/inventory/inventory_execution_popups.html
@@ -123,7 +123,7 @@
<th b2b-table-header key="workflow_id">Workflow ID</th>
<th b2b-table-header key="id">ID</th>
<th b2b-table-header key="status">Status</th>
- <th b2b-table-header sortable="false"><i class="icon-controls-gear ecd-icon-display"></i></th>
+ <th b2b-table-header sortable="false"><i class="icon-settings ecd-icon-display"></i></th>
</tr>
</thead>
@@ -175,7 +175,7 @@
</td>
<td b2b-table-body ng-if="rowData.status == 'started'">
<div ng-click="ecdapp.cancelExecutionModalPopup(rowData, ecdapp.ui_tenant);">
- <a href="" title="Cancel execution" class="icon-controls-stop ecd-icon-action"></a>
+ <a href="" title="Cancel execution" class="ion-stop ecd-icon-action"></a>
</div>
</td>
</tr>