Skip to content
This repository was archived by the owner on Aug 20, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions HCCGo/app/html/jobView.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ <h4 class="panel-title jobhistory" style="display: inline-block">Output<small cl
</div>
<div id="collapse0" class="panel-collapse collapse in">
<div class="panel-body jobstatus-text">
<pre>{{job.outText}}</pre>
<pre>{{job.outText}} <span class="mdi-action-autorenew" id="outText" ng-show="job.outText === 'Loading output...'"></span></pre>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading jobstatus-link" data-toggle="collapse" data-target="#collapse1">
<div class="row">
Expand All @@ -44,7 +43,7 @@ <h4 class="panel-title jobhistory" style="display: inline-block">Error<small cla
</div>
<div id="collapse1" class="panel-collapse collapse in">
<div class="panel-body jobstatus-text">
<pre>{{job.errText}}</pre>
<pre>{{job.errText}} <span class="mdi-action-autorenew" id="errText" ng-show="job.errText === 'Loading error...'"</span></pre>
</div>
</div>
</div>
Expand Down
13 changes: 12 additions & 1 deletion HCCGo/app/js/jobViewCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,18 @@ jobViewModule.controller('jobViewCtrl', ['$scope', '$log', '$timeout', 'connecti
}

else {
result.outText = "Loading output...";
result.errText = "Loading error...";

$('#outText').addClass('spinning-image');
$('#errText').addClass('spinning-image');
// In parallel, get the size of the output and error
connectionService.getFileSize(result.outputPath).then(function(size) {
// If the file is larger than 5MB
if(size > 5*1025*1024) {
result.outText = "The Output file is too large to be displayed here.";
outDownload = false;
$('#outText').removeClass('spinning-image');
} else {
connectionService.getFileText(result.outputPath).then(function(data) {
var text = data.length>0 ? data : "(none)";
Expand All @@ -73,15 +79,17 @@ jobViewModule.controller('jobViewCtrl', ['$scope', '$log', '$timeout', 'connecti
}
}
);
$('#outText').removeClass('spinning-image');
});
}
});


connectionService.getFileSize(result.errorPath).then(function(size) {
if(size > 5*1025*1024) {
result.errText = "The Error file is too large to be displayed here.";
errDownload = false;
$('#errText').removeClass('spinning-image');
}
else {
connectionService.getFileText(result.errorPath).then(function(data) {
Expand All @@ -108,6 +116,8 @@ jobViewModule.controller('jobViewCtrl', ['$scope', '$log', '$timeout', 'connecti
);
result.errDownload = errDownload;
result.outDownload = outDownload;

$('#errText').removeClass('spinning-image');
}
});
}
Expand All @@ -119,6 +129,7 @@ jobViewModule.controller('jobViewCtrl', ['$scope', '$log', '$timeout', 'connecti
});
});


/**
* Saves the output or error to a file
* @method saveFile
Expand Down