Simon Hunt | 195cb38 | 2014-11-03 17:50:51 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 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 -- Base Framework -- CSS file |
| 19 | |
| 20 | @author Simon Hunt |
| 21 | */ |
| 22 | |
| 23 | html, body { |
| 24 | height: 100%; |
| 25 | } |
| 26 | |
| 27 | |
| 28 | /* |
| 29 | * === DEBUGGING ====== |
| 30 | */ |
| 31 | svg { |
| 32 | /*border: 1px dashed red;*/ |
| 33 | } |
| 34 | |
| 35 | svg #bg { |
| 36 | opacity: 0.5; |
| 37 | } |
| 38 | |
| 39 | |
| 40 | /* |
| 41 | * Network Graph elements ====================================== |
| 42 | */ |
| 43 | |
| 44 | svg .link { |
| 45 | fill: none; |
| 46 | stroke: #666; |
| 47 | stroke-width: 2.0px; |
| 48 | opacity: .7; |
| 49 | |
| 50 | transition: opacity 250ms; |
| 51 | -webkit-transition: opacity 250ms; |
| 52 | -moz-transition: opacity 250ms; |
| 53 | } |
| 54 | |
| 55 | svg .link.host { |
| 56 | stroke: #666; |
| 57 | stroke-width: 1px; |
| 58 | } |
| 59 | |
| 60 | svg g.portLayer rect.port { |
| 61 | fill: #ccc; |
| 62 | } |
| 63 | |
| 64 | svg g.portLayer text { |
| 65 | font: 8pt sans-serif; |
| 66 | pointer-events: none; |
| 67 | } |
| 68 | |
| 69 | svg .node.device rect { |
| 70 | stroke-width: 1.5px; |
| 71 | |
| 72 | transition: opacity 250ms; |
| 73 | -webkit-transition: opacity 250ms; |
| 74 | -moz-transition: opacity 250ms; |
| 75 | } |
| 76 | |
| 77 | svg .node.device.fixed rect { |
| 78 | stroke-width: 1.5; |
| 79 | stroke: #ccc; |
| 80 | } |
| 81 | |
| 82 | svg .node.device.roadm rect { |
| 83 | fill: #03c; |
| 84 | } |
| 85 | |
| 86 | svg .node.device.switch rect { |
| 87 | fill: #06f; |
| 88 | } |
| 89 | |
| 90 | svg .node.host circle { |
| 91 | fill: #c96; |
| 92 | stroke: #000; |
| 93 | } |
| 94 | |
| 95 | svg .node text { |
| 96 | fill: white; |
| 97 | font: 10pt sans-serif; |
| 98 | pointer-events: none; |
| 99 | } |
| 100 | |
| 101 | /* for debugging */ |
| 102 | svg .node circle.debug { |
| 103 | fill: white; |
| 104 | stroke: red; |
| 105 | } |
| 106 | svg .node rect.debug { |
| 107 | fill: yellow; |
| 108 | stroke: red; |
| 109 | opacity: 0.35; |
| 110 | } |
| 111 | |
| 112 | |
| 113 | svg .node.selected rect, |
| 114 | svg .node.selected circle { |
| 115 | filter: url(#blue-glow); |
| 116 | } |
| 117 | |
| 118 | svg .link.inactive, |
| 119 | svg .port.inactive, |
| 120 | svg .portText.inactive, |
| 121 | svg .node.inactive rect, |
| 122 | svg .node.inactive circle, |
| 123 | svg .node.inactive text, |
| 124 | svg .node.inactive image { |
| 125 | opacity: .1; |
| 126 | } |
| 127 | |
| 128 | svg .node.inactive.selected rect, |
| 129 | svg .node.inactive.selected text, |
| 130 | svg .node.inactive.selected image { |
| 131 | opacity: .6; |
| 132 | } |
| 133 | |
| 134 | /* |
| 135 | * ============================================================= |
| 136 | */ |
| 137 | |
| 138 | /* |
| 139 | * Specific structural elements |
| 140 | */ |
| 141 | |
| 142 | /* This is to ensure that the body does not expand to account for the |
| 143 | flyout details pane, that is positioned "off screen". |
| 144 | */ |
| 145 | body { |
| 146 | overflow: hidden; |
| 147 | } |
| 148 | |
| 149 | |
| 150 | #frame { |
| 151 | width: 100%; |
| 152 | height: 100%; |
| 153 | background-color: #fff; |
| 154 | } |
| 155 | |
| 156 | #flyout { |
| 157 | position: absolute; |
| 158 | z-index: 100; |
| 159 | display: block; |
| 160 | top: 10%; |
| 161 | width: 280px; |
| 162 | right: -300px; |
| 163 | opacity: 0; |
| 164 | background-color: rgba(255,255,255,0.8); |
| 165 | |
| 166 | padding: 10px; |
| 167 | color: black; |
| 168 | font-size: 10pt; |
| 169 | box-shadow: 2px 2px 16px #777; |
| 170 | } |
| 171 | |
| 172 | #flyout h2 { |
| 173 | margin: 8px 4px; |
| 174 | color: black; |
| 175 | vertical-align: middle; |
| 176 | } |
| 177 | |
| 178 | #flyout h2 img { |
| 179 | height: 32px; |
| 180 | padding-right: 8px; |
| 181 | vertical-align: middle; |
| 182 | } |
| 183 | |
| 184 | #flyout p, table { |
| 185 | margin: 4px 4px; |
| 186 | } |
| 187 | |
| 188 | #flyout td.label { |
| 189 | font-style: italic; |
| 190 | color: #777; |
| 191 | padding-right: 12px; |
| 192 | } |
| 193 | |
| 194 | #flyout td.value { |
| 195 | |
| 196 | } |
| 197 | |
| 198 | #flyout hr { |
| 199 | height: 1px; |
| 200 | color: #ccc; |
| 201 | background-color: #ccc; |
| 202 | border: 0; |
| 203 | } |
| 204 | |