VIVO-541 First cut at the developer panel.

This commit is contained in:
j2blake 2013-11-17 11:50:06 -05:00
parent 35251e89f4
commit 0fce9f6a7b
21 changed files with 762 additions and 139 deletions

View file

@ -0,0 +1,5 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<div id="developerPanel" > </div>
<script>developerAjaxUrl = '${urls.developerAjax}'</script>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/developer/developerPanel.js"></script>')}

View file

@ -0,0 +1,91 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#macro showCheckbox key>
<input type="checkbox" id="${key}" <#if settings[key]>checked</#if>>
</#macro>
<#macro showTextbox key>
<input type="text" id="${key}" size="40" value="${settings[key]}" >
</#macro>
<style>
div.developer {
background-color: red;
padding: 0px 10px 0px 10px;
font-size: small;
font-variant: small-caps;
}
div.developer #developerPanelBody {
display: none;
}
div.developer .container {
border: thin groove black
}
</style>
<#if !settings["developer.enabled"]>
<#elseif !settings["mayControl"]>
<div class="developer">
<h1>${siteName} is running in developer mode.</h1>
</div>
<#else>
<div class="developer">
<h1 id="developerPanelClickMe">${siteName} is running in developer mode.
<span id="developerPanelClickText">(click for Options)</span>
</h1>
<div id="developerPanelBody">
<form>
<label>
<@showCheckbox "developer.enabled" />
Enable developer mode
</label>
<div class="container">
Freemarker templates
<label>
<@showCheckbox "developer.defeatFreemarkerCache" />
Defeat the template cache
</label>
<label>
<@showCheckbox "developer.insertFreemarkerDelimiters" />
Insert HTML comments at start and end of templates
</label>
</div>
<div class="container">
SPARQL Queries
<label>
<@showCheckbox "developer.loggingRDFService.enable" />
Log each query
</label>
<label>
<@showCheckbox "developer.loggingRDFService.stackTrace" />
Add stack trace
</label>
<label>
Restrict by calling stack
<@showTextbox "developer.loggingRDFService.restriction" />
</label>
</div>
<div class="container">
Language support
<label>
<@showCheckbox "developer.i18n.defeatCache" />
Defeat the cache of language property files
</label>
<label>
<@showCheckbox "developer.i18n.logStringRequests" />
Log the retrieval of language strings
</label>
</div>
<input type="button" id="developerPanelSaveButton" value="Save Settings" name="foo" />
</form>
</div>
</div>
</#if>

View file

@ -1,5 +1,7 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#include "developer.ftl">
<nav role="navigation">
<ul id="main-nav" role="list">
<#list menu.items as item>