All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 8611725e authored by Leigh B Stoller's avatar Leigh B Stoller

Minor tweak for when user has no usage data to show in the usage tab.

parent d3eeb1bb
......@@ -77,7 +77,7 @@ $(function ()
function LoadUsage()
{
var callback = function(json) {
console.info(json);
console.info("LoadUsage", json);
if (json.code) {
console.info(json.value);
......@@ -85,7 +85,11 @@ $(function ()
}
var blob = json.value;
var html = "";
if (1 || !(blob.pnodes || blob.weekpnodes ||
blob.monthpnodes || blob.rank)) {
$('#usage_nousage').removeClass("hidden");
return;
}
if (blob.pnodes) {
html = "<tr><td>Current Usage:</td><td>" +
blob.pnodes + " Node" + (blob.pnodes > 1 ? "s, " : ", ") +
......
......@@ -149,6 +149,10 @@
</div>
<div role="tabpanel" class="tab-pane" id="usage">
<div id="usage_content">
<div class="hidden" id="usage_nousage">
<br>
You do not have any usage data yet. Time to get busy!
</div>
<table class='table table-condensed table-bordered'
id='usage_table'>
<tbody></tbody>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment