1
0
Fork 0

visual status for replication state

This commit is contained in:
Heiko Kernbach 2013-10-11 18:45:31 +02:00
parent 77a2c0cab0
commit c0ee8f2c0a
2 changed files with 48 additions and 3 deletions

View File

@ -531,7 +531,8 @@ li:hover h6, li.hover h6 {
.arangoHeaderBar {
width: 100%;
background-color: #686766;
height: 25px;
height: 27px;
padding-top: 3px;
border-radius: 2px;
}
@ -571,3 +572,31 @@ li:hover h6, li.hover h6 {
.nvd3 .nv-wrap .nv-axis:last-child {
visibility: hidden !important;
}
.greenLight {
background: green;
background-image: radial-gradient(lime, transparent);
background-size: 3px 3px;
width: 20px;
height: 20px;
border-radius: 50%;
box-shadow:
margin-top: 1px;
0 0 20px #111 inset,
0 0 10px lime;
animation: 13s green infinite;
}
.redLight {
background: red;
background-image: radial-gradient(brown, transparent);
background-size: 3px 3px;
margin-top: 1px;
width: 20px;
height: 20px;
border-radius: 50%;
animation: 13s red infinite;
box-shadow:
0 0 20px #111 inset,
0 0 10px red;
}

View File

@ -100,7 +100,8 @@ var dashboardView = Backbone.View.extend({
var time = this.replLogState.state.time;
var cls = loggerRunning ? 'true' : 'false';
var runningLog = '<div class="' + cls + 'Class">' + cls + '</div>';
//var runningLog = '<div class="' + cls + 'Class">' + cls + '</div>';
var runningLog = '-';
var clientString = '-';
if (this.replLogState.state.clients) {
@ -120,6 +121,13 @@ var dashboardView = Backbone.View.extend({
var numEvents = this.replLogState.state.totalEvents || 0;
//log table
if (cls === true) {
runningLog = '<div class="greenLight"/>';
}
else {
runningLog = '<div class="redLight"/>';
}
$('#logRunningVal').html(runningLog);
$('#logTotalEventsVal').text(numEvents);
$('#logTimeVal').text(time);
@ -159,12 +167,20 @@ var dashboardView = Backbone.View.extend({
}
cls = applierRunning ? 'true' : 'false';
var runningApply = '<div class="' + cls + 'Class">' + cls + '</div>';
//var runningApply = '<div class="' + cls + 'Class">' + cls + '</div>';
var runningApply = '-';
numEvents = this.replApplyState.state.totalEvents || 0;
numRequests = this.replApplyState.state.totalRequests || 0;
numFailed = this.replApplyState.state.totalFailedConnects || 0;
if (cls === true) {
runningApply = '<div class="greenLight"/>';
}
else {
runningApply = '<div class="redLight"/>';
}
$('#applyRunningVal').html(runningApply);
$('#applyEndpointVal').text(endpoint);
$('#applyLastAppliedTickVal').text(lastAppliedTick);