blob: f047ebc79da48c0ecdb9c7aa399c455a4a39ec55 [file] [log] [blame]
Jian Lia23f46d2017-05-02 18:07:31 +09001/*
2 * Copyright 2017-present 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 -- Mapping Management View Module
19 */
20(function () {
21 'use strict';
22
23 // injected references
Jian Li4689f812017-05-04 07:30:35 +090024 var $log, $scope, $location, tbs;
Jian Lia23f46d2017-05-02 18:07:31 +090025
26 angular.module('ovMapping', [])
27 .controller('OvMappingCtrl',
Jian Li4689f812017-05-04 07:30:35 +090028 ['$log', '$scope', '$location', 'TableBuilderService',
Jian Lia23f46d2017-05-02 18:07:31 +090029
Jian Li4689f812017-05-04 07:30:35 +090030 function (_$log_, _$scope_, _$location_, _tbs_) {
Jian Lia23f46d2017-05-02 18:07:31 +090031 var params;
Jian Li4689f812017-05-04 07:30:35 +090032
Jian Lia23f46d2017-05-02 18:07:31 +090033 $log = _$log_;
34 $scope = _$scope_;
35 $location = _$location_;
Jian Li4689f812017-05-04 07:30:35 +090036 tbs = _tbs_;
37
38 params = $location.search();
39 if (params.hasOwnProperty('devId')) {
40 $scope.devId = params['devId'];
41 }
42
43 tbs.buildTable({
44 scope: $scope,
45 tag: 'mapping',
46 query: params
47 });
Jian Lia23f46d2017-05-02 18:07:31 +090048
49 $log.log('OvMappingCtrl has been created');
50 }]);
51}());