diff --git a/js/apps/system/_admin/aardvark/APP/frontend/html/body.html.part b/js/apps/system/_admin/aardvark/APP/frontend/html/body.html.part
index c1efdcc1c3..4af8ab8260 100644
--- a/js/apps/system/_admin/aardvark/APP/frontend/html/body.html.part
+++ b/js/apps/system/_admin/aardvark/APP/frontend/html/body.html.part
@@ -42,18 +42,41 @@
-
diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js b/js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js
index f9b935e115..2ba6511c00 100644
--- a/js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js
+++ b/js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js
@@ -46,6 +46,7 @@
execute: function(callback, args) {
$('#subNavigationBar .breadcrumb').html('');
$('#subNavigationBar .bottom').html('');
+ $('#loadingScreen').hide();
if (callback) {
callback.apply(this, args);
}
diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/footerView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/footerView.js
index fc988b2580..25b8b14f06 100644
--- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/footerView.js
+++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/footerView.js
@@ -10,6 +10,9 @@
isOffline: true,
isOfflineCounter: 0,
firstLogin: true,
+ timer: 15000,
+ lap: 0,
+ timerFunction: null,
events: {
'click .footer-center p' : 'showShortcutModal'
@@ -20,13 +23,17 @@
var self = this;
window.setInterval(function() {
self.getVersion();
- }, 15000);
+ }, self.timer);
self.getVersion();
window.VISIBLE = true;
document.addEventListener('visibilitychange', function () {
window.VISIBLE = !window.VISIBLE;
});
+
+ $('#offlinePlaceholder button').on('click', function() {
+ self.getVersion();
+ });
},
template: templateEngine.createTemplate("footerView.ejs"),
@@ -40,12 +47,17 @@
$('#healthStatus').addClass('positive');
$('.health-state').html('GOOD');
$('.health-icon').html('');
+ $('#offlinePlaceholder').hide();
}
else {
$('#healthStatus').removeClass('positive');
$('#healthStatus').addClass('negative');
- $('.health-state').html('OFFLINE');
+ $('.health-state').html('UNKNOWN');
$('.health-icon').html('');
+
+ //show offline overlay
+ $('#offlinePlaceholder').show();
+ this.reconnectAnimation(0);
}
}
else {
@@ -60,15 +72,36 @@
}
},
+ reconnectAnimation: function(lap) {
+ var self = this;
+
+ if (lap === 0) {
+ self.lap = lap;
+ $('#offlineSeconds').text(self.timer / 1000);
+ clearTimeout(self.timerFunction);
+ }
+
+ if (self.lap < this.timer / 1000) {
+ self.lap++;
+ $('#offlineSeconds').text(self.timer / 1000 - self.lap);
+
+ self.timerFunction = window.setTimeout(function() {
+ if (self.timer / 1000 - self.lap === 0) {
+ self.getVersion();
+ }
+ else {
+ self.reconnectAnimation(self.lap);
+ }
+ }, 1000);
+ }
+ },
+
renderClusterState: function(connection) {
- var ok = 0, error = 0;
+ var error = 0;
if (connection) {
this.collection.each(function(value) {
- if (value.toJSON().status === 'ok') {
- ok++;
- }
- else {
+ if (value.toJSON().status !== 'ok') {
error++;
}
});
diff --git a/js/apps/system/_admin/aardvark/APP/frontend/scss/_body.scss b/js/apps/system/_admin/aardvark/APP/frontend/scss/_body.scss
index 1566395166..7875a53cdf 100644
--- a/js/apps/system/_admin/aardvark/APP/frontend/scss/_body.scss
+++ b/js/apps/system/_admin/aardvark/APP/frontend/scss/_body.scss
@@ -48,4 +48,65 @@ body {
width: 100%;
}
}
+
+ #offlinePlaceholder {
+ background: $c-bluegrey-light;
+ height: 100%;
+ left: 0;
+ position: fixed;
+ top: 0;
+ width: 100%;
+ z-index: 9999;
+
+ .offline-div {
+ overflow: auto;
+ position: fixed;
+ top: 20%;
+ width: 100%;
+ z-index: 1050;
+
+ h3 {
+ font-weight: 300;
+ }
+
+ p {
+ font-weight: 300;
+ }
+
+ .pure-u {
+ width: 100%;
+ }
+
+ .offline-window {
+ background: $c-white;
+ border-radius: 3px;
+
+ .offline-header {
+ padding-top: 10px;
+ text-align: center;
+ }
+
+ .offline-body {
+ padding-bottom: 20px;
+ padding-top: 0;
+
+ .animation_state {
+ padding-top: 20px;
+ }
+
+ > p {
+ text-align: center;
+ margin-bottom: 0;
+ }
+ }
+
+ .offline-header,
+ .offline-body {
+ padding-left: 20px;
+ padding-right: 20px;
+ }
+ }
+ }
+ }
+
}
diff --git a/js/apps/system/_admin/aardvark/APP/frontend/scss/_colors.scss b/js/apps/system/_admin/aardvark/APP/frontend/scss/_colors.scss
index 821e182050..6f376e8561 100644
--- a/js/apps/system/_admin/aardvark/APP/frontend/scss/_colors.scss
+++ b/js/apps/system/_admin/aardvark/APP/frontend/scss/_colors.scss
@@ -190,4 +190,5 @@ $c-bluegrey-bg: rgba(64, 74, 83, .04);
$c-active-green: rgb(119, 203, 153);
$c-test-green: rgb(100, 144, 104);
+$c-test-green-transp: rgba(100, 144, 104, .7);
$c-login-grey: #f2f2f2;
diff --git a/utils/generateSwagger.py b/utils/generateSwagger.py
index 3d909c18b7..7414bd52c3 100755
--- a/utils/generateSwagger.py
+++ b/utils/generateSwagger.py
@@ -484,7 +484,7 @@ def start_docublock(cargo, r=Regexen()):
else:
currentDocuBlock = last.split(' ')[1].rstrip()
except Exception as x:
- print >> sys.stderr, "failed to fetch docublock in '" + last + "'"
+ print >> sys.stderr, "failed to fetch docublock in '" + last + "': " + str(x)
raise
return generic_handler(cargo, r, 'start_docublock')