blob: fb439efd2e63b72694d9460d1f4b7abb026651a2 [file] [log] [blame]
Thomas Vachuska5b48d6c2018-04-27 18:24:27 -07001/*
2 * Copyright 2015-present Open Networking Foundation
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 Module containing the "business logic" for the layout topology overlay.
19 */
20
21(function () {
22 'use strict';
23
24 // injected refs
25 var $log, flash, wss;
26
27 function doLayout(type, description) {
28 flash.flash(description);
29 wss.sendEvent('doLayout', {
30 type: type
31 });
32 }
33
Sean Condonae102932019-03-04 22:16:20 +000034 function clear() {
35 // Nothing to do?
36 }
37
Thomas Vachuska5b48d6c2018-04-27 18:24:27 -070038 angular.module('ovTlTopov', [])
39 .factory('LayoutTopovService',
40 ['$log', 'FlashService', 'WebSocketService',
41
42 function (_$log_, _flash_, _wss_) {
43 $log = _$log_;
44 flash = _flash_;
45 wss = _wss_;
46
47 return {
Sean Condonae102932019-03-04 22:16:20 +000048 doLayout: doLayout,
49 clear: clear
Thomas Vachuska5b48d6c2018-04-27 18:24:27 -070050 };
51 }]);
52}());