blob: e0b88e3b7c6d895d7ca6422fd780f5a4a41dc314 [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 Hunt8f907cc2016-06-15 18:04:01 -070047.topo-p svg {
48 background: #c0242b;
49}
50
Simon Huntf44d7262016-06-14 14:46:56 -070051.topo-p svg .glyph {
Simon Hunt8f907cc2016-06-15 18:04:01 -070052 fill: #ffffff;
Simon Hunt58894c82016-05-24 15:09:02 -070053}
54
Simon Huntf44d7262016-06-14 14:46:56 -070055.topo-p hr {
Simon Hunt8f907cc2016-06-15 18:04:01 -070056 background-color: #cccccc;
Simon Hunt58894c82016-05-24 15:09:02 -070057}
Simon Hunt58894c82016-05-24 15:09:02 -070058
Simon Hunt8f907cc2016-06-15 18:04:01 -070059#topo-p-detail svg {
60 background: none;
61}
62
63#topo-p-detail .header svg .glyph {
64 fill: #c0242b;
65}
66
67
Simon Hunt58894c82016-05-24 15:09:02 -070068/* --- Topo Instance Panel --- */
69
70#topo-p-instance svg rect {
Simon Hunta9761342016-06-10 18:02:53 -070071 stroke-width: 0;
Simon Hunta9761342016-06-10 18:02:53 -070072 fill: #fbfbfb;
Simon Hunt58894c82016-05-24 15:09:02 -070073}
74
Simon Huntf44d7262016-06-14 14:46:56 -070075/* body of an instance */
76#topo-p-instance .online svg rect {
77 opacity: 1;
78 fill: #fbfbfb;
79}
Simon Hunt58894c82016-05-24 15:09:02 -070080
81#topo-p-instance svg .glyph {
Simon Hunta9761342016-06-10 18:02:53 -070082 fill: #fff;
Simon Hunt58894c82016-05-24 15:09:02 -070083}
84#topo-p-instance .online svg .glyph {
Simon Hunta9761342016-06-10 18:02:53 -070085 fill: #fff;
Simon Hunt58894c82016-05-24 15:09:02 -070086}
87
88
Simon Hunta9761342016-06-10 18:02:53 -070089/* offline */
Simon Hunt58894c82016-05-24 15:09:02 -070090#topo-p-instance svg .badgeIcon {
Simon Hunt58894c82016-05-24 15:09:02 -070091 opacity: 0.4;
Simon Hunta9761342016-06-10 18:02:53 -070092 fill: #939598;
Simon Hunt58894c82016-05-24 15:09:02 -070093}
94
Simon Hunta9761342016-06-10 18:02:53 -070095/* online */
Simon Hunt58894c82016-05-24 15:09:02 -070096#topo-p-instance .online svg .badgeIcon {
97 opacity: 1.0;
Simon Hunta9761342016-06-10 18:02:53 -070098 fill: #939598;
Simon Hunt58894c82016-05-24 15:09:02 -070099}
Simon Huntf44d7262016-06-14 14:46:56 -0700100#topo-p-instance .online svg .badgeIcon.bird {
Simon Hunta9761342016-06-10 18:02:53 -0700101 fill: #ffffff;
102}
103
104#topo-p-instance svg .readyBadge {
105 visibility: hidden;
106}
107#topo-p-instance .ready svg .readyBadge {
108 visibility: visible;
Simon Hunt58894c82016-05-24 15:09:02 -0700109}
110
111#topo-p-instance svg text {
Simon Hunta9761342016-06-10 18:02:53 -0700112 text-anchor: left;
113 opacity: 0.5;
Simon Hunta9761342016-06-10 18:02:53 -0700114 fill: #3c3a3a;
Simon Hunt58894c82016-05-24 15:09:02 -0700115}
Simon Huntf44d7262016-06-14 14:46:56 -0700116
117#topo-p-instance .online svg text {
118 opacity: 1.0;
Simon Hunta9761342016-06-10 18:02:53 -0700119 fill: #3c3a3a;
Simon Hunt58894c82016-05-24 15:09:02 -0700120}
121
122#topo-p-instance .onosInst.mastership {
123 opacity: 0.3;
124}
125#topo-p-instance .onosInst.mastership.affinity {
126 opacity: 1.0;
127}
Simon Huntf44d7262016-06-14 14:46:56 -0700128#topo-p-instance .onosInst.mastership.affinity svg rect {
Simon Hunt58894c82016-05-24 15:09:02 -0700129 filter: url(#blue-glow);
130}
Simon Hunta9761342016-06-10 18:02:53 -0700131
Simon Huntf44d7262016-06-14 14:46:56 -0700132.firefox #topo-p-instance .onosInst.mastership.affinity svg rect {
Simon Hunt58894c82016-05-24 15:09:02 -0700133 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}
Simon Hunt58894c82016-05-24 15:09:02 -0700135
136/* --- Topo Nodes --- */
137
138#ov-topo svg .suppressed {
139 opacity: 0.5 !important;
140}
141
142#ov-topo svg .suppressedmax {
143 opacity: 0.2 !important;
144}
145
Simon Hunt58894c82016-05-24 15:09:02 -0700146/* Device Nodes */
147
Simon Huntf44d7262016-06-14 14:46:56 -0700148/* note: device without the 'online' class is offline */
Simon Hunt58894c82016-05-24 15:09:02 -0700149#ov-topo svg .node.device rect {
Simon Huntf44d7262016-06-14 14:46:56 -0700150 /* TODO: theme */
151 fill: #f0f0f0;
Simon Hunt58894c82016-05-24 15:09:02 -0700152}
Simon Hunt58894c82016-05-24 15:09:02 -0700153#ov-topo svg .node.device text {
Simon Huntf44d7262016-06-14 14:46:56 -0700154 /*TODO: theme*/
Simon Hunt58894c82016-05-24 15:09:02 -0700155 fill: #bbb;
Simon Hunt58894c82016-05-24 15:09:02 -0700156}
Simon Huntf44d7262016-06-14 14:46:56 -0700157#ov-topo svg .node.device use {
158 /*TODO: theme*/
Simon Hunt58894c82016-05-24 15:09:02 -0700159 fill: #777;
160}
Simon Huntf44d7262016-06-14 14:46:56 -0700161
162
163#ov-topo svg .node.device.online rect {
164 fill: #ffffff;
Simon Hunt58894c82016-05-24 15:09:02 -0700165}
Simon Huntf44d7262016-06-14 14:46:56 -0700166#ov-topo svg .node.device.online text {
167 fill: #3c3a3a;
Simon Hunt58894c82016-05-24 15:09:02 -0700168}
Simon Huntf44d7262016-06-14 14:46:56 -0700169#ov-topo svg .node.device.online use {
170 /* NOTE: this gets overridden programatically */
171 fill: #454545;
Simon Hunt58894c82016-05-24 15:09:02 -0700172}
Simon Huntf44d7262016-06-14 14:46:56 -0700173
174
175#ov-topo svg .node.device.selected rect {
Simon Hunt4766dfb2016-06-14 17:16:22 -0700176 stroke-width: 2.0;
177 stroke: #009fdb;
Simon Hunt58894c82016-05-24 15:09:02 -0700178}
179
180/* Badges */
Simon Huntf44d7262016-06-14 14:46:56 -0700181/* (... works for bothand dark themes...) */
Simon Hunt58894c82016-05-24 15:09:02 -0700182#ov-topo svg .node .badge circle {
183 stroke: #aaa;
184}
185
186#ov-topo svg .node .badge.badgeInfo circle {
187 fill: #99d;
188}
189
190#ov-topo svg .node .badge.badgeWarn circle {
191 fill: #da2;
192}
193
194#ov-topo svg .node .badge.badgeError circle {
195 fill: #e44;
196}
197
198#ov-topo svg .node .badge use {
199 fill: white !important;
200}
201
202#ov-topo svg .node .badge.badgeInfo use {
203 fill: #448;
204}
205
206#ov-topo svg .node .badge text {
207 fill: white !important;
208}
209
210#ov-topo svg .node .badge.badgeInfo text {
211 fill: #448;
212}
213
214/* Host Nodes */
215
216#ov-topo svg .node.host {
217}
218
219#ov-topo svg .node.host text {
220 stroke: none;
221 font: 9pt sans-serif;
Simon Hunt58894c82016-05-24 15:09:02 -0700222 fill: #846;
223}
Simon Hunt58894c82016-05-24 15:09:02 -0700224
Simon Hunt4766dfb2016-06-14 17:16:22 -0700225#ov-topo svg .node.host circle {
Simon Huntf44d7262016-06-14 14:46:56 -0700226 stroke: #a3a596;
227 fill: #e0dfd6;
Simon Hunt58894c82016-05-24 15:09:02 -0700228}
Simon Hunta5487ad2016-06-16 13:10:41 -0700229#ov-topo svg .node.host.selected .hostIcon > circle {
Simon Hunt4766dfb2016-06-14 17:16:22 -0700230 stroke-width: 2.0;
231 stroke: #009fdb;
232}
Simon Hunt58894c82016-05-24 15:09:02 -0700233
Simon Hunt4766dfb2016-06-14 17:16:22 -0700234#ov-topo svg .node.host use {
235 fill: #3c3a3a;
Simon Hunt58894c82016-05-24 15:09:02 -0700236}
Simon Hunt58894c82016-05-24 15:09:02 -0700237
238/* --- Topo Links --- */
239
240#ov-topo svg .link {
241 opacity: .9;
242}
243
244#ov-topo svg .link.selected,
245#ov-topo svg .link.enhanced {
Simon Hunt4766dfb2016-06-14 17:16:22 -0700246 stroke-width: 3.5;
247 stroke: #009fdb;
Simon Hunt58894c82016-05-24 15:09:02 -0700248}
Simon Hunt58894c82016-05-24 15:09:02 -0700249
250#ov-topo svg .link.inactive {
251 opacity: .5;
252 stroke-dasharray: 8 4;
253}
Simon Hunta9761342016-06-10 18:02:53 -0700254/* TODO: Review for not-permitted links */
Simon Hunt58894c82016-05-24 15:09:02 -0700255#ov-topo svg .link.not-permitted {
256 stroke: rgb(255,0,0);
257 stroke-width: 5.0;
258 stroke-dasharray: 8 4;
259}
260
261#ov-topo svg .link.secondary {
262 stroke-width: 3px;
Simon Hunt58894c82016-05-24 15:09:02 -0700263 stroke: rgba(0,153,51,0.5);
264}
Simon Hunt58894c82016-05-24 15:09:02 -0700265
266/* Port traffic color visualization for Kbps, Mbps, and Gbps */
267
Simon Huntf44d7262016-06-14 14:46:56 -0700268#ov-topo svg .link.secondary.port-traffic-Kbps {
Simon Hunt58894c82016-05-24 15:09:02 -0700269 stroke: rgb(0,153,51);
270 stroke-width: 5.0;
271}
Simon Hunt58894c82016-05-24 15:09:02 -0700272
Simon Huntf44d7262016-06-14 14:46:56 -0700273#ov-topo svg .link.secondary.port-traffic-Mbps {
Simon Hunt58894c82016-05-24 15:09:02 -0700274 stroke: rgb(128,145,27);
275 stroke-width: 6.5;
276}
Simon Hunt58894c82016-05-24 15:09:02 -0700277
Simon Huntf44d7262016-06-14 14:46:56 -0700278#ov-topo svg .link.secondary.port-traffic-Gbps {
Simon Hunt58894c82016-05-24 15:09:02 -0700279 stroke: rgb(255, 137, 3);
280 stroke-width: 8.0;
281}
Simon Hunt58894c82016-05-24 15:09:02 -0700282
Simon Huntf44d7262016-06-14 14:46:56 -0700283#ov-topo svg .link.secondary.port-traffic-Gbps-choked {
Simon Hunt58894c82016-05-24 15:09:02 -0700284 stroke: rgb(183, 30, 21);
285 stroke-width: 8.0;
286}
Simon Hunt58894c82016-05-24 15:09:02 -0700287
288
289
290#ov-topo svg .link.animated {
291 stroke-dasharray: 8 5;
292 animation: ants 5s infinite linear;
Simon Hunt4766dfb2016-06-14 17:16:22 -0700293 /* below line could be added via Javascript, based on path, if we cared
294 * enough about the direction of ant-flow
295 */
Simon Hunt58894c82016-05-24 15:09:02 -0700296 /*animation-direction: reverse;*/
297}
298@keyframes ants {
299 from {
300 stroke-dashoffset: 0;
301 }
302 to {
303 stroke-dashoffset: 400;
304 }
305}
306
307#ov-topo svg .link.primary {
308 stroke-width: 4px;
Simon Hunt58894c82016-05-24 15:09:02 -0700309 stroke: #ffA300;
310}
Simon Hunt58894c82016-05-24 15:09:02 -0700311
312#ov-topo svg .link.secondary.optical {
313 stroke-width: 4px;
Simon Hunt58894c82016-05-24 15:09:02 -0700314 stroke: rgba(128,64,255,0.5);
315}
Simon Hunt58894c82016-05-24 15:09:02 -0700316
317#ov-topo svg .link.primary.optical {
318 stroke-width: 6px;
Simon Hunt58894c82016-05-24 15:09:02 -0700319 stroke: #74f;
320}
Simon Hunt58894c82016-05-24 15:09:02 -0700321
322/* Link Labels */
323#ov-topo svg .linkLabel rect {
324 stroke: none;
Simon Hunt4766dfb2016-06-14 17:16:22 -0700325 fill: #ffffff;
Simon Hunt58894c82016-05-24 15:09:02 -0700326}
Simon Hunt58894c82016-05-24 15:09:02 -0700327
Simon Huntf44d7262016-06-14 14:46:56 -0700328#ov-topo svg .linkLabel text {
Simon Hunt58894c82016-05-24 15:09:02 -0700329 fill: #444;
330}
Simon Hunt58894c82016-05-24 15:09:02 -0700331
332/* Port Labels */
333
334#ov-topo svg .portLabel rect {
Simon Hunt4766dfb2016-06-14 17:16:22 -0700335 stroke: #a3a596;
336 fill: #ffffff;
Simon Hunt58894c82016-05-24 15:09:02 -0700337}
Simon Hunt58894c82016-05-24 15:09:02 -0700338
Simon Huntf44d7262016-06-14 14:46:56 -0700339#ov-topo svg .portLabel text {
Simon Hunt58894c82016-05-24 15:09:02 -0700340 fill: #444;
341}
Simon Hunt58894c82016-05-24 15:09:02 -0700342
343/* Number of Links Labels */
344
345
Simon Huntf44d7262016-06-14 14:46:56 -0700346#ov-topo text.numLinkText {
Simon Hunt58894c82016-05-24 15:09:02 -0700347 fill: #444;
348}
Simon Hunt58894c82016-05-24 15:09:02 -0700349
350/* ------------------------------------------------- */
351/* Sprite Layer */
352
Simon Huntf44d7262016-06-14 14:46:56 -0700353#ov-topo svg #topo-sprites .gold1 use {
Simon Hunt58894c82016-05-24 15:09:02 -0700354 stroke: #fda;
355 fill: none;
356}
Simon Huntf44d7262016-06-14 14:46:56 -0700357#ov-topo svg #topo-sprites .gold1 text {
Simon Hunt58894c82016-05-24 15:09:02 -0700358 fill: #eda;
359}
Simon Hunt58894c82016-05-24 15:09:02 -0700360
Simon Huntf44d7262016-06-14 14:46:56 -0700361#ov-topo svg #topo-sprites .blue1 use {
Simon Hunt58894c82016-05-24 15:09:02 -0700362 stroke: #bbd;
363 fill: none;
364}
Simon Huntf44d7262016-06-14 14:46:56 -0700365#ov-topo svg #topo-sprites .blue1 text {
Simon Hunt58894c82016-05-24 15:09:02 -0700366 fill: #cce;
367}
Simon Hunt58894c82016-05-24 15:09:02 -0700368
Simon Huntf44d7262016-06-14 14:46:56 -0700369#ov-topo svg #topo-sprites .gray1 use {
Simon Hunt58894c82016-05-24 15:09:02 -0700370 stroke: #ccc;
371 fill: none;
372}
Simon Huntf44d7262016-06-14 14:46:56 -0700373#ov-topo svg #topo-sprites .gray1 text {
Simon Hunt58894c82016-05-24 15:09:02 -0700374 fill: #ddd;
375}
Simon Hunt58894c82016-05-24 15:09:02 -0700376
377/* fills */
Simon Huntf44d7262016-06-14 14:46:56 -0700378#ov-topo svg #topo-sprites use.fill-gray2 {
Simon Hunt58894c82016-05-24 15:09:02 -0700379 fill: #eee;
380}
Simon Hunt58894c82016-05-24 15:09:02 -0700381
Simon Huntf44d7262016-06-14 14:46:56 -0700382#ov-topo svg #topo-sprites use.fill-blue2 {
Simon Hunt58894c82016-05-24 15:09:02 -0700383 fill: #bce;
384}