ONOS-4359: continued work on theming UI

- topo view: fixed internal spacing (padding) of summary and details panels.

Change-Id: Ie0c45b80a4362cc53329e7f3ab14ed7046a03513
(cherry picked from commit 9a1e18d)
This commit is contained in:
Simon Hunt 2016-06-15 18:04:01 -07:00 committed by Brian O'Connor
parent 8d47a5c872
commit 8f907ccbc8
4 changed files with 51 additions and 47 deletions

View File

@ -23,7 +23,7 @@
.light .button svg.embeddedIcon .icon rect, .light .button svg.embeddedIcon .icon rect,
.light .toggleButton.selected svg.embeddedIcon .icon rect, .light .toggleButton.selected svg.embeddedIcon .icon rect,
.light .radioButton.selected svg.embeddedIcon .icon rect { .light .radioButton.selected svg.embeddedIcon .icon rect {
fill: #838383; fill: #939598;
} }
.light .button:hover svg.embeddedIcon .icon rect, .light .button:hover svg.embeddedIcon .icon rect,

View File

@ -44,34 +44,27 @@
/* --- general topo-panel styling --- */ /* --- general topo-panel styling --- */
.topo-p svg {
background: #c0242b;
}
.topo-p svg .glyph { .topo-p svg .glyph {
fill: #222; fill: #ffffff;
}
.topo-p svg .glyph.overlay {
fill: #fff;
}
.topo-p h2 {
color: black;
}
.topo-p h3 {
color: black;
}
.topo-p td.label {
/* works for both light and dark themes ... */
color: #777;
}
.topo-p td.value {
} }
.topo-p hr { .topo-p hr {
background-color: #ccc; background-color: #cccccc;
color: #ccc;
} }
#topo-p-detail svg {
background: none;
}
#topo-p-detail .header svg .glyph {
fill: #c0242b;
}
/* --- Topo Instance Panel --- */ /* --- Topo Instance Panel --- */
#topo-p-instance svg rect { #topo-p-instance svg rect {

View File

@ -41,31 +41,35 @@
/* --- Topo Summary Panel --- */ /* --- Topo Summary Panel --- */
#topo-p-summary { #topo-p-summary {
/* Base css from panel.css */ padding: 16px;
} }
/* --- Topo Detail Panel --- */ /* --- Topo Detail Panel --- */
#topo-p-detail { #topo-p-detail {
/* Base css from panel.css */ padding: 16px;
top: 338px; top: 370px;
} }
html[data-platform='iPad'] #topo-p-detail { html[data-platform='iPad'] #topo-p-detail {
top: 354px; top: 386px;
} }
#topo-p-detail .actionBtns .actionBtn { #topo-p-detail .actionBtns .actionBtn {
display: inline-block; display: inline-block;
} }
#topo-p-detail .actionBtns .actionBtn svg { #topo-p-detail .actionBtns .actionBtn svg {
width: 30px; width: 28px;
height: 30px; height: 28px;
} }
/* --- general topo-panel styling --- */ /* --- general topo-panel styling --- */
.topo-p div.header {
margin-bottom: 10px;
}
.topo-p div.header div.icon { .topo-p div.header div.icon {
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
@ -80,17 +84,17 @@ html[data-platform='iPad'] #topo-p-detail {
.topo-p svg { .topo-p svg {
display: inline-block; display: inline-block;
width: 42px; width: 26px;
height: 42px; height: 26px;
} }
.topo-p h2 { .topo-p h2 {
padding: 0 4px; padding: 0 0 0 10px;
margin: 0; margin: 0;
font-weight: lighter;
word-wrap: break-word; word-wrap: break-word;
display: inline-block; display: inline-block;
width: 210px;
vertical-align: middle; vertical-align: middle;
} }
@ -104,23 +108,34 @@ html[data-platform='iPad'] #topo-p-detail {
.topo-p p, .topo-p p,
.topo-p table { .topo-p table {
padding: 4px; padding: 0;
margin: 0; margin: 0;
width: 100%;
} }
.topo-p td { .topo-p td {
word-wrap: break-word; word-wrap: break-word;
} }
.topo-p td.label { .topo-p td.label {
font-style: italic; font-weight: bold;
padding-right: 12px; padding: 0 10px 0 0;
} }
.topo-p td.value { .topo-p td.value {
padding: 0;
}
#topo-p-summary td.label {
width: 50%;
}
#topo-p-detail div.actionBtns {
padding-top: 6px;
} }
.topo-p hr { .topo-p hr {
height: 1px; height: 1px;
border: 0; border: 0;
margin: 4px -3px;
} }

View File

@ -30,11 +30,12 @@
idSum = 'topo-p-summary', idSum = 'topo-p-summary',
idDet = 'topo-p-detail', idDet = 'topo-p-detail',
panelOpts = { panelOpts = {
width: 290 // summary and detail panel width width: 260 // summary and detail panel width
}, },
sumMax = 262, // summary panel max height sumMax = 226, // summary panel max height
padTop = 16, // summary panel padding below masthead padTop = 16, // summary panel padding below masthead
padFudge = padTop + 6, padding = 16, // panel internal padding
padFudge = padTop + 2 * padding,
devPath = 'device'; devPath = 'device';
// internal state // internal state
@ -210,14 +211,9 @@
.append('svg'), .append('svg'),
title = summary.appendHeader('h2'), title = summary.appendHeader('h2'),
table = summary.appendBody('table'), table = summary.appendBody('table'),
tbody = table.append('tbody'), tbody = table.append('tbody');
glyphId = data.type || 'node';
gs.addGlyph(svg, glyphId, 40); gs.addGlyph(svg, 'bird', 24, 0, [1,1]);
if (glyphId === 'node') {
gs.addGlyph(svg, 'bird', 24, true, [8,12]);
}
title.text(data.title); title.text(data.title);
listProps(tbody, data); listProps(tbody, data);
@ -244,7 +240,7 @@
tbody = table.append('tbody'), tbody = table.append('tbody'),
navFn; navFn;
gs.addGlyph(svg, (data.type || 'unknown'), 40); gs.addGlyph(svg, (data.type || 'unknown'), 26);
title.text(data.title); title.text(data.title);
// only add navigation when displaying a device // only add navigation when displaying a device