Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /* |
| 18 | ONOS GUI -- Packet Processor View Module |
| 19 | */ |
| 20 | |
| 21 | (function () { |
| 22 | 'use strict'; |
| 23 | |
| 24 | // injected references |
Steven Burrows | 1c2a968 | 2017-07-14 16:52:46 +0100 | [diff] [blame] | 25 | var $log, $scope, $location, tbs, ns; |
Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 26 | |
| 27 | angular.module('ovProcessor', []) |
| 28 | .controller('OvProcessorCtrl', |
Steven Burrows | 1c2a968 | 2017-07-14 16:52:46 +0100 | [diff] [blame] | 29 | ['$log', '$scope', '$location', 'TableBuilderService', 'NavService', |
Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 30 | |
Steven Burrows | 1c2a968 | 2017-07-14 16:52:46 +0100 | [diff] [blame] | 31 | function (_$log_, _$scope_, _$location_, _tbs_, _ns_) { |
Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 32 | var params; |
| 33 | $log = _$log_; |
| 34 | $scope = _$scope_; |
| 35 | $location = _$location_; |
Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 36 | tbs = _tbs_; |
| 37 | ns = _ns_; |
| 38 | $scope.requestTip = 'Show packet requests'; |
| 39 | |
| 40 | params = $location.search(); |
| 41 | |
| 42 | tbs.buildTable({ |
| 43 | scope: $scope, |
| 44 | tag: 'processor', |
Steven Burrows | 1c2a968 | 2017-07-14 16:52:46 +0100 | [diff] [blame] | 45 | query: params, |
Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 46 | }); |
| 47 | |
| 48 | $scope.nav = function (path) { |
| 49 | if ($scope.devId) { |
| 50 | ns.navTo(path); |
| 51 | } |
| 52 | }; |
| 53 | |
| 54 | $log.log('OvProcessorCtrl has been created'); |
| 55 | }]); |
| 56 | }()); |