From a24e2b691c391ed5ac2e17e82164de1dde5d9dad Mon Sep 17 00:00:00 2001 From: j2blake Date: Fri, 23 Sep 2011 18:57:44 +0000 Subject: [PATCH] NIHVIVO-336 Create StartupStatusController, so admins can see the startup status from a link on the site admin page. --- .../body/admin/startupStatus-display.ftl | 72 +++++++++++++++++++ .../siteAdmin/siteAdmin-siteConfiguration.ftl | 5 +- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 webapp/web/templates/freemarker/body/admin/startupStatus-display.ftl diff --git a/webapp/web/templates/freemarker/body/admin/startupStatus-display.ftl b/webapp/web/templates/freemarker/body/admin/startupStatus-display.ftl new file mode 100644 index 000000000..e76332f7b --- /dev/null +++ b/webapp/web/templates/freemarker/body/admin/startupStatus-display.ftl @@ -0,0 +1,72 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- + Template for the page that displays the StartupStatus on request. + + Unlike the "raw" page, this one assumes that the usual Freemarker framework is in place. +--> + +<#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 item.cause??> + + + + +
${item.level}${item.shortSourceName}
${item.message}
${item.sourceName}
${item.cause}
+ + + +${stylesheets.add('')} + +<#if status.errorItems?has_content> +

Fatal error

+

VIVO detected a fatal error during startup.

+

+ Continue +

+ <#list status.errorItems as item> + <@statusItem item=item /> + + + +<#if status.warningItems?has_content> +

Warning

+

VIVO issued warnings during startup.

+

+ Continue +

+ <#list status.warningItems as item> + <@statusItem item=item /> + + + +

Startup trace

+

The full list of startup events and messages.

+ + <#list status.statusItems as item> + <@statusItem item=item /> + +
diff --git a/webapp/web/templates/freemarker/body/siteAdmin/siteAdmin-siteConfiguration.ftl b/webapp/web/templates/freemarker/body/siteAdmin/siteAdmin-siteConfiguration.ftl index 18a10942b..d744eaaed 100644 --- a/webapp/web/templates/freemarker/body/siteAdmin/siteAdmin-siteConfiguration.ftl +++ b/webapp/web/templates/freemarker/body/siteAdmin/siteAdmin-siteConfiguration.ftl @@ -17,12 +17,15 @@ <#if siteConfig.internalClass?has_content>
  • Institutional internal class
  • - <#if siteConfig.userAccounts?has_content>
  • User accounts
  • + + <#if siteConfig.startupStatus?has_content> +
  • Startup Status
  • + \ No newline at end of file