blob: 1da60c14df2ec7b1c523ae5d784ac2f7f0bdbe65 [file] [log] [blame]
Simon Hunt72e44bf2015-07-21 21:34:20 -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/*
19 ONOS GUI -- Topology Traffic Module.
20 Defines behavior for viewing different traffic modes.
21 Installed as a Topology Overlay.
22 */
23(function () {
24 'use strict';
25
26 // injected refs
27 var $log;
28
29 // traffic overlay definition
30 var overlay = {
31 overlayId: 'traffic',
32 glyph: { id: 'allTraffic' },
33 tooltip: 'Traffic Overlay',
34
35 activate: activateTraffic,
36 deactivate: deactivateTraffic
37 };
38
39 // === implementation of overlay API (essentially callbacks)
40 function activateTraffic() {
41 $log.debug("Topology traffic overlay ACTIVATED");
42 }
43
44 function deactivateTraffic() {
45 $log.debug("Topology traffic overlay DEACTIVATED");
46 }
47
48
49 // invoke code to register with the overlay service
50 angular.module('ovTopo')
51 .run(['$log', 'TopoOverlayService',
52
53 function (_$log_, tov) {
54 $log = _$log_;
55 tov.register(overlay);
56 }]);
57
58}());