blob: 9f82d895596544b6c69848202c981522c196923e [file] [log] [blame]
Simon Huntb0ec1e52015-01-28 18:13:49 -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 -- Topology Panel Module.
19 Defines functions for manipulating the summary, detail, and instance panels.
20 */
21
22(function () {
23 'use strict';
24
25 // injected refs
Bri Prebilic Coled8745462015-06-01 16:08:57 -070026 var $log, $window, $rootScope, fs, ps, gs, flash, wss, bns, mast;
Simon Huntb0ec1e52015-01-28 18:13:49 -080027
Simon Hunt626d2102015-01-29 11:54:50 -080028 // constants
Simon Hunt08f841d02015-02-10 14:39:20 -080029 var pCls = 'topo-p',
30 idSum = 'topo-p-summary',
Simon Hunt626d2102015-01-29 11:54:50 -080031 idDet = 'topo-p-detail',
Simon Hunt626d2102015-01-29 11:54:50 -080032 panelOpts = {
33 width: 260
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -070034 },
Bri Prebilic Coled8745462015-06-01 16:08:57 -070035 sumMax = 226,
36 padTop = 28;
Simon Hunt626d2102015-01-29 11:54:50 -080037
Simon Hunt0c6b2d32015-03-26 17:46:29 -070038 // internal state
39 var useDetails = true, // should we show details if we have 'em?
Bri Prebilic Coled8745462015-06-01 16:08:57 -070040 haveDetails = false, // do we have details that we could show?
41 sumFromTop; // summary panel distance from top of screen
Simon Huntb0ec1e52015-01-28 18:13:49 -080042
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -070043 // panels
44 var summary, detail;
45
46 // === -----------------------------------------------------
47 // Panel API
48 function createTopoPanel(id, opts) {
49 var p = ps.createPanel(id, opts),
Bri Prebilic Cole35d29712015-05-11 16:01:32 -070050 pid = id,
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -070051 header, body, footer;
52 p.classed(pCls, true);
53
Bri Prebilic Cole35d29712015-05-11 16:01:32 -070054 function panel() {
55 return p;
56 }
57
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -070058 function hAppend(x) {
59 return header.append(x);
60 }
61
62 function bAppend(x) {
63 return body.append(x);
64 }
65
66 function fAppend(x) {
67 return footer.append(x);
68 }
69
70 function setup() {
71 p.empty();
72
73 p.append('div').classed('header', true);
74 p.append('div').classed('body', true);
75 p.append('div').classed('footer', true);
76
77 header = p.el().select('.header');
78 body = p.el().select('.body');
79 footer = p.el().select('.footer');
80 }
81
Bri Prebilic Cole35d29712015-05-11 16:01:32 -070082 function destroy() {
83 ps.destroyPanel(pid);
84 }
85
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -070086 // fromTop is how many pixels from the top of the page the panel is
87 // max is the max height of the panel in pixels
88 // only adjusts if the body content would be 10px or larger
89 function adjustHeight(fromTop, max) {
90 var totalPHeight, avSpace,
91 overflow = 0,
92 pdg = 30;
93
94 if (!fromTop) {
95 $log.warn('adjustHeight: height from top of page not given');
96 return null;
97 } else if (!body || !p) {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -070098 $log.warn('adjustHeight: panel contents are not defined');
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -070099 return null;
100 }
101
102 p.el().style('height', null);
103 body.style('height', null);
104
105 totalPHeight = fromTop + p.height();
106 avSpace = fs.windowSize(pdg).height;
107
108 if (totalPHeight >= avSpace) {
109 overflow = totalPHeight - avSpace;
110 }
111
112 function _adjustBody(height) {
113 if (height < 10) {
114 return false;
115 } else {
116 body.style('height', height + 'px');
117 }
118 return true;
119 }
120
121 if (!_adjustBody(fs.noPxStyle(body, 'height') - overflow)) {
122 return;
123 }
124
125 if (max && p.height() > max) {
126 _adjustBody(fs.noPxStyle(body, 'height') - (p.height() - max));
127 }
128 }
129
130 return {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700131 panel: panel,
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700132 setup: setup,
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700133 destroy: destroy,
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700134 appendHeader: hAppend,
135 appendBody: bAppend,
136 appendFooter: fAppend,
137 adjustHeight: adjustHeight
138 };
139 }
140
Simon Hunt08f841d02015-02-10 14:39:20 -0800141 // === -----------------------------------------------------
142 // Utility functions
Simon Hunt626d2102015-01-29 11:54:50 -0800143
Simon Hunt4b668592015-01-29 17:33:53 -0800144 function addSep(tbody) {
145 tbody.append('tr').append('td').attr('colspan', 2).append('hr');
146 }
147
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700148 function addBtnFooter() {
149 detail.appendFooter('hr');
150 detail.appendFooter('div').classed('actionBtns', true);
151 }
152
Simon Hunt4b668592015-01-29 17:33:53 -0800153 function addProp(tbody, label, value) {
Simon Hunte25c5a22015-04-02 14:37:12 -0700154 var tr = tbody.append('tr'),
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -0700155 lab;
156 if (typeof label === 'string') {
Simon Hunte25c5a22015-04-02 14:37:12 -0700157 lab = label.replace(/_/g, ' ');
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -0700158 } else {
159 lab = label;
160 }
Simon Hunt4b668592015-01-29 17:33:53 -0800161
162 function addCell(cls, txt) {
Simon Hunta36f03b2015-04-01 15:22:49 -0700163 tr.append('td').attr('class', cls).html(txt);
Simon Hunt4b668592015-01-29 17:33:53 -0800164 }
Simon Hunte25c5a22015-04-02 14:37:12 -0700165 addCell('label', lab + ' :');
Simon Hunt4b668592015-01-29 17:33:53 -0800166 addCell('value', value);
167 }
168
Simon Hunt08f841d02015-02-10 14:39:20 -0800169 function listProps(tbody, data) {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700170 data.propOrder.forEach(function (p) {
Simon Hunt08f841d02015-02-10 14:39:20 -0800171 if (p === '-') {
172 addSep(tbody);
173 } else {
174 addProp(tbody, p, data.props[p]);
175 }
176 });
177 }
178
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700179 function watchWindow() {
180 $rootScope.$watchCollection(
181 function () {
182 return {
183 h: $window.innerHeight,
184 w: $window.innerWidth
185 };
186 }, function () {
187 summary.adjustHeight(sumFromTop, sumMax);
188 detail.adjustHeight(detail.ypos.current);
189 }
190 );
191 }
192
Simon Hunt08f841d02015-02-10 14:39:20 -0800193 // === -----------------------------------------------------
194 // Functions for populating the summary panel
195
196 function populateSummary(data) {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700197 summary.setup();
Simon Hunt08f841d02015-02-10 14:39:20 -0800198
Bri Prebilic Cole8d3de3d2015-05-15 16:02:59 -0700199 var svg = summary.appendHeader('div')
200 .classed('icon', true)
201 .append('svg'),
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700202 title = summary.appendHeader('h2'),
203 table = summary.appendBody('table'),
Simon Hunt08f841d02015-02-10 14:39:20 -0800204 tbody = table.append('tbody');
205
206 gs.addGlyph(svg, 'node', 40);
207 gs.addGlyph(svg, 'bird', 24, true, [8,12]);
208
209 title.text(data.id);
210 listProps(tbody, data);
211 }
212
213 // === -----------------------------------------------------
214 // Functions for populating the detail panel
215
216 function displaySingle(data) {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700217 detail.setup();
Simon Hunt08f841d02015-02-10 14:39:20 -0800218
Bri Prebilic Cole8d3de3d2015-05-15 16:02:59 -0700219 var svg = detail.appendHeader('div')
220 .classed('icon', true)
221 .append('svg'),
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700222 title = detail.appendHeader('h2'),
223 table = detail.appendBody('table'),
Simon Hunt08f841d02015-02-10 14:39:20 -0800224 tbody = table.append('tbody');
225
226 gs.addGlyph(svg, (data.type || 'unknown'), 40);
227 title.text(data.id);
228 listProps(tbody, data);
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700229 addBtnFooter();
Simon Hunt08f841d02015-02-10 14:39:20 -0800230 }
231
232 function displayMulti(ids) {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700233 detail.setup();
Simon Hunt08f841d02015-02-10 14:39:20 -0800234
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700235 var title = detail.appendHeader('h3'),
236 table = detail.appendBody('table'),
Simon Hunt08f841d02015-02-10 14:39:20 -0800237 tbody = table.append('tbody');
238
239 title.text('Selected Nodes');
240 ids.forEach(function (d, i) {
241 addProp(tbody, i+1, d);
242 });
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700243 addBtnFooter();
Simon Hunt08f841d02015-02-10 14:39:20 -0800244 }
245
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -0700246 function addAction(o) {
247 var btnDiv = d3.select('#' + idDet)
248 .select('.actionBtns')
249 .append('div')
250 .classed('actionBtn', true);
251 bns.button(btnDiv, idDet + o.id, o.gid, o.cb, o.tt);
Simon Hunt08f841d02015-02-10 14:39:20 -0800252 }
253
Simon Hunta36f03b2015-04-01 15:22:49 -0700254 var friendlyIndex = {
255 device: 1,
256 host: 0
257 };
258
259 function friendly(d) {
260 var i = friendlyIndex[d.class] || 0;
261 return (d.labels && d.labels[i]) || '';
262 }
263
264 function linkSummary(d) {
265 var o = d && d.online ? 'online' : 'offline';
266 return d ? d.type + ' / ' + o : '-';
267 }
268
Simon Hunte25c5a22015-04-02 14:37:12 -0700269 // provided to change presentation of internal type name
270 var linkTypePres = {
271 hostLink: 'edge link'
272 };
273
274 function linkType(d) {
275 return linkTypePres[d.type()] || d.type();
276 }
277
278 var coreOrder = [
279 'Type', '-',
280 'A_type', 'A_id', 'A_label', 'A_port', '-',
281 'B_type', 'B_id', 'B_label', 'B_port', '-'
282 ],
283 edgeOrder = [
284 'Type', '-',
285 'A_type', 'A_id', 'A_label', '-',
286 'B_type', 'B_id', 'B_label', 'B_port'
287 ];
288
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700289 function displayLink(data) {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700290 detail.setup();
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700291
Bri Prebilic Cole8d3de3d2015-05-15 16:02:59 -0700292 var svg = detail.appendHeader('div')
293 .classed('icon', true)
294 .append('svg'),
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700295 title = detail.appendHeader('h2'),
296 table = detail.appendBody('table'),
Simon Hunte25c5a22015-04-02 14:37:12 -0700297 tbody = table.append('tbody'),
298 edgeLink = data.type() === 'hostLink',
299 order = edgeLink ? edgeOrder : coreOrder;
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700300
301 gs.addGlyph(svg, 'ports', 40);
302 title.text('Link');
Simon Hunta36f03b2015-04-01 15:22:49 -0700303
Simon Hunta36f03b2015-04-01 15:22:49 -0700304
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700305 listProps(tbody, {
Simon Hunta36f03b2015-04-01 15:22:49 -0700306 propOrder: order,
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700307 props: {
Simon Hunte25c5a22015-04-02 14:37:12 -0700308 Type: linkType(data),
Simon Hunta36f03b2015-04-01 15:22:49 -0700309
310 A_type: data.source.class,
311 A_id: data.source.id,
312 A_label: friendly(data.source),
313 A_port: data.srcPort,
314
315 B_type: data.target.class,
316 B_id: data.target.id,
317 B_label: friendly(data.target),
318 B_port: data.tgtPort
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700319 }
320 });
Simon Hunta36f03b2015-04-01 15:22:49 -0700321
Simon Hunte25c5a22015-04-02 14:37:12 -0700322 if (!edgeLink) {
323 addProp(tbody, 'A &rarr; B', linkSummary(data.fromSource));
324 addProp(tbody, 'B &rarr; A', linkSummary(data.fromTarget));
325 }
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700326 }
327
328 function displayNothing() {
329 haveDetails = false;
330 hideDetailPanel();
331 }
332
333 function displaySomething() {
334 haveDetails = true;
335 if (useDetails) {
336 showDetailPanel();
337 }
338 }
339
Simon Hunt08f841d02015-02-10 14:39:20 -0800340 // === -----------------------------------------------------
341 // Event Handlers
342
343 function showSummary(data) {
344 populateSummary(data);
345 showSummaryPanel();
346 }
347
Simon Hunt36a58c62015-04-08 11:00:07 -0700348 function toggleSummary(x) {
Simon Huntee7a3ce2015-04-09 13:28:37 -0700349 var kev = (x === 'keyev'),
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700350 on = kev ? !summary.panel().isVisible() : !!x,
Simon Huntee7a3ce2015-04-09 13:28:37 -0700351 verb = on ? 'Show' : 'Hide';
Simon Hunt36a58c62015-04-08 11:00:07 -0700352
353 if (on) {
Simon Hunta0eb0a82015-02-11 12:30:06 -0800354 // ask server to start sending summary data.
Simon Hunt237676b52015-03-10 19:04:26 -0700355 wss.sendEvent('requestSummary');
Simon Hunta0eb0a82015-02-11 12:30:06 -0800356 // note: the summary panel will appear, once data arrives
Simon Hunt36a58c62015-04-08 11:00:07 -0700357 } else {
358 hideSummaryPanel();
Simon Hunt6036b192015-02-11 11:20:26 -0800359 }
Simon Huntee7a3ce2015-04-09 13:28:37 -0700360 flash.flash(verb + ' summary panel');
361 return on;
Simon Hunt6036b192015-02-11 11:20:26 -0800362 }
Simon Hunt08f841d02015-02-10 14:39:20 -0800363
364 // === -----------------------------------------------------
365 // === LOGIC For showing/hiding summary and detail panels...
366
Simon Hunt626d2102015-01-29 11:54:50 -0800367 function showSummaryPanel() {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700368 function _show() {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700369 summary.panel().show();
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700370 summary.adjustHeight(sumFromTop, sumMax);
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700371 }
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700372 if (detail.panel().isVisible()) {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700373 detail.down(_show);
Simon Hunt6036b192015-02-11 11:20:26 -0800374 } else {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700375 _show();
Simon Hunt6036b192015-02-11 11:20:26 -0800376 }
Simon Huntc252aa62015-02-10 16:45:39 -0800377 }
378
379 function hideSummaryPanel() {
Simon Hunta0eb0a82015-02-11 12:30:06 -0800380 // instruct server to stop sending summary data
Simon Hunt237676b52015-03-10 19:04:26 -0700381 wss.sendEvent("cancelSummary");
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700382 summary.panel().hide(detail.up);
Simon Hunt4b668592015-01-29 17:33:53 -0800383 }
Simon Hunt626d2102015-01-29 11:54:50 -0800384
Simon Hunt08f841d02015-02-10 14:39:20 -0800385 function showDetailPanel() {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700386 if (summary.panel().isVisible()) {
387 detail.down(detail.panel().show);
Simon Hunt6036b192015-02-11 11:20:26 -0800388 } else {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700389 detail.up(detail.panel().show);
Simon Hunt6036b192015-02-11 11:20:26 -0800390 }
Simon Hunt08f841d02015-02-10 14:39:20 -0800391 }
392
393 function hideDetailPanel() {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700394 detail.panel().hide();
Simon Hunt08f841d02015-02-10 14:39:20 -0800395 }
396
Simon Hunt6036b192015-02-11 11:20:26 -0800397 // ==========================
Simon Hunt08f841d02015-02-10 14:39:20 -0800398
Simon Hunt6036b192015-02-11 11:20:26 -0800399 function augmentDetailPanel() {
Bri Prebilic Coled8745462015-06-01 16:08:57 -0700400 var d = detail,
401 downPos = sumFromTop + sumMax + 20;
402 d.ypos = { up: sumFromTop, down: downPos, current: downPos};
Simon Hunt6036b192015-02-11 11:20:26 -0800403
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700404 d._move = function (y, cb) {
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700405 var yp = d.ypos,
406 endCb;
407
408 if (fs.isF(cb)) {
409 endCb = function () {
410 cb();
411 d.adjustHeight(d.ypos.current);
412 }
413 } else {
414 endCb = function () {
415 d.adjustHeight(d.ypos.current);
416 }
417 }
Simon Hunt6036b192015-02-11 11:20:26 -0800418 if (yp.current !== y) {
419 yp.current = y;
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700420 d.panel().el().transition().duration(300)
Simon Hunt6036b192015-02-11 11:20:26 -0800421 .each('end', endCb)
422 .style('top', yp.current + 'px');
423 } else {
424 endCb();
425 }
426 };
427
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700428 d.down = function (cb) { d._move(d.ypos.down, cb); };
429 d.up = function (cb) { d._move(d.ypos.up, cb); };
Simon Hunt6036b192015-02-11 11:20:26 -0800430 }
Simon Hunt08f841d02015-02-10 14:39:20 -0800431
Simon Hunt239e5882015-04-23 15:07:04 -0700432 function toggleUseDetailsFlag(x) {
Simon Huntee7a3ce2015-04-09 13:28:37 -0700433 var kev = (x === 'keyev'),
434 verb;
435
436 useDetails = kev ? !useDetails : !!x;
437 verb = useDetails ? 'Enable' : 'Disable';
438
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700439 if (useDetails) {
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700440 if (haveDetails) {
441 showDetailPanel();
442 }
443 } else {
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700444 hideDetailPanel();
445 }
Simon Huntee7a3ce2015-04-09 13:28:37 -0700446 flash.flash(verb + ' details panel');
447 return useDetails;
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700448 }
449
Simon Hunt4b668592015-01-29 17:33:53 -0800450 // ==========================
451
Simon Hunt237676b52015-03-10 19:04:26 -0700452 function initPanels() {
Bri Prebilic Coled8745462015-06-01 16:08:57 -0700453 sumFromTop = mast.mastHeight() + padTop;
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700454 summary = createTopoPanel(idSum, panelOpts);
455 detail = createTopoPanel(idDet, panelOpts);
Simon Hunt6036b192015-02-11 11:20:26 -0800456
457 augmentDetailPanel();
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700458 watchWindow();
Simon Hunt4b668592015-01-29 17:33:53 -0800459 }
460
461 function destroyPanels() {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700462 summary.destroy();
463 summary = null;
464
465 detail.destroy();
466 detail = null;
Simon Hunt239e5882015-04-23 15:07:04 -0700467 haveDetails = false;
Simon Hunt626d2102015-01-29 11:54:50 -0800468 }
469
470 // ==========================
471
Simon Huntb0ec1e52015-01-28 18:13:49 -0800472 angular.module('ovTopo')
473 .factory('TopoPanelService',
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700474 ['$log', '$window', '$rootScope', 'FnService', 'PanelService', 'GlyphService',
Bri Prebilic Coled8745462015-06-01 16:08:57 -0700475 'FlashService', 'WebSocketService', 'ButtonService', 'MastService',
Simon Huntb0ec1e52015-01-28 18:13:49 -0800476
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700477 function (_$log_, _$window_, _$rootScope_,
Bri Prebilic Coled8745462015-06-01 16:08:57 -0700478 _fs_, _ps_, _gs_, _flash_, _wss_, _bns_, _mast_) {
Simon Huntb0ec1e52015-01-28 18:13:49 -0800479 $log = _$log_;
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700480 $window = _$window_;
481 $rootScope = _$rootScope_;
Simon Hunt6036b192015-02-11 11:20:26 -0800482 fs = _fs_;
Simon Huntb0ec1e52015-01-28 18:13:49 -0800483 ps = _ps_;
Simon Huntc9b73162015-01-29 14:02:15 -0800484 gs = _gs_;
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700485 flash = _flash_;
Simon Hunt237676b52015-03-10 19:04:26 -0700486 wss = _wss_;
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -0700487 bns = _bns_;
Bri Prebilic Coled8745462015-06-01 16:08:57 -0700488 mast = _mast_;
Simon Huntb0ec1e52015-01-28 18:13:49 -0800489
Simon Huntb0ec1e52015-01-28 18:13:49 -0800490 return {
491 initPanels: initPanels,
Simon Hunt626d2102015-01-29 11:54:50 -0800492 destroyPanels: destroyPanels,
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700493 createTopoPanel: createTopoPanel,
Simon Hunt08f841d02015-02-10 14:39:20 -0800494
495 showSummary: showSummary,
Simon Hunt6036b192015-02-11 11:20:26 -0800496 toggleSummary: toggleSummary,
Simon Hunt08f841d02015-02-10 14:39:20 -0800497
Simon Hunt239e5882015-04-23 15:07:04 -0700498 toggleUseDetailsFlag: toggleUseDetailsFlag,
Simon Hunt08f841d02015-02-10 14:39:20 -0800499 displaySingle: displaySingle,
500 displayMulti: displayMulti,
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700501 displayLink: displayLink,
502 displayNothing: displayNothing,
503 displaySomething: displaySomething,
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700504 addAction: addAction,
Simon Hunt08f841d02015-02-10 14:39:20 -0800505
Simon Huntc252aa62015-02-10 16:45:39 -0800506 hideSummaryPanel: hideSummaryPanel,
Simon Hunt08f841d02015-02-10 14:39:20 -0800507
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700508 detailVisible: function () { return detail.panel().isVisible(); },
509 summaryVisible: function () { return summary.panel().isVisible(); }
Simon Huntb0ec1e52015-01-28 18:13:49 -0800510 };
511 }]);
512}());