Handling exit status different from 0
diff --git a/views/ngXosViews/truckroll/env/default.js b/views/ngXosViews/truckroll/env/default.js
index 3c2745d..65d9e93 100644
--- a/views/ngXosViews/truckroll/env/default.js
+++ b/views/ngXosViews/truckroll/env/default.js
@@ -8,6 +8,6 @@
module.exports = {
host: 'http://apt088.apt.emulab.net:9999/',
- xoscsrftoken: 'wkT4pFidds7J1GqGgDBnwgJladVDAmT2',
- xossessionid: 'n221mn1l6ncofsnx9zihjlssew2crom6'
+ xoscsrftoken: 'u5DXeMzOmHEQxrkhdJ1YuX3FefBv7Wtx',
+ xossessionid: 'z8wjipgmf90l23bqvij6kuj0nhcbwfpx'
};
diff --git a/views/ngXosViews/truckroll/src/js/main.js b/views/ngXosViews/truckroll/src/js/main.js
index af8e6cb..69c0c4f 100644
--- a/views/ngXosViews/truckroll/src/js/main.js
+++ b/views/ngXosViews/truckroll/src/js/main.js
@@ -42,6 +42,7 @@
// clean previous tests
delete this.truckroll.result;
+ delete this.truckroll.is_synced;
const test = new Truckroll(this.truckroll);
this.loader = true;
@@ -54,11 +55,19 @@
this.waitForTest = (id) => {
Truckroll.get({id: id}).$promise
.then((testResult) => {
- if(testResult.is_synced){
+ // if error
+ if(testResult.backend_status.indexOf('2') >= 0 || (testResult.result_code && testResult.result_code.indexOf('2') >= 0)){
+ this.truckroll = angular.copy(testResult);
+ this.loader = false;
+ // not deleting failed test for debugging
+ }
+ // if is synced
+ else if(testResult.is_synced){
this.truckroll = angular.copy(testResult);
Truckroll.delete({id: id});
this.loader = false;
}
+ // else keep polling
else{
$timeout(() => {
this.waitForTest(id);
diff --git a/views/ngXosViews/truckroll/src/templates/truckroll.tpl.html b/views/ngXosViews/truckroll/src/templates/truckroll.tpl.html
index 3454107..9bbdb4c 100644
--- a/views/ngXosViews/truckroll/src/templates/truckroll.tpl.html
+++ b/views/ngXosViews/truckroll/src/templates/truckroll.tpl.html
@@ -73,14 +73,24 @@
<div class="loader"></div>
</div>
</div>
- <div class="row" ng-hide="!vm.truckroll.result">
- <div class="col-xs-12">
- <label>
- Result:
- </label>
+ <section ng-hide="!vm.truckroll.is_synced">
+ <div class="row" style="margin-top: 20px">
+ <div class="col-xs-12" ng-hide="!vm.truckroll.result_code">
+ <label>Result Code</label>
+ </div>
+ <div class="col-xs-12">
+ <pre>{{vm.truckroll.result_code}}</pre>
+ </div>
</div>
- <div class="col-xs-12">
- <pre>{{vm.truckroll.result}}</pre>
+ <div class="row">
+ <div class="col-xs-12">
+ <label>
+ Result:
+ </label>
+ </div>
+ <div class="col-xs-12" ng-hide="!vm.truckroll.result">
+ <pre>{{vm.truckroll.result}}</pre>
+ </div>
</div>
- </div>
+ </section>
</form>
\ No newline at end of file