srikanth | 116e6e8 | 2014-08-19 07:22:37 -0700 | [diff] [blame] | 1 | <!-- |
| 2 | |
| 3 | Copyright (c) 2013 Big Switch Networks, Inc. |
| 4 | |
| 5 | Licensed under the Eclipse Public License, Version 1.0 (the |
| 6 | "License"); you may not use this file except in compliance with the |
| 7 | License. You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.eclipse.org/legal/epl-v10.html |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 14 | implied. See the License for the specific language governing |
| 15 | permissions and limitations under the License. |
| 16 | |
| 17 | Web UI home |
| 18 | |
| 19 | --> |
| 20 | |
| 21 | {% extends "base.html" %} |
| 22 | {% block content %} |
| 23 | |
| 24 | <div id="skip-link"> |
| 25 | </div> |
| 26 | <div id="page"> |
| 27 | <header id="header" role="banner"> |
| 28 | <div class="page-width"><div class="page-width-inner clearfix"> |
| 29 | <div id="site-logo" style="margin: 15px; display: table;"> |
| 30 | <div style="float: left; width: 100%;"> |
| 31 | <img src="static/images/logo_opendaylight.png" border="0" style="margin: 0px; padding: 5px;"> |
| 32 | </div> |
| 33 | <div style="float: left;"> |
| 34 | <span class="title header-processed" id="page-title" style="color: #3f3f40; font-family: sans-serif, Arial Unicode MS, Arial; font-weight: 100; font-size: 40px; margin-bottom: 0px; margin-top: 0px; height: 40px; display: table-cell; vertical-align: middle; width: 100%; position: static; padding-left: 30px;">SDN Controller Platform Dashboard</span> |
| 35 | </div> |
| 36 | </div> |
| 37 | <div id="tagline"> |
| 38 | <div class="region region-tagline"> |
| 39 | <div id="block-block-9" class="block block-block first last odd"> |
| 40 | <div class="block-content clearfix"> |
| 41 | </div> |
| 42 | </div> |
| 43 | </div> |
| 44 | </div> |
| 45 | |
| 46 | </div></div> |
| 47 | </header> |
| 48 | <div id="main" class="clearfix"> |
| 49 | <div class="page-width"><div class="page-width-inner clearfix" style="margin:50px; margin-top: 0px;"> |
| 50 | <a id="main-content"></a> |
| 51 | <div id="tabs"> |
| 52 | <ul> |
| 53 | <li><a href="#tabs-1">Switches</a></li> |
| 54 | <li><a href="#tabs-2">Inter-Switch Links</a></li> |
| 55 | <li><a href="#tabs-3">Hosts</a></li> |
| 56 | <li><a href="#tabs-4">Tunnels</a></li> |
| 57 | <li><a href="#tabs-5">Topology</a></li> |
| 58 | <span class="refresh" onClick="refreshTable(99);" style="float: right; padding: .6em; position: relative; z-index:1;"><img src="images/refresh.png" border="0"></span> |
| 59 | </ul> |
| 60 | <div id="tabs-1"> |
| 61 | <div id="switchTableHolder" class="dynamictable"> |
| 62 | </div> |
| 63 | </div> |
| 64 | <div style="clear: both;"></div> |
| 65 | <div id="tabs-2"> |
| 66 | <div id="linkTableHolder" class="dynamictable"> |
| 67 | </div> |
| 68 | </div> |
| 69 | <div style="clear: both;"></div> |
| 70 | <div id="tabs-3"> |
| 71 | <div id="deviceTableHolder" class="dynamictable"> |
| 72 | </div> |
| 73 | </div> |
| 74 | <div id="tabs-4"> |
| 75 | <div id="tunnelTableHolder" class="dynamictable"> |
| 76 | </div> |
| 77 | </div> |
| 78 | <div style="clear: both;"></div> |
| 79 | <div id="tabs-5"> |
| 80 | <div id="TopologyTableHolder" class="dynamictable" style="border: 1px #e5e5e5;"> |
| 81 | <div id="container"> |
| 82 | <div id="center-container" style="background-color: #e5e5e5; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px;"> |
| 83 | <div id="infovis"></div> |
| 84 | </div> |
| 85 | <div id="log" style="display: none;"></div> |
| 86 | </div> |
| 87 | </div> |
| 88 | <div style="text-align: justify; -ms-text-justify: distribute-all-lines; text-justify: distribute-all-lines;"> |
| 89 | |
| 90 | <div style="width: 100%; display: inline-block"></div> |
| 91 | |
| 92 | </div> |
| 93 | |
| 94 | <div style="clear: both;"></div> |
| 95 | |
| 96 | </div> |
| 97 | |
| 98 | <!-- Main content inner--> |
| 99 | |
| 100 | </div> |
| 101 | </div></div> |
| 102 | <footer id="footer" role="contentinfo"> |
| 103 | <div class="page-width"><div class="page-width-inner clearfix"> <div class="region region-footer"> |
| 104 | <div id="block-p6-helper-footer" class="block block-p6-helper first last odd"> |
| 105 | |
| 106 | |
| 107 | <div class="block-content clearfix"> |
| 108 | <span id="ui-footer-statement" style="font-family: Helvetica, Arial, sans-serif; font-size: 11px; padding-left: 45;"><center> ©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.</center></span> </div> |
| 109 | </div> |
| 110 | </div> |
| 111 | </div></div> |
| 112 | </footer> |
| 113 | |
| 114 | <div id="dumpingground" style="display: none;"></div> |
| 115 | |
| 116 | |
| 117 | <!-- /#page --> |
| 118 | <script src="static/js/thirdparty/jit.js"></script> |
| 119 | <script src="static/js/thirdparty/jquery-1.9.1.min.js"></script> |
| 120 | <script src="static/js/thirdparty/jquery-ui-1.10.2.custom.min.js"></script> |
| 121 | <script type="text/javascript"> |
| 122 | |
| 123 | $(document).ready(function(){ |
| 124 | refreshTable(99); |
| 125 | }); |
| 126 | $(function() { |
| 127 | $( "#tabs" ).tabs({ |
| 128 | activate: function( event, ui ) { refreshTable(ui.newTab.id); } |
| 129 | }); |
| 130 | // Hover states on the static widgets |
| 131 | $( "#dialog-link, #icons li" ).hover( |
| 132 | function() { |
| 133 | $( this ).addClass( "ui-state-hover" ); |
| 134 | }, |
| 135 | function() { |
| 136 | $( this ).removeClass( "ui-state-hover" ); |
| 137 | } |
| 138 | ); |
| 139 | }); |
| 140 | |
| 141 | |
| 142 | function refreshTable(choice){ |
| 143 | switch(choice) { |
| 144 | case 0: |
| 145 | $('#switchTableHolder').load('ui/show_switch'); |
| 146 | break; |
| 147 | case 1: |
| 148 | $('#linkTableHolder').load('ui/show_link'); |
| 149 | break; |
| 150 | case 2: |
| 151 | $('#deviceTableHolder').load('ui/show_host'); |
| 152 | break; |
| 153 | case 3: |
| 154 | $('#tunnelTableHolder').load('ui/show_tunnel'); |
| 155 | break; |
| 156 | case 4: |
| 157 | var tmpJSON = loadTopologyJSON(); |
| 158 | fd.loadJSON(tmpJSON); |
| 159 | fd.refresh(); |
| 160 | break; |
| 161 | default: |
| 162 | $('#switchTableHolder').load('ui/show_switch'); |
| 163 | $('#linkTableHolder').load('ui/show_link'); |
| 164 | $('#deviceTableHolder').load('ui/show_host'); |
| 165 | $('#tunnelTableHolder').load('ui/show_tunnel'); |
| 166 | var tmpJSON = loadTopologyJSON(); |
| 167 | fd.loadJSON(tmpJSON); |
| 168 | fd.refresh(); |
| 169 | break; |
| 170 | } |
| 171 | //setTimeout(refreshTable, 5000); |
| 172 | } |
| 173 | function loadTopologyJSON(){ |
| 174 | var request = new XMLHttpRequest( ); |
| 175 | request.open("GET", "ui/build_topology", false); |
| 176 | request.send(null); |
| 177 | var jsonFILE = request.response; |
| 178 | eval(jsonFILE); |
| 179 | return(json); |
| 180 | } |
| 181 | </script> |
| 182 | <script language="javascript" type="text/javascript" src="static/js/topology.js"></script> |
| 183 | |
| 184 | {% endblock %} |