blob: 587fcf6c485069c57b3afbaf13408b528342f4cc [file] [log] [blame]
Simon Hunt58894c82016-05-24 15:09:02 -07001/*
2 * Copyright 2016-present 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 View (theme) -- CSS file
19 */
20
21/* --- Base SVG Layer --- */
22
23.light #ov-topo svg {
24 background-color: #fff;
25}
26.dark #ov-topo svg {
27 background-color: #2b2b2b;
28}
29
30/* --- "No Devices" Layer --- */
31
32.light #ov-topo svg .noDevsBird {
33 fill: #ecd;
34}
35.dark #ov-topo svg .noDevsBird {
36 fill: #683434;
37}
38
39.light #ov-topo svg #topo-noDevsLayer text {
40 fill: #dde;
41}
42.dark #ov-topo svg #topo-noDevsLayer text {
43 fill: #3b3b4f;
44}
45
46/* --- Topo Map --- */
47
48#ov-topo svg #topo-map {
49 stroke-width: 2px;
50 fill: transparent;
51}
52
53.light #ov-topo svg #topo-map {
54 stroke: #ddd;
55}
56.dark #ov-topo svg #topo-map {
57 stroke: #444;
58}
59
60/* --- general topo-panel styling --- */
61
62.light .topo-p svg .glyph {
63 fill: #222;
64}
65.dark .topo-p svg .glyph {
66 fill: #ddd;
67}
68
69.light .topo-p svg .glyph.overlay {
70 fill: #fff;
71}
72.dark .topo-p svg .glyph.overlay {
73 fill: #222;
74}
75
76.light .topo-p h2 {
77 color: black;
78}
79.dark .topo-p h2 {
80 color: #ddd;
81}
82
83.light .topo-p h3 {
84 color: black;
85}
86.dark .topo-p h3 {
87 color: #ddd;
88}
89
90.topo-p td.label {
91 /* works for both light and dark themes ... */
92 color: #777;
93}
94.topo-p td.value {
95}
96
97.light .topo-p hr {
98 background-color: #ccc;
99 color: #ccc;
100}
101.dark .topo-p hr {
102 background-color: #888;
103 color: #888;
104}
105
106/* --- Topo Instance Panel --- */
107
108#topo-p-instance svg rect {
109 stroke-width: 3.5;
110}
111#topo-p-instance .online svg rect {
112 opacity: 1;
113}
114.light #topo-p-instance svg rect {
115 fill: #ccc;
116 stroke: #aaa;
117}
118.light #topo-p-instance .online svg rect {
119 fill: #9cf;
120 stroke: #555;
121}
122.dark #topo-p-instance svg rect {
123 fill: #666;
124 stroke: #222;
125}
126.dark #topo-p-instance .online svg rect {
127 fill: #9cf;
128 stroke: #999;
129}
130
131
132#topo-p-instance svg .glyph {
133 fill: #888;
134 fill-rule: evenodd;
135}
136#topo-p-instance .online svg .glyph {
137 fill: #000;
138}
139
140
141#topo-p-instance svg .badgeIcon {
142 fill-rule: evenodd;
143 opacity: 0.4;
144}
145.light #topo-p-instance svg .badgeIcon {
146 fill: #777;
147}
148.dark #topo-p-instance svg .badgeIcon {
149 fill: #555;
150}
151
152#topo-p-instance .online svg .badgeIcon {
153 opacity: 1.0;
154}
155.light #topo-p-instance .online svg .badgeIcon {
156 fill: #fff;
157}
158.dark #topo-p-instance .online svg .badgeIcon {
159 fill: #fff;
160}
161
162#topo-p-instance svg text {
163 text-anchor: middle;
164 opacity: 0.3;
165}
166#topo-p-instance .online svg text {
167 opacity: 1.0;
168}
169.light #topo-p-instance svg text {
170 fill: #444;
171}
172.light #topo-p-instance .online svg text {
173 fill: #eee;
174}
175.dark #topo-p-instance svg text {
176 fill: #aaa;
177}
178.dark #topo-p-instance .online svg text {
179 fill: #ccc;
180}
181
182#topo-p-instance .onosInst.mastership {
183 opacity: 0.3;
184}
185#topo-p-instance .onosInst.mastership.affinity {
186 opacity: 1.0;
187}
188.light #topo-p-instance .onosInst.mastership.affinity svg rect {
189 filter: url(#blue-glow);
190}
191.dark #topo-p-instance .onosInst.mastership.affinity svg rect {
192 filter: url(#yellow-glow);
193}
194.light.firefox #topo-p-instance .onosInst.mastership.affinity svg rect {
195 filter: url("data:image/svg+xml;utf8, <svg xmlns = \'http://www.w3.org/2000/svg\'><filter x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" id=\"blue-glow\"><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7 0 0 0 1 0 \"></feColorMatrix><feGaussianBlur stdDeviation=\"3\" result=\"coloredBlur\"></feGaussianBlur><feMerge><feMergeNode in=\"coloredBlur\"></feMergeNode><feMergeNode in=\"SourceGraphic\"></feMergeNode></feMerge></filter></svg>#blue-glow");
196}
197.dark.firefox #topo-p-instance .onosInst.mastership.affinity svg rect {
198 filter: url("data:image/svg+xml;utf8, <svg xmlns = \'http://www.w3.org/2000/svg\'><filter x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" id=\"yellow-glow\"><feColorMatrix type=\"matrix\" values=\"0 0 0 0 1.0 0 0 0 0 1.0 0 0 0 0 0.3 0 0 0 1 0 \"></feColorMatrix><feGaussianBlur stdDeviation=\"3\" result=\"coloredBlur\"></feGaussianBlur><feMerge><feMergeNode in=\"coloredBlur\"></feMergeNode><feMergeNode in=\"SourceGraphic\"></feMergeNode></feMerge></filter></svg>#yellow-glow");
199}
200
201/* --- Topo Nodes --- */
202
203#ov-topo svg .suppressed {
204 opacity: 0.5 !important;
205}
206
207#ov-topo svg .suppressedmax {
208 opacity: 0.2 !important;
209}
210
211.light #ov-topo svg .node.selected rect,
212.light #ov-topo svg .node.selected circle {
213 fill: #f90;
214 filter: url(#blue-glow);
215}
216.dark #ov-topo svg .node.selected rect,
217.dark #ov-topo svg .node.selected circle {
218 fill: #f90;
219 filter: url(#yellow-glow);
220}
221.light.firefox #ov-topo svg .node.selected rect,
222.light.firefox #ov-topo svg .node.selected circle {
223 filter: url("data:image/svg+xml;utf8, <svg xmlns = \'http://www.w3.org/2000/svg\'><filter x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" id=\"blue-glow\"><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7 0 0 0 1 0 \"></feColorMatrix><feGaussianBlur stdDeviation=\"3\" result=\"coloredBlur\"></feGaussianBlur><feMerge><feMergeNode in=\"coloredBlur\"></feMergeNode><feMergeNode in=\"SourceGraphic\"></feMergeNode></feMerge></filter></svg>#blue-glow");
224}
225.dark.firefox #ov-topo svg .node.selected rect,
226.dark.firefox #ov-topo svg .node.selected circle {
227 filter: url("data:image/svg+xml;utf8, <svg xmlns = \'http://www.w3.org/2000/svg\'><filter x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" id=\"yellow-glow\"><feColorMatrix type=\"matrix\" values=\"0 0 0 0 1.0 0 0 0 0 1.0 0 0 0 0 0.3 0 0 0 1 0 \"></feColorMatrix><feGaussianBlur stdDeviation=\"3\" result=\"coloredBlur\"></feGaussianBlur><feMerge><feMergeNode in=\"coloredBlur\"></feMergeNode><feMergeNode in=\"SourceGraphic\"></feMergeNode></feMerge></filter></svg>#yellow-glow");
228}
229
230/* Device Nodes */
231
232#ov-topo svg .node.device rect {
233 stroke-width: 1.5;
234}
235
236#ov-topo svg .node.device.fixed rect {
237 stroke-width: 1.5;
238}
239.light #ov-topo svg .node.device.fixed rect {
240 stroke: #aaa;
241}
242.dark #ov-topo svg .node.device.fixed rect {
243 stroke: #999;
244}
245
246/* note: device is offline without the 'online' class */
247.light #ov-topo svg .node.device {
248 fill: #777;
249}
250.dark #ov-topo svg .node.device {
251 fill: #555;
252}
253
254.light #ov-topo svg .node.device rect {
255 stroke: #666;
256}
257.light #ov-topo svg .node.device rect {
258 stroke: #999;
259}
260
261.light #ov-topo svg .node.device.online {
262 fill: #6e7fa3;
263}
264.dark #ov-topo svg .node.device.online {
265 fill: #4E5C7F;
266}
267
268/* note: device is offline without the 'online' class */
269#ov-topo svg .node.device text {
270 fill: #bbb;
271 font: 10pt sans-serif;
272}
273
274#ov-topo svg .node.device.online text {
275 fill: white;
276}
277
278#ov-topo svg .node.device .svgIcon rect {
279 fill: #aaa;
280}
281#ov-topo svg .node.device .svgIcon use {
282 fill: #777;
283}
284#ov-topo svg .node.device.selected .svgIcon rect {
285 fill: #f90;
286}
287#ov-topo svg .node.device.online .svgIcon rect {
288 fill: #ccc;
289}
290#ov-topo svg .node.device.online .svgIcon use {
291 fill: #000;
292}
293#ov-topo svg .node.device.online.selected .svgIcon rect {
294 fill: #f90;
295}
296
297/* Badges */
298/* (... works for both light and dark themes...) */
299#ov-topo svg .node .badge circle {
300 stroke: #aaa;
301}
302
303#ov-topo svg .node .badge.badgeInfo circle {
304 fill: #99d;
305}
306
307#ov-topo svg .node .badge.badgeWarn circle {
308 fill: #da2;
309}
310
311#ov-topo svg .node .badge.badgeError circle {
312 fill: #e44;
313}
314
315#ov-topo svg .node .badge use {
316 fill: white !important;
317}
318
319#ov-topo svg .node .badge.badgeInfo use {
320 fill: #448;
321}
322
323#ov-topo svg .node .badge text {
324 fill: white !important;
325}
326
327#ov-topo svg .node .badge.badgeInfo text {
328 fill: #448;
329}
330
331/* Host Nodes */
332
333#ov-topo svg .node.host {
334}
335
336#ov-topo svg .node.host text {
337 stroke: none;
338 font: 9pt sans-serif;
339}
340.light #ov-topo svg .node.host text {
341 fill: #846;
342}
343.dark #ov-topo svg .node.host text {
344 fill: #BB809D;
345}
346
347.light svg .node.host circle {
348 stroke: #000;
349 fill: #edb;
350}
351.dark svg .node.host circle {
352 stroke: #eee;
353 fill: #B2A180;
354}
355
356.light svg .node.host .svgIcon {
357 fill: #444;
358}
359.dark svg .node.host .svgIcon {
360 fill: #222;
361}
362
363/* --- Topo Links --- */
364
365#ov-topo svg .link {
366 opacity: .9;
367}
368
369#ov-topo svg .link.selected,
370#ov-topo svg .link.enhanced {
371 stroke-width: 4.5px;
372}
373.light #ov-topo svg .link.selected,
374.light #ov-topo svg .link.enhanced {
375 filter: url(#blue-glow);
376}
377.dark #ov-topo svg .link.selected,
378.dark #ov-topo svg .link.enhanced {
379 filter: url(#yellow-glow);
380}
381.light.firefox #ov-topo svg .link.selected,
382.light.firefox #ov-topo svg .link.enhanced {
383 filter: url("data:image/svg+xml;utf8, <svg xmlns = \'http://www.w3.org/2000/svg\'><filter x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" id=\"blue-glow\"><feColorMatrix type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7 0 0 0 1 0 \"></feColorMatrix><feGaussianBlur stdDeviation=\"3\" result=\"coloredBlur\"></feGaussianBlur><feMerge><feMergeNode in=\"coloredBlur\"></feMergeNode><feMergeNode in=\"SourceGraphic\"></feMergeNode></feMerge></filter></svg>#blue-glow");
384}
385.dark.firefox #ov-topo svg .link.selected,
386.dark.firefox #ov-topo svg .link.enhanced {
387 filter: url("data:image/svg+xml;utf8, <svg xmlns = \'http://www.w3.org/2000/svg\'><filter x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" id=\"yellow-glow\"><feColorMatrix type=\"matrix\" values=\"0 0 0 0 1.0 0 0 0 0 1.0 0 0 0 0 0.3 0 0 0 1 0 \"></feColorMatrix><feGaussianBlur stdDeviation=\"3\" result=\"coloredBlur\"></feGaussianBlur><feMerge><feMergeNode in=\"coloredBlur\"></feMergeNode><feMergeNode in=\"SourceGraphic\"></feMergeNode></feMerge></filter></svg>#yellow-glow");
388
389}
390
391#ov-topo svg .link.inactive {
392 opacity: .5;
393 stroke-dasharray: 8 4;
394}
395/* FIXME: Review for not-permitted links */
396#ov-topo svg .link.not-permitted {
397 stroke: rgb(255,0,0);
398 stroke-width: 5.0;
399 stroke-dasharray: 8 4;
400}
401
402#ov-topo svg .link.secondary {
403 stroke-width: 3px;
404}
405.light #ov-topo svg .link.secondary {
406 stroke: rgba(0,153,51,0.5);
407}
408.dark #ov-topo svg .link.secondary {
409 stroke: rgba(121,231,158,0.5);
410}
411
412/* Port traffic color visualization for Kbps, Mbps, and Gbps */
413
414.light #ov-topo svg .link.secondary.port-traffic-Kbps {
415 stroke: rgb(0,153,51);
416 stroke-width: 5.0;
417}
418.dark #ov-topo svg .link.secondary.port-traffic-Kbps {
419 stroke: rgb(98, 153, 118);
420 stroke-width: 5.0;
421}
422
423.light #ov-topo svg .link.secondary.port-traffic-Mbps {
424 stroke: rgb(128,145,27);
425 stroke-width: 6.5;
426}
427.dark #ov-topo svg .link.secondary.port-traffic-Mbps {
428 stroke: rgb(91, 109, 54);
429 stroke-width: 6.5;
430}
431
432.light #ov-topo svg .link.secondary.port-traffic-Gbps {
433 stroke: rgb(255, 137, 3);
434 stroke-width: 8.0;
435}
436.dark #ov-topo svg .link.secondary.port-traffic-Gbps {
437 stroke: rgb(174, 119, 55);
438 stroke-width: 8.0;
439}
440
441.light #ov-topo svg .link.secondary.port-traffic-Gbps-choked {
442 stroke: rgb(183, 30, 21);
443 stroke-width: 8.0;
444}
445.dark #ov-topo svg .link.secondary.port-traffic-Gbps-choked {
446 stroke: rgb(127, 40, 39);
447 stroke-width: 8.0;
448}
449
450
451
452#ov-topo svg .link.animated {
453 stroke-dasharray: 8 5;
454 animation: ants 5s infinite linear;
455 /* below line will be added via Javascript based on path */
456 /*animation-direction: reverse;*/
457}
458@keyframes ants {
459 from {
460 stroke-dashoffset: 0;
461 }
462 to {
463 stroke-dashoffset: 400;
464 }
465}
466
467#ov-topo svg .link.primary {
468 stroke-width: 4px;
469}
470.light #ov-topo svg .link.primary {
471 stroke: #ffA300;
472}
473.dark #ov-topo svg .link.primary {
474 stroke: #D58E0F;
475}
476
477#ov-topo svg .link.secondary.optical {
478 stroke-width: 4px;
479}
480.light #ov-topo svg .link.secondary.optical {
481 stroke: rgba(128,64,255,0.5);
482}
483.dark #ov-topo svg .link.secondary.optical {
484 stroke: rgba(164,139,215,0.5);
485}
486
487#ov-topo svg .link.primary.optical {
488 stroke-width: 6px;
489}
490.light #ov-topo svg .link.primary.optical {
491 stroke: #74f;
492}
493.dark #ov-topo svg .link.primary.optical {
494 stroke: #7352CD;
495}
496
497/* Link Labels */
498#ov-topo svg .linkLabel rect {
499 stroke: none;
500}
501.light #ov-topo svg .linkLabel rect {
502 fill: #eee;
503}
504.dark #ov-topo svg .linkLabel rect {
505 fill: #555;
506}
507
508.light #ov-topo svg .linkLabel text {
509 fill: #444;
510}
511.dark #ov-topo svg .linkLabel text {
512 fill: #eee;
513}
514
515/* Port Labels */
516
517#ov-topo svg .portLabel rect {
518 stroke: none;
519}
520.light #ov-topo svg .portLabel rect {
521 fill: #eee;
522}
523.dark #ov-topo svg .portLabel rect {
524 fill: #222;
525}
526
527.light #ov-topo svg .portLabel text {
528 fill: #444;
529}
530.dark #ov-topo svg .portLabel text {
531 fill: #eee;
532}
533
534/* Number of Links Labels */
535
536
537.light #ov-topo text.numLinkText {
538 fill: #444;
539}
540.dark #ov-topo text.numLinkText {
541 fill: #eee;
542}
543
544/* ------------------------------------------------- */
545/* Sprite Layer */
546
547.light #ov-topo svg #topo-sprites .gold1 use {
548 stroke: #fda;
549 fill: none;
550}
551.dark #ov-topo svg #topo-sprites .gold1 use {
552 stroke: #541;
553 fill: none;
554}
555.light #ov-topo svg #topo-sprites .gold1 text {
556 fill: #eda;
557}
558.dark #ov-topo svg #topo-sprites .gold1 text {
559 fill: #543;
560}
561
562.light #ov-topo svg #topo-sprites .blue1 use {
563 stroke: #bbd;
564 fill: none;
565}
566.dark #ov-topo svg #topo-sprites .blue1 use {
567 stroke: #445;
568 fill: none;
569}
570.light #ov-topo svg #topo-sprites .blue1 text {
571 fill: #cce;
572}
573.dark #ov-topo svg #topo-sprites .blue1 text {
574 fill: #446;
575}
576
577.light #ov-topo svg #topo-sprites .gray1 use {
578 stroke: #ccc;
579 fill: none;
580}
581.dark #ov-topo svg #topo-sprites .gray1 use {
582 stroke: #333;
583 fill: none;
584}
585.light #ov-topo svg #topo-sprites .gray1 text {
586 fill: #ddd;
587}
588.dark #ov-topo svg #topo-sprites .gray1 text {
589 fill: #444;
590}
591
592/* fills */
593.light #ov-topo svg #topo-sprites use.fill-gray2 {
594 fill: #eee;
595}
596.dark #ov-topo svg #topo-sprites use.fill-gray2 {
597 fill: #444;
598}
599
600.light #ov-topo svg #topo-sprites use.fill-blue2 {
601 fill: #bce;
602}
603.dark #ov-topo svg #topo-sprites use.fill-blue2 {
604 fill: #447;
605}
606
607/* -- MISC -- */