Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ function refresh() {
refreshTable(queuesHtmlTable, COORDINATOR_QUEUE_PROCESS_VIEW);
ajaxReloadTable(tableRunning);
ajaxReloadTable(queueRunning);
$(coordinatorHtmlTable).hide();
$(queuesHtmlTable).hide();
$(runningTableHtmlTable).hide();
$(runningQueueHtmlTable).hide();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,46 +290,36 @@ $(function () {
}
});

refreshManagerStatus();
refreshRunningCompactions();
});

/**
* Used to redraw the page
*/
function refresh() {
refreshManagerStatus();
refreshRunningCompactions();
}

/**
* Refreshes the running compactions
*/
function refreshRunningCompactions() {
refreshManagerStatus().then(function (managerStatus) {
// tables will not be shown, avoid reloading
if (managerStatus === 'ERROR') {
return;
}

// user paging is not reset on reload
ajaxReloadTable(runningTable);
});
// user paging is not reset on reload
ajaxReloadTable(runningTable);
}

/**
* Updates session storage then checks if the manager is running. If it is,
* show the tables and hide the 'manager not running' banner. Else, vice-versa.
* Updates session storage then checks if the manager is running and updates the banner.
*/
async function refreshManagerStatus() {
return getStatus().then(function () {
var managerStatus = getComponentStatus(getStoredStatusData(), 'MANAGER');
if (managerStatus === 'ERROR') {
// show banner and hide tables
$('#managerBanner').show();
$('#runningDiv').hide();
} else {
// otherwise, hide banner and show tables
$('#managerBanner').hide();
$('#runningDiv').show();
}
return managerStatus;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,9 @@ function updateManagerGoalStateBanner() {
function refreshManagerBanners() {
var managerRows = getStoredRows(MANAGER_SERVER_PROCESS_VIEW);
if (!Array.isArray(managerRows) || managerRows.length === 0) {
// show the manager error banner and hide manager table
$(runningBanner).show();
$(htmlTable).hide();
$(fateHtmlTable).hide();
} else {
// otherwise, hide the error banner and show manager table
$(runningBanner).hide();
$(fateHtmlTable).show();
$(htmlTable).show();
}
updateManagerGoalStateBanner();
}
Expand All @@ -74,8 +68,6 @@ function refresh() {
refreshTable(htmlTable, MANAGER_SERVER_PROCESS_VIEW);
refreshTable(fateHtmlTable, MANAGER_FATE_SERVER_PROCESS_VIEW);
$(runningBanner).show();
$(htmlTable).hide();
$(fateHtmlTable).hide();
$(managerStateBanner).hide();
showBannerError(htmlBanner, htmlBannerMessage);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ function getReplaying() {
return getStoredView(RECOVERY).serversRecoveringTablets;
}

function showOrHide(divElement, dataArray) {
if (dataArray.length == 0) {
$(divElement).hide();
} else {
$(divElement).show();
}
}

function refresh() {
$.when(getRecoveryInformation()).then(function () {
ajaxReloadTable(overviewDataTable);
Expand All @@ -82,10 +74,6 @@ function refresh() {
ajaxReloadTable(sortingDataTable);
ajaxReloadTable(replayingDataTable);
});
showOrHide(overviewTableDivElement, getOverview());
showOrHide(tabletRecoveryDivElement, getTablets());
showOrHide(sortingServersDivElement, getSorting());
showOrHide(replayingServersDivElement, getReplaying());
}

$(function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ function refreshTServersBanner() {
if (getComponentStatus(statusData, 'MANAGER') === 'ERROR') {
$('#tserversManagerBanner').show();
$(htmlBanner).hide();
$('#tservers_wrapper').hide();
$('#recovery-caption').hide();
} else {
$('#tserversManagerBanner').hide();
$('#tservers_wrapper').show();
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<h3>${title}</h3>
</div>
</div>
<div id="runningDiv" style="display: none;">
<div id="runningDiv">
<div class="row">
<div class="col-xs-12">
<table id="runningTable" class="table caption-top table-bordered table-striped table-condensed">
Expand Down