Skip to content
Open
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>
<groupId>org.entando.entando</groupId>
<artifactId>entando-admin-console</artifactId>
<version>6.5.3</version>
<version>6.5.4</version>
<packaging>war</packaging>
<name>Entando Core: Administration Console</name>
<description>Entando Administration Console: an agile, modern and user-centric open source Portal platform.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ name.editor.hoofed=Hoofed (moo-Entando component)
message.reloadConfig.ok=The configuration has been reloaded
message.reloadConfig.warning=Some services reported an error during the reload
message.reloadConfig.ko=Something went wrong while reloading the configuration. Try again in a minute.
message.reload.connectionError=The connection to the server was lost. The reload may still be running. Please check the result manually.
message.reloadEntities.ok=Reloading Entity references
message.configSystemParams.ok=The settings have been updated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ name.editor.hoofed=Hoofed (fa parte di moo-Entando)
message.reloadConfig.ok=La configurazione di sistema &egrave; stata ricaricata
message.reloadConfig.warning=Durante il ricaricamento alcuni servizi hanno riportato un errore
message.reloadConfig.ko=Non &egrave; stato possibile ricaricare la configurazione di sistema
message.reload.connectionError=La connessione con il server &egrave; stata interrotta. Il ricaricamento potrebbe essere ancora in corso. Verificare il risultato manualmente.
message.reloadEntities.ok=Il ricaricamento delle referenze delle Entit&agrave; &egrave; in corso
message.configSystemParams.ok=I cambiamenti sono stati salvati

Expand All @@ -30,4 +31,4 @@ reload.table.head.status=Stato
reload.bean.status.ok=Successo
reload.bean.status.ko=ERRORE

reload.legend.info=le informazioni mostrate dipendono da come il servizio è stato implementato. Eventuali errori interni potrebbero non essere riportati in questa schermata, ma sono visibili solo a livello di log.
reload.legend.info=le informazioni mostrate dipendono da come il servizio � stato implementato. Eventuali errori interni potrebbero non essere riportati in questa schermata, ma sono visibili solo a livello di log.
50 changes: 40 additions & 10 deletions src/main/webapp/WEB-INF/apsadmin/jsp/admin/reloadProgress.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<div class="text-center">
<wp:ifauthorized permission="superuser">
<i class="fa fa-question esclamation-big" aria-hidden="true"></i>
<p class="esclamation-underline"><s:text name="menu.reload.verify"/></p>
<p class="esclamation-underline">
<s:text name="menu.reload.verify"/>
</p>
<p>
<s:text name="label.reload.message.check"/>
</p>
Expand All @@ -15,11 +17,23 @@
<s:text name="label.reload.check" />
</a>
</div>
<div>
<h3 id="show-reload-progress">
<s:text name="label.reload.progress"/>:&nbsp;
<b><s:property value="%{getReloadProgress()}"/>%</b>
</h3>
<div id="show-reload-progress" style="max-width: 480px; margin: 20px auto 0;">
<p style="margin-bottom: 6px;">
<s:text name="label.reload.progress"/>
<i id="reload-spinner" class="fa fa-spinner fa-spin" aria-hidden="true" style="display:none; margin-left: 6px;"></i>
</p>
<div class="progress progress-striped active" title="0%">
<div id="reload-progress-bar" class="progress-bar" role="progressbar"
aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"
style="width: 0%; min-width: 2em;">

Check warning on line 28 in src/main/webapp/WEB-INF/apsadmin/jsp/admin/reloadProgress.jsp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use <progress> instead of the progressbar role to ensure accessibility across all devices.

See more on https://sonarcloud.io/project/issues?id=entando_entando-admin-console&issues=AZ6x3o-47F7GSoapZ-_N&open=AZ6x3o-47F7GSoapZ-_N&pullRequest=191
<span id="reload-progress-label">0%</span>
</div>
</div>
<div id="reload-connection-error" class="alert alert-danger" style="display:none; margin-top: 16px; text-align: left;">
<span class="pficon pficon-error-circle-o"></span>
<strong><s:text name="messages.error" /></strong>&#32;&ndash;
<s:text name="message.reload.connectionError" />
</div>
</div>

</wp:ifauthorized>
Expand All @@ -29,27 +43,43 @@
$(document).ready(function () {
let reloadUrl = "<s:url namespace='/do/BaseAdmin' action='reloadStatusJson' />";

function updateBar(pct) {
$('#reload-progress-bar').css('width', pct + '%').attr('aria-valuenow', pct);
$('#reload-progress-label').text(pct + '%');
$('#show-reload-progress .progress').attr('title', pct + '%');
}

function showConnectionError() {
clearInterval(pollInterval);
$('#reload-progress-bar').removeClass('active');
$('#show-reload-progress .progress').removeClass('active');
$('#reload-connection-error').show();
}

function refreshProgress() {
$('#reload-spinner').show();
$.getJSON(reloadUrl, function (data) {
let progress = parseInt(data, 10);

if (!isNaN(progress)) {
if (progress === -1) {
$('#show-reload-progress b').text('100%');
updateBar(100);
window.location.href = $('#link-reload-action').attr('href');
} else {
$('#show-reload-progress b').text(progress + '%');
updateBar(progress);
}
} else {
console.warn('NaN, leaving...');
window.location.href = $('#link-reload-action').attr('href');
}
}).fail(function (jqxhr, textStatus, error) {
console.error('AJAX error:', textStatus, error);
showConnectionError();
}).always(function () {
$('#reload-spinner').hide();
});
}

refreshProgress();
setInterval(refreshProgress, 2000);
let pollInterval = setInterval(refreshProgress, 2000);
});
</script>
Loading