blob: 7b15a0d992879fc2dff5f60af3f13c5b3c440313 [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
Simon Huntc217cb92016-08-30 16:17:51 -070067#toolbar-topo-tbar .tbar-row.right {
68 color: #aaa;
69}
Simon Hunt8f907cc2016-06-15 18:04:01 -070070
Simon Hunt58894c82016-05-24 15:09:02 -070071/* --- Topo Instance Panel --- */
72
73#topo-p-instance svg rect {
Simon Hunta9761342016-06-10 18:02:53 -070074 stroke-width: 0;
Simon Hunta9761342016-06-10 18:02:53 -070075 fill: #fbfbfb;
Simon Hunt58894c82016-05-24 15:09:02 -070076}
77
Simon Huntf44d7262016-06-14 14:46:56 -070078/* body of an instance */
79#topo-p-instance .online svg rect {
80 opacity: 1;
81 fill: #fbfbfb;
82}
Simon Hunt58894c82016-05-24 15:09:02 -070083
84#topo-p-instance svg .glyph {
Simon Hunta9761342016-06-10 18:02:53 -070085 fill: #fff;
Simon Hunt58894c82016-05-24 15:09:02 -070086}
87#topo-p-instance .online svg .glyph {
Simon Hunta9761342016-06-10 18:02:53 -070088 fill: #fff;
Simon Hunt58894c82016-05-24 15:09:02 -070089}
90
91
Simon Hunta9761342016-06-10 18:02:53 -070092/* offline */
Simon Hunt58894c82016-05-24 15:09:02 -070093#topo-p-instance svg .badgeIcon {
Simon Hunt58894c82016-05-24 15:09:02 -070094 opacity: 0.4;
Simon Hunta9761342016-06-10 18:02:53 -070095 fill: #939598;
Simon Hunt58894c82016-05-24 15:09:02 -070096}
97
Simon Hunta9761342016-06-10 18:02:53 -070098/* online */
Simon Hunt58894c82016-05-24 15:09:02 -070099#topo-p-instance .online svg .badgeIcon {
100 opacity: 1.0;
Simon Hunta9761342016-06-10 18:02:53 -0700101 fill: #939598;
Simon Hunt58894c82016-05-24 15:09:02 -0700102}
Simon Huntf44d7262016-06-14 14:46:56 -0700103#topo-p-instance .online svg .badgeIcon.bird {
Simon Hunta9761342016-06-10 18:02:53 -0700104 fill: #ffffff;
105}
106
107#topo-p-instance svg .readyBadge {
108 visibility: hidden;
109}
110#topo-p-instance .ready svg .readyBadge {
111 visibility: visible;
Simon Hunt58894c82016-05-24 15:09:02 -0700112}
113
114#topo-p-instance svg text {
Simon Hunta9761342016-06-10 18:02:53 -0700115 text-anchor: left;
116 opacity: 0.5;
Simon Hunta9761342016-06-10 18:02:53 -0700117 fill: #3c3a3a;
Simon Hunt58894c82016-05-24 15:09:02 -0700118}
Simon Huntf44d7262016-06-14 14:46:56 -0700119
120#topo-p-instance .online svg text {
121 opacity: 1.0;
Simon Hunta9761342016-06-10 18:02:53 -0700122 fill: #3c3a3a;
Simon Hunt58894c82016-05-24 15:09:02 -0700123}
124
125#topo-p-instance .onosInst.mastership {
126 opacity: 0.3;
127}
128#topo-p-instance .onosInst.mastership.affinity {
129 opacity: 1.0;
130}
Simon Huntf44d7262016-06-14 14:46:56 -0700131#topo-p-instance .onosInst.mastership.affinity svg rect {
Simon Hunt58894c82016-05-24 15:09:02 -0700132 filter: url(#blue-glow);
133}
Simon Hunta9761342016-06-10 18:02:53 -0700134
Simon Huntf44d7262016-06-14 14:46:56 -0700135.firefox #topo-p-instance .onosInst.mastership.affinity svg rect {
Simon Hunt58894c82016-05-24 15:09:02 -0700136 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");
137}
Simon Hunt58894c82016-05-24 15:09:02 -0700138
139/* --- Topo Nodes --- */
140
141#ov-topo svg .suppressed {
142 opacity: 0.5 !important;
143}
144
145#ov-topo svg .suppressedmax {
146 opacity: 0.2 !important;
147}
148
Simon Hunt58894c82016-05-24 15:09:02 -0700149/* Device Nodes */
150
Simon Huntf44d7262016-06-14 14:46:56 -0700151/* note: device without the 'online' class is offline */
Simon Hunt58894c82016-05-24 15:09:02 -0700152#ov-topo svg .node.device rect {
Simon Huntf44d7262016-06-14 14:46:56 -0700153 /* TODO: theme */
154 fill: #f0f0f0;
Simon Hunt58894c82016-05-24 15:09:02 -0700155}
Simon Hunt58894c82016-05-24 15:09:02 -0700156#ov-topo svg .node.device text {
Simon Huntf44d7262016-06-14 14:46:56 -0700157 /*TODO: theme*/
Simon Hunt58894c82016-05-24 15:09:02 -0700158 fill: #bbb;
Simon Hunt58894c82016-05-24 15:09:02 -0700159}
Simon Huntf44d7262016-06-14 14:46:56 -0700160#ov-topo svg .node.device use {
161 /*TODO: theme*/
Simon Hunt58894c82016-05-24 15:09:02 -0700162 fill: #777;
163}
Simon Huntf44d7262016-06-14 14:46:56 -0700164
165
166#ov-topo svg .node.device.online rect {
167 fill: #ffffff;
Simon Hunt58894c82016-05-24 15:09:02 -0700168}
Simon Huntf44d7262016-06-14 14:46:56 -0700169#ov-topo svg .node.device.online text {
170 fill: #3c3a3a;
Simon Hunt58894c82016-05-24 15:09:02 -0700171}
Simon Huntf44d7262016-06-14 14:46:56 -0700172#ov-topo svg .node.device.online use {
173 /* NOTE: this gets overridden programatically */
174 fill: #454545;
Simon Hunt58894c82016-05-24 15:09:02 -0700175}
Simon Huntf44d7262016-06-14 14:46:56 -0700176
177
178#ov-topo svg .node.device.selected rect {
Simon Hunt4766dfb2016-06-14 17:16:22 -0700179 stroke-width: 2.0;
180 stroke: #009fdb;
Simon Hunt58894c82016-05-24 15:09:02 -0700181}
182
183/* Badges */
Simon Huntf44d7262016-06-14 14:46:56 -0700184/* (... works for bothand dark themes...) */
Simon Hunt58894c82016-05-24 15:09:02 -0700185#ov-topo svg .node .badge circle {
186 stroke: #aaa;
187}
188
189#ov-topo svg .node .badge.badgeInfo circle {
190 fill: #99d;
191}
192
193#ov-topo svg .node .badge.badgeWarn circle {
194 fill: #da2;
195}
196
197#ov-topo svg .node .badge.badgeError circle {
198 fill: #e44;
199}
200
201#ov-topo svg .node .badge use {
202 fill: white !important;
203}
204
205#ov-topo svg .node .badge.badgeInfo use {
206 fill: #448;
207}
208
209#ov-topo svg .node .badge text {
210 fill: white !important;
211}
212
213#ov-topo svg .node .badge.badgeInfo text {
214 fill: #448;
215}
216
217/* Host Nodes */
218
219#ov-topo svg .node.host {
220}
221
222#ov-topo svg .node.host text {
223 stroke: none;
224 font: 9pt sans-serif;
Simon Hunt58894c82016-05-24 15:09:02 -0700225 fill: #846;
226}
Simon Hunt58894c82016-05-24 15:09:02 -0700227
Simon Hunt4766dfb2016-06-14 17:16:22 -0700228#ov-topo svg .node.host circle {
Simon Huntf44d7262016-06-14 14:46:56 -0700229 stroke: #a3a596;
230 fill: #e0dfd6;
Simon Hunt58894c82016-05-24 15:09:02 -0700231}
Simon Hunta5487ad2016-06-16 13:10:41 -0700232#ov-topo svg .node.host.selected .hostIcon > circle {
Simon Hunt4766dfb2016-06-14 17:16:22 -0700233 stroke-width: 2.0;
234 stroke: #009fdb;
235}
Simon Hunt58894c82016-05-24 15:09:02 -0700236
Simon Hunt4766dfb2016-06-14 17:16:22 -0700237#ov-topo svg .node.host use {
238 fill: #3c3a3a;
Simon Hunt58894c82016-05-24 15:09:02 -0700239}
Simon Hunt58894c82016-05-24 15:09:02 -0700240
241/* --- Topo Links --- */
242
243#ov-topo svg .link {
244 opacity: .9;
245}
246
247#ov-topo svg .link.selected,
248#ov-topo svg .link.enhanced {
Simon Hunt4766dfb2016-06-14 17:16:22 -0700249 stroke-width: 3.5;
250 stroke: #009fdb;
Simon Hunt58894c82016-05-24 15:09:02 -0700251}
Simon Hunt58894c82016-05-24 15:09:02 -0700252
253#ov-topo svg .link.inactive {
254 opacity: .5;
255 stroke-dasharray: 8 4;
256}
Simon Hunta9761342016-06-10 18:02:53 -0700257/* TODO: Review for not-permitted links */
Simon Hunt58894c82016-05-24 15:09:02 -0700258#ov-topo svg .link.not-permitted {
259 stroke: rgb(255,0,0);
260 stroke-width: 5.0;
261 stroke-dasharray: 8 4;
262}
263
264#ov-topo svg .link.secondary {
265 stroke-width: 3px;
Simon Hunt58894c82016-05-24 15:09:02 -0700266 stroke: rgba(0,153,51,0.5);
267}
Simon Hunt58894c82016-05-24 15:09:02 -0700268
269/* Port traffic color visualization for Kbps, Mbps, and Gbps */
270
Simon Huntf44d7262016-06-14 14:46:56 -0700271#ov-topo svg .link.secondary.port-traffic-Kbps {
Simon Hunt58894c82016-05-24 15:09:02 -0700272 stroke: rgb(0,153,51);
273 stroke-width: 5.0;
274}
Simon Hunt58894c82016-05-24 15:09:02 -0700275
Simon Huntf44d7262016-06-14 14:46:56 -0700276#ov-topo svg .link.secondary.port-traffic-Mbps {
Simon Hunt58894c82016-05-24 15:09:02 -0700277 stroke: rgb(128,145,27);
278 stroke-width: 6.5;
279}
Simon Hunt58894c82016-05-24 15:09:02 -0700280
Simon Huntf44d7262016-06-14 14:46:56 -0700281#ov-topo svg .link.secondary.port-traffic-Gbps {
Simon Hunt58894c82016-05-24 15:09:02 -0700282 stroke: rgb(255, 137, 3);
283 stroke-width: 8.0;
284}
Simon Hunt58894c82016-05-24 15:09:02 -0700285
Simon Huntf44d7262016-06-14 14:46:56 -0700286#ov-topo svg .link.secondary.port-traffic-Gbps-choked {
Simon Hunt58894c82016-05-24 15:09:02 -0700287 stroke: rgb(183, 30, 21);
288 stroke-width: 8.0;
289}
Simon Hunt58894c82016-05-24 15:09:02 -0700290
291
292
293#ov-topo svg .link.animated {
294 stroke-dasharray: 8 5;
295 animation: ants 5s infinite linear;
Simon Hunt4766dfb2016-06-14 17:16:22 -0700296 /* below line could be added via Javascript, based on path, if we cared
297 * enough about the direction of ant-flow
298 */
Simon Hunt58894c82016-05-24 15:09:02 -0700299 /*animation-direction: reverse;*/
300}
301@keyframes ants {
302 from {
303 stroke-dashoffset: 0;
304 }
305 to {
306 stroke-dashoffset: 400;
307 }
308}
309
310#ov-topo svg .link.primary {
311 stroke-width: 4px;
Simon Hunt58894c82016-05-24 15:09:02 -0700312 stroke: #ffA300;
313}
Simon Hunt58894c82016-05-24 15:09:02 -0700314
315#ov-topo svg .link.secondary.optical {
316 stroke-width: 4px;
Simon Hunt58894c82016-05-24 15:09:02 -0700317 stroke: rgba(128,64,255,0.5);
318}
Simon Hunt58894c82016-05-24 15:09:02 -0700319
320#ov-topo svg .link.primary.optical {
321 stroke-width: 6px;
Simon Hunt58894c82016-05-24 15:09:02 -0700322 stroke: #74f;
323}
Simon Hunt58894c82016-05-24 15:09:02 -0700324
325/* Link Labels */
326#ov-topo svg .linkLabel rect {
327 stroke: none;
Simon Hunt4766dfb2016-06-14 17:16:22 -0700328 fill: #ffffff;
Simon Hunt58894c82016-05-24 15:09:02 -0700329}
Simon Hunt58894c82016-05-24 15:09:02 -0700330
Simon Huntf44d7262016-06-14 14:46:56 -0700331#ov-topo svg .linkLabel text {
Simon Hunt58894c82016-05-24 15:09:02 -0700332 fill: #444;
333}
Simon Hunt58894c82016-05-24 15:09:02 -0700334
335/* Port Labels */
336
337#ov-topo svg .portLabel rect {
Simon Hunt4766dfb2016-06-14 17:16:22 -0700338 stroke: #a3a596;
339 fill: #ffffff;
Simon Hunt58894c82016-05-24 15:09:02 -0700340}
Simon Hunt58894c82016-05-24 15:09:02 -0700341
Simon Huntf44d7262016-06-14 14:46:56 -0700342#ov-topo svg .portLabel text {
Simon Hunt58894c82016-05-24 15:09:02 -0700343 fill: #444;
344}
Simon Hunt58894c82016-05-24 15:09:02 -0700345
346/* Number of Links Labels */
347
348
Simon Huntf44d7262016-06-14 14:46:56 -0700349#ov-topo text.numLinkText {
Simon Hunt58894c82016-05-24 15:09:02 -0700350 fill: #444;
351}
Simon Hunt58894c82016-05-24 15:09:02 -0700352
353/* ------------------------------------------------- */
354/* Sprite Layer */
355
Simon Huntf44d7262016-06-14 14:46:56 -0700356#ov-topo svg #topo-sprites .gold1 use {
Simon Hunt58894c82016-05-24 15:09:02 -0700357 stroke: #fda;
358 fill: none;
359}
Simon Huntf44d7262016-06-14 14:46:56 -0700360#ov-topo svg #topo-sprites .gold1 text {
Simon Hunt58894c82016-05-24 15:09:02 -0700361 fill: #eda;
362}
Simon Hunt58894c82016-05-24 15:09:02 -0700363
Simon Huntf44d7262016-06-14 14:46:56 -0700364#ov-topo svg #topo-sprites .blue1 use {
Simon Hunt58894c82016-05-24 15:09:02 -0700365 stroke: #bbd;
366 fill: none;
367}
Simon Huntf44d7262016-06-14 14:46:56 -0700368#ov-topo svg #topo-sprites .blue1 text {
Simon Hunt58894c82016-05-24 15:09:02 -0700369 fill: #cce;
370}
Simon Hunt58894c82016-05-24 15:09:02 -0700371
Simon Huntf44d7262016-06-14 14:46:56 -0700372#ov-topo svg #topo-sprites .gray1 use {
Simon Hunt58894c82016-05-24 15:09:02 -0700373 stroke: #ccc;
374 fill: none;
375}
Simon Huntf44d7262016-06-14 14:46:56 -0700376#ov-topo svg #topo-sprites .gray1 text {
Simon Hunt58894c82016-05-24 15:09:02 -0700377 fill: #ddd;
378}
Simon Hunt58894c82016-05-24 15:09:02 -0700379
380/* fills */
Simon Huntf44d7262016-06-14 14:46:56 -0700381#ov-topo svg #topo-sprites use.fill-gray2 {
Simon Hunt58894c82016-05-24 15:09:02 -0700382 fill: #eee;
383}
Simon Hunt58894c82016-05-24 15:09:02 -0700384
Simon Huntf44d7262016-06-14 14:46:56 -0700385#ov-topo svg #topo-sprites use.fill-blue2 {
Simon Hunt58894c82016-05-24 15:09:02 -0700386 fill: #bce;
387}