Skip to content
Snippets Groups Projects
Commit 142dddb6 authored by Wes Felter's avatar Wes Felter
Browse files

Display loaded module list in a nicer way.

parent de73f361
No related branches found
No related tags found
No related merge requests found
......@@ -14,10 +14,7 @@
limitations under the License.
*/
window.Status = Backbone.Model.extend({
// url:"http://localhost:8080/wm/core/memory/json",
window.Status = Backbone.Model.extend({
defaults: {
host: 'localhost',
ofport: 6633,
......@@ -25,7 +22,8 @@ window.Status = Backbone.Model.extend({
free: 0,
total: 0,
healthy: 'unknown',
modules: []
modules: [],
moduleText: ''
},
initialize:function () {
......@@ -55,8 +53,8 @@ window.Status = Backbone.Model.extend({
success:function (data) {
console.log("fetched controller status: modules loaded");
// console.log(data);
// TODO format this better
self.set({modules:_.keys(data)});
self.set({moduleText:_.reduce(_.keys(data), function(s, m){return s+m.replace("net.floodlightcontroller", "n.f")+", "}, '')});
}
});
......
......@@ -7,6 +7,6 @@ Hostname: <%= host %>:<%= ofport %><br>
Healthy: <%= healthy %><br>
Uptime: <%= uptime %><br>
JVM memory bloat: <%= free %> free out of <%= total %><br>
Modules loaded: <%= modules %>
Modules loaded: <%= moduleText %>
</div>
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment