mirror of https://gitee.com/bigwinds/arangodb
fixed replication status display
This commit is contained in:
parent
444a110b72
commit
8c35c4ff14
|
@ -50,12 +50,12 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="alignLeft" id="logRunning">Running</th>
|
<td class="alignLeft" id="logRunning">Running</td>
|
||||||
<th id="logRunningVal"></th>
|
<td id="logRunningVal"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="alignLeft" id="logLastTick">Last log tick</th>
|
<td class="alignLeft" id="logLastTick">Last log tick</td>
|
||||||
<th id="logLastTickVal"></th>
|
<td id="logLastTickVal"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -67,33 +67,27 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>State</th>
|
<th>State</th>
|
||||||
<th>Value</th>
|
<th>Value</th>
|
||||||
<th>Info</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="alignLeft" id="applyRunning">Running</th>
|
<td class="alignLeft" id="applyRunning">Running</td>
|
||||||
<th id="applyRunningVal"></th>
|
<td id="applyRunningVal"></td>
|
||||||
<th>--</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="alignLeft" id="applyLastTick">Last processed tick</th>
|
<td class="alignLeft" id="applyLastTick">Last applied tick</th>
|
||||||
<th id="applyLastTickVal"></th>
|
<td id="applyLastAppliedTickVal"></td>
|
||||||
<th>--</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="checkApplyRunningStatus">
|
<tr class="checkApplyRunningStatus">
|
||||||
<th class="alignLeft" id="applyCurrentPhase">Current phase</th>
|
<td class="alignLeft" id="applyCurrentPhase">Current phase</td>
|
||||||
<th id="applyCurrentPhaseId"></th>
|
<td id="applyCurrentPhaseLabel"></td>
|
||||||
<th id="applyCurrentPhaseLabel"></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="checkApplyRunningStatus">
|
<tr class="checkApplyRunningStatus">
|
||||||
<th class="alignLeft" id="applyProgress">Progress</th>
|
<td class="alignLeft" id="applyProgress">Progress</td>
|
||||||
<th id="applyProgressVal"></th>
|
<td id="applyProgressVal"></td>
|
||||||
<th>--</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="checkApplyRunningStatus">
|
<tr class="checkApplyRunningStatus">
|
||||||
<th class="alignLeft" id="applyLastError">Last error</th>
|
<td class="alignLeft" id="applyLastError">Last error</td>
|
||||||
<th id="applyLastErrorTime"></th>
|
<td id="applyLastError"></td>
|
||||||
<th id="applyLastErrorErrorNum"></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -98,7 +98,7 @@ var dashboardView = Backbone.View.extend({
|
||||||
},
|
},
|
||||||
putReplicationStatus: function () {
|
putReplicationStatus: function () {
|
||||||
|
|
||||||
if (this.replApplyState.running === true) {
|
if (this.replApplyState.state.running === true) {
|
||||||
$('#detailReplication').height(290);
|
$('#detailReplication').height(290);
|
||||||
$('.checkApplyRunningStatus').show();
|
$('.checkApplyRunningStatus').show();
|
||||||
}
|
}
|
||||||
|
@ -111,26 +111,40 @@ var dashboardView = Backbone.View.extend({
|
||||||
$('#logLastTickVal').text(this.replLogState.state.lastLogTick);
|
$('#logLastTickVal').text(this.replLogState.state.lastLogTick);
|
||||||
|
|
||||||
//apply table
|
//apply table
|
||||||
var convertedProgressTime;
|
var lastAppliedTick;
|
||||||
var convertedLastErrorTime;
|
var phase = "-";
|
||||||
var convertedLastTick;
|
var progress = "-";
|
||||||
if (this.replApplyState.state.progress.time === '') {
|
var lastError = "-";
|
||||||
convertedProgressTime = 'n/A';
|
|
||||||
|
if (this.replApplyState.state.lastAppliedContinuousTick === null) {
|
||||||
|
lastAppliedTick = this.replApplyState.state.lastAppliedInitialTick;
|
||||||
}
|
}
|
||||||
if (this.replApplyState.state.lastError.time === '') {
|
else {
|
||||||
convertedLastErrorTime = 'n/A';
|
lastAppliedTick = this.replApplyState.state.lastAppliedContinuousTick;
|
||||||
}
|
}
|
||||||
if (this.replApplyState.state.lastProcessedContinuousTick === null) {
|
|
||||||
convertedLastTick = 0;
|
if (lastAppliedTick === null) {
|
||||||
|
lastAppliedTick = "-";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.replApplyState.state.currentPhase) {
|
||||||
|
phase = this.replApplyState.state.currentPhase.label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.replApplyState.state.progress) {
|
||||||
|
progress = this.replApplyState.state.progress.message;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.replApplyState.state.lastError) {
|
||||||
|
lastError = this.replApplyState.state.lastError.errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$('#applyRunningVal').text(this.replApplyState.state.running);
|
$('#applyRunningVal').text(this.replApplyState.state.running);
|
||||||
$('#applyLastTickVal').text(convertedLastTick);
|
$('#applyLastAppliedTickVal').text(lastAppliedTick);
|
||||||
$('#applyCurrentPhaseId').text(this.replApplyState.state.currentPhase.id);
|
$('#applyCurrentPhaseLabel').text(phase);
|
||||||
$('#applyCurrentPhaseLabel').text(this.replApplyState.state.currentPhase.label);
|
$('#applyProgressVal').text(progress);
|
||||||
$('#applyProgressVal').text(convertedProgressTime);
|
$('#applyLastError').text(lastError);
|
||||||
$('#applyLastErrorTime').text(convertedLastErrorTime);
|
|
||||||
$('#applyLastErrorErrorNum').text(this.replApplyState.state.lastError.errorNum);
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue