Jian Li | a23f46d | 2017-05-02 18:07:31 +0900 | [diff] [blame] | 1 | /* |
| 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 Li | 4689f81 | 2017-05-04 07:30:35 +0900 | [diff] [blame^] | 24 | var $log, $scope, $location, tbs; |
Jian Li | a23f46d | 2017-05-02 18:07:31 +0900 | [diff] [blame] | 25 | |
| 26 | angular.module('ovMapping', []) |
| 27 | .controller('OvMappingCtrl', |
Jian Li | 4689f81 | 2017-05-04 07:30:35 +0900 | [diff] [blame^] | 28 | ['$log', '$scope', '$location', 'TableBuilderService', |
Jian Li | a23f46d | 2017-05-02 18:07:31 +0900 | [diff] [blame] | 29 | |
Jian Li | 4689f81 | 2017-05-04 07:30:35 +0900 | [diff] [blame^] | 30 | function (_$log_, _$scope_, _$location_, _tbs_) { |
Jian Li | a23f46d | 2017-05-02 18:07:31 +0900 | [diff] [blame] | 31 | var params; |
Jian Li | 4689f81 | 2017-05-04 07:30:35 +0900 | [diff] [blame^] | 32 | |
Jian Li | a23f46d | 2017-05-02 18:07:31 +0900 | [diff] [blame] | 33 | $log = _$log_; |
| 34 | $scope = _$scope_; |
| 35 | $location = _$location_; |
Jian Li | 4689f81 | 2017-05-04 07:30:35 +0900 | [diff] [blame^] | 36 | 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 Li | a23f46d | 2017-05-02 18:07:31 +0900 | [diff] [blame] | 48 | |
| 49 | $log.log('OvMappingCtrl has been created'); |
| 50 | }]); |
| 51 | }()); |