NIHVIVO-336 Create StartupStatusDisplayFilter which will forcibly display the StartupStatus if there are warnings or errors.
This commit is contained in:
parent
e6b4238019
commit
39dc9736a2
3 changed files with 184 additions and 0 deletions
|
@ -0,0 +1,77 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#--
|
||||
Template for the raw page that displays the StartupStatus if there
|
||||
are warnings or errors.
|
||||
|
||||
"raw" because this template works outside of the usual framework, in
|
||||
case the Freemarker context didn't initialize properly.
|
||||
-->
|
||||
|
||||
<#macro statusItem item>
|
||||
<#if item.level = "FATAL">
|
||||
<#assign color = "error" >
|
||||
<#elseif item.level = "WARNING">
|
||||
<#assign color = "warning" >
|
||||
<#elseif item.level = "INFO">
|
||||
<#assign color = "info" >
|
||||
<#elseif item.level = "NOT_EXECUTED">
|
||||
<#assign color = "not_executed" >
|
||||
<#else>
|
||||
<#assign color = "" >
|
||||
</#if>
|
||||
<tr><td>
|
||||
<table cellspacing="0" class="item ${color}">
|
||||
<tr class="top">
|
||||
<td width="20%">${item.level}</td>
|
||||
<td>${item.shortSourceName}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">${item.message}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">${item.sourceName}</td>
|
||||
</tr>
|
||||
<#if item.cause??>
|
||||
<tr>
|
||||
<td colspan="2">${item.cause}</td>
|
||||
</tr>
|
||||
</#if>
|
||||
</table>
|
||||
</td></tr>
|
||||
</#macro>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Startup Status</title>
|
||||
<link rel="stylesheet" type="text/css" href="./css/startupStatus.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<#if status.errorItems?has_content>
|
||||
<h2>Fatal error</h2>
|
||||
<p>VIVO detected a fatal error during startup.</p>
|
||||
<p><a href=".">Continue</a></p>
|
||||
<#list status.errorItems as item>
|
||||
<@statusItem item=item />
|
||||
</#list>
|
||||
</#if>
|
||||
|
||||
<#if status.warningItems?has_content>
|
||||
<h2>Warning</h2>
|
||||
<p>VIVO issued warnings during startup.</p>
|
||||
<p><a href=".">Continue</a></p>
|
||||
<#list status.warningItems as item>
|
||||
<@statusItem item=item />
|
||||
</#list>
|
||||
</#if>
|
||||
|
||||
<h2>Startup trace</h2>
|
||||
<p>The full list of startup events and messages.</p>
|
||||
<table cellspacing="0" class="trace">
|
||||
<#list status.statusItems as item>
|
||||
<@statusItem item=item />
|
||||
</#list>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue