2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
9 define(['app/node/nodes.module'],function(node) {
\r
11 node.factory('nodeConnectorFactory', function() {
\r
14 factory.getActiveFlow = function(flowTable, index) {
\r
15 var flow = flowTable[index];
\r
16 var activeFlow = flow['opendaylight-flow-table-statistics:flow-table-statistics']['opendaylight-flow-table-statistics:active-flows'];
\r
18 return (activeFlow > 0);
\r
23 node.factory('NodeRestangular', function(Restangular, ENV) {
\r
24 return Restangular.withConfig(function(RestangularConfig) {
\r
25 RestangularConfig.setBaseUrl(ENV.getBaseURL("MD_SAL"));
\r
29 node.factory('NodeInventorySvc', function(NodeRestangular) {
\r
32 return NodeRestangular.one('restconf').one('operational').one('opendaylight-inventory:nodes');
\r
37 svc.getCurrentData = function() {
\r
41 svc.getAllNodes = function() {
\r
42 svc.data = svc.base().getList();
\r
46 svc.getNode = function(node) {
\r
47 return svc.base().one('node', node).get();
\r