+++ /dev/null
-define(['app/yangui/yangui.module'], function(yangui) {\r
-\r
- yangui.register.factory('checkFlow', function($http, YangUtilsRestangularService) {\r
-\r
- var fnc = function($scope) {\r
- var requestPath = $scope.selSubApi.buildApiRequestString().replace('config','operational'),\r
- requestData = {},\r
- getPathIdentifierData = function(pathArray){\r
- var data = '';\r
- pathArray.forEach(function(item){\r
- if( item.hasIdentifier() ) {\r
- data += item.name + ': ' + item.identifierValue + '\n ';\r
- }\r
- });\r
- return data;\r
- },\r
- identifiers = getPathIdentifierData($scope.selSubApi.pathArray);\r
-\r
- YangUtilsRestangularService.one('restconf').customGET(requestPath).then(\r
- function (data) {\r
- alert('Flow: \n\n' + identifiers + '\n\n is in controller.');\r
- }, function (result) {\r
- alert('Flow: \n\n' + identifiers + '\n\n isn\'t in controller.');\r
- }\r
- );\r
- };\r
-\r
- return {\r
- module: ['opendaylight-inventory'],\r
- revision: null,\r
- pathString: ['config/opendaylight-inventory:nodes/node/{id}/flow-node-inventory:table/{id}/flow/{id}/'],\r
- label: 'Verify operational flow', \r
- getCallback: fnc\r
- };\r
- });\r
-});
\ No newline at end of file