Simon Hunt | ef31fb2 | 2014-12-19 13:16:44 -0800 | [diff] [blame] | 1 | /* |
Simon Hunt | 8ead3a2 | 2015-01-06 11:00:15 -0800 | [diff] [blame] | 2 | * Copyright 2014,2015 Open Networking Laboratory |
Simon Hunt | ef31fb2 | 2014-12-19 13:16:44 -0800 | [diff] [blame] | 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 -- CSS file |
Simon Hunt | ef31fb2 | 2014-12-19 13:16:44 -0800 | [diff] [blame] | 19 | */ |
| 20 | |
Simon Hunt | 7c8ab8d | 2015-02-03 15:05:15 -0800 | [diff] [blame] | 21 | /* --- Base SVG Layer --- */ |
Simon Hunt | 626d210 | 2015-01-29 11:54:50 -0800 | [diff] [blame] | 22 | |
Simon Hunt | 5ee36e0 | 2015-01-15 10:33:20 -0800 | [diff] [blame] | 23 | .light #ov-topo svg { |
Simon Hunt | 426bd86 | 2015-01-14 16:48:41 -0800 | [diff] [blame] | 24 | background-color: #fff; |
Simon Hunt | 6cc5369 | 2015-01-07 11:33:45 -0800 | [diff] [blame] | 25 | } |
Simon Hunt | 5ee36e0 | 2015-01-15 10:33:20 -0800 | [diff] [blame] | 26 | .dark #ov-topo svg { |
| 27 | background-color: #2b2b2b; |
| 28 | } |
Simon Hunt | 426bd86 | 2015-01-14 16:48:41 -0800 | [diff] [blame] | 29 | |
Simon Hunt | 7c8ab8d | 2015-02-03 15:05:15 -0800 | [diff] [blame] | 30 | |
| 31 | /* --- "No Devices" Layer --- */ |
| 32 | |
| 33 | #ov-topo svg #topo-noDevsLayer { |
| 34 | visibility: hidden; |
| 35 | } |
| 36 | |
| 37 | .light #ov-topo svg .noDevsBird { |
| 38 | fill: #ecd; |
| 39 | } |
| 40 | .dark #ov-topo svg .noDevsBird { |
| 41 | fill: #683434; |
| 42 | } |
| 43 | |
| 44 | #ov-topo svg #topo-noDevsLayer text { |
| 45 | font-size: 60pt; |
| 46 | font-style: italic; |
| 47 | } |
| 48 | .light #ov-topo svg #topo-noDevsLayer text { |
| 49 | fill: #dde; |
| 50 | } |
| 51 | .dark #ov-topo svg #topo-noDevsLayer text { |
| 52 | fill: #3b3b4f; |
| 53 | } |
| 54 | |
| 55 | |
| 56 | /* --- Topo Map --- */ |
| 57 | |
Simon Hunt | 426bd86 | 2015-01-14 16:48:41 -0800 | [diff] [blame] | 58 | #ov-topo svg #topo-map { |
| 59 | stroke-width: 2px; |
Simon Hunt | 426bd86 | 2015-01-14 16:48:41 -0800 | [diff] [blame] | 60 | fill: transparent; |
Simon Hunt | 5ee36e0 | 2015-01-15 10:33:20 -0800 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | .light #ov-topo svg #topo-map { |
Simon Hunt | 7c8ab8d | 2015-02-03 15:05:15 -0800 | [diff] [blame] | 64 | stroke: #ddd; |
| 65 | /*stroke: #88b;*/ |
Simon Hunt | 5ee36e0 | 2015-01-15 10:33:20 -0800 | [diff] [blame] | 66 | } |
| 67 | .dark #ov-topo svg #topo-map { |
| 68 | stroke: #444; |
| 69 | } |
Simon Hunt | 626d210 | 2015-01-29 11:54:50 -0800 | [diff] [blame] | 70 | |
| 71 | |
Simon Hunt | 4b66859 | 2015-01-29 17:33:53 -0800 | [diff] [blame] | 72 | /* --- Topo Summary Panel --- */ |
Simon Hunt | 626d210 | 2015-01-29 11:54:50 -0800 | [diff] [blame] | 73 | |
| 74 | #topo-p-summary { |
| 75 | /* Base css from panel.css */ |
| 76 | |
| 77 | } |
| 78 | |
| 79 | #topo-p-summary svg { |
| 80 | display: inline-block; |
| 81 | width: 42px; |
| 82 | height: 42px; |
| 83 | } |
| 84 | |
Simon Hunt | 626d210 | 2015-01-29 11:54:50 -0800 | [diff] [blame] | 85 | #topo-p-summary h2 { |
| 86 | position: absolute; |
| 87 | margin: 0 4px; |
| 88 | top: 20px; |
| 89 | left: 50px; |
| 90 | } |
| 91 | .light #topo-p-summary h2 { |
| 92 | color: black; |
| 93 | } |
| 94 | .dark #topo-p-summary h2 { |
| 95 | color: #ddd; |
| 96 | } |
| 97 | |
| 98 | #topo-p-summary h3 { |
| 99 | margin: 0 4px; |
| 100 | top: 20px; |
| 101 | left: 50px; |
| 102 | } |
| 103 | .light #topo-p-summary h3 { |
| 104 | color: black; |
| 105 | } |
| 106 | .dark #topo-p-summary h3 { |
| 107 | color: #ddd; |
| 108 | } |
| 109 | |
| 110 | #topo-p-summary p, table { |
| 111 | margin: 4px 4px; |
| 112 | } |
| 113 | |
| 114 | #topo-p-summary td.label { |
| 115 | font-style: italic; |
| 116 | padding-right: 12px; |
| 117 | /* works for both light and dark themes ... */ |
| 118 | color: #777; |
| 119 | } |
| 120 | |
| 121 | #topo-p-summary td.value { |
| 122 | } |
| 123 | |
| 124 | #topo-p-summary hr { |
| 125 | height: 1px; |
| 126 | border: 0; |
| 127 | } |
| 128 | .light #topo-p-summary hr { |
| 129 | background-color: #ccc; |
| 130 | color: #ccc; |
| 131 | } |
| 132 | .dark #topo-p-summary hr { |
| 133 | background-color: #888; |
| 134 | color: #888; |
| 135 | } |
Simon Hunt | 4b66859 | 2015-01-29 17:33:53 -0800 | [diff] [blame] | 136 | |
| 137 | |
| 138 | /* --- Topo Detail Panel --- */ |
| 139 | |
| 140 | /* TODO: add CSS rules */ |
| 141 | |
| 142 | |
| 143 | /* --- Topo Instance Panel --- */ |
| 144 | |
| 145 | #topo-p-instance { |
| 146 | height: 100px; |
| 147 | } |
| 148 | |
| 149 | #topo-p-instance div.onosInst { |
| 150 | display: inline-block; |
| 151 | width: 170px; |
| 152 | height: 85px; |
| 153 | cursor: pointer; |
| 154 | } |
| 155 | |
| 156 | #topo-p-instance svg rect { |
Simon Hunt | 4b66859 | 2015-01-29 17:33:53 -0800 | [diff] [blame] | 157 | stroke-width: 3.5; |
| 158 | } |
| 159 | #topo-p-instance .online svg rect { |
| 160 | opacity: 1; |
Simon Hunt | a57d681 | 2015-02-02 18:34:04 -0800 | [diff] [blame] | 161 | } |
| 162 | .light #topo-p-instance svg rect { |
| 163 | fill: #ccc; |
| 164 | stroke: #aaa; |
| 165 | } |
| 166 | .light #topo-p-instance .online svg rect { |
Simon Hunt | 4b66859 | 2015-01-29 17:33:53 -0800 | [diff] [blame] | 167 | fill: #9cf; |
| 168 | stroke: #555; |
| 169 | } |
Simon Hunt | a57d681 | 2015-02-02 18:34:04 -0800 | [diff] [blame] | 170 | .dark #topo-p-instance svg rect { |
| 171 | fill: #666; |
| 172 | stroke: #222; |
| 173 | } |
| 174 | .dark #topo-p-instance .online svg rect { |
| 175 | fill: #9cf; |
| 176 | stroke: #999; |
| 177 | } |
| 178 | |
Simon Hunt | 4b66859 | 2015-01-29 17:33:53 -0800 | [diff] [blame] | 179 | |
| 180 | #topo-p-instance svg .glyph { |
| 181 | fill: #888; |
| 182 | fill-rule: evenodd; |
| 183 | } |
| 184 | #topo-p-instance .online svg .glyph { |
| 185 | fill: #000; |
| 186 | } |
| 187 | |
| 188 | #topo-p-instance svg .badgeIcon { |
Simon Hunt | 4b66859 | 2015-01-29 17:33:53 -0800 | [diff] [blame] | 189 | fill-rule: evenodd; |
Simon Hunt | a57d681 | 2015-02-02 18:34:04 -0800 | [diff] [blame] | 190 | opacity: 0.4; |
| 191 | } |
| 192 | .light #topo-p-instance svg .badgeIcon { |
| 193 | fill: #777; |
| 194 | } |
| 195 | .dark #topo-p-instance svg .badgeIcon { |
| 196 | fill: #555; |
Simon Hunt | 4b66859 | 2015-01-29 17:33:53 -0800 | [diff] [blame] | 197 | } |
| 198 | |
| 199 | #topo-p-instance .online svg .badgeIcon { |
Simon Hunt | a57d681 | 2015-02-02 18:34:04 -0800 | [diff] [blame] | 200 | opacity: 1.0; |
| 201 | } |
| 202 | .light #topo-p-instance .online svg .badgeIcon { |
| 203 | fill: #fff; |
| 204 | } |
| 205 | .dark #topo-p-instance .online svg .badgeIcon { |
Simon Hunt | 4b66859 | 2015-01-29 17:33:53 -0800 | [diff] [blame] | 206 | fill: #fff; |
| 207 | } |
| 208 | |
| 209 | #topo-p-instance svg text { |
| 210 | text-anchor: middle; |
Simon Hunt | a57d681 | 2015-02-02 18:34:04 -0800 | [diff] [blame] | 211 | opacity: 0.3; |
Simon Hunt | 4b66859 | 2015-01-29 17:33:53 -0800 | [diff] [blame] | 212 | } |
| 213 | #topo-p-instance .online svg text { |
Simon Hunt | a57d681 | 2015-02-02 18:34:04 -0800 | [diff] [blame] | 214 | opacity: 1.0; |
| 215 | } |
| 216 | .light #topo-p-instance svg text { |
| 217 | fill: #444; |
| 218 | } |
| 219 | .light #topo-p-instance .online svg text { |
Simon Hunt | 4b66859 | 2015-01-29 17:33:53 -0800 | [diff] [blame] | 220 | fill: #eee; |
| 221 | } |
Simon Hunt | a57d681 | 2015-02-02 18:34:04 -0800 | [diff] [blame] | 222 | .dark #topo-p-instance svg text { |
| 223 | fill: #aaa; |
| 224 | } |
| 225 | .dark #topo-p-instance .online svg text { |
| 226 | fill: #ccc; |
| 227 | } |
Simon Hunt | 4b66859 | 2015-01-29 17:33:53 -0800 | [diff] [blame] | 228 | |
| 229 | #topo-p-instance svg text.instTitle { |
| 230 | font-size: 11pt; |
| 231 | font-weight: bold; |
| 232 | } |
| 233 | #topo-p-instance svg text.instLabel { |
| 234 | font-size: 9pt; |
| 235 | font-style: italic; |
| 236 | } |
| 237 | |
| 238 | #topo-p-instance .onosInst.mastership { |
| 239 | opacity: 0.3; |
| 240 | } |
| 241 | #topo-p-instance .onosInst.mastership.affinity { |
| 242 | opacity: 1.0; |
| 243 | } |
| 244 | #topo-p-instance .onosInst.mastership.affinity svg rect { |
| 245 | /* TODO: add blue glow */ |
| 246 | /*filter: url(#blue-glow);*/ |
| 247 | } |
Simon Hunt | ac4c6f7 | 2015-02-03 19:50:53 -0800 | [diff] [blame] | 248 | |
| 249 | |
| 250 | /* --- Topo Nodes --- */ |
| 251 | |
| 252 | #ov-topo svg .node { |
| 253 | cursor: pointer; |
| 254 | } |
| 255 | |
| 256 | #ov-topo svg .node.selected rect, |
| 257 | #ov-topo svg .node.selected circle { |
| 258 | fill: #f90; |
| 259 | /* TODO: add blue glow filter */ |
| 260 | /*filter: url(#blue-glow);*/ |
| 261 | } |
| 262 | |
| 263 | #ov-topo svg .node text { |
| 264 | pointer-events: none; |
| 265 | } |
| 266 | |
| 267 | /* Device Nodes */ |
| 268 | |
| 269 | #ov-topo svg .node.device { |
| 270 | } |
| 271 | |
| 272 | #ov-topo svg .node.device rect { |
| 273 | stroke-width: 1.5; |
| 274 | } |
| 275 | |
| 276 | #ov-topo svg .node.device.fixed rect { |
| 277 | stroke-width: 1.5; |
| 278 | stroke: #ccc; |
| 279 | } |
| 280 | |
| 281 | /* note: device is offline without the 'online' class */ |
| 282 | #ov-topo svg .node.device { |
| 283 | fill: #777; |
| 284 | } |
| 285 | |
| 286 | #ov-topo svg .node.device.online { |
| 287 | fill: #6e7fa3; |
| 288 | } |
| 289 | |
| 290 | /* note: device is offline without the 'online' class */ |
| 291 | #ov-topo svg .node.device text { |
| 292 | fill: #bbb; |
| 293 | font: 10pt sans-serif; |
| 294 | } |
| 295 | |
| 296 | #ov-topo svg .node.device.online text { |
| 297 | fill: white; |
| 298 | } |
| 299 | |
| 300 | #ov-topo svg .node.device .svgIcon rect { |
| 301 | fill: #aaa; |
| 302 | } |
| 303 | #ov-topo svg .node.device .svgIcon use { |
| 304 | fill: #777; |
| 305 | } |
| 306 | #ov-topo svg .node.device.selected .svgIcon rect { |
| 307 | fill: #f90; |
| 308 | } |
| 309 | #ov-topo svg .node.device.online .svgIcon rect { |
| 310 | fill: #ccc; |
| 311 | } |
| 312 | #ov-topo svg .node.device.online .svgIcon use { |
| 313 | fill: #000; |
| 314 | } |
| 315 | #ov-topo svg .node.device.online.selected .svgIcon rect { |
| 316 | fill: #f90; |
| 317 | } |
| 318 | |
| 319 | |
| 320 | /* Host Nodes */ |
| 321 | |
| 322 | #ov-topo svg .node.host { |
| 323 | stroke: #000; |
| 324 | } |
| 325 | |
| 326 | #ov-topo svg .node.host text { |
| 327 | fill: #846; |
| 328 | stroke: none; |
| 329 | font: 9pt sans-serif; |
| 330 | } |
| 331 | |
| 332 | svg .node.host circle { |
| 333 | stroke: #000; |
| 334 | fill: #edb; |
| 335 | } |
| 336 | |
| 337 | |
| 338 | |