Deleting failed truckroll
diff --git a/views/ngXosViews/truckroll/bower.json b/views/ngXosViews/truckroll/bower.json
index 4eddd1e..c0f3265 100644
--- a/views/ngXosViews/truckroll/bower.json
+++ b/views/ngXosViews/truckroll/bower.json
@@ -15,6 +15,7 @@
"tests"
],
"dependencies": {
+ "angular-animate": "~1.5.0"
},
"devDependencies": {
"jquery": "~2.1.4",
@@ -25,5 +26,8 @@
"angular-resource": "~1.4.7",
"ng-lodash": "~0.3.0",
"bootstrap-css": "~3.3.6"
+ },
+ "resolutions": {
+ "angular": "~1.4.7"
}
}
diff --git a/views/ngXosViews/truckroll/env/default.js b/views/ngXosViews/truckroll/env/default.js
index d1e41fd..2236839 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: 'AcDUMSMLenXesxkAmRRfuDrrcm0nfK2R',
- xossessionid: 'vpfim02rcpr3fcp4uf37l4ffilavr6x7'
+ xoscsrftoken: 'sBLEU3jBpCFVUSBrxZ3pFeGFV50LR1GE',
+ xossessionid: 'n73jta6yf81hrgzmmut04vuens090kfc'
};
diff --git a/views/ngXosViews/truckroll/src/css/truckroll.css b/views/ngXosViews/truckroll/src/css/truckroll.css
index 4ff5ccf..8ac0369 100644
--- a/views/ngXosViews/truckroll/src/css/truckroll.css
+++ b/views/ngXosViews/truckroll/src/css/truckroll.css
@@ -2,6 +2,39 @@
margin-top: 20px;
}
+/* ANIMATIONS */
+.animate-vertical.ng-hide-add {
+ animation:0.5s slideOutDown ease-in-out;
+}
+.animate-vertical.ng-hide-remove {
+ animation:0.5s slideInUp ease-in-out;
+}
+
+@keyframes slideInUp {
+ from {
+ transform: translate3d(0, 100%, 0);
+ opacity: 0;
+ }
+
+ to {
+ transform: translate3d(0, 0, 0);
+ opacity: 1;
+ }
+}
+
+
+@keyframes slideOutDown {
+ from {
+ transform: translate3d(0, 0, 0);
+ opacity: 1;
+ }
+
+ to {
+ opacity: 0;
+ transform: translate3d(0, 100%, 0);
+ }
+}
+
/* LOADER */
.loader {
font-size: 10px;
diff --git a/views/ngXosViews/truckroll/src/index.html b/views/ngXosViews/truckroll/src/index.html
index 0b6606e..048c112 100644
--- a/views/ngXosViews/truckroll/src/index.html
+++ b/views/ngXosViews/truckroll/src/index.html
@@ -20,6 +20,7 @@
<script src="vendor/angular-resource/angular-resource.js"></script>
<script src="vendor/ng-lodash/build/ng-lodash.js"></script>
<script src="vendor/bootstrap-css/js/bootstrap.min.js"></script>
+<script src="vendor/angular-animate/angular-animate.js"></script>
<!-- endbower --><!-- endjs -->
<!-- inject:js -->
<script src="/xosHelpers/src/xosHelpers.module.js"></script>
diff --git a/views/ngXosViews/truckroll/src/js/main.js b/views/ngXosViews/truckroll/src/js/main.js
index 514126e..8f43c35 100644
--- a/views/ngXosViews/truckroll/src/js/main.js
+++ b/views/ngXosViews/truckroll/src/js/main.js
@@ -3,6 +3,7 @@
angular.module('xos.truckroll', [
'ngResource',
'ngCookies',
+ 'ngAnimate',
'ngLodash',
'ui.router',
'xos.helpers'
@@ -58,16 +59,16 @@
Truckroll.get({id: id}).$promise
.then((testResult) => {
// 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
- }
+ // or
// if is synced
- else if(testResult.is_synced){
+ if(
+ testResult.backend_status.indexOf('2') >= 0 ||
+ (testResult.result_code && testResult.result_code.indexOf('2') >= 0) ||
+ testResult.is_synced
+ ){
this.truckroll = angular.copy(testResult);
- Truckroll.delete({id: id});
this.loader = false;
+ Truckroll.delete({id: id});
}
// else keep polling
else{
diff --git a/views/ngXosViews/truckroll/src/templates/truckroll.tpl.html b/views/ngXosViews/truckroll/src/templates/truckroll.tpl.html
index 424cf26..f0c2dbe 100644
--- a/views/ngXosViews/truckroll/src/templates/truckroll.tpl.html
+++ b/views/ngXosViews/truckroll/src/templates/truckroll.tpl.html
@@ -1,6 +1,8 @@
<div class="row">
- <h2>Virtual Truck Roll</h2>
- <p>Use this page to run test against your subscriber</p>
+ <div class="col-xs-12">
+ <h2>Virtual Truck Roll</h2>
+ <p>Use this page to run test against your subscriber</p>
+ </div>
</div>
<form ng-submit="vm.runTest()">
<div class="row">
@@ -69,7 +71,10 @@
<div class="col-xs-12" ng-show="!vm.loader">
<button class="btn btn-success btn-block">Run test</button>
</div>
- <div class="col-xs-12" ng-show="vm.loader">
+ </div>
+</form>
+<div class="row">
+ <div class="col-xs-12 animate-vertical" ng-show="vm.loader">
<div class="loader"></div>
</div>
</div>
@@ -93,10 +98,9 @@
</div>
<div class="row" ng-hide="!vm.truckroll.backend_status">
<div class="col-xs-12">
- <label>Result Code</label>
+ <label>Backend Status</label>
</div>
<div class="col-xs-12">
<pre>{{vm.truckroll.backend_status}}</pre>
</div>
- </div>
-</form>
\ No newline at end of file
+ </div>
\ No newline at end of file