blob: 66188a195c5c684b07630398e24767ca68f311e7 [file] [log] [blame]
Thomas Vachuska3ece3732015-09-22 23:58:50 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Thomas Vachuska3ece3732015-09-22 23:58:50 -07003 *
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 Burrows1c2a9682017-07-14 16:52:46 +010025 var $log, $scope, $location, tbs, ns;
Thomas Vachuska3ece3732015-09-22 23:58:50 -070026
27 angular.module('ovProcessor', [])
28 .controller('OvProcessorCtrl',
Steven Burrows1c2a9682017-07-14 16:52:46 +010029 ['$log', '$scope', '$location', 'TableBuilderService', 'NavService',
Thomas Vachuska3ece3732015-09-22 23:58:50 -070030
Steven Burrows1c2a9682017-07-14 16:52:46 +010031 function (_$log_, _$scope_, _$location_, _tbs_, _ns_) {
Thomas Vachuska3ece3732015-09-22 23:58:50 -070032 var params;
33 $log = _$log_;
34 $scope = _$scope_;
35 $location = _$location_;
Thomas Vachuska3ece3732015-09-22 23:58:50 -070036 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 Burrows1c2a9682017-07-14 16:52:46 +010045 query: params,
Thomas Vachuska3ece3732015-09-22 23:58:50 -070046 });
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}());