GUI -- VeilService Implemented and some changes to device view.
Change-Id: Iad496e2ca698213dce4da4d1894eee6e6fe5a874
Showing
4 changed files
with
36 additions
and
32 deletions
| ... | @@ -24,26 +24,27 @@ | ... | @@ -24,26 +24,27 @@ |
| 24 | position: absolute; | 24 | position: absolute; |
| 25 | top: 0; | 25 | top: 0; |
| 26 | left: 0; | 26 | left: 0; |
| 27 | - padding: 60px; | ||
| 28 | } | 27 | } |
| 29 | 28 | ||
| 30 | .light #veil { | 29 | .light #veil { |
| 31 | background-color: rgba(0,0,0,0.75); | 30 | background-color: rgba(0,0,0,0.75); |
| 32 | } | 31 | } |
| 33 | .dark #veil { | 32 | .dark #veil { |
| 34 | - background-color: rgba(255,255,255,0.5); | 33 | + background-color: rgba(64,64,64,0.75); |
| 34 | +} | ||
| 35 | + | ||
| 36 | +#veil .msg { | ||
| 37 | + position: absolute; | ||
| 38 | + padding: 60px; | ||
| 35 | } | 39 | } |
| 36 | 40 | ||
| 37 | -#veil p { | 41 | +#veil .msg p { |
| 38 | display: block; | 42 | display: block; |
| 39 | - margin: 8px 20px; | ||
| 40 | font-size: 14pt; | 43 | font-size: 14pt; |
| 41 | font-style: italic; | 44 | font-style: italic; |
| 42 | -} | ||
| 43 | - | ||
| 44 | -.light #veil p { | ||
| 45 | color: #ddd; | 45 | color: #ddd; |
| 46 | } | 46 | } |
| 47 | -.dark #veil p { | 47 | + |
| 48 | - color: #404040; | 48 | +#veil svg .glyph { |
| 49 | + fill: #222; | ||
| 49 | } | 50 | } | ... | ... |
| ... | @@ -26,15 +26,13 @@ | ... | @@ -26,15 +26,13 @@ |
| 26 | // injected references | 26 | // injected references |
| 27 | var $log, fs; | 27 | var $log, fs; |
| 28 | 28 | ||
| 29 | - var veil, svg; | 29 | + var veil, pdiv, svg; |
| 30 | 30 | ||
| 31 | function show(msg) { | 31 | function show(msg) { |
| 32 | - veil.selectAll('p').remove(); | 32 | + pdiv.selectAll('p').remove(); |
| 33 | - | ||
| 34 | - //veil.data(msg).enter().append('p').text(function (d) { return d; }); | ||
| 35 | 33 | ||
| 36 | msg.forEach(function (line) { | 34 | msg.forEach(function (line) { |
| 37 | - veil.insert('p').text(line); | 35 | + pdiv.append('p').text(line); |
| 38 | }); | 36 | }); |
| 39 | 37 | ||
| 40 | veil.style('display', 'block'); | 38 | veil.style('display', 'block'); |
| ... | @@ -53,15 +51,24 @@ | ... | @@ -53,15 +51,24 @@ |
| 53 | $log = _$log_; | 51 | $log = _$log_; |
| 54 | fs = _fs_; | 52 | fs = _fs_; |
| 55 | 53 | ||
| 54 | + var wSize = fs.windowSize(), | ||
| 55 | + ww = wSize.width, | ||
| 56 | + wh = wSize.height, | ||
| 57 | + shrinkConst = wh-(wh * 0.7), | ||
| 58 | + birdDim = wh-shrinkConst, | ||
| 59 | + birdCenter = (ww / 2) - (birdDim / 2); | ||
| 60 | + | ||
| 56 | veil = d3.select('#veil'); | 61 | veil = d3.select('#veil'); |
| 62 | + pdiv = veil.append('div').classed('msg', true); | ||
| 57 | 63 | ||
| 58 | svg = veil.append('svg').attr({ | 64 | svg = veil.append('svg').attr({ |
| 59 | - width: 500, | 65 | + width: (ww + 'px'), |
| 60 | - height: 500, | 66 | + height: (wh + 'px'), |
| 61 | - viewBox: '0 0 500 500' | 67 | + viewBox: '0 0 ' + ww + ' ' + wh |
| 62 | - }); | 68 | + }).style('opacity', 0.2); |
| 63 | 69 | ||
| 64 | - gs.addGlyph(svg, 'bird', 400); | 70 | + gs.addGlyph(svg, 'bird', (birdDim + 'px'), |
| 71 | + false, [birdCenter, shrinkConst/2]); | ||
| 65 | 72 | ||
| 66 | return { | 73 | return { |
| 67 | show: show, | 74 | show: show, | ... | ... |
| ... | @@ -3,21 +3,17 @@ | ... | @@ -3,21 +3,17 @@ |
| 3 | <h2>Devices</h2> | 3 | <h2>Devices</h2> |
| 4 | <table class="summary-list" | 4 | <table class="summary-list" |
| 5 | onos-fixed-header | 5 | onos-fixed-header |
| 6 | - ng-style="setTableHW()"> | 6 | + ng-style="setTableHW()" |
| 7 | + sort-callback="ctrl.sortCallback()"> | ||
| 7 | <thead> | 8 | <thead> |
| 8 | <tr> | 9 | <tr> |
| 9 | <th colId="available"></th> | 10 | <th colId="available"></th> |
| 10 | - <th colId="id">URI | 11 | + <th colId="id" sortable>URI</th> |
| 11 | - <div class="inline-icon" | 12 | + <th colId="mfr" sortable>Vendor</th> |
| 12 | - icon icon-id="tableColSortAsc" | 13 | + <th colId="hw" sortable>Hardware Version</th> |
| 13 | - icon-size="10"> | 14 | + <th colId="sw" sortable>Software Version</th> |
| 14 | - </div> | 15 | + <th colId="serial" sortable>Serial Number</th> |
| 15 | - </th> | 16 | + <th colId="protocol" sortable>Protocol</th> |
| 16 | - <th colId="mfr">Vendor</th> | ||
| 17 | - <th colId="hw">Hardware Version</th> | ||
| 18 | - <th colId="sw">Software Version</th> | ||
| 19 | - <th colId="serial">Serial Number</th> | ||
| 20 | - <th colId="protocol">Protocol</th> | ||
| 21 | </tr> | 17 | </tr> |
| 22 | </thead> | 18 | </thead> |
| 23 | 19 | ... | ... |
| ... | @@ -38,7 +38,7 @@ | ... | @@ -38,7 +38,7 @@ |
| 38 | self.deviceData = data.devices; | 38 | self.deviceData = data.devices; |
| 39 | }); | 39 | }); |
| 40 | 40 | ||
| 41 | - d3.selectAll('th').on('click', function(d) { | 41 | + d3.selectAll('th').on('click', function () { |
| 42 | var thElem = d3.select(this); | 42 | var thElem = d3.select(this); |
| 43 | currCol.colId = thElem.attr('colId'); | 43 | currCol.colId = thElem.attr('colId'); |
| 44 | 44 | ... | ... |
-
Please register or login to post a comment