Simon Hunt | d5b9673 | 2016-07-08 13:22:27 -0700 | [diff] [blame] | 1 | /* |
| 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 Hunt | d5b9673 | 2016-07-08 13:22:27 -0700 | [diff] [blame] | 17 | /* |
| 18 | ONOS GUI -- Topology View (theme) -- CSS file |
| 19 | */ |
| 20 | |
| 21 | /* --- Base SVG Layer --- */ |
| 22 | |
| 23 | #ov-topo2 svg { |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame^] | 24 | background-color: #f4f4f4; |
Simon Hunt | d5b9673 | 2016-07-08 13:22:27 -0700 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | /* --- "No Devices" Layer --- */ |
| 28 | |
| 29 | #ov-topo2 svg .noDevsBird { |
| 30 | fill: #db7773; |
| 31 | } |
| 32 | |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame^] | 33 | #ov-topo2 svg #topo-noDevsLayer text { |
Simon Hunt | d5b9673 | 2016-07-08 13:22:27 -0700 | [diff] [blame] | 34 | fill: #7e9aa8; |
| 35 | } |
| 36 | |
| 37 | /* --- Topo Map --- */ |
| 38 | |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame^] | 39 | #ov-topo2 svg #topo-map { |
Simon Hunt | d5b9673 | 2016-07-08 13:22:27 -0700 | [diff] [blame] | 40 | stroke-width: 2px; |
| 41 | stroke: #f4f4f4; |
| 42 | fill: #e5e5e6; |
| 43 | } |
| 44 | |
Steven Burrows | ec1f45c | 2016-08-08 16:14:41 +0100 | [diff] [blame^] | 45 | /* --- 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 | |
| 59 | #topo-p-detail svg { |
| 60 | background: none; |
| 61 | } |
| 62 | |
| 63 | #topo-p-detail .header svg .glyph { |
| 64 | fill: #c0242b; |
| 65 | } |
| 66 | |
| 67 | |
| 68 | /* --- Topo Instance Panel --- */ |
| 69 | |
| 70 | #topo-p-instance svg rect { |
| 71 | stroke-width: 0; |
| 72 | fill: #fbfbfb; |
| 73 | } |
| 74 | |
| 75 | /* body of an instance */ |
| 76 | #topo-p-instance .online svg rect { |
| 77 | opacity: 1; |
| 78 | fill: #fbfbfb; |
| 79 | } |
| 80 | |
| 81 | #topo-p-instance svg .glyph { |
| 82 | fill: #fff; |
| 83 | } |
| 84 | #topo-p-instance .online svg .glyph { |
| 85 | fill: #fff; |
| 86 | } |
| 87 | |
| 88 | |
| 89 | /* offline */ |
| 90 | #topo-p-instance svg .badgeIcon { |
| 91 | opacity: 0.4; |
| 92 | fill: #939598; |
| 93 | } |
| 94 | |
| 95 | /* online */ |
| 96 | #topo-p-instance .online svg .badgeIcon { |
| 97 | opacity: 1.0; |
| 98 | fill: #939598; |
| 99 | } |
| 100 | #topo-p-instance .online svg .badgeIcon.bird { |
| 101 | fill: #ffffff; |
| 102 | } |
| 103 | |
| 104 | #topo-p-instance svg .readyBadge { |
| 105 | visibility: hidden; |
| 106 | } |
| 107 | #topo-p-instance .ready svg .readyBadge { |
| 108 | visibility: visible; |
| 109 | } |
| 110 | |
| 111 | #topo-p-instance svg text { |
| 112 | text-anchor: left; |
| 113 | opacity: 0.5; |
| 114 | fill: #3c3a3a; |
| 115 | } |
| 116 | |
| 117 | #topo-p-instance .online svg text { |
| 118 | opacity: 1.0; |
| 119 | fill: #3c3a3a; |
| 120 | } |
| 121 | |
| 122 | #topo-p-instance .onosInst.mastership { |
| 123 | opacity: 0.3; |
| 124 | } |
| 125 | #topo-p-instance .onosInst.mastership.affinity { |
| 126 | opacity: 1.0; |
| 127 | } |
| 128 | #topo-p-instance .onosInst.mastership.affinity svg rect { |
| 129 | filter: url(#blue-glow); |
| 130 | } |
| 131 | |
| 132 | .firefox #topo-p-instance .onosInst.mastership.affinity svg rect { |
| 133 | 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 | |
| 174 | |
| 175 | #ov-topo2 svg .node.device.selected rect { |
| 176 | stroke-width: 2.0; |
| 177 | stroke: #009fdb; |
| 178 | } |
| 179 | |
| 180 | /* Badges */ |
| 181 | /* (... works for bothand dark themes...) */ |
| 182 | #ov-topo2 svg .node .badge circle { |
| 183 | stroke: #aaa; |
| 184 | } |
| 185 | |
| 186 | #ov-topo2 svg .node .badge.badgeInfo circle { |
| 187 | fill: #99d; |
| 188 | } |
| 189 | |
| 190 | #ov-topo2 svg .node .badge.badgeWarn circle { |
| 191 | fill: #da2; |
| 192 | } |
| 193 | |
| 194 | #ov-topo2 svg .node .badge.badgeError circle { |
| 195 | fill: #e44; |
| 196 | } |
| 197 | |
| 198 | #ov-topo2 svg .node .badge use { |
| 199 | fill: white !important; |
| 200 | } |
| 201 | |
| 202 | #ov-topo2 svg .node .badge.badgeInfo use { |
| 203 | fill: #448; |
| 204 | } |
| 205 | |
| 206 | #ov-topo2 svg .node .badge text { |
| 207 | fill: white !important; |
| 208 | } |
| 209 | |
| 210 | #ov-topo2 svg .node .badge.badgeInfo text { |
| 211 | fill: #448; |
| 212 | } |
| 213 | |
| 214 | /* Host Nodes */ |
| 215 | |
| 216 | #ov-topo2 svg .node.host { |
| 217 | } |
| 218 | |
| 219 | #ov-topo2 svg .node.host text { |
| 220 | stroke: none; |
| 221 | font: 9pt sans-serif; |
| 222 | fill: #846; |
| 223 | } |
| 224 | |
| 225 | #ov-topo2 svg .node.host circle { |
| 226 | stroke: #a3a596; |
| 227 | fill: #e0dfd6; |
| 228 | } |
| 229 | #ov-topo2 svg .node.host.selected .hostIcon > circle { |
| 230 | stroke-width: 2.0; |
| 231 | stroke: #009fdb; |
| 232 | } |
| 233 | |
| 234 | #ov-topo2 svg .node.host use { |
| 235 | fill: #3c3a3a; |
| 236 | } |
| 237 | |
| 238 | /* --- Topo Links --- */ |
| 239 | |
| 240 | #ov-topo2 svg .link { |
| 241 | opacity: .9; |
| 242 | } |
| 243 | |
| 244 | #ov-topo2 svg .link.selected, |
| 245 | #ov-topo2 svg .link.enhanced { |
| 246 | stroke-width: 3.5; |
| 247 | stroke: #009fdb; |
| 248 | } |
| 249 | |
| 250 | #ov-topo2 svg .link.inactive { |
| 251 | opacity: .5; |
| 252 | stroke-dasharray: 8 4; |
| 253 | } |
| 254 | /* TODO: Review for not-permitted links */ |
| 255 | #ov-topo2 svg .link.not-permitted { |
| 256 | stroke: rgb(255,0,0); |
| 257 | stroke-width: 5.0; |
| 258 | stroke-dasharray: 8 4; |
| 259 | } |
| 260 | |
| 261 | #ov-topo2 svg .link.secondary { |
| 262 | stroke-width: 3px; |
| 263 | stroke: rgba(0,153,51,0.5); |
| 264 | } |
| 265 | |
| 266 | /* Port traffic color visualization for Kbps, Mbps, and Gbps */ |
| 267 | |
| 268 | #ov-topo2 svg .link.secondary.port-traffic-Kbps { |
| 269 | stroke: rgb(0,153,51); |
| 270 | stroke-width: 5.0; |
| 271 | } |
| 272 | |
| 273 | #ov-topo2 svg .link.secondary.port-traffic-Mbps { |
| 274 | stroke: rgb(128,145,27); |
| 275 | stroke-width: 6.5; |
| 276 | } |
| 277 | |
| 278 | #ov-topo2 svg .link.secondary.port-traffic-Gbps { |
| 279 | stroke: rgb(255, 137, 3); |
| 280 | stroke-width: 8.0; |
| 281 | } |
| 282 | |
| 283 | #ov-topo2 svg .link.secondary.port-traffic-Gbps-choked { |
| 284 | stroke: rgb(183, 30, 21); |
| 285 | stroke-width: 8.0; |
| 286 | } |
| 287 | |
| 288 | |
| 289 | |
| 290 | #ov-topo2 svg .link.animated { |
| 291 | stroke-dasharray: 8 5; |
| 292 | animation: ants 5s infinite linear; |
| 293 | /* below line could be added via Javascript, based on path, if we cared |
| 294 | * enough about the direction of ant-flow |
| 295 | */ |
| 296 | /*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-topo2 svg .link.primary { |
| 308 | stroke-width: 4px; |
| 309 | stroke: #ffA300; |
| 310 | } |
| 311 | |
| 312 | #ov-topo2 svg .link.secondary.optical { |
| 313 | stroke-width: 4px; |
| 314 | stroke: rgba(128,64,255,0.5); |
| 315 | } |
| 316 | |
| 317 | #ov-topo2 svg .link.primary.optical { |
| 318 | stroke-width: 6px; |
| 319 | stroke: #74f; |
| 320 | } |
| 321 | |
| 322 | /* Link Labels */ |
| 323 | #ov-topo2 svg .linkLabel rect { |
| 324 | stroke: none; |
| 325 | fill: #ffffff; |
| 326 | } |
| 327 | |
| 328 | #ov-topo2 svg .linkLabel text { |
| 329 | fill: #444; |
| 330 | } |
| 331 | |
| 332 | /* Port Labels */ |
| 333 | |
| 334 | #ov-topo2 svg .portLabel rect { |
| 335 | stroke: #a3a596; |
| 336 | fill: #ffffff; |
| 337 | } |
| 338 | |
| 339 | #ov-topo2 svg .portLabel text { |
| 340 | fill: #444; |
| 341 | } |
| 342 | |
| 343 | /* Number of Links Labels */ |
| 344 | |
| 345 | |
| 346 | #ov-topo2 text.numLinkText { |
| 347 | fill: #444; |
| 348 | } |
| 349 | |
| 350 | /* ------------------------------------------------- */ |
| 351 | /* Sprite Layer */ |
| 352 | |
| 353 | #ov-topo2 svg #topo-sprites .gold1 use { |
| 354 | stroke: #fda; |
| 355 | fill: none; |
| 356 | } |
| 357 | #ov-topo2 svg #topo-sprites .gold1 text { |
| 358 | fill: #eda; |
| 359 | } |
| 360 | |
| 361 | #ov-topo2 svg #topo-sprites .blue1 use { |
| 362 | stroke: #bbd; |
| 363 | fill: none; |
| 364 | } |
| 365 | #ov-topo2 svg #topo-sprites .blue1 text { |
| 366 | fill: #cce; |
| 367 | } |
| 368 | |
| 369 | #ov-topo2 svg #topo-sprites .gray1 use { |
| 370 | stroke: #ccc; |
| 371 | fill: none; |
| 372 | } |
| 373 | #ov-topo2 svg #topo-sprites .gray1 text { |
| 374 | fill: #ddd; |
| 375 | } |
| 376 | |
| 377 | /* fills */ |
| 378 | #ov-topo2 svg #topo-sprites use.fill-gray2 { |
| 379 | fill: #eee; |
| 380 | } |
| 381 | |
| 382 | #ov-topo2 svg #topo-sprites use.fill-blue2 { |
| 383 | fill: #bce; |
| 384 | } |