blob: a90bae5c795d318362cee0b1f374458c02fade38 [file] [log] [blame]
Simon Huntd5b96732016-07-08 13:22:27 -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
Simon Huntd5b96732016-07-08 13:22:27 -070017/*
18 ONOS GUI -- Topology View (theme) -- CSS file
19 */
20
21/* --- Base SVG Layer --- */
22
23#ov-topo2 svg {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010024 background-color: #f4f4f4;
Simon Huntd5b96732016-07-08 13:22:27 -070025}
26
27/* --- "No Devices" Layer --- */
28
29#ov-topo2 svg .noDevsBird {
30 fill: #db7773;
31}
32
Simon Hunt95f4b422017-03-03 13:49:05 -080033#ov-topo2 svg #topo2-noDevsLayer text {
Simon Huntd5b96732016-07-08 13:22:27 -070034 fill: #7e9aa8;
35}
36
37/* --- Topo Map --- */
38
Simon Hunt95f4b422017-03-03 13:49:05 -080039#ov-topo2 svg #topo2-map {
Simon Huntd5b96732016-07-08 13:22:27 -070040 stroke-width: 2px;
41 stroke: #f4f4f4;
42 fill: #e5e5e6;
43}
44
Simon Hunt95f4b422017-03-03 13:49:05 -080045/* --- general topo2-panel styling --- */
Steven Burrowsec1f45c2016-08-08 16:14:41 +010046
Simon Hunt95f4b422017-03-03 13:49:05 -080047.topo2-p h2 {
48 display: inline-block;
49 padding: 6px;
Steven Burrowsec1f45c2016-08-08 16:14:41 +010050}
51
Simon Hunt95f4b422017-03-03 13:49:05 -080052.topo2-p svg {
53 background: #c0242b;
54 width: 28px;
55 height: 28px;
56}
57
58.topo2-p svg .glyph {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010059 fill: #ffffff;
60}
61
Simon Hunt95f4b422017-03-03 13:49:05 -080062.topo2-p hr {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010063 background-color: #cccccc;
64}
65
Steven Burrows7a9d04e2016-09-26 17:05:37 -070066#topo2-p-detail svg {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010067 background: none;
68}
69
Steven Burrows7a9d04e2016-09-26 17:05:37 -070070#topo2-p-detail .header svg .glyph {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010071 fill: #c0242b;
72}
73
74
75/* --- Topo Instance Panel --- */
76
Steven Burrows7a9d04e2016-09-26 17:05:37 -070077#topo2-p-instance svg rect {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010078 stroke-width: 0;
79 fill: #fbfbfb;
80}
81
82/* body of an instance */
Steven Burrows7a9d04e2016-09-26 17:05:37 -070083#topo2-p-instance .online svg rect {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010084 opacity: 1;
85 fill: #fbfbfb;
86}
87
Steven Burrows7a9d04e2016-09-26 17:05:37 -070088#topo2-p-instance svg .glyph {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010089 fill: #fff;
90}
Steven Burrows7a9d04e2016-09-26 17:05:37 -070091#topo2-p-instance .online svg .glyph {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010092 fill: #fff;
93}
94
95
96/* offline */
Steven Burrows7a9d04e2016-09-26 17:05:37 -070097#topo2-p-instance svg .badgeIcon {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010098 opacity: 0.4;
99 fill: #939598;
100}
101
102/* online */
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700103#topo2-p-instance .online svg .badgeIcon {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100104 opacity: 1.0;
105 fill: #939598;
106}
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700107#topo2-p-instance .online svg .badgeIcon.bird {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100108 fill: #ffffff;
109}
110
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700111#topo2-p-instance svg .readyBadge {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100112 visibility: hidden;
113}
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700114#topo2-p-instance .ready svg .readyBadge {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100115 visibility: visible;
116}
117
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700118#topo2-p-instance svg text {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100119 text-anchor: left;
120 opacity: 0.5;
121 fill: #3c3a3a;
122}
123
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700124#topo2-p-instance .online svg text {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100125 opacity: 1.0;
126 fill: #3c3a3a;
127}
128
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700129#topo2-p-instance .onosInst.mastership {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100130 opacity: 0.3;
131}
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700132#topo2-p-instance .onosInst.mastership.affinity {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100133 opacity: 1.0;
134}
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700135#topo2-p-instance .onosInst.mastership.affinity svg rect {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100136 filter: url(#blue-glow);
137}
138
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700139.firefox #topo2-p-instance .onosInst.mastership.affinity svg rect {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100140 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}
142
143/* --- Topo Nodes --- */
144
145#ov-topo2 svg .suppressed {
146 opacity: 0.5 !important;
147}
148
149#ov-topo2 svg .suppressedmax {
150 opacity: 0.2 !important;
151}
152
153/* Device Nodes */
154
155/* note: device without the 'online' class is offline */
156#ov-topo2 svg .node.device rect {
157 /* TODO: theme */
158 fill: #f0f0f0;
159}
160#ov-topo2 svg .node.device text {
161 /*TODO: theme*/
162 fill: #bbb;
163}
164#ov-topo2 svg .node.device use {
165 /*TODO: theme*/
166 fill: #777;
167}
168
169
170#ov-topo2 svg .node.device.online rect {
171 fill: #ffffff;
172}
173#ov-topo2 svg .node.device.online text {
174 fill: #3c3a3a;
175}
176#ov-topo2 svg .node.device.online use {
177 /* NOTE: this gets overridden programatically */
178 fill: #454545;
179}
180
Steven Burrows6deb4ce2016-08-26 16:06:23 +0100181#ov-topo2 svg .node.sub-region rect {
182 fill: #ffffff;
183}
184
185#ov-topo2 svg .node.sub-region use {
186 /* NOTE: this gets overridden programatically */
187 fill: #454545;
188}
189
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100190
Steven Burrows86af4352016-11-16 18:19:12 -0600191#ov-topo2 svg .node.selected .node-container {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100192 stroke-width: 2.0;
193 stroke: #009fdb;
194}
195
196/* Badges */
197/* (... works for bothand dark themes...) */
198#ov-topo2 svg .node .badge circle {
199 stroke: #aaa;
200}
201
202#ov-topo2 svg .node .badge.badgeInfo circle {
203 fill: #99d;
204}
205
206#ov-topo2 svg .node .badge.badgeWarn circle {
207 fill: #da2;
208}
209
210#ov-topo2 svg .node .badge.badgeError circle {
211 fill: #e44;
212}
213
214#ov-topo2 svg .node .badge use {
215 fill: white !important;
216}
217
218#ov-topo2 svg .node .badge.badgeInfo use {
219 fill: #448;
220}
221
222#ov-topo2 svg .node .badge text {
223 fill: white !important;
224}
225
226#ov-topo2 svg .node .badge.badgeInfo text {
227 fill: #448;
228}
229
230/* Host Nodes */
231
232#ov-topo2 svg .node.host {
233}
234
235#ov-topo2 svg .node.host text {
236 stroke: none;
237 font: 9pt sans-serif;
238 fill: #846;
239}
240
241#ov-topo2 svg .node.host circle {
242 stroke: #a3a596;
243 fill: #e0dfd6;
244}
245#ov-topo2 svg .node.host.selected .hostIcon > circle {
246 stroke-width: 2.0;
247 stroke: #009fdb;
248}
249
250#ov-topo2 svg .node.host use {
251 fill: #3c3a3a;
252}
253
254/* --- Topo Links --- */
255
256#ov-topo2 svg .link {
257 opacity: .9;
258}
259
260#ov-topo2 svg .link.selected,
261#ov-topo2 svg .link.enhanced {
262 stroke-width: 3.5;
263 stroke: #009fdb;
264}
265
266#ov-topo2 svg .link.inactive {
267 opacity: .5;
Steven Burrows583f4be2016-11-04 14:06:50 +0100268 stroke-dasharray: 4 2;
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100269}
270/* TODO: Review for not-permitted links */
271#ov-topo2 svg .link.not-permitted {
272 stroke: rgb(255,0,0);
273 stroke-width: 5.0;
274 stroke-dasharray: 8 4;
275}
276
277#ov-topo2 svg .link.secondary {
278 stroke-width: 3px;
279 stroke: rgba(0,153,51,0.5);
280}
281
282/* Port traffic color visualization for Kbps, Mbps, and Gbps */
283
284#ov-topo2 svg .link.secondary.port-traffic-Kbps {
285 stroke: rgb(0,153,51);
286 stroke-width: 5.0;
287}
288
289#ov-topo2 svg .link.secondary.port-traffic-Mbps {
290 stroke: rgb(128,145,27);
291 stroke-width: 6.5;
292}
293
294#ov-topo2 svg .link.secondary.port-traffic-Gbps {
295 stroke: rgb(255, 137, 3);
296 stroke-width: 8.0;
297}
298
299#ov-topo2 svg .link.secondary.port-traffic-Gbps-choked {
300 stroke: rgb(183, 30, 21);
301 stroke-width: 8.0;
302}
303
304
305
306#ov-topo2 svg .link.animated {
307 stroke-dasharray: 8 5;
308 animation: ants 5s infinite linear;
309 /* below line could be added via Javascript, based on path, if we cared
310 * enough about the direction of ant-flow
311 */
312 /*animation-direction: reverse;*/
313}
314@keyframes ants {
315 from {
316 stroke-dashoffset: 0;
317 }
318 to {
319 stroke-dashoffset: 400;
320 }
321}
322
323#ov-topo2 svg .link.primary {
324 stroke-width: 4px;
325 stroke: #ffA300;
326}
327
328#ov-topo2 svg .link.secondary.optical {
329 stroke-width: 4px;
330 stroke: rgba(128,64,255,0.5);
331}
332
333#ov-topo2 svg .link.primary.optical {
334 stroke-width: 6px;
335 stroke: #74f;
336}
337
338/* Link Labels */
339#ov-topo2 svg .linkLabel rect {
340 stroke: none;
341 fill: #ffffff;
342}
343
344#ov-topo2 svg .linkLabel text {
345 fill: #444;
346}
347
348/* Port Labels */
349
350#ov-topo2 svg .portLabel rect {
351 stroke: #a3a596;
352 fill: #ffffff;
353}
354
355#ov-topo2 svg .portLabel text {
356 fill: #444;
357}
358
359/* Number of Links Labels */
360
361
362#ov-topo2 text.numLinkText {
363 fill: #444;
364}
365
366/* ------------------------------------------------- */
367/* Sprite Layer */
368
Simon Hunt95f4b422017-03-03 13:49:05 -0800369#ov-topo2 svg #topo2-sprites .gold1 use {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100370 stroke: #fda;
371 fill: none;
372}
Simon Hunt95f4b422017-03-03 13:49:05 -0800373#ov-topo2 svg #topo2-sprites .gold1 text {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100374 fill: #eda;
375}
376
Simon Hunt95f4b422017-03-03 13:49:05 -0800377#ov-topo2 svg #topo2-sprites .blue1 use {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100378 stroke: #bbd;
379 fill: none;
380}
Simon Hunt95f4b422017-03-03 13:49:05 -0800381#ov-topo2 svg #topo2-sprites .blue1 text {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100382 fill: #cce;
383}
384
Simon Hunt95f4b422017-03-03 13:49:05 -0800385#ov-topo2 svg #topo2-sprites .gray1 use {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100386 stroke: #ccc;
387 fill: none;
388}
Simon Hunt95f4b422017-03-03 13:49:05 -0800389#ov-topo2 svg #topo2-sprites .gray1 text {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100390 fill: #ddd;
391}
392
393/* fills */
Simon Hunt95f4b422017-03-03 13:49:05 -0800394#ov-topo2 svg #topo2-sprites use.fill-gray2 {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100395 fill: #eee;
396}
397
Simon Hunt95f4b422017-03-03 13:49:05 -0800398#ov-topo2 svg #topo2-sprites use.fill-blue2 {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100399 fill: #bce;
400}