X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-widget-main.js;h=07243e726876e915255b5bde822bf184fa4773bb;hb=db46e4d678127a9c80ee5b329ad447c1c522195d;hp=92716027b0639467e1209637f95bb1b3504e3fd4;hpb=5374406d1e6b911c4a92a826b20ec6282ec31012;p=mkws-moved-to-github.git diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index 9271602..07243e7 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -420,6 +420,26 @@ mkws.registerWidgetType('Config', function() { }); +mkws.registerWidgetType('Progress', function() { + var that = this; + + this.node.hide(); + this.team.queue("stat").subscribe(function(data) { + var s = ''; + for (var i = 0; i < data.clients; i++) { + if (i == data.clients - data.activeclients) { + s += ''; + s += ''; + } + s += '█'; + } + s += ''; + that.node.html(s); + that.node.show(); + }); +}); + + // Some elements have mkws* classes that makes them appear as widgets // -- for example, because we want to style them using CSS -- but have // no actual functionality. We register these to prevent ignorable