mirror of https://github.com/apache/archiva.git
[MRM-1580] system status page button to refresh all stats.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1299909 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
40750437f3
commit
37d0206e9f
|
@ -593,6 +593,8 @@ $(function() {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
displayCacheEntries=function(){
|
displayCacheEntries=function(){
|
||||||
var divContent = $("#main-content #status_caches");
|
var divContent = $("#main-content #status_caches");
|
||||||
divContent.html(smallSpinnerImg());
|
divContent.html(smallSpinnerImg());
|
||||||
|
@ -684,6 +686,32 @@ $(function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
displayQueueEntries=function(){
|
||||||
|
var divContent = $("#main-content #status_queues");
|
||||||
|
divContent.html(smallSpinnerImg());
|
||||||
|
$.ajax("restServices/archivaServices/systemStatusService/queueEntries", {
|
||||||
|
type: "GET",
|
||||||
|
success: function(data){
|
||||||
|
var queueEntries=mapQueueEntries(data);
|
||||||
|
divContent.html($("#status_queues_tmpl" ).tmpl({queueEntries: queueEntries}));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
displayServerTime=function(){
|
||||||
|
var divContent = $("#main-content #status_current_time");
|
||||||
|
divContent.html(smallSpinnerImg());
|
||||||
|
$.ajax("restServices/archivaServices/systemStatusService/currentServerTime/"+encodeURIComponent(usedLang()), {
|
||||||
|
type: "GET",
|
||||||
|
dataType: "text",
|
||||||
|
success: function(data){
|
||||||
|
var curTime=data;
|
||||||
|
$.log("currentServerTime:"+curTime);
|
||||||
|
divContent.html(curTime);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
displaySystemStatus=function(){
|
displaySystemStatus=function(){
|
||||||
screenChange();
|
screenChange();
|
||||||
var mainContent=$("#main-content");
|
var mainContent=$("#main-content");
|
||||||
|
@ -695,29 +723,22 @@ $(function() {
|
||||||
|
|
||||||
displayMemoryUsage();
|
displayMemoryUsage();
|
||||||
|
|
||||||
$.ajax("restServices/archivaServices/systemStatusService/currentServerTime/"+encodeURIComponent(usedLang()), {
|
displayServerTime();
|
||||||
type: "GET",
|
|
||||||
dataType: "text",
|
|
||||||
success: function(data){
|
|
||||||
var curTime=data;
|
|
||||||
$.log("currentServerTime:"+curTime);
|
|
||||||
mainContent.find("#status_current_time").html(curTime);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$.ajax("restServices/archivaServices/systemStatusService/queueEntries", {
|
displayQueueEntries();
|
||||||
type: "GET",
|
|
||||||
success: function(data){
|
|
||||||
var queueEntries=mapQueueEntries(data);
|
|
||||||
mainContent.find("#status_queues").html($("#status_queues_tmpl" ).tmpl({queueEntries: queueEntries}));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
displayScanningStats();
|
displayScanningStats();
|
||||||
|
|
||||||
displayCacheEntries();
|
displayCacheEntries();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refreshSystemStatus=function(){
|
||||||
|
displayCacheEntries();
|
||||||
|
displayScanningStats();
|
||||||
|
displayMemoryUsage();
|
||||||
|
displayQueueEntries();
|
||||||
|
displayServerTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
|
@ -312,7 +312,7 @@
|
||||||
<script id="system-status-main" type="text/html">
|
<script id="system-status-main" type="text/html">
|
||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h3>${$.i18n.prop('system-status.header.main')}</h3>
|
<h3>${$.i18n.prop('system-status.header.main')} <a href="#" onclick="refreshSystemStatus()"><img src="images/view-refresh-22-22.png"/></a></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h4>${$.i18n.prop('system-status.header.queues')}</h4>
|
<h4>${$.i18n.prop('system-status.header.queues')}</h4>
|
||||||
|
|
Loading…
Reference in New Issue