blob: 466b08cd320da399507fc286e04c53d04c305dfc [file] [log] [blame]
Simon Hunt400ebbf2017-01-06 20:07:50 -08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Simon Hunt400ebbf2017-01-06 20:07:50 -08003 *
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 -- Widget -- Table Detail Panel Service
19 */
20(function () {
21 'use strict';
22
23 // injected refs
Steven Burrows1c2a9682017-07-14 16:52:46 +010024 var $log, fs;
Simon Hunt400ebbf2017-01-06 20:07:50 -080025
26 // constants
27 // var refreshInterval = 2000;
28
29 function noop() {}
30
31 // TODO: describe the input object for the main function
32 // example params to (functionX):
33 // {
34 // ...
35 // }
36 function buildBasePanel(opts) {
37 var popTopF = fs.isF(opts.popTop) || noop,
38 popMidF = fs.isF(opts.popMid) || noop,
39 popBotF = fs.isF(opts.popBot) || noop;
40
41 $log.debug('options are', opts);
42
43 // TODO use panel service to create base panel
44
45 // TODO: create divs, and pass into invocations of popTopF(div), etc.
46 }
47
48 // more functions
49
50 // TODO: add ref to PanelService
51 angular.module('onosWidget')
52 .factory('TableDetailService',
Steven Burrows1c2a9682017-07-14 16:52:46 +010053 ['$log', 'FnService',
Simon Hunt400ebbf2017-01-06 20:07:50 -080054
Steven Burrows1c2a9682017-07-14 16:52:46 +010055 function (_$log_, _fs_) {
Simon Hunt400ebbf2017-01-06 20:07:50 -080056 $log = _$log_;
Simon Hunt400ebbf2017-01-06 20:07:50 -080057 fs = _fs_;
Simon Hunt400ebbf2017-01-06 20:07:50 -080058
59 return {
Steven Burrows1c2a9682017-07-14 16:52:46 +010060 buildBasePanel: buildBasePanel,
Simon Hunt400ebbf2017-01-06 20:07:50 -080061 };
62 }]);
63}());