mirror of https://gitee.com/bigwinds/arangodb
adjusted dashboard for replication applier
This commit is contained in:
parent
2368adf250
commit
b9f76f18d7
Binary file not shown.
|
@ -91,6 +91,14 @@
|
||||||
<td class="alignLeft">Last applied tick</th>
|
<td class="alignLeft">Last applied tick</th>
|
||||||
<td id="applyLastAppliedTickVal"></td>
|
<td id="applyLastAppliedTickVal"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="alignLeft">Total number of requests</th>
|
||||||
|
<td id="applyTotalRequestsVal"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="alignLeft">Total number of failed connection attempts</th>
|
||||||
|
<td id="applyTotalFailedVal"></td>
|
||||||
|
</tr>
|
||||||
<tr class="checkApplyRunningStatus">
|
<tr class="checkApplyRunningStatus">
|
||||||
<td class="alignLeft">Progress</td>
|
<td class="alignLeft">Progress</td>
|
||||||
<td id="applyProgressVal"></td>
|
<td id="applyProgressVal"></td>
|
||||||
|
|
|
@ -98,10 +98,10 @@ var dashboardView = Backbone.View.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
putReplicationStatus: function () {
|
putReplicationStatus: function () {
|
||||||
var time;
|
var loggerRunning = this.replLogState.state.running;
|
||||||
var clientString = '-';
|
var applierRunning = this.replApplyState.state.running;
|
||||||
|
|
||||||
if (this.replApplyState.state.running === true) {
|
if (applierRunning || this.replApplyState.state.lastError != '') {
|
||||||
$('#detailReplication').height(290);
|
$('#detailReplication').height(290);
|
||||||
$('.checkApplyRunningStatus').show();
|
$('.checkApplyRunningStatus').show();
|
||||||
}
|
}
|
||||||
|
@ -109,19 +109,15 @@ var dashboardView = Backbone.View.extend({
|
||||||
$('.checkApplyRunningStatus').hide();
|
$('.checkApplyRunningStatus').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
time = this.replLogState.state.time;
|
var time = this.replLogState.state.time;
|
||||||
|
|
||||||
var runningLog;
|
var cls = loggerRunning ? 'true' : 'false';
|
||||||
if (this.replLogState.state.running === true) {
|
var runningLog = '<div class="' + cls + 'Class">' + cls + '</div>';
|
||||||
runningLog = '<div class="trueClass">true</div>';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
runningLog = '<div class="falseClass">false</div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
var clientString = '-';
|
||||||
if (this.replLogState.state.clients) {
|
if (this.replLogState.state.clients) {
|
||||||
$.each(this.replLogState.state.clients, function(k,v) {
|
$.each(this.replLogState.state.clients, function(k,v) {
|
||||||
clientString = clientString + "Server: "+v.serverId+" | Time: "+v.time+"\n";
|
clientString = clientString + "Server: " + v.serverId + " | Time: " + v.time + "\n";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,22 +134,17 @@ var dashboardView = Backbone.View.extend({
|
||||||
|
|
||||||
|
|
||||||
//apply table
|
//apply table
|
||||||
var lastAppliedTick;
|
var lastAppliedTick = "-";
|
||||||
var progress = "-";
|
var progress = "-";
|
||||||
var lastError = "-";
|
var lastError = "-";
|
||||||
var endpoint = "-";
|
var endpoint = "-";
|
||||||
|
var numRequests = "-";
|
||||||
|
var numFailed = "-";
|
||||||
|
|
||||||
if (this.replApplyState.state.lastAppliedContinuousTick === null) {
|
if (this.replApplyState.state.lastAppliedContinuousTick !== null) {
|
||||||
lastAppliedTick = this.replApplyState.state.lastAppliedInitialTick;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
lastAppliedTick = this.replApplyState.state.lastAppliedContinuousTick;
|
lastAppliedTick = this.replApplyState.state.lastAppliedContinuousTick;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastAppliedTick === null) {
|
|
||||||
lastAppliedTick = "-";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.replApplyState.state.endpoint !== undefined) {
|
if (this.replApplyState.state.endpoint !== undefined) {
|
||||||
endpoint = this.replApplyState.state.endpoint;
|
endpoint = this.replApplyState.state.endpoint;
|
||||||
}
|
}
|
||||||
|
@ -167,22 +158,21 @@ var dashboardView = Backbone.View.extend({
|
||||||
if (this.replApplyState.state.lastError) {
|
if (this.replApplyState.state.lastError) {
|
||||||
lastError = this.replApplyState.state.lastError.errorMessage;
|
lastError = this.replApplyState.state.lastError.errorMessage;
|
||||||
}
|
}
|
||||||
var runningApply;
|
|
||||||
if (this.replApplyState.state.running === true) {
|
|
||||||
runningApply = '<div class="trueClass">true</div>';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
runningApply = '<div class="falseClass">false</div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
cls = applierRunning ? 'true' : 'false';
|
||||||
|
var runningApply = '<div class="' + cls + 'Class">' + cls + '</div>';
|
||||||
|
|
||||||
|
numRequests = this.replApplyState.state.totalRequests || 0;
|
||||||
|
numFailed = this.replApplyState.state.totalFailedConnects || 0;
|
||||||
|
|
||||||
$('#applyRunningVal').html(runningApply);
|
$('#applyRunningVal').html(runningApply);
|
||||||
$('#applyEndpointVal').text(endpoint);
|
$('#applyEndpointVal').text(endpoint);
|
||||||
$('#applyLastAppliedTickVal').text(lastAppliedTick);
|
$('#applyLastAppliedTickVal').text(lastAppliedTick);
|
||||||
$('#applyTimeVal').text(time);
|
$('#applyTimeVal').text(time);
|
||||||
$('#applyProgressVal').text(progress);
|
$('#applyProgressVal').text(progress);
|
||||||
|
$('#applyTotalRequestsVal').text(numRequests);
|
||||||
|
$('#applyTotalFailedVal').text(numFailed);
|
||||||
$('#applyLastErrorVal').text(lastError);
|
$('#applyLastErrorVal').text(lastError);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|
Loading…
Reference in New Issue