Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
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 |
Simon Hunt | 5c3ed73 | 2017-07-20 19:03:28 +0000 | [diff] [blame] | 25 | var $log, $scope, $location, fs, tbs, ns; |
Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 26 | |
| 27 | angular.module('ovProcessor', []) |
| 28 | .controller('OvProcessorCtrl', |
Simon Hunt | 5c3ed73 | 2017-07-20 19:03:28 +0000 | [diff] [blame] | 29 | ['$log', '$scope', '$location', |
| 30 | 'FnService', 'TableBuilderService', 'NavService', |
Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 31 | |
Simon Hunt | 5c3ed73 | 2017-07-20 19:03:28 +0000 | [diff] [blame] | 32 | function (_$log_, _$scope_, _$location_, _fs_, _tbs_, _ns_) { |
Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 33 | var params; |
| 34 | $log = _$log_; |
| 35 | $scope = _$scope_; |
| 36 | $location = _$location_; |
Simon Hunt | 5c3ed73 | 2017-07-20 19:03:28 +0000 | [diff] [blame] | 37 | fs = _fs_; |
Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 38 | tbs = _tbs_; |
| 39 | ns = _ns_; |
| 40 | $scope.requestTip = 'Show packet requests'; |
| 41 | |
| 42 | params = $location.search(); |
| 43 | |
| 44 | tbs.buildTable({ |
| 45 | scope: $scope, |
| 46 | tag: 'processor', |
Simon Hunt | 5c3ed73 | 2017-07-20 19:03:28 +0000 | [diff] [blame] | 47 | query: params |
Thomas Vachuska | 3ece373 | 2015-09-22 23:58:50 -0700 | [diff] [blame] | 48 | }); |
| 49 | |
| 50 | $scope.nav = function (path) { |
| 51 | if ($scope.devId) { |
| 52 | ns.navTo(path); |
| 53 | } |
| 54 | }; |
| 55 | |
| 56 | $log.log('OvProcessorCtrl has been created'); |
| 57 | }]); |
| 58 | }()); |