blob: 48a434a975bd3a94a62d44242ec55c95824e8d99 [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 Cole69d5f4e2015-05-19 15:59:55 -070026 var $log, $window, $rootScope, fs, ps, gs, flash, wss, bns;
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 },
35 sumFromTop = 64,
36 sumMax = 226;
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?
40 haveDetails = false; // do we have details that we could show?
Simon Huntb0ec1e52015-01-28 18:13:49 -080041
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -070042 // panels
43 var summary, detail;
44
45 // === -----------------------------------------------------
46 // Panel API
47 function createTopoPanel(id, opts) {
48 var p = ps.createPanel(id, opts),
Bri Prebilic Cole35d29712015-05-11 16:01:32 -070049 pid = id,
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -070050 header, body, footer;
51 p.classed(pCls, true);
52
Bri Prebilic Cole35d29712015-05-11 16:01:32 -070053 function panel() {
54 return p;
55 }
56
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -070057 function hAppend(x) {
58 return header.append(x);
59 }
60
61 function bAppend(x) {
62 return body.append(x);
63 }
64
65 function fAppend(x) {
66 return footer.append(x);
67 }
68
69 function setup() {
70 p.empty();
71
72 p.append('div').classed('header', true);
73 p.append('div').classed('body', true);
74 p.append('div').classed('footer', true);
75
76 header = p.el().select('.header');
77 body = p.el().select('.body');
78 footer = p.el().select('.footer');
79 }
80
Bri Prebilic Cole35d29712015-05-11 16:01:32 -070081 function destroy() {
82 ps.destroyPanel(pid);
83 }
84
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -070085 // fromTop is how many pixels from the top of the page the panel is
86 // max is the max height of the panel in pixels
87 // only adjusts if the body content would be 10px or larger
88 function adjustHeight(fromTop, max) {
89 var totalPHeight, avSpace,
90 overflow = 0,
91 pdg = 30;
92
93 if (!fromTop) {
94 $log.warn('adjustHeight: height from top of page not given');
95 return null;
96 } else if (!body || !p) {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -070097 $log.warn('adjustHeight: panel contents are not defined');
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -070098 return null;
99 }
100
101 p.el().style('height', null);
102 body.style('height', null);
103
104 totalPHeight = fromTop + p.height();
105 avSpace = fs.windowSize(pdg).height;
106
107 if (totalPHeight >= avSpace) {
108 overflow = totalPHeight - avSpace;
109 }
110
111 function _adjustBody(height) {
112 if (height < 10) {
113 return false;
114 } else {
115 body.style('height', height + 'px');
116 }
117 return true;
118 }
119
120 if (!_adjustBody(fs.noPxStyle(body, 'height') - overflow)) {
121 return;
122 }
123
124 if (max && p.height() > max) {
125 _adjustBody(fs.noPxStyle(body, 'height') - (p.height() - max));
126 }
127 }
128
129 return {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700130 panel: panel,
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700131 setup: setup,
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700132 destroy: destroy,
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700133 appendHeader: hAppend,
134 appendBody: bAppend,
135 appendFooter: fAppend,
136 adjustHeight: adjustHeight
137 };
138 }
139
Simon Hunt08f841d02015-02-10 14:39:20 -0800140 // === -----------------------------------------------------
141 // Utility functions
Simon Hunt626d2102015-01-29 11:54:50 -0800142
Simon Hunt4b668592015-01-29 17:33:53 -0800143 function addSep(tbody) {
144 tbody.append('tr').append('td').attr('colspan', 2).append('hr');
145 }
146
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700147 function addBtnFooter() {
148 detail.appendFooter('hr');
149 detail.appendFooter('div').classed('actionBtns', true);
150 }
151
Simon Hunt4b668592015-01-29 17:33:53 -0800152 function addProp(tbody, label, value) {
Simon Hunte25c5a22015-04-02 14:37:12 -0700153 var tr = tbody.append('tr'),
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -0700154 lab;
155 if (typeof label === 'string') {
Simon Hunte25c5a22015-04-02 14:37:12 -0700156 lab = label.replace(/_/g, ' ');
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -0700157 } else {
158 lab = label;
159 }
Simon Hunt4b668592015-01-29 17:33:53 -0800160
161 function addCell(cls, txt) {
Simon Hunta36f03b2015-04-01 15:22:49 -0700162 tr.append('td').attr('class', cls).html(txt);
Simon Hunt4b668592015-01-29 17:33:53 -0800163 }
Simon Hunte25c5a22015-04-02 14:37:12 -0700164 addCell('label', lab + ' :');
Simon Hunt4b668592015-01-29 17:33:53 -0800165 addCell('value', value);
166 }
167
Simon Hunt08f841d02015-02-10 14:39:20 -0800168 function listProps(tbody, data) {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700169 data.propOrder.forEach(function (p) {
Simon Hunt08f841d02015-02-10 14:39:20 -0800170 if (p === '-') {
171 addSep(tbody);
172 } else {
173 addProp(tbody, p, data.props[p]);
174 }
175 });
176 }
177
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700178 function watchWindow() {
179 $rootScope.$watchCollection(
180 function () {
181 return {
182 h: $window.innerHeight,
183 w: $window.innerWidth
184 };
185 }, function () {
186 summary.adjustHeight(sumFromTop, sumMax);
187 detail.adjustHeight(detail.ypos.current);
188 }
189 );
190 }
191
Simon Hunt08f841d02015-02-10 14:39:20 -0800192 // === -----------------------------------------------------
193 // Functions for populating the summary panel
194
195 function populateSummary(data) {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700196 summary.setup();
Simon Hunt08f841d02015-02-10 14:39:20 -0800197
Bri Prebilic Cole8d3de3d2015-05-15 16:02:59 -0700198 var svg = summary.appendHeader('div')
199 .classed('icon', true)
200 .append('svg'),
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700201 title = summary.appendHeader('h2'),
202 table = summary.appendBody('table'),
Simon Hunt08f841d02015-02-10 14:39:20 -0800203 tbody = table.append('tbody');
204
205 gs.addGlyph(svg, 'node', 40);
206 gs.addGlyph(svg, 'bird', 24, true, [8,12]);
207
208 title.text(data.id);
209 listProps(tbody, data);
210 }
211
212 // === -----------------------------------------------------
213 // Functions for populating the detail panel
214
215 function displaySingle(data) {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700216 detail.setup();
Simon Hunt08f841d02015-02-10 14:39:20 -0800217
Bri Prebilic Cole8d3de3d2015-05-15 16:02:59 -0700218 var svg = detail.appendHeader('div')
219 .classed('icon', true)
220 .append('svg'),
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700221 title = detail.appendHeader('h2'),
222 table = detail.appendBody('table'),
Simon Hunt08f841d02015-02-10 14:39:20 -0800223 tbody = table.append('tbody');
224
225 gs.addGlyph(svg, (data.type || 'unknown'), 40);
226 title.text(data.id);
227 listProps(tbody, data);
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700228 addBtnFooter();
Simon Hunt08f841d02015-02-10 14:39:20 -0800229 }
230
231 function displayMulti(ids) {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700232 detail.setup();
Simon Hunt08f841d02015-02-10 14:39:20 -0800233
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700234 var title = detail.appendHeader('h3'),
235 table = detail.appendBody('table'),
Simon Hunt08f841d02015-02-10 14:39:20 -0800236 tbody = table.append('tbody');
237
238 title.text('Selected Nodes');
239 ids.forEach(function (d, i) {
240 addProp(tbody, i+1, d);
241 });
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700242 addBtnFooter();
Simon Hunt08f841d02015-02-10 14:39:20 -0800243 }
244
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -0700245 function addAction(o) {
246 var btnDiv = d3.select('#' + idDet)
247 .select('.actionBtns')
248 .append('div')
249 .classed('actionBtn', true);
250 bns.button(btnDiv, idDet + o.id, o.gid, o.cb, o.tt);
Simon Hunt08f841d02015-02-10 14:39:20 -0800251 }
252
Simon Hunta36f03b2015-04-01 15:22:49 -0700253 var friendlyIndex = {
254 device: 1,
255 host: 0
256 };
257
258 function friendly(d) {
259 var i = friendlyIndex[d.class] || 0;
260 return (d.labels && d.labels[i]) || '';
261 }
262
263 function linkSummary(d) {
264 var o = d && d.online ? 'online' : 'offline';
265 return d ? d.type + ' / ' + o : '-';
266 }
267
Simon Hunte25c5a22015-04-02 14:37:12 -0700268 // provided to change presentation of internal type name
269 var linkTypePres = {
270 hostLink: 'edge link'
271 };
272
273 function linkType(d) {
274 return linkTypePres[d.type()] || d.type();
275 }
276
277 var coreOrder = [
278 'Type', '-',
279 'A_type', 'A_id', 'A_label', 'A_port', '-',
280 'B_type', 'B_id', 'B_label', 'B_port', '-'
281 ],
282 edgeOrder = [
283 'Type', '-',
284 'A_type', 'A_id', 'A_label', '-',
285 'B_type', 'B_id', 'B_label', 'B_port'
286 ];
287
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700288 function displayLink(data) {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700289 detail.setup();
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700290
Bri Prebilic Cole8d3de3d2015-05-15 16:02:59 -0700291 var svg = detail.appendHeader('div')
292 .classed('icon', true)
293 .append('svg'),
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700294 title = detail.appendHeader('h2'),
295 table = detail.appendBody('table'),
Simon Hunte25c5a22015-04-02 14:37:12 -0700296 tbody = table.append('tbody'),
297 edgeLink = data.type() === 'hostLink',
298 order = edgeLink ? edgeOrder : coreOrder;
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700299
300 gs.addGlyph(svg, 'ports', 40);
301 title.text('Link');
Simon Hunta36f03b2015-04-01 15:22:49 -0700302
Simon Hunta36f03b2015-04-01 15:22:49 -0700303
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700304 listProps(tbody, {
Simon Hunta36f03b2015-04-01 15:22:49 -0700305 propOrder: order,
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700306 props: {
Simon Hunte25c5a22015-04-02 14:37:12 -0700307 Type: linkType(data),
Simon Hunta36f03b2015-04-01 15:22:49 -0700308
309 A_type: data.source.class,
310 A_id: data.source.id,
311 A_label: friendly(data.source),
312 A_port: data.srcPort,
313
314 B_type: data.target.class,
315 B_id: data.target.id,
316 B_label: friendly(data.target),
317 B_port: data.tgtPort
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700318 }
319 });
Simon Hunta36f03b2015-04-01 15:22:49 -0700320
Simon Hunte25c5a22015-04-02 14:37:12 -0700321 if (!edgeLink) {
322 addProp(tbody, 'A &rarr; B', linkSummary(data.fromSource));
323 addProp(tbody, 'B &rarr; A', linkSummary(data.fromTarget));
324 }
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700325 }
326
327 function displayNothing() {
328 haveDetails = false;
329 hideDetailPanel();
330 }
331
332 function displaySomething() {
333 haveDetails = true;
334 if (useDetails) {
335 showDetailPanel();
336 }
337 }
338
Simon Hunt08f841d02015-02-10 14:39:20 -0800339 // === -----------------------------------------------------
340 // Event Handlers
341
342 function showSummary(data) {
343 populateSummary(data);
344 showSummaryPanel();
345 }
346
Simon Hunt36a58c62015-04-08 11:00:07 -0700347 function toggleSummary(x) {
Simon Huntee7a3ce2015-04-09 13:28:37 -0700348 var kev = (x === 'keyev'),
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700349 on = kev ? !summary.panel().isVisible() : !!x,
Simon Huntee7a3ce2015-04-09 13:28:37 -0700350 verb = on ? 'Show' : 'Hide';
Simon Hunt36a58c62015-04-08 11:00:07 -0700351
352 if (on) {
Simon Hunta0eb0a82015-02-11 12:30:06 -0800353 // ask server to start sending summary data.
Simon Hunt237676b52015-03-10 19:04:26 -0700354 wss.sendEvent('requestSummary');
Simon Hunta0eb0a82015-02-11 12:30:06 -0800355 // note: the summary panel will appear, once data arrives
Simon Hunt36a58c62015-04-08 11:00:07 -0700356 } else {
357 hideSummaryPanel();
Simon Hunt6036b192015-02-11 11:20:26 -0800358 }
Simon Huntee7a3ce2015-04-09 13:28:37 -0700359 flash.flash(verb + ' summary panel');
360 return on;
Simon Hunt6036b192015-02-11 11:20:26 -0800361 }
Simon Hunt08f841d02015-02-10 14:39:20 -0800362
363 // === -----------------------------------------------------
364 // === LOGIC For showing/hiding summary and detail panels...
365
Simon Hunt626d2102015-01-29 11:54:50 -0800366 function showSummaryPanel() {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700367 function _show() {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700368 summary.panel().show();
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700369 summary.adjustHeight(sumFromTop, sumMax);
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700370 }
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700371 if (detail.panel().isVisible()) {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700372 detail.down(_show);
Simon Hunt6036b192015-02-11 11:20:26 -0800373 } else {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700374 _show();
Simon Hunt6036b192015-02-11 11:20:26 -0800375 }
Simon Huntc252aa62015-02-10 16:45:39 -0800376 }
377
378 function hideSummaryPanel() {
Simon Hunta0eb0a82015-02-11 12:30:06 -0800379 // instruct server to stop sending summary data
Simon Hunt237676b52015-03-10 19:04:26 -0700380 wss.sendEvent("cancelSummary");
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700381 summary.panel().hide(detail.up);
Simon Hunt4b668592015-01-29 17:33:53 -0800382 }
Simon Hunt626d2102015-01-29 11:54:50 -0800383
Simon Hunt08f841d02015-02-10 14:39:20 -0800384 function showDetailPanel() {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700385 if (summary.panel().isVisible()) {
386 detail.down(detail.panel().show);
Simon Hunt6036b192015-02-11 11:20:26 -0800387 } else {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700388 detail.up(detail.panel().show);
Simon Hunt6036b192015-02-11 11:20:26 -0800389 }
Simon Hunt08f841d02015-02-10 14:39:20 -0800390 }
391
392 function hideDetailPanel() {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700393 detail.panel().hide();
Simon Hunt08f841d02015-02-10 14:39:20 -0800394 }
395
Simon Hunt6036b192015-02-11 11:20:26 -0800396 // ==========================
Simon Hunt08f841d02015-02-10 14:39:20 -0800397
Simon Hunt6036b192015-02-11 11:20:26 -0800398 function augmentDetailPanel() {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700399 var d = detail;
400 d.ypos = { up: 64, down: 310, current: 310};
Simon Hunt6036b192015-02-11 11:20:26 -0800401
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700402 d._move = function (y, cb) {
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700403 var yp = d.ypos,
404 endCb;
405
406 if (fs.isF(cb)) {
407 endCb = function () {
408 cb();
409 d.adjustHeight(d.ypos.current);
410 }
411 } else {
412 endCb = function () {
413 d.adjustHeight(d.ypos.current);
414 }
415 }
Simon Hunt6036b192015-02-11 11:20:26 -0800416 if (yp.current !== y) {
417 yp.current = y;
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700418 d.panel().el().transition().duration(300)
Simon Hunt6036b192015-02-11 11:20:26 -0800419 .each('end', endCb)
420 .style('top', yp.current + 'px');
421 } else {
422 endCb();
423 }
424 };
425
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700426 d.down = function (cb) { d._move(d.ypos.down, cb); };
427 d.up = function (cb) { d._move(d.ypos.up, cb); };
Simon Hunt6036b192015-02-11 11:20:26 -0800428 }
Simon Hunt08f841d02015-02-10 14:39:20 -0800429
Simon Hunt239e5882015-04-23 15:07:04 -0700430 function toggleUseDetailsFlag(x) {
Simon Huntee7a3ce2015-04-09 13:28:37 -0700431 var kev = (x === 'keyev'),
432 verb;
433
434 useDetails = kev ? !useDetails : !!x;
435 verb = useDetails ? 'Enable' : 'Disable';
436
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700437 if (useDetails) {
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700438 if (haveDetails) {
439 showDetailPanel();
440 }
441 } else {
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700442 hideDetailPanel();
443 }
Simon Huntee7a3ce2015-04-09 13:28:37 -0700444 flash.flash(verb + ' details panel');
445 return useDetails;
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700446 }
447
Simon Hunt4b668592015-01-29 17:33:53 -0800448 // ==========================
449
Simon Hunt237676b52015-03-10 19:04:26 -0700450 function initPanels() {
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700451 summary = createTopoPanel(idSum, panelOpts);
452 detail = createTopoPanel(idDet, panelOpts);
Simon Hunt6036b192015-02-11 11:20:26 -0800453
454 augmentDetailPanel();
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700455 watchWindow();
Simon Hunt4b668592015-01-29 17:33:53 -0800456 }
457
458 function destroyPanels() {
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700459 summary.destroy();
460 summary = null;
461
462 detail.destroy();
463 detail = null;
Simon Hunt239e5882015-04-23 15:07:04 -0700464 haveDetails = false;
Simon Hunt626d2102015-01-29 11:54:50 -0800465 }
466
467 // ==========================
468
Simon Huntb0ec1e52015-01-28 18:13:49 -0800469 angular.module('ovTopo')
470 .factory('TopoPanelService',
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700471 ['$log', '$window', '$rootScope', 'FnService', 'PanelService', 'GlyphService',
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -0700472 'FlashService', 'WebSocketService', 'ButtonService',
Simon Huntb0ec1e52015-01-28 18:13:49 -0800473
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700474 function (_$log_, _$window_, _$rootScope_,
475 _fs_, _ps_, _gs_, _flash_, _wss_, _bns_) {
Simon Huntb0ec1e52015-01-28 18:13:49 -0800476 $log = _$log_;
Bri Prebilic Cole69d5f4e2015-05-19 15:59:55 -0700477 $window = _$window_;
478 $rootScope = _$rootScope_;
Simon Hunt6036b192015-02-11 11:20:26 -0800479 fs = _fs_;
Simon Huntb0ec1e52015-01-28 18:13:49 -0800480 ps = _ps_;
Simon Huntc9b73162015-01-29 14:02:15 -0800481 gs = _gs_;
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700482 flash = _flash_;
Simon Hunt237676b52015-03-10 19:04:26 -0700483 wss = _wss_;
Bri Prebilic Colef5e48b12015-04-21 14:52:36 -0700484 bns = _bns_;
Simon Huntb0ec1e52015-01-28 18:13:49 -0800485
Simon Huntb0ec1e52015-01-28 18:13:49 -0800486 return {
487 initPanels: initPanels,
Simon Hunt626d2102015-01-29 11:54:50 -0800488 destroyPanels: destroyPanels,
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700489 createTopoPanel: createTopoPanel,
Simon Hunt08f841d02015-02-10 14:39:20 -0800490
491 showSummary: showSummary,
Simon Hunt6036b192015-02-11 11:20:26 -0800492 toggleSummary: toggleSummary,
Simon Hunt08f841d02015-02-10 14:39:20 -0800493
Simon Hunt239e5882015-04-23 15:07:04 -0700494 toggleUseDetailsFlag: toggleUseDetailsFlag,
Simon Hunt08f841d02015-02-10 14:39:20 -0800495 displaySingle: displaySingle,
496 displayMulti: displayMulti,
Simon Hunt0c6b2d32015-03-26 17:46:29 -0700497 displayLink: displayLink,
498 displayNothing: displayNothing,
499 displaySomething: displaySomething,
Bri Prebilic Cole684bcb72015-05-11 12:00:24 -0700500 addAction: addAction,
Simon Hunt08f841d02015-02-10 14:39:20 -0800501
Simon Huntc252aa62015-02-10 16:45:39 -0800502 hideSummaryPanel: hideSummaryPanel,
Simon Hunt08f841d02015-02-10 14:39:20 -0800503
Bri Prebilic Cole35d29712015-05-11 16:01:32 -0700504 detailVisible: function () { return detail.panel().isVisible(); },
505 summaryVisible: function () { return summary.panel().isVisible(); }
Simon Huntb0ec1e52015-01-28 18:13:49 -0800506 };
507 }]);
508}());