From 609f193862339c50420553b45f3bb56f9711cf95 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 30 Oct 2018 09:39:59 -0400 Subject: Remove SDNR seed code Remove SDNR seed code to resolve license issues. Code is not currently used, so it will be removed for now and a cleaned version resubmitted for Dublin release. Change-Id: I37ca0feb458012626bf448739ff2497679fcb357 Issue-ID: CCSDK-641 Signed-off-by: Timoney, Dan (dt5972) --- .../ux/mwtnFault/mwtnFault-bundle/pom.xml | 115 ---- .../resources/OSGI-INF/blueprint/blueprint.xml | 19 - .../ux/mwtnFault/mwtnFault-module/pom.xml | 15 - .../main/resources/mwtnFault/images/mwtnFault.png | Bin 2048 -> 0 bytes .../main/resources/mwtnFault/mwtnFault-custom.css | 100 ---- .../resources/mwtnFault/mwtnFault.controller.js | 597 --------------------- .../resources/mwtnFault/mwtnFault.directives.js | 163 ------ .../main/resources/mwtnFault/mwtnFault.module.js | 56 -- .../main/resources/mwtnFault/mwtnFault.services.js | 100 ---- .../main/resources/mwtnFault/mwtnFault.tpl.html | 119 ---- .../mwtnFault/templates/alarmStatus.tpl.html | 21 - .../templates/clearLogConfirmation.tpl.html | 17 - .../code-Carbon-SR1/ux/mwtnFault/pom.xml | 24 - 13 files changed, 1346 deletions(-) delete mode 100644 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-bundle/pom.xml delete mode 100644 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/pom.xml delete mode 100755 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/images/mwtnFault.png delete mode 100644 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/mwtnFault-custom.css delete mode 100644 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/mwtnFault.controller.js delete mode 100644 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/mwtnFault.directives.js delete mode 100644 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/mwtnFault.module.js delete mode 100644 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/mwtnFault.services.js delete mode 100644 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/mwtnFault.tpl.html delete mode 100644 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/templates/alarmStatus.tpl.html delete mode 100644 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/templates/clearLogConfirmation.tpl.html delete mode 100644 sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/pom.xml (limited to 'sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault') diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-bundle/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-bundle/pom.xml deleted file mode 100644 index bceb9084..00000000 --- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-bundle/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - 4.0.0 - - mwtnFault - com.highstreet.technologies.odl.dlux - 0.5.1-SNAPSHOT - - mwtnFault-bundle - bundle - ${prefix} ${project.artifactId} - - - org.osgi - org.osgi.core - ${osgi.core.version} - - - org.osgi - org.osgi.compendium - ${osgi.core.version} - - - org.apache.felix - org.osgi.compendium - ${apache.felix.compendium} - - - org.opendaylight.dlux - loader - ${dlux.loader.version} - - - com.highstreet.technologies.odl.dlux - mwtnFault-module - 0.5.1-SNAPSHOT - - - - - - target/generated-resources - - - src/main/resources - - - - - org.apache.maven.plugins - maven-dependency-plugin - 2.6 - - - - unpack-loader-resources - - unpack-dependencies - - generate-resources - - ${project.build.directory}/generated-resources - com.highstreet.technologies.odl.dlux - mwtnFault-module - META-INF\/** - true - false - - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.osgi.service.http, - org.osgi.framework;version="1.0.0", - org.opendaylight.dlux.loader - - - - - - - - - diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 2f89a41c..00000000 --- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - src/app/mwtnFault/mwtnFault-custom.css - - - - \ No newline at end of file diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/pom.xml deleted file mode 100644 index f0d7215d..00000000 --- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - mwtnFault - com.highstreet.technologies.odl.dlux - 0.5.1-SNAPSHOT - - mwtnFault-module - ${prefix} ${project.artifactId} - jar - - \ No newline at end of file diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/images/mwtnFault.png b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/images/mwtnFault.png deleted file mode 100755 index 47bfc70c..00000000 Binary files a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/images/mwtnFault.png and /dev/null differ diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/mwtnFault-custom.css b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/mwtnFault-custom.css deleted file mode 100644 index 7e959b1e..00000000 --- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/mwtnFault-custom.css +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Add your application related css here - */ -.global-alarm-status { - float: left; - margin: 5px; - margin-left: 8px; -} - -.global-alarm-status a { - color:azure; - text-decoration: none; -} - -.global-alarm-status a:visited { - color:azure; - text-decoration: none; -} - -.global-alarm-status a:hover { - color:bisque; -} -s -.mwtn span { - color: white; -} -.mwtn a span { - color: white; -} -.Critical { - color: red; -} -.Major { - color: orange; -} -.Minor { - color: yellow; -} -.Warning { - color: #428bca; -} -.cleared { - color: lightgreen; -} - -.mwtnFaultGrid { - height: 600px; - background-color: white; -} - -.mwtnFaultGrid span { - color: #393939; -} -.ht-pagination span { - color: #393939; -} -.ht-pagination span.dark { - color: #393939; -} -.dark { - color: #393939; -} - - - -.mwtnFaultGrid div.debug { - color: #393939; - background-color: white; -} -.mwtnFaultGrid div.error { - color: #ff0000; - background-color: #ffeeee; - font-weight: bold; -} - -.mwtnFaultGrid div.info { - color: #3276b1; - background-color: #eeeeff; -} - -.mwtnFaultGrid div.warning { - color: #ffa500; - background-color: #ffeedd; -} - -.rotated { - transform: rotate(180deg); - -webkit-transform: rotate(180deg); - -ms-transform: rotate(180deg); - -moz-transform: rotate(180deg); - -o-transform: rotate(180deg); -} - -h3.modal-title { - color: #393939; -} - -.modal-body span { - color: #393939; -} \ No newline at end of file diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/mwtnFault.controller.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/mwtnFault.controller.js deleted file mode 100644 index d29d547d..00000000 --- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/mwtnFault.controller.js +++ /dev/null @@ -1,597 +0,0 @@ -/* - * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -define(['app/mwtnFault/mwtnFault.module', - 'app/mwtnFault/mwtnFault.services', - 'app/mwtnFault/mwtnFault.directives'], - function(mwtnFaultApp) { - - mwtnFaultApp.register.controller('mwtnFaultCtrl', ['uiGridConstants', '$uibModal', '$scope', '$rootScope', '$window', '$timeout', '$mwtnFault', '$mwtnLog', '$http', - function(uiGridConstants, $uibModal, $scope, $rootScope, $window, $timeout, $mwtnFault, $mwtnLog, $http) { - - - var COMPONENT = 'mwtnFaultCtrl'; - $mwtnLog.info({component: COMPONENT, message: 'mwtnFaultCtrl started!'}); - - $rootScope.section_logo = 'src/app/mwtnFault/images/mwtnFault.png'; // Add your topbar logo location here such as 'assets/images/logo_topology.gif' - - $scope.date = new Date().toISOString().toHumanReadableTimeFormat(); - $scope.highlightFilteredHeader = $mwtnFault.highlightFilteredHeader; - $scope.oneATime = true; - - // var rowTemplate = '
'; - var iconCell = '
'; - var getIconFromSeverity = function(severity) { - var mapping = { - Cleared : '', - NonAlarmed : '', - Critical : 'fa-exclamation-triangle', - Major : 'fa-exclamation-triangle', - Minor : 'fa-exclamation-triangle', - Warning : 'fa-times-circle' - }; - return mapping[severity]; - }; - - // Current Problem List - $scope.gridOptionsCurrentProblemList = JSON.parse(JSON.stringify($mwtnFault.gridOptions)); - $scope.gridOptionsCurrentProblemList.columnDefs = [ - // { field: 'id', type: 'number', displayName: 'No.', headerCellClass: $scope.highlightFilteredHeader, width : 50, cellClass: 'number', pinnedLeft : true }, - { field: 'icon', type: 'string', displayName: '', headerCellClass: $scope.highlightFilteredHeader, width: 25, enableSorting: false, enableFiltering:false, cellTemplate: iconCell }, - { field: 'timestamp', type: 'string', displayName: 'Timestamp', headerCellClass: $scope.highlightFilteredHeader, width : 200, sort: { - direction: uiGridConstants.DESC, - priority: 1 - } }, - { field: 'node', type: 'string', displayName: 'Node name', headerCellClass: $scope.highlightFilteredHeader, width: 200 }, - { field: 'counter', type: 'number', displayName: 'Counter', headerCellClass: $scope.highlightFilteredHeader, width: 70, cellClass: 'number' }, - { field: 'object', type: 'string', displayName: 'Object Id', headerCellClass: $scope.highlightFilteredHeader, width: 300 }, - { field: 'problem', type: 'string', displayName: 'Alarm type', headerCellClass: $scope.highlightFilteredHeader, width : 200 }, - { field: 'severity', type: 'string', displayName: 'Severity', headerCellClass: $scope.highlightFilteredHeader, width : 150 } - - ]; - - var processCurrentProblemEntries = function(logEntries) { - if (logEntries.data.hits.hits) { - $scope.gridOptionsCurrentProblemList.data = logEntries.data.hits.hits.map(function(entry){ - return { - id: entry._id, - icon: getIconFromSeverity(entry._source.faultCurrent.severity), - timestamp: $mwtnFault.formatTimeStamp(entry._source.faultCurrent.timeStamp), - node: entry._source.faultCurrent.nodeName, - counter: entry._source.faultCurrent.counter, - object: entry._source.faultCurrent.objectId, - problem: entry._source.faultCurrent.problem, - severity: entry._source.faultCurrent.severity, - }; - }); - $scope.progress.max = logEntries.data.hits.total; - $scope.progress.value = $scope.gridOptionsCurrentProblemList.data.length; - $scope.progress.show = $scope.gridOptionsCurrentProblemList.data.length < logEntries.data.hits.total; - } - }; - - $scope.refreshCurrentProblemList = function() { - // $scope.gridOptionsCurrentProblemList.data = []; - var from = 0; - var size = 10000; - $scope.processing = true; - $mwtnFault.getAllCurrentProblemEntries(from, size).then(function(logEntries){ - $scope.processing = false; - $scope.spinner.currentProblemList = false; - processCurrentProblemEntries(logEntries); - from = from + size; - while (from < $scope.progress.max) { - $mwtnFault.getAllCurrentProblemEntries(from, size).then(function(logEntries){ - processCurrentProblemEntries(logEntries); - }, function(error){ - console.error(JSON.stringify(error)); - }); - from = from + size; - } - }, function(error){ - $scope.processing = false; - $scope.spinner.currentProblemList = false; - console.error(JSON.stringify(error)); - }); - }; - - // Alarm Notifications - $scope.gridOptionsAlarmNotifications = JSON.parse(JSON.stringify($mwtnFault.gridOptions)); - $scope.gridOptionsAlarmNotifications.columnDefs = [ - // { field: 'id', type: 'number', displayName: 'No.', headerCellClass: $scope.highlightFilteredHeader, width : 50, cellClass: 'number', pinnedLeft : true }, - { field: 'icon', type: 'string', displayName: '', headerCellClass: $scope.highlightFilteredHeader, width: 25, enableSorting: false, enableFiltering:false, cellTemplate: iconCell }, - { field: 'timeStamp', type: 'string', displayName: 'Timestamp', headerCellClass: $scope.highlightFilteredHeader, width : 200,sort: { - direction: uiGridConstants.DESC, - priority: 1 - } }, - { field: 'counter', type: 'number', displayName: 'Counter', headerCellClass: $scope.highlightFilteredHeader, width: 90 }, - { field: 'nodeName', type: 'string', displayName: 'NetworkElement', headerCellClass: $scope.highlightFilteredHeader, width: 170 }, - { field: 'objectId', type: 'string', displayName: 'Object', headerCellClass: $scope.highlightFilteredHeader, width: 400 }, - - { field: 'problem', type: 'string', displayName: 'Alarm', headerCellClass: $scope.highlightFilteredHeader, width : 140 }, - { field: 'severity', type: 'string', displayName: 'Severity', headerCellClass: $scope.highlightFilteredHeader, width : 100 } - ]; - var listenToNotifications = function() { - $mwtnFault.getMwtnWebSocketUrl().then(function(success){ - try { - var notificationSocket = new WebSocket(success); - - notificationSocket.onmessage = function(event) { - // we process our received event here - if (typeof event.data === 'string') { - // console.log("Client Received:\n" + event.data); - // console.log("---------------------------"); - $mwtnFault.formatData(event).then(function(formated) { - switch (formated.notifType) { - case 'ProblemNotification': - formated.icon = getIconFromSeverity(formated.severity); - $scope.gridOptionsAlarmNotifications.data.push(formated); - $timeout(function(){$scope.refreshCurrentProblemList();}, 500); - break; - case 'AttributeValueChangedNotification': - case 'ObjectCreationNotification': - case 'ObjectDeletionNotification': - // ignore - break; - default: - console.error('Missing implementation for', formated.notifType); - } - }, function(error) { - // do nothing - }); - } - }; - - notificationSocket.onerror = function(error) { - console.log("Socket error: " + error); - }; - - notificationSocket.onopen = function(event) { - console.log("Socket connection opened."); - - function subscribe() { - if (notificationSocket.readyState === notificationSocket.OPEN) { - var data = { - 'data' : 'scopes', - 'scopes' : [ "ProblemNotification" ] - }; - notificationSocket.send(JSON.stringify(data)); - } - } - subscribe(); - }; - - notificationSocket.onclose = function(event) { - console.log("Socket connection closed."); - }; - } catch (e) { - console.error("Error when creating WebSocket.\n" + e); - } - }, function(error){ - console.error("Error when creating WebSocket.\n" + error); - }); - }; - listenToNotifications(); - - // Alarm Log - // $scope.gridOptionsAlarmLog = JSON.parse(JSON.stringify($mwtnFault.gridOptions)); - - $scope.paginationOptions = { - pageNumber: 1, - pageSize: 25, - sort: null - }; - - $scope.gridOptionsAlarmLog = { - paginationPageSizes: [25, 100, 1000, 10000], - paginationPageSize: 25, - useExternalPagination: true, - useExternalSorting: true, - enablePaginationControls: false, - enableFiltering: true, - useExternalFiltering: true, - columnDefs : [ - // { field: 'id', type: 'number', displayName: 'No.', headerCellClass: $scope.highlightFilteredHeader, width : 50, cellClass: 'number', pinnedLeft : true }, - { field: 'icon', type: 'string', displayName: '', headerCellClass: $scope.highlightFilteredHeader, width: 25, enableSorting: false, enableFiltering:false, cellTemplate: iconCell }, - { field: 'timestamp', type: 'string', displayName: 'Timestamp', headerCellClass: $scope.highlightFilteredHeader, width : 200, sort: { - direction: uiGridConstants.DESC, - priority: 1 - } }, - { field: 'node', type: 'string', displayName: 'Node name', headerCellClass: $scope.highlightFilteredHeader, width: 200 }, - { field: 'counter', type: 'number', displayName: 'Counter', headerCellClass: $scope.highlightFilteredHeader, width: 70, cellClass: 'number' }, - { field: 'object', type: 'string', displayName: 'Object Id', headerCellClass: $scope.highlightFilteredHeader, width: 300 }, - { field: 'problem', type: 'string', displayName: 'Alarm type', headerCellClass: $scope.highlightFilteredHeader, width : 200 }, - { field: 'severity', type: 'string', displayName: 'Severity', headerCellClass: $scope.highlightFilteredHeader, width : 150 } - ], - data: 'data', - onRegisterApi: function(gridApi) { - $scope.gridApi = gridApi; - $scope.gridApi.core.on.filterChanged( $scope, $scope.filter); - $scope.gridApi.core.on.sortChanged( $scope, $scope.sortChanged ); - $scope.sortChanged($scope.gridApi.grid, [ $scope.gridOptionsAlarmLog.columnDefs[1] ] ); - - $scope.gridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) { - $scope.paginationOptions.pageNumber = newPage; - $scope.paginationOptions.pageSize = pageSize; - getPage(); - }); - } -}; - - //stateobject - $scope.state={}; - $scope.state.filter=false; - $scope.state.sort=false; - $scope.state.lastfilter=null; - $scope.state.lastSort=null; - - $scope.maxCount=0; //value shown on screen - - - $scope.seekPage= function(page){ - if(!page){ //catch NaN values - page=1; - return; - } - $scope.gridApi.pagination.seek(parseInt(page)); - }; - - $scope.paginationStatusMessage = function() { - - var startnum=($scope.paginationOptions.pageNumber-1)*$scope.paginationOptions.pageSize+1; - var pagenednum=($scope.paginationOptions.pageNumber-1)*$scope.paginationOptions.pageSize+1+$scope.data.length; - if(pagenednum>$scope.gridOptionsAlarmLog.totalItems) pagenednum=pagenednum-1; //reduce by initial added 1 - - if($scope.state.filter){ - var filterTpl = 'Showing {0} to {1} of {2} items (filtered from {3} total items)'; - return filterTpl.format(startnum, pagenednum, $scope.gridOptionsAlarmLog.totalItems, $scope.maxCount); - - } else { - var defaultTpl = 'Showing {0} to {1} of {2} total items'; - return defaultTpl.format( startnum, pagenednum, $scope.maxCount); - } - }; - -//list visible on screen - $scope.data = []; - - var getPage = function() { - //from, how many, sort, filter - getData(($scope.gridOptionsAlarmLog.paginationCurrentPage-1)*$scope.paginationOptions.pageSize, $scope.paginationOptions.pageSize,$scope.state.lastSort,$scope.state.lastfilter) - .then(function (data) { - $scope.gridOptionsAlarmLog.totalItems = data.data.hits.total; - processResponseRecreateList(data); - }); - }; - - //filter - $scope.filter = function() - { - var grid = this.grid; - var columns=[]; - - //get all columns where data was typed in - angular.forEach(grid.columns, function(value, key) { - if(value.filters[0].term) { - var col=findColumn(value.displayName); - if(col==="fault.timeStamp"){ - //convert timestamp to db format - var timestamp= $mwtnFault.TimeStampToONFFormat(value.filters[0].term); - columns.push({ column: col ,value: timestamp }); - } - else - columns.push({ column: col ,value: value.filters[0].term }); //create column object - } - }); - - if(columns.length === 0){ //all filter data cleared away - $scope.state.filter=false; - $scope.state.lastfilter=null; - - //get unfiltered data - getData(($scope.gridOptionsAlarmLog.paginationCurrentPage-1)*$scope.paginationOptions.pageSize,$scope.paginationOptions.pageSize,$scope.state.lastSort,$scope.state.lastfilter).then(function(response) { - if (response.data.hits.hits) { - processResponseRecreateList(response); - - } - }); - - }else{ - //base filter string - var filter={"query":{"bool":{"must":[]}}}; - - //create filter objects - var prefixs=[]; - for(var obj of columns){ - var prefixObj={}; - prefixObj[obj.column]=obj.value;//add like: {column: "fault.counter", value: "1"} => {"fault.counter":1} - prefixs.push({prefix:prefixObj}); // => {"prefix":{...}} - } - - //add objects to must property - filter.query.bool.must=prefixs; - - //save filter - $scope.state.lastfilter=filter; - $scope.state.filter=true; - - //send data to sdnevents/faultlog/_search - getData(($scope.gridOptionsAlarmLog.paginationCurrentPage-1)*$scope.paginationOptions.pageSize,$scope.paginationOptions.pageSize,$scope.state.lastSort,$scope.state.lastfilter).then(function(response) { - if (response.data.hits.total>0) { //only, when hits exist - processResponseRecreateList(response); - $scope.gridOptionsAlarmLog.totalItems = response.data.hits.total; - }else{ - //clear data from list - $scope.data=[]; - $scope.gridOptionsAlarmLog.totalItems =0; - $scope.state.filter=false; - $scope.state.lastfilter=null; - } - }); - } -}; - - //sort - - $scope.sortChanged=function(grid, sortColumns){ // sortColumns is an array containing just the column sorted in the grid - - - if(sortColumns.length>0){ - if(sortColumns[0].sort){ - var name = sortColumns[0].displayName; // the name of the column sorted - var direction = sortColumns[0].sort.direction; // the direction of the column sorted: "desc" or "asc" - sort(direction,findColumn(name)); - } - }else{ - $scope.state.sort=false; - $scope.state.lastSort=null; - - //get unsorted data - getData(($scope.gridOptionsAlarmLog.paginationCurrentPage-1)*$scope.paginationOptions.pageSize,$scope.paginationOptions.pageSize,$scope.state.lastSort,$scope.state.lastfilter).then(function(response) { - if (response.data.hits.hits) { - processResponseRecreateList(response); - } - }); - } - }; - - function sort(direction, columnName){ - - var sortObj={}; - var sort = [ sortObj]; - switch(direction) { - case uiGridConstants.ASC: - - //create sort object - sortObj[columnName]={order : 'asc'}; - sort = [ sortObj]; - //save last sort - $scope.state.lastSort=sort; - - getData(($scope.paginationOptions.pageNumber-1)*$scope.paginationOptions.pageSize,$scope.paginationOptions.pageSize,$scope.state.lastSort,$scope.state.lastfilter).then(function(response) { - if (response.data.hits.hits) { - processResponseRecreateList(response); - $scope.state.sort=true; - } - }); - - break; - - case uiGridConstants.DESC: - - sortObj[columnName]={order : 'desc'}; - sort = [ sortObj]; - $scope.state.lastSort=sort; - - getData(($scope.paginationOptions.pageNumber-1)*$scope.paginationOptions.pageSize,$scope.paginationOptions.pageSize,$scope.state.lastSort,$scope.state.lastfilter).then(function(response) { - if (response.data.hits.hits) { - processResponseRecreateList(response); - $scope.state.sort=true; - } - }); - break; - - case undefined: - - $scope.state.sort=false; - $scope.state.lastSort=null; - - getData(($scope.gridOptionsAlarmLog.paginationCurrentPage-1)*$scope.paginationOptions.pageSize,$scope.paginationOptions.pageSize,$scope.state.lastSort,$scope.state.lastfilter) - .then(function(response) { - if (response.data.hits.hits) { - processResponseRecreateList(response); - } - }); - - break; - } - } - - var findColumn = function(name) { - - if(name==="Timestamp"){ return "fault.timeStamp"; } - else if(name==="Node name"){ return "fault.nodeName"; } - else if(name==="Counter"){ return "fault.counter"; } - else if(name==="Object Id"){ return "fault.objectId"; } - else if(name==="Alarm type"){return "fault.problem"; } - else if(name==="Severity"){ return "fault.severity"; } - - }; - - var getData = function(from, size, sort, query){ - if(sort === null){ //default sort value - sort = [ { "fault.timeStamp" : {order : 'desc'}}]; - } - if(query === null){ //default filter value - query= {match_all: {}}; - } - return $mwtnFault.getFilteredSortedData(from, size, sort, query); - }; - - var processResponseAddToList=function(response) { - if (response.data.hits.hits) { - response.data.hits.hits.map(function(entry){ - var log = { - id: entry._id, - icon: getIconFromSeverity(entry._source.fault.severity), - timestamp: $mwtnFault.formatTimeStamp(entry._source.fault.timeStamp), - node: entry._source.fault.nodeName, - counter: entry._source.fault.counter, - object: entry._source.fault.objectId, - problem: entry._source.fault.problem, - severity: entry._source.fault.severity, - }; - - $scope.data.push(log); - }); - - $scope.gridOptionsAlarmLog.totalItems = response.data.hits.total; // needed by ui-grid to calculate page number, always update! - if($scope.maxCount -
{{error}}
- - - -
- - {{'MWTN_CURRENT_PROBLEM_LIST' | translate}} - ({{gridOptionsCurrentProblemList.data.length}}) - - - - -
-
- -
- - {{'MWTN_ALARM_NOTIFICATIONS' | translate}} - ({{gridOptionsAlarmNotifications.data.length}} since {{date}}) - - - - -
-
- -
- - {{'MWTN_ALARM_LOG' | translate}} - ({{maxCount}}) - - - -
-
- -
- - - -  / {{ gridApi.pagination.getTotalPages() }} - - - - - - - items per page - - {{ paginationStatusMessage() }} - -
- -
- - - -
- -
-
- -
-
- ONAP SDN-R | ONF Wireless for @distversion@ - Build: @buildtime@ -
\ No newline at end of file diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/templates/alarmStatus.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/templates/alarmStatus.tpl.html deleted file mode 100644 index b57a614c..00000000 --- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/templates/alarmStatus.tpl.html +++ /dev/null @@ -1,21 +0,0 @@ - \ No newline at end of file diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/templates/clearLogConfirmation.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/templates/clearLogConfirmation.tpl.html deleted file mode 100644 index 3e58a3a4..00000000 --- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/mwtnFault-module/src/main/resources/mwtnFault/templates/clearLogConfirmation.tpl.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - \ No newline at end of file diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/pom.xml deleted file mode 100644 index 64df3af1..00000000 --- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnFault/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - 4.0.0 - - mwtn - com.highstreet.technologies.odl.dlux - 0.5.1-SNAPSHOT - - pom - com.highstreet.technologies.odl.dlux - mwtnFault - 0.5.1-SNAPSHOT - ${prefix} ${project.artifactId} - - - 3.0 - - - - mwtnFault-module - mwtnFault-bundle - - -- cgit 1.2.3-korg