blob: 7d8be0bed0ffb42ee58054deb3877bcd2c11b93b [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
Steven Burrowsec1f45c2016-08-08 16:14:41 +010033#ov-topo2 svg #topo-noDevsLayer text {
Simon Huntd5b96732016-07-08 13:22:27 -070034 fill: #7e9aa8;
35}
36
37/* --- Topo Map --- */
38
Steven Burrowsec1f45c2016-08-08 16:14:41 +010039#ov-topo2 svg #topo-map {
Simon Huntd5b96732016-07-08 13:22:27 -070040 stroke-width: 2px;
41 stroke: #f4f4f4;
42 fill: #e5e5e6;
43}
44
Steven Burrowsec1f45c2016-08-08 16:14:41 +010045/* --- general topo-panel styling --- */
46
47.topo-p svg {
48 background: #c0242b;
49}
50
51.topo-p svg .glyph {
52 fill: #ffffff;
53}
54
55.topo-p hr {
56 background-color: #cccccc;
57}
58
Steven Burrows7a9d04e2016-09-26 17:05:37 -070059#topo2-p-detail svg {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010060 background: none;
61}
62
Steven Burrows7a9d04e2016-09-26 17:05:37 -070063#topo2-p-detail .header svg .glyph {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010064 fill: #c0242b;
65}
66
67
68/* --- Topo Instance Panel --- */
69
Steven Burrows7a9d04e2016-09-26 17:05:37 -070070#topo2-p-instance svg rect {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010071 stroke-width: 0;
72 fill: #fbfbfb;
73}
74
75/* body of an instance */
Steven Burrows7a9d04e2016-09-26 17:05:37 -070076#topo2-p-instance .online svg rect {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010077 opacity: 1;
78 fill: #fbfbfb;
79}
80
Steven Burrows7a9d04e2016-09-26 17:05:37 -070081#topo2-p-instance svg .glyph {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010082 fill: #fff;
83}
Steven Burrows7a9d04e2016-09-26 17:05:37 -070084#topo2-p-instance .online svg .glyph {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010085 fill: #fff;
86}
87
88
89/* offline */
Steven Burrows7a9d04e2016-09-26 17:05:37 -070090#topo2-p-instance svg .badgeIcon {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010091 opacity: 0.4;
92 fill: #939598;
93}
94
95/* online */
Steven Burrows7a9d04e2016-09-26 17:05:37 -070096#topo2-p-instance .online svg .badgeIcon {
Steven Burrowsec1f45c2016-08-08 16:14:41 +010097 opacity: 1.0;
98 fill: #939598;
99}
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700100#topo2-p-instance .online svg .badgeIcon.bird {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100101 fill: #ffffff;
102}
103
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700104#topo2-p-instance svg .readyBadge {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100105 visibility: hidden;
106}
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700107#topo2-p-instance .ready svg .readyBadge {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100108 visibility: visible;
109}
110
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700111#topo2-p-instance svg text {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100112 text-anchor: left;
113 opacity: 0.5;
114 fill: #3c3a3a;
115}
116
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700117#topo2-p-instance .online svg text {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100118 opacity: 1.0;
119 fill: #3c3a3a;
120}
121
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700122#topo2-p-instance .onosInst.mastership {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100123 opacity: 0.3;
124}
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700125#topo2-p-instance .onosInst.mastership.affinity {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100126 opacity: 1.0;
127}
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700128#topo2-p-instance .onosInst.mastership.affinity svg rect {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100129 filter: url(#blue-glow);
130}
131
Steven Burrows7a9d04e2016-09-26 17:05:37 -0700132.firefox #topo2-p-instance .onosInst.mastership.affinity svg rect {
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100133 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");
134}
135
136/* --- Topo Nodes --- */
137
138#ov-topo2 svg .suppressed {
139 opacity: 0.5 !important;
140}
141
142#ov-topo2 svg .suppressedmax {
143 opacity: 0.2 !important;
144}
145
146/* Device Nodes */
147
148/* note: device without the 'online' class is offline */
149#ov-topo2 svg .node.device rect {
150 /* TODO: theme */
151 fill: #f0f0f0;
152}
153#ov-topo2 svg .node.device text {
154 /*TODO: theme*/
155 fill: #bbb;
156}
157#ov-topo2 svg .node.device use {
158 /*TODO: theme*/
159 fill: #777;
160}
161
162
163#ov-topo2 svg .node.device.online rect {
164 fill: #ffffff;
165}
166#ov-topo2 svg .node.device.online text {
167 fill: #3c3a3a;
168}
169#ov-topo2 svg .node.device.online use {
170 /* NOTE: this gets overridden programatically */
171 fill: #454545;
172}
173
Steven Burrows6deb4ce2016-08-26 16:06:23 +0100174#ov-topo2 svg .node.sub-region rect {
175 fill: #ffffff;
176}
177
178#ov-topo2 svg .node.sub-region use {
179 /* NOTE: this gets overridden programatically */
180 fill: #454545;
181}
182
Steven Burrowsec1f45c2016-08-08 16:14:41 +0100183
184#ov-topo2 svg .node.device.selected rect {
185 stroke-width: 2.0;
186 stroke: #009fdb;
187}
188
189/* Badges */
190/* (... works for bothand dark themes...) */
191#ov-topo2 svg .node .badge circle {
192 stroke: #aaa;
193}
194
195#ov-topo2 svg .node .badge.badgeInfo circle {
196 fill: #99d;
197}
198
199#ov-topo2 svg .node .badge.badgeWarn circle {
200 fill: #da2;
201}
202
203#ov-topo2 svg .node .badge.badgeError circle {
204 fill: #e44;
205}
206
207#ov-topo2 svg .node .badge use {
208 fill: white !important;
209}
210
211#ov-topo2 svg .node .badge.badgeInfo use {
212 fill: #448;
213}
214
215#ov-topo2 svg .node .badge text {
216 fill: white !important;
217}
218
219#ov-topo2 svg .node .badge.badgeInfo text {
220 fill: #448;
221}
222
223/* Host Nodes */
224
225#ov-topo2 svg .node.host {
226}
227
228#ov-topo2 svg .node.host text {
229 stroke: none;
230 font: 9pt sans-serif;
231 fill: #846;
232}
233
234#ov-topo2 svg .node.host circle {
235 stroke: #a3a596;
236 fill: #e0dfd6;
237}
238#ov-topo2 svg .node.host.selected .hostIcon > circle {
239 stroke-width: 2.0;
240 stroke: #009fdb;
241}
242
243#ov-topo2 svg .node.host use {
244 fill: #3c3a3a;
245}
246
247/* --- Topo Links --- */
248
249#ov-topo2 svg .link {
250 opacity: .9;
251}
252
253#ov-topo2 svg .link.selected,
254#ov-topo2 svg .link.enhanced {
255 stroke-width: 3.5;
256 stroke: #009fdb;
257}
258
259#ov-topo2 svg .link.inactive {
260 opacity: .5;
261 stroke-dasharray: 8 4;
262}
263/* TODO: Review for not-permitted links */
264#ov-topo2 svg .link.not-permitted {
265 stroke: rgb(255,0,0);
266 stroke-width: 5.0;
267 stroke-dasharray: 8 4;
268}
269
270#ov-topo2 svg .link.secondary {
271 stroke-width: 3px;
272 stroke: rgba(0,153,51,0.5);
273}
274
275/* Port traffic color visualization for Kbps, Mbps, and Gbps */
276
277#ov-topo2 svg .link.secondary.port-traffic-Kbps {
278 stroke: rgb(0,153,51);
279 stroke-width: 5.0;
280}
281
282#ov-topo2 svg .link.secondary.port-traffic-Mbps {
283 stroke: rgb(128,145,27);
284 stroke-width: 6.5;
285}
286
287#ov-topo2 svg .link.secondary.port-traffic-Gbps {
288 stroke: rgb(255, 137, 3);
289 stroke-width: 8.0;
290}
291
292#ov-topo2 svg .link.secondary.port-traffic-Gbps-choked {
293 stroke: rgb(183, 30, 21);
294 stroke-width: 8.0;
295}
296
297
298
299#ov-topo2 svg .link.animated {
300 stroke-dasharray: 8 5;
301 animation: ants 5s infinite linear;
302 /* below line could be added via Javascript, based on path, if we cared
303 * enough about the direction of ant-flow
304 */
305 /*animation-direction: reverse;*/
306}
307@keyframes ants {
308 from {
309 stroke-dashoffset: 0;
310 }
311 to {
312 stroke-dashoffset: 400;
313 }
314}
315
316#ov-topo2 svg .link.primary {
317 stroke-width: 4px;
318 stroke: #ffA300;
319}
320
321#ov-topo2 svg .link.secondary.optical {
322 stroke-width: 4px;
323 stroke: rgba(128,64,255,0.5);
324}
325
326#ov-topo2 svg .link.primary.optical {
327 stroke-width: 6px;
328 stroke: #74f;
329}
330
331/* Link Labels */
332#ov-topo2 svg .linkLabel rect {
333 stroke: none;
334 fill: #ffffff;
335}
336
337#ov-topo2 svg .linkLabel text {
338 fill: #444;
339}
340
341/* Port Labels */
342
343#ov-topo2 svg .portLabel rect {
344 stroke: #a3a596;
345 fill: #ffffff;
346}
347
348#ov-topo2 svg .portLabel text {
349 fill: #444;
350}
351
352/* Number of Links Labels */
353
354
355#ov-topo2 text.numLinkText {
356 fill: #444;
357}
358
359/* ------------------------------------------------- */
360/* Sprite Layer */
361
362#ov-topo2 svg #topo-sprites .gold1 use {
363 stroke: #fda;
364 fill: none;
365}
366#ov-topo2 svg #topo-sprites .gold1 text {
367 fill: #eda;
368}
369
370#ov-topo2 svg #topo-sprites .blue1 use {
371 stroke: #bbd;
372 fill: none;
373}
374#ov-topo2 svg #topo-sprites .blue1 text {
375 fill: #cce;
376}
377
378#ov-topo2 svg #topo-sprites .gray1 use {
379 stroke: #ccc;
380 fill: none;
381}
382#ov-topo2 svg #topo-sprites .gray1 text {
383 fill: #ddd;
384}
385
386/* fills */
387#ov-topo2 svg #topo-sprites use.fill-gray2 {
388 fill: #eee;
389}
390
391#ov-topo2 svg #topo-sprites use.fill-blue2 {
392 fill: #bce;
393}