blob: 197b6d670936df24d86fa25f3db525c25e71f910 [file] [log] [blame]
Simon Hunt11f662f2016-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
Simon Hunt92eaf442016-06-14 14:46:56 -070023#ov-topo svg {
Simon Hunt2d147f62016-06-10 18:02:53 -070024 background-color: #f4f4f4;
Simon Hunt11f662f2016-05-24 15:09:02 -070025}
26
27/* --- "No Devices" Layer --- */
28
Simon Hunt92eaf442016-06-14 14:46:56 -070029#ov-topo svg .noDevsBird {
Simon Hunt2d147f62016-06-10 18:02:53 -070030 fill: #db7773;
Simon Hunt11f662f2016-05-24 15:09:02 -070031}
32
Simon Hunt92eaf442016-06-14 14:46:56 -070033#ov-topo svg #topo-noDevsLayer text {
Simon Hunt2d147f62016-06-10 18:02:53 -070034 fill: #7e9aa8;
Simon Hunt11f662f2016-05-24 15:09:02 -070035}
36
37/* --- Topo Map --- */
38
Simon Hunt92eaf442016-06-14 14:46:56 -070039#ov-topo svg #topo-map {
Simon Hunt2d147f62016-06-10 18:02:53 -070040 stroke-width: 2px;
41 stroke: #f4f4f4;
42 fill: #e5e5e6;
Simon Hunt11f662f2016-05-24 15:09:02 -070043}
44
45/* --- general topo-panel styling --- */
46
Simon Hunt92eaf442016-06-14 14:46:56 -070047.topo-p svg .glyph {
Simon Hunt11f662f2016-05-24 15:09:02 -070048 fill: #222;
49}
Simon Hunt11f662f2016-05-24 15:09:02 -070050
Simon Hunt92eaf442016-06-14 14:46:56 -070051.topo-p svg .glyph.overlay {
Simon Hunt11f662f2016-05-24 15:09:02 -070052 fill: #fff;
53}
Simon Hunt11f662f2016-05-24 15:09:02 -070054
Simon Hunt92eaf442016-06-14 14:46:56 -070055.topo-p h2 {
Simon Hunt11f662f2016-05-24 15:09:02 -070056 color: black;
57}
Simon Hunt11f662f2016-05-24 15:09:02 -070058
Simon Hunt92eaf442016-06-14 14:46:56 -070059.topo-p h3 {
Simon Hunt11f662f2016-05-24 15:09:02 -070060 color: black;
61}
Simon Hunt11f662f2016-05-24 15:09:02 -070062
63.topo-p td.label {
64 /* works for both light and dark themes ... */
65 color: #777;
66}
67.topo-p td.value {
68}
69
Simon Hunt92eaf442016-06-14 14:46:56 -070070.topo-p hr {
Simon Hunt11f662f2016-05-24 15:09:02 -070071 background-color: #ccc;
72 color: #ccc;
73}
Simon Hunt11f662f2016-05-24 15:09:02 -070074
75/* --- Topo Instance Panel --- */
76
77#topo-p-instance svg rect {
Simon Hunt2d147f62016-06-10 18:02:53 -070078 stroke-width: 0;
Simon Hunt2d147f62016-06-10 18:02:53 -070079 fill: #fbfbfb;
Simon Hunt11f662f2016-05-24 15:09:02 -070080}
81
Simon Hunt92eaf442016-06-14 14:46:56 -070082/* body of an instance */
83#topo-p-instance .online svg rect {
84 opacity: 1;
85 fill: #fbfbfb;
86}
Simon Hunt11f662f2016-05-24 15:09:02 -070087
88#topo-p-instance svg .glyph {
Simon Hunt2d147f62016-06-10 18:02:53 -070089 fill: #fff;
Simon Hunt11f662f2016-05-24 15:09:02 -070090}
91#topo-p-instance .online svg .glyph {
Simon Hunt2d147f62016-06-10 18:02:53 -070092 fill: #fff;
Simon Hunt11f662f2016-05-24 15:09:02 -070093}
94
95
Simon Hunt2d147f62016-06-10 18:02:53 -070096/* offline */
Simon Hunt11f662f2016-05-24 15:09:02 -070097#topo-p-instance svg .badgeIcon {
Simon Hunt11f662f2016-05-24 15:09:02 -070098 opacity: 0.4;
Simon Hunt2d147f62016-06-10 18:02:53 -070099 fill: #939598;
Simon Hunt11f662f2016-05-24 15:09:02 -0700100}
101
Simon Hunt2d147f62016-06-10 18:02:53 -0700102/* online */
Simon Hunt11f662f2016-05-24 15:09:02 -0700103#topo-p-instance .online svg .badgeIcon {
104 opacity: 1.0;
Simon Hunt2d147f62016-06-10 18:02:53 -0700105 fill: #939598;
Simon Hunt11f662f2016-05-24 15:09:02 -0700106}
Simon Hunt92eaf442016-06-14 14:46:56 -0700107#topo-p-instance .online svg .badgeIcon.bird {
Simon Hunt2d147f62016-06-10 18:02:53 -0700108 fill: #ffffff;
109}
110
111#topo-p-instance svg .readyBadge {
112 visibility: hidden;
113}
114#topo-p-instance .ready svg .readyBadge {
115 visibility: visible;
Simon Hunt11f662f2016-05-24 15:09:02 -0700116}
117
118#topo-p-instance svg text {
Simon Hunt2d147f62016-06-10 18:02:53 -0700119 text-anchor: left;
120 opacity: 0.5;
Simon Hunt2d147f62016-06-10 18:02:53 -0700121 fill: #3c3a3a;
Simon Hunt11f662f2016-05-24 15:09:02 -0700122}
Simon Hunt92eaf442016-06-14 14:46:56 -0700123
124#topo-p-instance .online svg text {
125 opacity: 1.0;
Simon Hunt2d147f62016-06-10 18:02:53 -0700126 fill: #3c3a3a;
Simon Hunt11f662f2016-05-24 15:09:02 -0700127}
128
129#topo-p-instance .onosInst.mastership {
130 opacity: 0.3;
131}
132#topo-p-instance .onosInst.mastership.affinity {
133 opacity: 1.0;
134}
Simon Hunt92eaf442016-06-14 14:46:56 -0700135#topo-p-instance .onosInst.mastership.affinity svg rect {
Simon Hunt11f662f2016-05-24 15:09:02 -0700136 filter: url(#blue-glow);
137}
Simon Hunt2d147f62016-06-10 18:02:53 -0700138
Simon Hunt92eaf442016-06-14 14:46:56 -0700139.firefox #topo-p-instance .onosInst.mastership.affinity svg rect {
Simon Hunt11f662f2016-05-24 15:09:02 -0700140 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");
141}
Simon Hunt11f662f2016-05-24 15:09:02 -0700142
143/* --- Topo Nodes --- */
144
145#ov-topo svg .suppressed {
146 opacity: 0.5 !important;
147}
148
149#ov-topo svg .suppressedmax {
150 opacity: 0.2 !important;
151}
152
Simon Hunt92eaf442016-06-14 14:46:56 -0700153#ov-topo svg .node.selected rect,
154#ov-topo svg .node.selected circle {
Simon Hunt11f662f2016-05-24 15:09:02 -0700155 fill: #f90;
156 filter: url(#blue-glow);
157}
Simon Hunt92eaf442016-06-14 14:46:56 -0700158.firefox #ov-topo svg .node.selected rect,
159.firefox #ov-topo svg .node.selected circle {
Simon Hunt11f662f2016-05-24 15:09:02 -0700160 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");
161}
Simon Hunt11f662f2016-05-24 15:09:02 -0700162
163/* Device Nodes */
164
Simon Hunt92eaf442016-06-14 14:46:56 -0700165/* note: device without the 'online' class is offline */
Simon Hunt11f662f2016-05-24 15:09:02 -0700166#ov-topo svg .node.device rect {
Simon Hunt92eaf442016-06-14 14:46:56 -0700167 /* TODO: theme */
168 fill: #f0f0f0;
Simon Hunt11f662f2016-05-24 15:09:02 -0700169}
Simon Hunt11f662f2016-05-24 15:09:02 -0700170#ov-topo svg .node.device text {
Simon Hunt92eaf442016-06-14 14:46:56 -0700171 /*TODO: theme*/
Simon Hunt11f662f2016-05-24 15:09:02 -0700172 fill: #bbb;
Simon Hunt11f662f2016-05-24 15:09:02 -0700173}
Simon Hunt92eaf442016-06-14 14:46:56 -0700174#ov-topo svg .node.device use {
175 /*TODO: theme*/
Simon Hunt11f662f2016-05-24 15:09:02 -0700176 fill: #777;
177}
Simon Hunt92eaf442016-06-14 14:46:56 -0700178
179
180#ov-topo svg .node.device.online rect {
181 fill: #ffffff;
Simon Hunt11f662f2016-05-24 15:09:02 -0700182}
Simon Hunt92eaf442016-06-14 14:46:56 -0700183#ov-topo svg .node.device.online text {
184 fill: #3c3a3a;
Simon Hunt11f662f2016-05-24 15:09:02 -0700185}
Simon Hunt92eaf442016-06-14 14:46:56 -0700186#ov-topo svg .node.device.online use {
187 /* NOTE: this gets overridden programatically */
188 fill: #454545;
Simon Hunt11f662f2016-05-24 15:09:02 -0700189}
Simon Hunt92eaf442016-06-14 14:46:56 -0700190
191
192#ov-topo svg .node.device.selected rect {
Simon Hunt11f662f2016-05-24 15:09:02 -0700193 fill: #f90;
194}
195
196/* Badges */
Simon Hunt92eaf442016-06-14 14:46:56 -0700197/* (... works for bothand dark themes...) */
Simon Hunt11f662f2016-05-24 15:09:02 -0700198#ov-topo svg .node .badge circle {
199 stroke: #aaa;
200}
201
202#ov-topo svg .node .badge.badgeInfo circle {
203 fill: #99d;
204}
205
206#ov-topo svg .node .badge.badgeWarn circle {
207 fill: #da2;
208}
209
210#ov-topo svg .node .badge.badgeError circle {
211 fill: #e44;
212}
213
214#ov-topo svg .node .badge use {
215 fill: white !important;
216}
217
218#ov-topo svg .node .badge.badgeInfo use {
219 fill: #448;
220}
221
222#ov-topo svg .node .badge text {
223 fill: white !important;
224}
225
226#ov-topo svg .node .badge.badgeInfo text {
227 fill: #448;
228}
229
230/* Host Nodes */
231
232#ov-topo svg .node.host {
233}
234
235#ov-topo svg .node.host text {
236 stroke: none;
237 font: 9pt sans-serif;
Simon Hunt11f662f2016-05-24 15:09:02 -0700238 fill: #846;
239}
Simon Hunt11f662f2016-05-24 15:09:02 -0700240
Simon Hunt92eaf442016-06-14 14:46:56 -0700241svg .node.host circle {
242 stroke: #a3a596;
243 fill: #e0dfd6;
Simon Hunt11f662f2016-05-24 15:09:02 -0700244}
Simon Hunt11f662f2016-05-24 15:09:02 -0700245
Simon Hunt92eaf442016-06-14 14:46:56 -0700246svg .node.host .svgIcon {
Simon Hunt11f662f2016-05-24 15:09:02 -0700247 fill: #444;
248}
Simon Hunt11f662f2016-05-24 15:09:02 -0700249
250/* --- Topo Links --- */
251
252#ov-topo svg .link {
253 opacity: .9;
254}
255
256#ov-topo svg .link.selected,
257#ov-topo svg .link.enhanced {
258 stroke-width: 4.5px;
Simon Hunt11f662f2016-05-24 15:09:02 -0700259 filter: url(#blue-glow);
260}
Simon Hunt92eaf442016-06-14 14:46:56 -0700261.firefox #ov-topo svg .link.selected,
262.firefox #ov-topo svg .link.enhanced {
Simon Hunt11f662f2016-05-24 15:09:02 -0700263 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");
264}
Simon Hunt11f662f2016-05-24 15:09:02 -0700265
266#ov-topo svg .link.inactive {
267 opacity: .5;
268 stroke-dasharray: 8 4;
269}
Simon Hunt2d147f62016-06-10 18:02:53 -0700270/* TODO: Review for not-permitted links */
Simon Hunt11f662f2016-05-24 15:09:02 -0700271#ov-topo svg .link.not-permitted {
272 stroke: rgb(255,0,0);
273 stroke-width: 5.0;
274 stroke-dasharray: 8 4;
275}
276
277#ov-topo svg .link.secondary {
278 stroke-width: 3px;
Simon Hunt11f662f2016-05-24 15:09:02 -0700279 stroke: rgba(0,153,51,0.5);
280}
Simon Hunt11f662f2016-05-24 15:09:02 -0700281
282/* Port traffic color visualization for Kbps, Mbps, and Gbps */
283
Simon Hunt92eaf442016-06-14 14:46:56 -0700284#ov-topo svg .link.secondary.port-traffic-Kbps {
Simon Hunt11f662f2016-05-24 15:09:02 -0700285 stroke: rgb(0,153,51);
286 stroke-width: 5.0;
287}
Simon Hunt11f662f2016-05-24 15:09:02 -0700288
Simon Hunt92eaf442016-06-14 14:46:56 -0700289#ov-topo svg .link.secondary.port-traffic-Mbps {
Simon Hunt11f662f2016-05-24 15:09:02 -0700290 stroke: rgb(128,145,27);
291 stroke-width: 6.5;
292}
Simon Hunt11f662f2016-05-24 15:09:02 -0700293
Simon Hunt92eaf442016-06-14 14:46:56 -0700294#ov-topo svg .link.secondary.port-traffic-Gbps {
Simon Hunt11f662f2016-05-24 15:09:02 -0700295 stroke: rgb(255, 137, 3);
296 stroke-width: 8.0;
297}
Simon Hunt11f662f2016-05-24 15:09:02 -0700298
Simon Hunt92eaf442016-06-14 14:46:56 -0700299#ov-topo svg .link.secondary.port-traffic-Gbps-choked {
Simon Hunt11f662f2016-05-24 15:09:02 -0700300 stroke: rgb(183, 30, 21);
301 stroke-width: 8.0;
302}
Simon Hunt11f662f2016-05-24 15:09:02 -0700303
304
305
306#ov-topo svg .link.animated {
307 stroke-dasharray: 8 5;
308 animation: ants 5s infinite linear;
309 /* below line will be added via Javascript based on path */
310 /*animation-direction: reverse;*/
311}
312@keyframes ants {
313 from {
314 stroke-dashoffset: 0;
315 }
316 to {
317 stroke-dashoffset: 400;
318 }
319}
320
321#ov-topo svg .link.primary {
322 stroke-width: 4px;
Simon Hunt11f662f2016-05-24 15:09:02 -0700323 stroke: #ffA300;
324}
Simon Hunt11f662f2016-05-24 15:09:02 -0700325
326#ov-topo svg .link.secondary.optical {
327 stroke-width: 4px;
Simon Hunt11f662f2016-05-24 15:09:02 -0700328 stroke: rgba(128,64,255,0.5);
329}
Simon Hunt11f662f2016-05-24 15:09:02 -0700330
331#ov-topo svg .link.primary.optical {
332 stroke-width: 6px;
Simon Hunt11f662f2016-05-24 15:09:02 -0700333 stroke: #74f;
334}
Simon Hunt11f662f2016-05-24 15:09:02 -0700335
336/* Link Labels */
337#ov-topo svg .linkLabel rect {
338 stroke: none;
Simon Hunt11f662f2016-05-24 15:09:02 -0700339 fill: #eee;
340}
Simon Hunt11f662f2016-05-24 15:09:02 -0700341
Simon Hunt92eaf442016-06-14 14:46:56 -0700342#ov-topo svg .linkLabel text {
Simon Hunt11f662f2016-05-24 15:09:02 -0700343 fill: #444;
344}
Simon Hunt11f662f2016-05-24 15:09:02 -0700345
346/* Port Labels */
347
348#ov-topo svg .portLabel rect {
349 stroke: none;
Simon Hunt11f662f2016-05-24 15:09:02 -0700350 fill: #eee;
351}
Simon Hunt11f662f2016-05-24 15:09:02 -0700352
Simon Hunt92eaf442016-06-14 14:46:56 -0700353#ov-topo svg .portLabel text {
Simon Hunt11f662f2016-05-24 15:09:02 -0700354 fill: #444;
355}
Simon Hunt11f662f2016-05-24 15:09:02 -0700356
357/* Number of Links Labels */
358
359
Simon Hunt92eaf442016-06-14 14:46:56 -0700360#ov-topo text.numLinkText {
Simon Hunt11f662f2016-05-24 15:09:02 -0700361 fill: #444;
362}
Simon Hunt11f662f2016-05-24 15:09:02 -0700363
364/* ------------------------------------------------- */
365/* Sprite Layer */
366
Simon Hunt92eaf442016-06-14 14:46:56 -0700367#ov-topo svg #topo-sprites .gold1 use {
Simon Hunt11f662f2016-05-24 15:09:02 -0700368 stroke: #fda;
369 fill: none;
370}
Simon Hunt92eaf442016-06-14 14:46:56 -0700371#ov-topo svg #topo-sprites .gold1 text {
Simon Hunt11f662f2016-05-24 15:09:02 -0700372 fill: #eda;
373}
Simon Hunt11f662f2016-05-24 15:09:02 -0700374
Simon Hunt92eaf442016-06-14 14:46:56 -0700375#ov-topo svg #topo-sprites .blue1 use {
Simon Hunt11f662f2016-05-24 15:09:02 -0700376 stroke: #bbd;
377 fill: none;
378}
Simon Hunt92eaf442016-06-14 14:46:56 -0700379#ov-topo svg #topo-sprites .blue1 text {
Simon Hunt11f662f2016-05-24 15:09:02 -0700380 fill: #cce;
381}
Simon Hunt11f662f2016-05-24 15:09:02 -0700382
Simon Hunt92eaf442016-06-14 14:46:56 -0700383#ov-topo svg #topo-sprites .gray1 use {
Simon Hunt11f662f2016-05-24 15:09:02 -0700384 stroke: #ccc;
385 fill: none;
386}
Simon Hunt92eaf442016-06-14 14:46:56 -0700387#ov-topo svg #topo-sprites .gray1 text {
Simon Hunt11f662f2016-05-24 15:09:02 -0700388 fill: #ddd;
389}
Simon Hunt11f662f2016-05-24 15:09:02 -0700390
391/* fills */
Simon Hunt92eaf442016-06-14 14:46:56 -0700392#ov-topo svg #topo-sprites use.fill-gray2 {
Simon Hunt11f662f2016-05-24 15:09:02 -0700393 fill: #eee;
394}
Simon Hunt11f662f2016-05-24 15:09:02 -0700395
Simon Hunt92eaf442016-06-14 14:46:56 -0700396#ov-topo svg #topo-sprites use.fill-blue2 {
Simon Hunt11f662f2016-05-24 15:09:02 -0700397 fill: #bce;
398}