Simon Hunt

GUI -- Reduced size of onos-logo to be 41x38 pixels.

- cleaned up ONOS instances a little: added icon; centered text; UI-attached icon shown.

Change-Id: If6d1adf4866c33f1c40baf3e37bebbe4e705ea80

37.7 KB | W: | H:

5.61 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
...@@ -204,20 +204,19 @@ ...@@ -204,20 +204,19 @@
204 } 204 }
205 205
206 #topo-oibox .onosInst { 206 #topo-oibox .onosInst {
207 - margin: 6px 0; 207 + position: relative;
208 - padding: 3px;
209 width: 80%; 208 width: 80%;
210 left: 10%; 209 left: 10%;
211 - height: 40px; 210 + height: 80px;
211 + margin: 4px 0;
212 cursor: pointer; 212 cursor: pointer;
213 213
214 /* theme-related */ 214 /* theme-related */
215 color: #444; 215 color: #444;
216 background-color: #ccc; 216 background-color: #ccc;
217 - border: 2px dashed #aaa; 217 + border: 2px solid #aaa;
218 } 218 }
219 219
220 -
221 #topo-oibox .onosInst.online { 220 #topo-oibox .onosInst.online {
222 /* theme-related */ 221 /* theme-related */
223 color: #113; 222 color: #113;
...@@ -225,6 +224,34 @@ ...@@ -225,6 +224,34 @@
225 border: 2px solid #555; 224 border: 2px solid #555;
226 } 225 }
227 226
227 +#topo-oibox .onosInst .onosTitle {
228 + text-align: center;
229 + font-size: 11pt;
230 + margin-top: 6px;
231 + color: #888;
232 +}
233 +
234 +#topo-oibox .onosInst.online .onosTitle {
235 + color: black;
236 +}
237 +
238 +#topo-oibox .onosInst img {
239 + opacity: 0.5;
240 +}
241 +
242 +#topo-oibox .onosInst.online img {
243 + opacity: 1.0;
244 +}
245 +
246 +#topo-oibox .onosInst img.ui {
247 + opacity: 1;
248 + position: absolute;
249 + top: 3px;
250 + right: 3px;
251 + width: 20px;
252 + height: 20px;
253 +}
254 +
228 #topo-oibox .onosInst.mastership { 255 #topo-oibox .onosInst.mastership {
229 opacity: 0.3; 256 opacity: 0.3;
230 } 257 }
......
...@@ -696,8 +696,31 @@ ...@@ -696,8 +696,31 @@
696 .append('div') 696 .append('div')
697 .attr('class', 'onosInst') 697 .attr('class', 'onosInst')
698 .classed('online', function (d) { return d.online; }) 698 .classed('online', function (d) { return d.online; })
699 - .on('click', clickInst) 699 + .on('click', clickInst);
700 - .text(function (d) { return d.id; }); 700 +
701 + entering.each(function (d, i) {
702 + var el = d3.select(this),
703 + img;
704 +
705 + $('<img src="img/host.png">').appendTo(el);
706 + img = el.select('img')
707 + .attr({
708 + width: 40,
709 + top: -10,
710 + left: -10
711 + })
712 + .style({
713 + });
714 +
715 + $('<div>').attr('class', 'onosTitle').text(d.id).appendTo(el);
716 +
717 + // is the UI attached to this instance?
718 + // TODO: need uiAttached boolean in instance data
719 + //if (d.uiAttached) {
720 + if (i === 0) {
721 + $('<img src="img/ui.png">').attr('class','ui').appendTo(el);
722 + }
723 + });
701 724
702 // operate on existing + new onoses here 725 // operate on existing + new onoses here
703 726
......