blob: 2777454c0f7a7f1913d7bea9a7a2dcb0a3fd9e1a [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
Simon Huntcaed0412017-08-12 13:49:17 -070029 /*
30 * NOTE: work-in-progress; this relates to ONOS-5579 (currently stalled)
31 */
32
Simon Hunt400ebbf2017-01-06 20:07:50 -080033 function noop() {}
34
35 // TODO: describe the input object for the main function
36 // example params to (functionX):
37 // {
38 // ...
39 // }
40 function buildBasePanel(opts) {
41 var popTopF = fs.isF(opts.popTop) || noop,
42 popMidF = fs.isF(opts.popMid) || noop,
43 popBotF = fs.isF(opts.popBot) || noop;
44
45 $log.debug('options are', opts);
46
47 // TODO use panel service to create base panel
48
49 // TODO: create divs, and pass into invocations of popTopF(div), etc.
50 }
51
52 // more functions
53
54 // TODO: add ref to PanelService
55 angular.module('onosWidget')
56 .factory('TableDetailService',
Steven Burrows1c2a9682017-07-14 16:52:46 +010057 ['$log', 'FnService',
Simon Hunt400ebbf2017-01-06 20:07:50 -080058
Steven Burrows1c2a9682017-07-14 16:52:46 +010059 function (_$log_, _fs_) {
Simon Hunt400ebbf2017-01-06 20:07:50 -080060 $log = _$log_;
Simon Hunt400ebbf2017-01-06 20:07:50 -080061 fs = _fs_;
Simon Hunt400ebbf2017-01-06 20:07:50 -080062
63 return {
Steven Burrows1c2a9682017-07-14 16:52:46 +010064 buildBasePanel: buildBasePanel,
Simon Hunt400ebbf2017-01-06 20:07:50 -080065 };
66 }]);
67}());