blob: 6b85e07ffc83dfa5d26fa56b619e719792b15dba [file] [log] [blame]
Simon Hunt988934e2015-01-23 11:49:24 -08001/*
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 ONOS GUI -- Layer -- Panel Service
19 */
20(function () {
21 'use strict';
22
23 var $log;
24
25 var defaultSettings = {
26 position: 'TR',
27 side: 'right',
28 width: 200
29 };
30
31 angular.module('onosLayer')
32 .factory('PanelService', ['$log', function (_$log_) {
33 $log = _$log_;
34
35
36 function createPanel(opts) {
37 var settings = angular.extend({}, defaultSettings, opts);
38
39 function renderPanel() {
40
41 }
42
43 function showPanel() {
44
45 }
46
47 function hidePanel() {
48
49 }
50
51 var api = {
52 render: renderPanel,
53 show: showPanel,
54 hide: hidePanel
55 };
56
57 $log.debug('creating panel with settings: ', settings);
58 return api;
59 }
60
61 return {
62 createPanel: createPanel
63 };
64 }]);
65
66}());