GUI -- "State" is now an icon on Link and Cluster node views. - Icon mapping has generic names to be reused between views - Fixed broken table unit tests - Other minor cleanup
Change-Id: I7136cba15ad4fd185095617d790940d55b9f968f
diff --git a/web/gui/src/main/webapp/app/view/app/app.html b/web/gui/src/main/webapp/app/view/app/app.html
index e86c34c..45f9cbc 100644
--- a/web/gui/src/main/webapp/app/view/app/app.html
+++ b/web/gui/src/main/webapp/app/view/app/app.html
@@ -3,10 +3,10 @@
<div>
<h2>Applications ({{ctrl.tableData.length}} total)</h2>
<div class="ctrl-btns">
- <div icon icon-size="36" icon-id="appPlus"></div>
- <div icon icon-size="36" icon-id="appMinus" class="disabled"></div>
- <div icon icon-size="36" icon-id="appPlay" class="disabled"></div>
- <div icon icon-size="36" icon-id="appStop" class="disabled"></div>
+ <div icon icon-size="36" icon-id="plus"></div>
+ <div icon icon-size="36" icon-id="minus" class="disabled"></div>
+ <div icon icon-size="36" icon-id="play" class="disabled"></div>
+ <div icon icon-size="36" icon-id="stop" class="disabled"></div>
</div>
</div>
<table class="summary-list"
diff --git a/web/gui/src/main/webapp/app/view/cluster/cluster.html b/web/gui/src/main/webapp/app/view/cluster/cluster.html
index b6c015b..c758ed7 100644
--- a/web/gui/src/main/webapp/app/view/cluster/cluster.html
+++ b/web/gui/src/main/webapp/app/view/cluster/cluster.html
@@ -23,10 +23,10 @@
sort-callback="sortCallback(requestParams)">
<thead>
<tr>
+ <th colId="_iconid_state" class="table-icon" sortable></th>
<th colId="id" sortable>ID </th>
<th colId="ip" sortable>IP Address </th>
<th colId="tcp" sortable>TCP Port </th>
- <th colId="state" sortable>State </th>
<th colId="updated" sortable>Last Updated </th>
</tr>
</thead>
@@ -40,10 +40,12 @@
<tr ng-repeat="node in ctrl.tableData"
ng-repeat-done>
+ <td class="table-icon">
+ <div icon icon-id="{{node._iconid_state}}"></div>
+ </td>
<td>{{node.id}}</td>
<td>{{node.ip}}</td>
<td>{{node.tcp}}</td>
- <td>{{node.state}}</td>
<td>{{node.updated}}</td>
</tr>
</tbody>
diff --git a/web/gui/src/main/webapp/app/view/device/device.css b/web/gui/src/main/webapp/app/view/device/device.css
index 09b729b..25a6245 100644
--- a/web/gui/src/main/webapp/app/view/device/device.css
+++ b/web/gui/src/main/webapp/app/view/device/device.css
@@ -42,10 +42,10 @@
top: 0;
cursor: pointer;
}
-.light .close-btn svg.embeddedIcon .icon.appPlus .glyph {
+.light .close-btn svg.embeddedIcon .icon.plus .glyph {
fill: #aaa;
}
-.dark .close-btn svg.embeddedIcon .icon.appPlus .glyph {
+.dark .close-btn svg.embeddedIcon .icon.plus .glyph {
fill: #ccc;
}
diff --git a/web/gui/src/main/webapp/app/view/device/device.html b/web/gui/src/main/webapp/app/view/device/device.html
index 9cfa091..849e666 100644
--- a/web/gui/src/main/webapp/app/view/device/device.html
+++ b/web/gui/src/main/webapp/app/view/device/device.html
@@ -21,7 +21,7 @@
<tbody>
<tr ng-hide="ctrl.tableData.length">
- <td class="nodata" colspan="10">
+ <td class="nodata" colspan="9">
No Devices found
</td>
</tr>
diff --git a/web/gui/src/main/webapp/app/view/device/device.js b/web/gui/src/main/webapp/app/view/device/device.js
index 29567bc..c5b9828 100644
--- a/web/gui/src/main/webapp/app/view/device/device.js
+++ b/web/gui/src/main/webapp/app/view/device/device.js
@@ -56,7 +56,7 @@
];
function addCloseBtn(div) {
- is.loadEmbeddedIcon(div, 'appPlus', 30);
+ is.loadEmbeddedIcon(div, 'plus', 30);
div.select('g').attr('transform', 'translate(25, 0) rotate(45)');
div.on('click', function () {
diff --git a/web/gui/src/main/webapp/app/view/link/link.html b/web/gui/src/main/webapp/app/view/link/link.html
index e8646b7..b82b4fb4 100644
--- a/web/gui/src/main/webapp/app/view/link/link.html
+++ b/web/gui/src/main/webapp/app/view/link/link.html
@@ -23,10 +23,10 @@
sort-callback="sortCallback(requestParams)">
<thead>
<tr>
+ <th colId="_iconid_state" class="table-icon" sortable></th>
<th colId="one" sortable>Port 1 </th>
<th colId="two" sortable>Port 2 </th>
<th colId="type" sortable>Type </th>
- <th colId="state" sortable>State </th>
<th colId="direction" sortable>Direction </th>
<th colId="durable" sortable>Durable </th>
</tr>
@@ -41,10 +41,12 @@
<tr ng-repeat="link in ctrl.tableData"
ng-repeat-done>
+ <td class="table-icon">
+ <div icon icon-id="{{link._iconid_state}}"></div>
+ </td>
<td>{{link.one}}</td>
<td>{{link.two}}</td>
<td>{{link.type}}</td>
- <td>{{link.state}}</td>
<td>{{link.direction}}</td>
<td>{{link.durable}}</td>
</tr>