blob: e06429b43a52e097720587200fa68e2d46afa580 [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
Simon Huntf44d7262016-06-14 14:46:56 -070023#ov-topo svg {
Simon Hunta9761342016-06-10 18:02:53 -070024 background-color: #f4f4f4;
Simon Hunt58894c82016-05-24 15:09:02 -070025}
26
27/* --- "No Devices" Layer --- */
28
Simon Huntf44d7262016-06-14 14:46:56 -070029#ov-topo svg .noDevsBird {
Simon Hunta9761342016-06-10 18:02:53 -070030 fill: #db7773;
Simon Hunt58894c82016-05-24 15:09:02 -070031}
32
Simon Huntf44d7262016-06-14 14:46:56 -070033#ov-topo svg #topo-noDevsLayer text {
Simon Hunta9761342016-06-10 18:02:53 -070034 fill: #7e9aa8;
Simon Hunt58894c82016-05-24 15:09:02 -070035}
36
37/* --- Topo Map --- */
38
Simon Huntf44d7262016-06-14 14:46:56 -070039#ov-topo svg #topo-map {
Simon Hunta9761342016-06-10 18:02:53 -070040 stroke-width: 2px;
41 stroke: #f4f4f4;
42 fill: #e5e5e6;
Simon Hunt58894c82016-05-24 15:09:02 -070043}
44
45/* --- general topo-panel styling --- */
46
Simon Huntf44d7262016-06-14 14:46:56 -070047.topo-p svg .glyph {
Simon Hunt58894c82016-05-24 15:09:02 -070048 fill: #222;
49}
Simon Hunt58894c82016-05-24 15:09:02 -070050
Simon Huntf44d7262016-06-14 14:46:56 -070051.topo-p svg .glyph.overlay {
Simon Hunt58894c82016-05-24 15:09:02 -070052 fill: #fff;
53}
Simon Hunt58894c82016-05-24 15:09:02 -070054
Simon Huntf44d7262016-06-14 14:46:56 -070055.topo-p h2 {
Simon Hunt58894c82016-05-24 15:09:02 -070056 color: black;
57}
Simon Hunt58894c82016-05-24 15:09:02 -070058
Simon Huntf44d7262016-06-14 14:46:56 -070059.topo-p h3 {
Simon Hunt58894c82016-05-24 15:09:02 -070060 color: black;
61}
Simon Hunt58894c82016-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 Huntf44d7262016-06-14 14:46:56 -070070.topo-p hr {
Simon Hunt58894c82016-05-24 15:09:02 -070071 background-color: #ccc;
72 color: #ccc;
73}
Simon Hunt58894c82016-05-24 15:09:02 -070074
75/* --- Topo Instance Panel --- */
76
77#topo-p-instance svg rect {
Simon Hunta9761342016-06-10 18:02:53 -070078 stroke-width: 0;
Simon Hunta9761342016-06-10 18:02:53 -070079 fill: #fbfbfb;
Simon Hunt58894c82016-05-24 15:09:02 -070080}
81
Simon Huntf44d7262016-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 Hunt58894c82016-05-24 15:09:02 -070087
88#topo-p-instance svg .glyph {
Simon Hunta9761342016-06-10 18:02:53 -070089 fill: #fff;
Simon Hunt58894c82016-05-24 15:09:02 -070090}
91#topo-p-instance .online svg .glyph {
Simon Hunta9761342016-06-10 18:02:53 -070092 fill: #fff;
Simon Hunt58894c82016-05-24 15:09:02 -070093}
94
95
Simon Hunta9761342016-06-10 18:02:53 -070096/* offline */
Simon Hunt58894c82016-05-24 15:09:02 -070097#topo-p-instance svg .badgeIcon {
Simon Hunt58894c82016-05-24 15:09:02 -070098 opacity: 0.4;
Simon Hunta9761342016-06-10 18:02:53 -070099 fill: #939598;
Simon Hunt58894c82016-05-24 15:09:02 -0700100}
101
Simon Hunta9761342016-06-10 18:02:53 -0700102/* online */
Simon Hunt58894c82016-05-24 15:09:02 -0700103#topo-p-instance .online svg .badgeIcon {
104 opacity: 1.0;
Simon Hunta9761342016-06-10 18:02:53 -0700105 fill: #939598;
Simon Hunt58894c82016-05-24 15:09:02 -0700106}
Simon Huntf44d7262016-06-14 14:46:56 -0700107#topo-p-instance .online svg .badgeIcon.bird {
Simon Hunta9761342016-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 Hunt58894c82016-05-24 15:09:02 -0700116}
117
118#topo-p-instance svg text {
Simon Hunta9761342016-06-10 18:02:53 -0700119 text-anchor: left;
120 opacity: 0.5;
Simon Hunta9761342016-06-10 18:02:53 -0700121 fill: #3c3a3a;
Simon Hunt58894c82016-05-24 15:09:02 -0700122}
Simon Huntf44d7262016-06-14 14:46:56 -0700123
124#topo-p-instance .online svg text {
125 opacity: 1.0;
Simon Hunta9761342016-06-10 18:02:53 -0700126 fill: #3c3a3a;
Simon Hunt58894c82016-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 Huntf44d7262016-06-14 14:46:56 -0700135#topo-p-instance .onosInst.mastership.affinity svg rect {
Simon Hunt58894c82016-05-24 15:09:02 -0700136 filter: url(#blue-glow);
137}
Simon Hunta9761342016-06-10 18:02:53 -0700138
Simon Huntf44d7262016-06-14 14:46:56 -0700139.firefox #topo-p-instance .onosInst.mastership.affinity svg rect {
Simon Hunt58894c82016-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 Hunt58894c82016-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 Hunt58894c82016-05-24 15:09:02 -0700153/* Device Nodes */
154
Simon Huntf44d7262016-06-14 14:46:56 -0700155/* note: device without the 'online' class is offline */
Simon Hunt58894c82016-05-24 15:09:02 -0700156#ov-topo svg .node.device rect {
Simon Huntf44d7262016-06-14 14:46:56 -0700157 /* TODO: theme */
158 fill: #f0f0f0;
Simon Hunt58894c82016-05-24 15:09:02 -0700159}
Simon Hunt58894c82016-05-24 15:09:02 -0700160#ov-topo svg .node.device text {
Simon Huntf44d7262016-06-14 14:46:56 -0700161 /*TODO: theme*/
Simon Hunt58894c82016-05-24 15:09:02 -0700162 fill: #bbb;
Simon Hunt58894c82016-05-24 15:09:02 -0700163}
Simon Huntf44d7262016-06-14 14:46:56 -0700164#ov-topo svg .node.device use {
165 /*TODO: theme*/
Simon Hunt58894c82016-05-24 15:09:02 -0700166 fill: #777;
167}
Simon Huntf44d7262016-06-14 14:46:56 -0700168
169
170#ov-topo svg .node.device.online rect {
171 fill: #ffffff;
Simon Hunt58894c82016-05-24 15:09:02 -0700172}
Simon Huntf44d7262016-06-14 14:46:56 -0700173#ov-topo svg .node.device.online text {
174 fill: #3c3a3a;
Simon Hunt58894c82016-05-24 15:09:02 -0700175}
Simon Huntf44d7262016-06-14 14:46:56 -0700176#ov-topo svg .node.device.online use {
177 /* NOTE: this gets overridden programatically */
178 fill: #454545;
Simon Hunt58894c82016-05-24 15:09:02 -0700179}
Simon Huntf44d7262016-06-14 14:46:56 -0700180
181
182#ov-topo svg .node.device.selected rect {
Simon Hunt4766dfb2016-06-14 17:16:22 -0700183 stroke-width: 2.0;
184 stroke: #009fdb;
Simon Hunt58894c82016-05-24 15:09:02 -0700185}
186
187/* Badges */
Simon Huntf44d7262016-06-14 14:46:56 -0700188/* (... works for bothand dark themes...) */
Simon Hunt58894c82016-05-24 15:09:02 -0700189#ov-topo svg .node .badge circle {
190 stroke: #aaa;
191}
192
193#ov-topo svg .node .badge.badgeInfo circle {
194 fill: #99d;
195}
196
197#ov-topo svg .node .badge.badgeWarn circle {
198 fill: #da2;
199}
200
201#ov-topo svg .node .badge.badgeError circle {
202 fill: #e44;
203}
204
205#ov-topo svg .node .badge use {
206 fill: white !important;
207}
208
209#ov-topo svg .node .badge.badgeInfo use {
210 fill: #448;
211}
212
213#ov-topo svg .node .badge text {
214 fill: white !important;
215}
216
217#ov-topo svg .node .badge.badgeInfo text {
218 fill: #448;
219}
220
221/* Host Nodes */
222
223#ov-topo svg .node.host {
224}
225
226#ov-topo svg .node.host text {
227 stroke: none;
228 font: 9pt sans-serif;
Simon Hunt58894c82016-05-24 15:09:02 -0700229 fill: #846;
230}
Simon Hunt58894c82016-05-24 15:09:02 -0700231
Simon Hunt4766dfb2016-06-14 17:16:22 -0700232#ov-topo svg .node.host circle {
Simon Huntf44d7262016-06-14 14:46:56 -0700233 stroke: #a3a596;
234 fill: #e0dfd6;
Simon Hunt58894c82016-05-24 15:09:02 -0700235}
Simon Hunt4766dfb2016-06-14 17:16:22 -0700236#ov-topo svg .node.host.selected circle {
237 stroke-width: 2.0;
238 stroke: #009fdb;
239}
Simon Hunt58894c82016-05-24 15:09:02 -0700240
Simon Hunt4766dfb2016-06-14 17:16:22 -0700241#ov-topo svg .node.host use {
242 fill: #3c3a3a;
Simon Hunt58894c82016-05-24 15:09:02 -0700243}
Simon Hunt58894c82016-05-24 15:09:02 -0700244
245/* --- Topo Links --- */
246
247#ov-topo svg .link {
248 opacity: .9;
249}
250
251#ov-topo svg .link.selected,
252#ov-topo svg .link.enhanced {
Simon Hunt4766dfb2016-06-14 17:16:22 -0700253 stroke-width: 3.5;
254 stroke: #009fdb;
Simon Hunt58894c82016-05-24 15:09:02 -0700255}
Simon Hunt58894c82016-05-24 15:09:02 -0700256
257#ov-topo svg .link.inactive {
258 opacity: .5;
259 stroke-dasharray: 8 4;
260}
Simon Hunta9761342016-06-10 18:02:53 -0700261/* TODO: Review for not-permitted links */
Simon Hunt58894c82016-05-24 15:09:02 -0700262#ov-topo svg .link.not-permitted {
263 stroke: rgb(255,0,0);
264 stroke-width: 5.0;
265 stroke-dasharray: 8 4;
266}
267
268#ov-topo svg .link.secondary {
269 stroke-width: 3px;
Simon Hunt58894c82016-05-24 15:09:02 -0700270 stroke: rgba(0,153,51,0.5);
271}
Simon Hunt58894c82016-05-24 15:09:02 -0700272
273/* Port traffic color visualization for Kbps, Mbps, and Gbps */
274
Simon Huntf44d7262016-06-14 14:46:56 -0700275#ov-topo svg .link.secondary.port-traffic-Kbps {
Simon Hunt58894c82016-05-24 15:09:02 -0700276 stroke: rgb(0,153,51);
277 stroke-width: 5.0;
278}
Simon Hunt58894c82016-05-24 15:09:02 -0700279
Simon Huntf44d7262016-06-14 14:46:56 -0700280#ov-topo svg .link.secondary.port-traffic-Mbps {
Simon Hunt58894c82016-05-24 15:09:02 -0700281 stroke: rgb(128,145,27);
282 stroke-width: 6.5;
283}
Simon Hunt58894c82016-05-24 15:09:02 -0700284
Simon Huntf44d7262016-06-14 14:46:56 -0700285#ov-topo svg .link.secondary.port-traffic-Gbps {
Simon Hunt58894c82016-05-24 15:09:02 -0700286 stroke: rgb(255, 137, 3);
287 stroke-width: 8.0;
288}
Simon Hunt58894c82016-05-24 15:09:02 -0700289
Simon Huntf44d7262016-06-14 14:46:56 -0700290#ov-topo svg .link.secondary.port-traffic-Gbps-choked {
Simon Hunt58894c82016-05-24 15:09:02 -0700291 stroke: rgb(183, 30, 21);
292 stroke-width: 8.0;
293}
Simon Hunt58894c82016-05-24 15:09:02 -0700294
295
296
297#ov-topo svg .link.animated {
298 stroke-dasharray: 8 5;
299 animation: ants 5s infinite linear;
Simon Hunt4766dfb2016-06-14 17:16:22 -0700300 /* below line could be added via Javascript, based on path, if we cared
301 * enough about the direction of ant-flow
302 */
Simon Hunt58894c82016-05-24 15:09:02 -0700303 /*animation-direction: reverse;*/
304}
305@keyframes ants {
306 from {
307 stroke-dashoffset: 0;
308 }
309 to {
310 stroke-dashoffset: 400;
311 }
312}
313
314#ov-topo svg .link.primary {
315 stroke-width: 4px;
Simon Hunt58894c82016-05-24 15:09:02 -0700316 stroke: #ffA300;
317}
Simon Hunt58894c82016-05-24 15:09:02 -0700318
319#ov-topo svg .link.secondary.optical {
320 stroke-width: 4px;
Simon Hunt58894c82016-05-24 15:09:02 -0700321 stroke: rgba(128,64,255,0.5);
322}
Simon Hunt58894c82016-05-24 15:09:02 -0700323
324#ov-topo svg .link.primary.optical {
325 stroke-width: 6px;
Simon Hunt58894c82016-05-24 15:09:02 -0700326 stroke: #74f;
327}
Simon Hunt58894c82016-05-24 15:09:02 -0700328
329/* Link Labels */
330#ov-topo svg .linkLabel rect {
331 stroke: none;
Simon Hunt4766dfb2016-06-14 17:16:22 -0700332 fill: #ffffff;
Simon Hunt58894c82016-05-24 15:09:02 -0700333}
Simon Hunt58894c82016-05-24 15:09:02 -0700334
Simon Huntf44d7262016-06-14 14:46:56 -0700335#ov-topo svg .linkLabel text {
Simon Hunt58894c82016-05-24 15:09:02 -0700336 fill: #444;
337}
Simon Hunt58894c82016-05-24 15:09:02 -0700338
339/* Port Labels */
340
341#ov-topo svg .portLabel rect {
Simon Hunt4766dfb2016-06-14 17:16:22 -0700342 stroke: #a3a596;
343 fill: #ffffff;
Simon Hunt58894c82016-05-24 15:09:02 -0700344}
Simon Hunt58894c82016-05-24 15:09:02 -0700345
Simon Huntf44d7262016-06-14 14:46:56 -0700346#ov-topo svg .portLabel text {
Simon Hunt58894c82016-05-24 15:09:02 -0700347 fill: #444;
348}
Simon Hunt58894c82016-05-24 15:09:02 -0700349
350/* Number of Links Labels */
351
352
Simon Huntf44d7262016-06-14 14:46:56 -0700353#ov-topo text.numLinkText {
Simon Hunt58894c82016-05-24 15:09:02 -0700354 fill: #444;
355}
Simon Hunt58894c82016-05-24 15:09:02 -0700356
357/* ------------------------------------------------- */
358/* Sprite Layer */
359
Simon Huntf44d7262016-06-14 14:46:56 -0700360#ov-topo svg #topo-sprites .gold1 use {
Simon Hunt58894c82016-05-24 15:09:02 -0700361 stroke: #fda;
362 fill: none;
363}
Simon Huntf44d7262016-06-14 14:46:56 -0700364#ov-topo svg #topo-sprites .gold1 text {
Simon Hunt58894c82016-05-24 15:09:02 -0700365 fill: #eda;
366}
Simon Hunt58894c82016-05-24 15:09:02 -0700367
Simon Huntf44d7262016-06-14 14:46:56 -0700368#ov-topo svg #topo-sprites .blue1 use {
Simon Hunt58894c82016-05-24 15:09:02 -0700369 stroke: #bbd;
370 fill: none;
371}
Simon Huntf44d7262016-06-14 14:46:56 -0700372#ov-topo svg #topo-sprites .blue1 text {
Simon Hunt58894c82016-05-24 15:09:02 -0700373 fill: #cce;
374}
Simon Hunt58894c82016-05-24 15:09:02 -0700375
Simon Huntf44d7262016-06-14 14:46:56 -0700376#ov-topo svg #topo-sprites .gray1 use {
Simon Hunt58894c82016-05-24 15:09:02 -0700377 stroke: #ccc;
378 fill: none;
379}
Simon Huntf44d7262016-06-14 14:46:56 -0700380#ov-topo svg #topo-sprites .gray1 text {
Simon Hunt58894c82016-05-24 15:09:02 -0700381 fill: #ddd;
382}
Simon Hunt58894c82016-05-24 15:09:02 -0700383
384/* fills */
Simon Huntf44d7262016-06-14 14:46:56 -0700385#ov-topo svg #topo-sprites use.fill-gray2 {
Simon Hunt58894c82016-05-24 15:09:02 -0700386 fill: #eee;
387}
Simon Hunt58894c82016-05-24 15:09:02 -0700388
Simon Huntf44d7262016-06-14 14:46:56 -0700389#ov-topo svg #topo-sprites use.fill-blue2 {
Simon Hunt58894c82016-05-24 15:09:02 -0700390 fill: #bce;
391}