From 01efb19edab74f91af2b090572c5569dec3c65be Mon Sep 17 00:00:00 2001 From: Wes Felter <wmf@us.ibm.com> Date: Wed, 8 Aug 2012 16:47:09 -0500 Subject: [PATCH] UI: Clean up HTML a little. --- src/main/resources/web/index.html | 4 ++-- .../resources/web/tpl/flow-list-item.html | 2 +- src/main/resources/web/tpl/flow-list.html | 18 ++++++++-------- src/main/resources/web/tpl/header.html | 10 ++++----- src/main/resources/web/tpl/home.html | 17 --------------- .../resources/web/tpl/host-list-item.html | 2 +- src/main/resources/web/tpl/host-list.html | 21 ++++++++++--------- src/main/resources/web/tpl/host.html | 2 +- .../resources/web/tpl/port-list-item.html | 2 +- src/main/resources/web/tpl/port-list.html | 20 +++++++++--------- src/main/resources/web/tpl/status.html | 12 +++++------ .../resources/web/tpl/switch-list-item.html | 2 +- src/main/resources/web/tpl/switch-list.html | 20 +++++++++--------- src/main/resources/web/tpl/switch.html | 3 +-- src/main/resources/web/tpl/topology.html | 2 +- .../resources/web/tpl/vlan-list-item.html | 2 +- 16 files changed, 60 insertions(+), 79 deletions(-) diff --git a/src/main/resources/web/index.html b/src/main/resources/web/index.html index 54e1cb398..cc2c2e8ed 100644 --- a/src/main/resources/web/index.html +++ b/src/main/resources/web/index.html @@ -56,8 +56,8 @@ <hr> <footer class="footer"> - <p><a href="http://floodlight.openflowhub.org/">Floodlight </a> © <a href="http://www.bigswitch.com/">Big Switch Networks</a>, <a href="http://www.research.ibm.com/arl/">IBM</a>, et. al. - Powered by <a href="http://documentcloud.github.com/backbone/">Backbone.js</a>, <a href="http://twitter.github.com/bootstrap/">Bootstrap</a>, <a href="http://jquery.com/">jQuery</a>, <a href="http://mbostock.github.com/d3/">D3.js</a>, etc.</p> + <p><a href="http://floodlight.openflowhub.org/">Floodlight </a> © <a href="http://www.bigswitch.com/">Big Switch Networks</a>, <a href="http://www.research.ibm.com/arl/">IBM</a>, et. al. + Powered by <a href="http://documentcloud.github.com/backbone/">Backbone.js</a>, <a href="http://twitter.github.com/bootstrap/">Bootstrap</a>, <a href="http://jquery.com/">jQuery</a>, <a href="http://mbostock.github.com/d3/">D3.js</a>, etc.</p> </footer> </div> <!-- /container --> diff --git a/src/main/resources/web/tpl/flow-list-item.html b/src/main/resources/web/tpl/flow-list-item.html index 59734906a..7c099c3e7 100644 --- a/src/main/resources/web/tpl/flow-list-item.html +++ b/src/main/resources/web/tpl/flow-list-item.html @@ -1 +1 @@ -<td><%= cookie %></td><td><%= priority %></td><td><%= matchHTML %></td><td><%= actionText %></td><td><%= packetCount %></td><td><%= byteCount %></td><td><%= durationSeconds %> s</td><td><%= idleTimeout %> s</td> + <td><%= cookie %></td><td><%= priority %></td><td><%= matchHTML %></td><td><%= actionText %></td><td><%= packetCount %></td><td><%= byteCount %></td><td><%= durationSeconds %> s</td><td><%= idleTimeout %> s</td> diff --git a/src/main/resources/web/tpl/flow-list.html b/src/main/resources/web/tpl/flow-list.html index 4bd0a856c..21a30cf8d 100644 --- a/src/main/resources/web/tpl/flow-list.html +++ b/src/main/resources/web/tpl/flow-list.html @@ -1,19 +1,19 @@ <div class="page-header"> - <h1>Flows (<%= nflows %>)</h1> + <h1>Flows (<%= nflows %>)</h1> </div> <table class="table table-striped flow-table"> - <thead><tr><th>Cookie</th><th>Priority</th><th>Match</th><th>Action</th><th>Packets</th><th>Bytes</th><th>Age</th><th>Timeout</th></tr></thead> - <tbody> - <!-- flows will be inserted here by FlowListView:render --> - </tbody> + <thead><tr><th>Cookie</th><th>Priority</th><th>Match</th><th>Action</th><th>Packets</th><th>Bytes</th><th>Age</th><th>Timeout</th></tr></thead> + <tbody> + <!-- flows will be inserted here by FlowListView:render --> + </tbody> </table> <!-- TODO implement pagination --> <!-- <div class="pagination pagination-right"><ul> - <li><a href="">←</a></li> - <li class="active"><a href="">1</a></li> - <li><a href="">2</a></li> - <li><a href="">→</a> + <li><a href="">←</a></li> + <li class="active"><a href="">1</a></li> + <li><a href="">2</a></li> + <li><a href="">→</a> </ul></div> --> \ No newline at end of file diff --git a/src/main/resources/web/tpl/header.html b/src/main/resources/web/tpl/header.html index ae4545bab..78045ef69 100644 --- a/src/main/resources/web/tpl/header.html +++ b/src/main/resources/web/tpl/header.html @@ -1,4 +1,3 @@ - <div class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> @@ -7,8 +6,7 @@ <span class="icon-bar"></span> <span class="icon-bar"></span> </a> - <!-- TODO we could use a better version of the OF logo without the drop shadow --> - <img src="img/floodlight.png" style="float:left;"> + <img src="img/floodlight.png" style="float:left;"> <div class="nav-collapse"> <ul class="nav"> @@ -19,10 +17,10 @@ <!-- <li><a href="/vlans">VLANs</a></li> --> </ul> <form id="searchForm" class="navbar-search pull-right dropdown"> - <input id="searchText" type="text" class="search-query dropdown-toggle" placeholder="Search (try an IP or MAC address)"> + <input id="searchText" type="text" class="search-query dropdown-toggle" + placeholder="Search (try an IP or MAC address)"> </form> - </div> - <!--/.nav-collapse --> + </div> <!--/.nav-collapse --> </div> </div> </div> diff --git a/src/main/resources/web/tpl/home.html b/src/main/resources/web/tpl/home.html index 1530c0f19..6abf49441 100644 --- a/src/main/resources/web/tpl/home.html +++ b/src/main/resources/web/tpl/home.html @@ -5,20 +5,3 @@ <div id="host-list"></div> <!-- <div id="vlan-list"></div> --> - -<!-- Floodlight doesn't provide an API for this -<div class="row"> -<div class="span12"> -<div class="page-header"> - <h1>Recent Events</h1> -</div> -<table class="table striped-table"> - <thead><tr><th>Time</th><th>Device</th><th>Message</th></tr></thead> - <tbody> - <tr><td>Fri Mar 30 15:16:52 CDT 2012</td><td>Switch <a href="">C</a></td><td><i class="icon-fire"></i> caught on fire.</td></tr> - <tr><td>Fri Mar 30 15:14:15 CDT 2012</td><td>Host <a href="">BroVM</a></td><td><i class="icon-resize-horizontal"></i> moved from <a href="">switch a port x</a> to <a href="">switch b port y</a>.</td></tr> - </tbody> -</table> -</div> -</div> ---> diff --git a/src/main/resources/web/tpl/host-list-item.html b/src/main/resources/web/tpl/host-list-item.html index bf6797f87..169477e36 100644 --- a/src/main/resources/web/tpl/host-list-item.html +++ b/src/main/resources/web/tpl/host-list-item.html @@ -1 +1 @@ - <td><a href="/host/<%= mac %>"><%= mac %></a></td><!-- <td><%= vlan %></td> --><td><%= ipv4 %></td><td><%= swport %></td><td><%= lastSeen %></td> + <td><a href="/host/<%= mac %>"><%= mac %></a></td><!-- <td><%= vlan %></td> --><td><%= ipv4 %></td><td><%= swport %></td><td><%= lastSeen %></td> diff --git a/src/main/resources/web/tpl/host-list.html b/src/main/resources/web/tpl/host-list.html index cc4a2c067..bc1f36437 100644 --- a/src/main/resources/web/tpl/host-list.html +++ b/src/main/resources/web/tpl/host-list.html @@ -1,21 +1,22 @@ <div class="row"> <div class="span12"> <div class="page-header"> - <h1>Hosts (<%= nhosts %>)</h1> + <h1>Hosts (<%= nhosts %>)</h1> </div> <table class="table table-striped host-table"> - <thead><tr><th>MAC Address</th><!-- <th>VLAN</th> --><th>IP Address</th><th>Switch Port</th><th>Last Seen</th></tr></thead> - <tbody> - <!-- hosts will be inserted here by HostListView.render --> - </tbody> + <thead><tr><th>MAC Address</th><!-- <th>VLAN</th> --><th>IP Address</th><th>Switch Port</th><th>Last Seen</th> + </tr></thead> + <tbody> + <!-- hosts will be inserted here by HostListView.render --> + </tbody> </table> <!-- TODO implement pagination --> -<!-- +<!-- <div class="pagination pagination-right"><ul> - <li><a href="">←</a></li> - <li class="active"><a href="">1</a></li> - <li><a href="">2</a></li> - <li><a href="">→</a> + <li><a href="">←</a></li> + <li class="active"><a href="">1</a></li> + <li><a href="">2</a></li> + <li><a href="">→</a> </ul></div> --> </div> diff --git a/src/main/resources/web/tpl/host.html b/src/main/resources/web/tpl/host.html index 1aa38015a..985940f4b 100644 --- a/src/main/resources/web/tpl/host.html +++ b/src/main/resources/web/tpl/host.html @@ -1,7 +1,7 @@ <div class="row"> <div class="span12"> <div class="page-header"> - <h1>Host <%= id %></h1> + <h1>Host <%= id %></h1> </div> <p> <!-- VLAN: <a href="/vlan/<%= vlan %>"><%= vlan %></a><br> --> diff --git a/src/main/resources/web/tpl/port-list-item.html b/src/main/resources/web/tpl/port-list-item.html index 93252c961..bfc197844 100644 --- a/src/main/resources/web/tpl/port-list-item.html +++ b/src/main/resources/web/tpl/port-list-item.html @@ -1 +1 @@ - <td><a id="<%= portNumber %>"><%= name %></a></td><td><%= status %></td><td><%= transmitBytes %></td><td><%= receiveBytes %></td><td><%= transmitPackets %></td><td><%= receivePackets %></td><td><%= dropped %></td><td><%= errors %></td> + <td><a id="<%= portNumber %>"><%= name %></a></td><td><%= status %></td><td><%= transmitBytes %></td><td><%= receiveBytes %></td><td><%= transmitPackets %></td><td><%= receivePackets %></td><td><%= dropped %></td><td><%= errors %></td> diff --git a/src/main/resources/web/tpl/port-list.html b/src/main/resources/web/tpl/port-list.html index 044fffff4..9ceb6c334 100644 --- a/src/main/resources/web/tpl/port-list.html +++ b/src/main/resources/web/tpl/port-list.html @@ -1,19 +1,19 @@ <div class="page-header"> - <h1>Ports (<%= nports %>)</h1> + <h1>Ports (<%= nports %>)</h1> </div> <table class="table table-striped port-table"> - <thead><tr><th>#</th><th>Link Status</th><th>TX Bytes</th><th>RX Bytes</th><th>TX Pkts</th><th>RX Pkts</th><th>Dropped</th><th>Errors</th></tr></thead> - <tbody> - <!-- ports will be inserted here by PortListView:render --> - </tbody> + <thead><tr><th>#</th><th>Link Status</th><th>TX Bytes</th><th>RX Bytes</th><th>TX Pkts</th><th>RX Pkts</th><th>Dropped</th><th>Errors</th></tr></thead> + <tbody> + <!-- ports will be inserted here by PortListView:render --> + </tbody> </table> <!-- TODO implement pagination --> -<!-- +<!-- <div class="pagination pagination-right"><ul> - <li><a href="">←</a></li> - <li class="active"><a href="">1</a></li> - <li><a href="">2</a></li> - <li><a href="">→</a> + <li><a href="">←</a></li> + <li class="active"><a href="">1</a></li> + <li><a href="">2</a></li> + <li><a href="">→</a> </ul></div> --> \ No newline at end of file diff --git a/src/main/resources/web/tpl/status.html b/src/main/resources/web/tpl/status.html index 86b77bf39..5a7686974 100644 --- a/src/main/resources/web/tpl/status.html +++ b/src/main/resources/web/tpl/status.html @@ -1,13 +1,13 @@ <div class="row"> <div class="span12"> <div class="page-header"> - <h1>Controller Status</h1> + <h1>Controller Status</h1> </div> <table class="status-table"> - <tr><td class="status-head">Hostname:<td><%= host %>:<%= ofport %></td></tr> - <tr><td class="status-head">Healthy:<td><%= healthy %></td> - <tr><td class="status-head">Uptime:<td><%= uptime %><td> - <tr><td class="status-head">JVM memory bloat:<td><%= free %> free out of <%= total %></td> - <Tr><td class="status-head">Modules loaded:<td><%= moduleText %></td> + <tr><td class="status-head">Hostname:<td><%= host %>:<%= ofport %></td></tr> + <tr><td class="status-head">Healthy:<td><%= healthy %></td> + <tr><td class="status-head">Uptime:<td><%= uptime %><td> + <tr><td class="status-head">JVM memory bloat:<td><%= free %> free out of <%= total %></td> + <Tr><td class="status-head">Modules loaded:<td><%= moduleText %></td> </div> </div> diff --git a/src/main/resources/web/tpl/switch-list-item.html b/src/main/resources/web/tpl/switch-list-item.html index c6cd4ac58..7ce026278 100644 --- a/src/main/resources/web/tpl/switch-list-item.html +++ b/src/main/resources/web/tpl/switch-list-item.html @@ -1 +1 @@ -<td><a href="/switch/<%= id %>"><%= id %></a></td><td><%= inetAddress %></td><td><%= manufacturerDescription %><td><%= packetCount %></td><td><%= byteCount %></td><td><%= flowCount %></td><td><%= connectedSince %></td> + <td><a href="/switch/<%= id %>"><%= id %></a></td><td><%= inetAddress %></td><td><%= manufacturerDescription %><td><%= packetCount %></td><td><%= byteCount %></td><td><%= flowCount %></td><td><%= connectedSince %></td> diff --git a/src/main/resources/web/tpl/switch-list.html b/src/main/resources/web/tpl/switch-list.html index 7e577aac8..e7dac09c1 100644 --- a/src/main/resources/web/tpl/switch-list.html +++ b/src/main/resources/web/tpl/switch-list.html @@ -1,21 +1,21 @@ <div class="row"> <div class="span12"> <div class="page-header"> - <h1>Switches (<%= nswitches %>)</h1> + <h1>Switches (<%= nswitches %>)</h1> </div> <table class="table table-striped switch-table"> - <thead><tr><th>DPID</th><th>IP Address</th><th>Vendor</th><th>Packets</th><th>Bytes</th><th>Flows</th><th>Connected Since</th></tr></thead> - <tbody> - <!-- switches will be inserted here by SwitchListView:render --> - </tbody> + <thead><tr><th>DPID</th><th>IP Address</th><th>Vendor</th><th>Packets</th><th>Bytes</th><th>Flows</th><th>Connected Since</th></tr></thead> + <tbody> + <!-- switches will be inserted here by SwitchListView:render --> + </tbody> </table> <!-- TODO implement pagination --> -<!-- +<!-- <div class="pagination pagination-right"><ul> - <li><a href="">←</a></li> - <li class="active"><a href="">1</a></li> - <li><a href="">2</a></li> - <li><a href="">→</a> + <li><a href="">←</a></li> + <li class="active"><a href="">1</a></li> + <li><a href="">2</a></li> + <li><a href="">→</a> </ul></div> --> </div> diff --git a/src/main/resources/web/tpl/switch.html b/src/main/resources/web/tpl/switch.html index bc1169d38..af89797e9 100644 --- a/src/main/resources/web/tpl/switch.html +++ b/src/main/resources/web/tpl/switch.html @@ -1,14 +1,13 @@ <div class="row"> <div class="span12"> <div class="page-header"> - <h1>Switch <%= id %> <%= inetAddress %></h1> + <h1>Switch <%= id %> <%= inetAddress %></h1> </div> <p>Connected since <%= connectedSince %><br> <%= manufacturerDescription %><br> <%= hardwareDescription %><br> <%= softwareDescription %><br> S/N: <%= serialNumber %><br> -<!-- <%= flowCount %> flows --> </p> <div id="port-list"></div> <!-- TODO would be nice to make this collapsible --> diff --git a/src/main/resources/web/tpl/topology.html b/src/main/resources/web/tpl/topology.html index feb88df84..ce77cc75b 100644 --- a/src/main/resources/web/tpl/topology.html +++ b/src/main/resources/web/tpl/topology.html @@ -1,7 +1,7 @@ <div class="row"> <div class="span12"> <div class="page-header"> - <h1>Network Topology</h1> + <h1>Network Topology</h1> </div> <div id="topology-graph"></div> </div> diff --git a/src/main/resources/web/tpl/vlan-list-item.html b/src/main/resources/web/tpl/vlan-list-item.html index 785517b0a..55a2f3556 100644 --- a/src/main/resources/web/tpl/vlan-list-item.html +++ b/src/main/resources/web/tpl/vlan-list-item.html @@ -1 +1 @@ - <tr><td><a href="/vlan/<%= id %>"><%= id %></a></td><td><%= name %></td><td><%= nhosts %></td></tr> + <tr><td><a href="/vlan/<%= id %>"><%= id %></a></td><td><%= name %></td><td><%= nhosts %></td></tr> -- GitLab