mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:arangodb/arangodb into devel
This commit is contained in:
commit
f9a8aab639
|
@ -42,18 +42,41 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div id="modalPlaceholder">
|
||||
</div>
|
||||
<div id="modalPlaceholder">
|
||||
</div>
|
||||
|
||||
<div id="progressPlaceholder" style="display:none">
|
||||
</div>
|
||||
<div id="progressPlaceholder" style="display:none">
|
||||
</div>
|
||||
|
||||
<div id="spotlightPlaceholder" style="display:none">
|
||||
</div>
|
||||
<div id="spotlightPlaceholder" style="display:none">
|
||||
</div>
|
||||
|
||||
<div id="offlinePlaceholder" style="display:none">
|
||||
<div class="offline-div">
|
||||
|
||||
<div class="pure-u">
|
||||
|
||||
<div class="pure-u-1-4"></div>
|
||||
<div class="pure-u-1-2 offline-window">
|
||||
<div class="offline-header">
|
||||
<h3>You have been disconnected from the server</h3>
|
||||
</div>
|
||||
<div class="offline-body">
|
||||
<p>The connection to the server has been lost. The server may be under heavy load.</p>
|
||||
<p>Trying to reconnect in <span id="offlineSeconds">10</span> seconds.</p>
|
||||
<p class="animation_state">
|
||||
<span><button class="button-success">Reconnect now</button></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pure-u-1-4"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="arangoFrame" style="">
|
||||
<div class="outerDiv">
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
execute: function(callback, args) {
|
||||
$('#subNavigationBar .breadcrumb').html('');
|
||||
$('#subNavigationBar .bottom').html('');
|
||||
$('#loadingScreen').hide();
|
||||
if (callback) {
|
||||
callback.apply(this, args);
|
||||
}
|
||||
|
|
|
@ -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('<i class="fa fa-check-circle"></i>');
|
||||
$('#offlinePlaceholder').hide();
|
||||
}
|
||||
else {
|
||||
$('#healthStatus').removeClass('positive');
|
||||
$('#healthStatus').addClass('negative');
|
||||
$('.health-state').html('OFFLINE');
|
||||
$('.health-state').html('UNKNOWN');
|
||||
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
||||
|
||||
//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++;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue