Skip to content

Commit

Permalink
Merge pull request #541 from MG-RAST/master
Browse files Browse the repository at this point in the history
get develop back in sync
  • Loading branch information
teharrison authored Sep 6, 2017
2 parents 9e02f63 + 971927f commit 195d210
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ About:

AWE is a workload management system for bioinformatic workflow applications. AWE, together with Shock data management system, can be used to build an integrated platform for efficient data analysis and management which features following functionalities:

- Common workflow language support
- Multi cloud support
- Explicit task parallelization and convenient application integration
- Scalable, portable, and fault-tolerant workflow computation
- Integration of heterogeneous and geographically distributed computing resources
Expand Down
1 change: 1 addition & 0 deletions site/widgets/widget.awe_home.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
if (Retina.WidgetInstances.login && Retina.WidgetInstances.login[1].user && Retina.WidgetInstances.login[1].user.admin) {
var html = [ '<h4>Admin Info</h4><table class="table" style="width: 600px;">' ];
html.push('<tr><td style="width: 200px;"><b>server time</b></td><td>'+data.server_time+'</td></tr>');
html.push('<tr><td style="width: 200px;"><b>uptime</b></td><td>'+data.uptime+'</td></tr>');
html.push('<tr><td><b>queue status</b></td><td>'+(data.queue_status == 'running' ? '<span class="label label-success">running</span>' : '<span class="label label-important">suspended</span>')+'</td></tr>');
html.push('<tr><td><b>queue action</b></td><td>'+(data.queue_status == 'running' ? '<button class="btn btn-small btn-danger" onclick="if(confirm(\'Really suspend the queue?\')){Retina.WidgetInstances.awe_home[1].queue(\'suspend\');}">suspend</button>' : '<button class="btn btn-small btn-info" onclick="Retina.WidgetInstances.awe_home[1].queue(\'resume\');">resume</button>')+'</td></tr>');
html.push('</table>');
Expand Down
2 changes: 1 addition & 1 deletion site/widgets/widget.awe_monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
obj.total_failed || "0",
skipwork.join(", "),
obj.version,
Retina.keys(obj.current_work).length ? Retina.keys(obj.current_work)[0] : '- none -' ]);
Retina.keys(obj.current_work.data).length ? Retina.keys(obj.current_work.data)[0] : '- none -' ]);
}
}
return_data = { header: [ "name",
Expand Down
27 changes: 15 additions & 12 deletions site/widgets/widget.awe_panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,15 @@
if (! pipelines.hasOwnProperty(wdata[i].info.pipeline)) {
pipelines[wdata[i].info.pipeline] = [];
}
wdata[i].client = wdata[i].client.replace(/^<[^>]+>([^<]+)<\/.+$/, '$1');
wdata[i].client = wdata[i].client ? wdata[i].client.replace(/^<[^>]+>([^<]+)<\/.+$/, '$1') : null;
apps[wdata[i].cmd.name].push(wdata[i].client);
pipelines[wdata[i].info.pipeline].push(wdata[i].client);
if (clientIndex[wdata[i].client] && data[clientIndex[wdata[i].client]]) {
data[clientIndex[wdata[i].client]].current_work[wdata[i].wuid] = "<span class='href' onclick='Retina.WidgetInstances.awe_panel[1].aweWorkunitDetail("+i+");'>"+wdata[i].cmd.name+"</span>";

if (wdata[i].client && clientIndex[wdata[i].client] && data[clientIndex[wdata[i].client]]) {
for (var h=0; h<data[clientIndex[wdata[i].client]].current_work.data.length; h++) {
if (data[clientIndex[wdata[i].client]].current_work.data[h] == wdata[i].wuid) {
data[clientIndex[wdata[i].client]].current_work.data[h] = "<span class='href' onclick='Retina.WidgetInstances.awe_panel[1].aweWorkunitDetail("+i+");'>"+wdata[i].cmd.name+"</span>";
}
}
if (widget.currentApp && (widget.currentApp == wdata[i].cmd.name || widget.currentApp == wdata[i].info.pipeline) ) {
data[clientIndex[wdata[i].client]].highlight = true;
} else {
Expand All @@ -96,33 +99,33 @@
// client counts
var numIdle = 0;
var numBusy = 0;
var numDeleted = 0;
var numOffline = 0;
var numError = 0;

// box-display
var boxDisplay = "<div style='width: 600px; margin-top: 10px;'>";
for (var h=0; h<groupOrder.length; h++) {
boxDisplay += "<h5 style='clear: both;'>"+grouping+": "+groupOrder[h]+"</h5>";
for (var i=0; i<groups[groupOrder[h]].length; i++) {
if (groups[groupOrder[h]][i].Status == "active-idle") {
if (groups[groupOrder[h]][i].online && ! groups[groupOrder[h]][i].suspended && ! groups[groupOrder[h]][i].busy) {
boxDisplay += widget.aweNode('info', groups[groupOrder[h]][i]);
numIdle++;
} else if (groups[groupOrder[h]][i].Status == "active-busy") {
} else if (groups[groupOrder[h]][i].busy) {
boxDisplay += widget.aweNode('success', groups[groupOrder[h]][i]);
numBusy++;
} else if (groups[groupOrder[h]][i].Status == "suspend") {
} else if (groups[groupOrder[h]][i].suspended) {
boxDisplay += widget.aweNode('danger', groups[groupOrder[h]][i]);
numError++;
} else if (groups[groupOrder[h]][i].Status == "deleted") {
} else if (! groups[groupOrder[h]][i].online) {
boxDisplay += widget.aweNode('warning', groups[groupOrder[h]][i]);
numDeleted++;
numOffline++;
}
}
}
boxDisplay += "</div><div style='clear: both;'></div>";

// clients
var html = ["<div style='float: left;'><table style='font-size: 30px; font-weight: bold; text-align: center;'><tr><td style='color: black; width: 120px;' title='total number of clients'>"+data.length+"</td><td style='color: blue; width: 120px;' title='number of idle clients'>"+numIdle+"</td><td style='color: green; width: 120px;' title='number of busy clients'>"+numBusy+"</td><td style='color: orange; width: 120px;' title='number of deleted clients'>"+numDeleted+"</td><td style='color: red; width: 120px;' title='number of error clients'>"+numError+"</td></tr></table>"];
var html = ["<div style='float: left;'><table style='font-size: 30px; font-weight: bold; text-align: center;'><tr><td style='color: black; width: 120px;' title='total number of clients'>"+data.length+"</td><td style='color: blue; width: 120px;' title='number of idle clients'>"+numIdle+"</td><td style='color: green; width: 120px;' title='number of busy clients'>"+numBusy+"</td><td style='color: orange; width: 120px;' title='number of offline clients'>"+numOffline+"</td><td style='color: red; width: 120px;' title='number of error clients'>"+numError+"</td></tr></table>"];
html.push( boxDisplay );
html.push("</div>");

Expand Down Expand Up @@ -165,7 +168,7 @@
};

widget.aweNode = function (status, data) {
return "<div class='box alert alert-"+status+"' "+(data.highlight ? " style='box-shadow: 0 0 1em blue;'" : "")+"onclick='Retina.WidgetInstances.awe_panel[1].aweNodeDetail("+data.index+");'>"+Retina.keys(data.current_work).length+"</div>";
return "<div class='box alert alert-"+status+"' "+(data.highlight ? " style='box-shadow: 0 0 1em blue;'" : "")+"onclick='Retina.WidgetInstances.awe_panel[1].aweNodeDetail("+data.index+");'>"+Retina.keys(data.current_work.data).length+"</div>";
};

widget.aweNodeDetail = function (nodeIndex) {
Expand Down

0 comments on commit 195d210

Please sign in to comment.