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 | /* |
Simon Hunt | 2fe26ac | 2014-11-06 09:58:32 -0800 | [diff] [blame] | 18 | ONOS GUI -- Masthead script |
Simon Hunt | 195cb38 | 2014-11-03 17:50:51 -0800 | [diff] [blame] | 19 | |
| 20 | Defines the masthead for the UI. Injects logo and title, as well as providing |
| 21 | the placeholder for a set of radio buttons. |
Simon Hunt | 195cb38 | 2014-11-03 17:50:51 -0800 | [diff] [blame] | 22 | */ |
| 23 | |
| 24 | (function (onos){ |
| 25 | 'use strict'; |
| 26 | |
| 27 | // API's |
| 28 | var api = onos.api; |
| 29 | |
| 30 | // Config variables |
Thomas Vachuska | e4cebaf | 2014-11-15 18:49:34 -0800 | [diff] [blame] | 31 | var guiTitle = 'Open Network Operating System'; |
Simon Hunt | 195cb38 | 2014-11-03 17:50:51 -0800 | [diff] [blame] | 32 | |
| 33 | // DOM elements and the like |
| 34 | var mast = d3.select('#mast'); |
| 35 | |
| 36 | mast.append('img') |
| 37 | .attr({ |
| 38 | id: 'logo', |
| 39 | src: 'img/onos-logo.png' |
| 40 | }); |
| 41 | |
| 42 | mast.append('span') |
| 43 | .attr({ |
| 44 | class: 'title' |
| 45 | }) |
| 46 | .text(guiTitle); |
| 47 | |
| 48 | mast.append('span') |
| 49 | .attr({ |
| 50 | id: 'mastRadio', |
| 51 | class: 'right' |
| 52 | }); |
| 53 | |
Simon Hunt | 2fe26ac | 2014-11-06 09:58:32 -0800 | [diff] [blame] | 54 | }(ONOS)); |