blob: 729d1178cc9d10531c06e445a365add05732b565 [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
34 angular.module('ovTlTopov', [])
35 .factory('LayoutTopovService',
36 ['$log', 'FlashService', 'WebSocketService',
37
38 function (_$log_, _flash_, _wss_) {
39 $log = _$log_;
40 flash = _flash_;
41 wss = _wss_;
42
43 return {
44 doLayout: doLayout
45 };
46 }]);
47}());