git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1299619 13f79535-47bb-0310-9956-ffa450edef68tags/archiva-1.4-M3
@@ -68,6 +68,7 @@ | |||
<ref bean="searchService#rest"/> | |||
<ref bean="commonServices#rest"/> | |||
<ref bean="browseService#rest"/> | |||
<ref bean="systemStatusService#rest"/> | |||
</jaxrs:serviceBeans> | |||
<jaxrs:outInterceptors> |
@@ -457,8 +457,7 @@ $(function() { | |||
} | |||
displayRepositoryScanning=function(){ | |||
clearUserMessages(); | |||
screenChange(); | |||
var mainContent=$("#main-content"); | |||
mainContent.html($("#repository-scanning-main").tmpl()); | |||
@@ -537,6 +536,7 @@ $(function() { | |||
} | |||
displayNetworkConfiguration=function(){ | |||
screenChange(); | |||
var mainContent=$("#main-content"); | |||
mainContent.html($("#network-configuration-screen").tmpl()); | |||
@@ -561,4 +561,21 @@ $(function() { | |||
// system status part | |||
//--------------------------- | |||
displaySystemStatus=function(){ | |||
screenChange(); | |||
var mainContent=$("#main-content"); | |||
mainContent.html($("#system-status-main").tmpl()); | |||
mainContent.find("#status_memory_info" ).html(smallSpinnerImg()); | |||
$.ajax("restServices/archivaServices/systemStatusService/memoryStatus", { | |||
type: "GET", | |||
dataType: "text", | |||
success: function(data){ | |||
var memUsage = data; | |||
$.log("memUsage:"+memUsage); | |||
mainContent.find("#status_memory_info" ).html($("#memory-info-tmpl" ).tmpl({memoryUsage: memUsage})); | |||
} | |||
}); | |||
} | |||
}); |
@@ -102,6 +102,10 @@ $(function() { | |||
displayNetworkConfiguration(); | |||
return; | |||
} | |||
if (screen=='system-status'&& hasKarma('archiva-manage-configuration')){ | |||
displaySystemStatus(); | |||
return; | |||
} | |||
} | |||
// by default display search screen |
@@ -309,5 +309,53 @@ | |||
</form> | |||
</script> | |||
<script id="system-status-main" type="text/html"> | |||
<div class="page-header"> | |||
<h4>${$.i18n.prop('system-status.header.queues')}</h4> | |||
</div> | |||
<div id="status_queues"> | |||
Queues | |||
</div> | |||
<div class="page-header"> | |||
<h4>${$.i18n.prop('system-status.header.scanning')}</h4> | |||
</div> | |||
<div id="status_scanning"> | |||
repos scanning | |||
</div> | |||
<div class="page-header"> | |||
<h4>${$.i18n.prop('system-status.header.caches')}</h4> | |||
</div> | |||
<div id="status_caches"> | |||
caches | |||
</div> | |||
<div class="page-header"> | |||
<h4>${$.i18n.prop('system-status.header.memory')}</h4> | |||
</div> | |||
<div id="status_memory_info"> | |||
memory | |||
</div> | |||
<div class="page-header"> | |||
<h4>${$.i18n.prop('system-status.header.current.time')}</h4> | |||
</div> | |||
<div div="status_current_time"> | |||
current time | |||
</div> | |||
<div class="page-header"> | |||
<h4>${$.i18n.prop('system-status.header.version.info')}</h4> | |||
</div> | |||
<div id="status_version_info"> | |||
version info | |||
</div> | |||
</script> | |||
<div id="memory-info-tmpl"> | |||
${memoryUsage} | |||
</div> | |||
@@ -51,6 +51,9 @@ | |||
<li style="display: none" redback-permissions="{permissions: ['archiva-manage-configuration']}"> | |||
<a href="#" id="menu-network-configuration-list-a" onclick="displayNetworkConfiguration()">${$.i18n.prop('menu.network-configuration')}</a> | |||
</li> | |||
<li style="display: none" redback-permissions="{permissions: ['archiva-manage-configuration']}"> | |||
<a href="#" id="menu-system-status-list-a" onclick="displaySystemStatus()">${$.i18n.prop('menu.system-status')}</a> | |||
</li> | |||
</ul> |