blob: b596ef5e041f2684ccedd9396a2bc4a5ad2d0df8 [file] [log] [blame]
Bri Prebilic Coleac829e42015-05-05 13:42:06 -07001/*
2 * Copyright 2015 Open Networking Laboratory
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 -- Port View Module
19 */
20
21(function () {
22 'use strict';
23
24 // injected references
Bri Prebilic Colee1be1b72015-05-12 16:07:24 -070025 var $log, $scope, $location, fs, tbs;
Bri Prebilic Coleac829e42015-05-05 13:42:06 -070026
27 angular.module('ovPort', [])
28 .controller('OvPortCtrl',
Bri Prebilic Colee1be1b72015-05-12 16:07:24 -070029 ['$log', '$scope', '$location', 'FnService', 'TableBuilderService',
Bri Prebilic Coleac829e42015-05-05 13:42:06 -070030
Bri Prebilic Colee1be1b72015-05-12 16:07:24 -070031 function (_$log_, _$scope_, _$location_, _fs_, _tbs_) {
Bri Prebilic Coleac829e42015-05-05 13:42:06 -070032 var params;
33 $log = _$log_;
34 $scope = _$scope_;
35 $location = _$location_;
36 fs = _fs_;
Bri Prebilic Coleac829e42015-05-05 13:42:06 -070037 tbs = _tbs_;
38
39 params = $location.search();
40 if (params.hasOwnProperty('devId')) {
41 $scope.devId = params['devId'];
42 }
43
44 tbs.buildTable({
45 scope: $scope,
46 tag: 'port',
47 query: params
48 });
49
Bri Prebilic Coleac829e42015-05-05 13:42:06 -070050 $log.log('OvPortCtrl has been created');
51 }]);
52}());