Another step forward with the UI.
- Added (placeholder) logo to mast head.
- Minor tweaks.
diff --git a/web/gui/src/main/webapp/img/device.png b/web/gui/src/main/webapp/img/device.png
new file mode 100644
index 0000000..d608153
--- /dev/null
+++ b/web/gui/src/main/webapp/img/device.png
Binary files differ
diff --git a/web/gui/src/main/webapp/img/host.png b/web/gui/src/main/webapp/img/host.png
new file mode 100644
index 0000000..cacde17
--- /dev/null
+++ b/web/gui/src/main/webapp/img/host.png
Binary files differ
diff --git a/web/gui/src/main/webapp/img/onos-logo.png b/web/gui/src/main/webapp/img/onos-logo.png
new file mode 100644
index 0000000..afd87e1
--- /dev/null
+++ b/web/gui/src/main/webapp/img/onos-logo.png
Binary files differ
diff --git a/web/gui/src/main/webapp/img/opt.png b/web/gui/src/main/webapp/img/opt.png
new file mode 100644
index 0000000..2f2c88e
--- /dev/null
+++ b/web/gui/src/main/webapp/img/opt.png
Binary files differ
diff --git a/web/gui/src/main/webapp/img/pkt.png b/web/gui/src/main/webapp/img/pkt.png
new file mode 100644
index 0000000..1b1d5a3
--- /dev/null
+++ b/web/gui/src/main/webapp/img/pkt.png
Binary files differ
diff --git a/web/gui/src/main/webapp/index.html b/web/gui/src/main/webapp/index.html
index ebf25c5..19c9204 100644
--- a/web/gui/src/main/webapp/index.html
+++ b/web/gui/src/main/webapp/index.html
@@ -15,19 +15,18 @@
<link rel="stylesheet" href="onos.css">
<script src="geometry.js"></script>
- <script src="onosui.js"></script>
+ <script src="onos.js"></script>
</head>
<body>
<div id="frame">
<div id="mast">
- <span class="title">
- ONOS Web UI
- </span>
+ <img id="logo" src="img/onos-logo.png" width="60" height="38">
+ <span class="title">Open Network Operating System</span>
<span class="right">
- <span class="radio">[one]</span>
- <span class="radio">[two]</span>
- <span class="radio">[three]</span>
+ <span class="radio">[All Layers]</span>
+ <span class="radio">[Packet Only]</span>
+ <span class="radio">[Optical Only]</span>
</span>
</div>
<div id="view"></div>
diff --git a/web/gui/src/main/webapp/network.js b/web/gui/src/main/webapp/network.js
index ef190e7..c5145ad 100644
--- a/web/gui/src/main/webapp/network.js
+++ b/web/gui/src/main/webapp/network.js
@@ -11,18 +11,17 @@
var config = {
options: {
- layering: false,
+ layering: true,
collisionPrevention: true
},
jsonUrl: 'network.json',
iconUrl: {
- logo: 'img/onos-logo.tiff',
device: 'img/device.png',
host: 'img/host.png',
pkt: 'img/pkt.png',
opt: 'img/opt.png'
},
- mastHeight: 32,
+ mastHeight: 36,
force: {
note: 'node.class or link.class is used to differentiate',
linkDistance: {
@@ -47,7 +46,7 @@
}
},
labels: {
- imgPad: 22,
+ imgPad: 16,
padLR: 8,
padTB: 6,
marginLR: 3,
@@ -57,7 +56,7 @@
w: 32,
h: 32,
xoff: -12,
- yoff: -10
+ yoff: -8
},
constraints: {
ypos: {
@@ -376,6 +375,7 @@
rect = node.select('rect'),
icon = iconUrl(d),
text = node.append('text')
+ // TODO: add label cycle behavior
.text(d.id)
.attr('dy', '1.1em');
diff --git a/web/gui/src/main/webapp/onos.css b/web/gui/src/main/webapp/onos.css
index b2df75c..7f387eb 100644
--- a/web/gui/src/main/webapp/onos.css
+++ b/web/gui/src/main/webapp/onos.css
@@ -13,13 +13,15 @@
*/
span.title {
- color: darkblue;
- font-size: 16pt;
+ color: #37b;
+ font-size: 14pt;
font-style: italic;
+ vertical-align: 10px;
}
span.radio {
color: darkslateblue;
+ font-size: 10pt;
}
span.right {
@@ -127,8 +129,8 @@
}
#mast {
- height: 32px;
- padding: 6px;
+ height: 36px;
+ padding: 4px;
background-color: #ccc;
vertical-align: baseline;
}
diff --git a/web/gui/src/main/webapp/onosui.js b/web/gui/src/main/webapp/onos.js
similarity index 100%
rename from web/gui/src/main/webapp/onosui.js
rename to web/gui/src/main/webapp/onos.js