blob: d4f51b74fc3d969e81214ea912bae90a4d254dbc [file] [log] [blame]
Simon Hunt195cb382014-11-03 17:50:51 -08001/*
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 Hunt2fe26ac2014-11-06 09:58:32 -080018 ONOS GUI -- Masthead script
Simon Hunt195cb382014-11-03 17:50:51 -080019
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 Hunt195cb382014-11-03 17:50:51 -080022 */
23
24(function (onos){
25 'use strict';
26
27 // API's
28 var api = onos.api;
29
30 // Config variables
Thomas Vachuskae4cebaf2014-11-15 18:49:34 -080031 var guiTitle = 'Open Network Operating System';
Simon Hunt195cb382014-11-03 17:50:51 -080032
33 // DOM elements and the like
34 var mast = d3.select('#mast');
35
36 mast.append('img')
37 .attr({
38 id: 'logo',
Thomas Vachuska5f399652015-02-23 15:17:36 -080039 src: 'onos-logo.png'
Simon Hunt195cb382014-11-03 17:50:51 -080040 });
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 Hunt2fe26ac2014-11-06 09:58:32 -080054}(ONOS));