by-by old junk.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3131 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
8fd59c8823
commit
9ca8e345fc
|
|
@ -1,80 +0,0 @@
|
|||
<#-- a couple of basic fields we use-->
|
||||
<#assign colWidth=20>
|
||||
<#assign colTextWidth=17>
|
||||
<#assign currentAnalysis="">
|
||||
|
||||
Report,${root.value}
|
||||
Description,${root.description}
|
||||
|
||||
<#list root.children as analysis>
|
||||
<#if analysis.complex>
|
||||
<#if analysis.value!=currentAnalysis>
|
||||
<#assign currentAnalysis=analysis.value>
|
||||
|
||||
Analysis,${analysis.value}
|
||||
|
||||
<@emit_tags analysis=analysis/>
|
||||
<@emit_column_names analysis=analysis/>
|
||||
|
||||
</#if>
|
||||
<@emit_row_values analysis=analysis/>
|
||||
</#if>
|
||||
</#list>
|
||||
<#-- -------------------- -->
|
||||
<#-- get the data tag values -->
|
||||
<#macro emit_row_values analysis>
|
||||
<#list analysis.tableRows as rows>
|
||||
<@emit_tag_values analysis=analysis/>
|
||||
<#list rows as node>
|
||||
<#if (node.value?length > colTextWidth)>
|
||||
<#lt>${node.value},<#rt>
|
||||
<#else>
|
||||
<#lt>${node.value},<#rt>
|
||||
</#if>
|
||||
</#list>
|
||||
|
||||
</#list>
|
||||
</#macro>
|
||||
<#-- -------------------- -->
|
||||
<#-- get the column names -->
|
||||
<#macro emit_column_names analysis>
|
||||
<#if analysis.complex && analysis.display>
|
||||
<#list analysis.children as child>
|
||||
<#if child.complex && !child.table>
|
||||
<@emit_name value=child.value/>
|
||||
<#elseif child.table>
|
||||
<#list child.children as rows>
|
||||
<@emit_name value=rows.name/>
|
||||
<#list rows.children as cols>
|
||||
<@emit_name value=cols.value/>
|
||||
</#list>
|
||||
<#break>
|
||||
</#list>
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
</#macro>
|
||||
<#-- -------------------- -->
|
||||
<#-- get the tag values -->
|
||||
<#macro emit_tag_values analysis>
|
||||
<#list analysis.children as child>
|
||||
<#if child.tag>
|
||||
<@emit_name value=child.value/>
|
||||
</#if>
|
||||
</#list>
|
||||
</#macro>
|
||||
<#-- -------------------- -->
|
||||
<#-- get the tag names -->
|
||||
<#macro emit_tags analysis>
|
||||
<#list analysis.children as child>
|
||||
<#if child.tag>
|
||||
<@emit_name value=child.name/>
|
||||
</#if>
|
||||
</#list>
|
||||
</#macro>
|
||||
|
||||
<#-- -------------------- -->
|
||||
<#-- a macro for cleaning up emitted names -->
|
||||
<#macro emit_name value>
|
||||
<#lt>${value},<#rt>
|
||||
</#macro>
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
<#list root.children as analysis>
|
||||
<#if analysis.display && !analysis.tag>
|
||||
<@recurse_macro node=analysis prefix=get_tags(analysis)/>
|
||||
</#if>
|
||||
</#list>
|
||||
<#-- ------------------- -->
|
||||
<#-- Table display macro -->
|
||||
<#macro displayTable table>
|
||||
${table.name}
|
||||
<#list table.rows as row>
|
||||
<#compress>
|
||||
<#list row as item>
|
||||
${item},
|
||||
</#list>
|
||||
</#compress>
|
||||
</#list>
|
||||
</#macro>
|
||||
<#function get_tags rootnode>
|
||||
<#assign ret="">
|
||||
<#list rootnode.children as child>
|
||||
<#if child.tag>
|
||||
<#if ret=="">
|
||||
<#assign ret="[${child.name}=${child.value}]">
|
||||
<#else>
|
||||
<#assign ret="${ret}.[${child.name}=${child.value}]">
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
<#return ret>
|
||||
</#function>
|
||||
<#-- -------------------- -->
|
||||
<#-- recursively get data -->
|
||||
<#macro recurse_macro node prefix>
|
||||
<#if node.display> <#-- we don't display it if the value isn't set -->
|
||||
<#compress>
|
||||
<#if node.complex>
|
||||
<#list node.children as child>
|
||||
<#if prefix=="">
|
||||
<#assign newPrefix="[${node.name}=${node.value}]">
|
||||
<#else>
|
||||
<#assign newPrefix="${prefix}.[${node.name}=${node.value}]">
|
||||
</#if>
|
||||
<@recurse_macro node=child prefix=newPrefix/>
|
||||
</#list>
|
||||
<#elseif node.display && !node.tag>
|
||||
${prefix} ${node.value}
|
||||
<#assign prefix="">
|
||||
</#if>
|
||||
</#compress>
|
||||
</#if>
|
||||
</#macro>
|
||||
<#-- ------------------------------------- -->
|
||||
<#-- display a list of single values macro -->
|
||||
<#macro displaySimple listof>
|
||||
<#list listof as point>
|
||||
${point.name?right_pad(20)} <@recurse_macro node=point/> # ${point.description}
|
||||
</#list>
|
||||
</#macro>
|
||||
<#-- ------------------------------------- -->
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
<#-- a couple of basic fields we use-->
|
||||
<#assign colWidth=20>
|
||||
<#assign colTextWidth=17>
|
||||
<#assign currentAnalysis="">
|
||||
|
||||
Report: ${root.value}
|
||||
Description: ${root.description}
|
||||
|
||||
<#-- get any tags on the root node (any information we've tagged the report with) -->
|
||||
<#list root.children as tagNode>
|
||||
<#if tagNode.tag>
|
||||
Tag: ${tagNode.name} = ${tagNode.value}
|
||||
</#if>
|
||||
</#list>
|
||||
|
||||
<#list root.childresn as analysis>
|
||||
<#if analysis.complex>
|
||||
<#if analysis.value!=currentAnalysi>
|
||||
<#assign currentAnalysis=analysis.value>
|
||||
|
||||
Analysis: ${analysis.value}
|
||||
|
||||
Column names specific to the analysis:
|
||||
<@emit_column_names_with_descriptions analysis=analysis/>
|
||||
|
||||
|
||||
<@emit_tables analysis=analysis/>
|
||||
|
||||
<@emit_tags analysis=analysis/>
|
||||
<@emit_column_names analysis=analysis/>
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------------------------
|
||||
</#if>
|
||||
<@emit_row_values analysis=analysis/>
|
||||
</#if>
|
||||
</#list>
|
||||
<#-- -------------------- -->
|
||||
<#-- emit only tables -->
|
||||
<#macro emit_tables analysis>
|
||||
<#if analysis.complex && !analysis.tag>
|
||||
<#list analysis.children as child>
|
||||
<#if child.table>
|
||||
<@emit_tags analysis=analysis/>
|
||||
<#list child.tableRows as rows>
|
||||
<@emit_tag_values analysis=analysis/>
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------------------------
|
||||
<#list rows as node>
|
||||
<@emit_name value=node.value/>
|
||||
</#list>
|
||||
|
||||
</#list>
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
</#macro>
|
||||
<#-- -------------------- -->
|
||||
<#-- get the data tag values -->
|
||||
<#macro emit_row_values analysis>
|
||||
<#list analysis.tableRowsNoTables as rows>
|
||||
<@emit_tag_values analysis=analysis/>
|
||||
<#list rows as node>
|
||||
<@emit_name value=node.value/>
|
||||
</#list>
|
||||
|
||||
</#list>
|
||||
</#macro>
|
||||
<#-- -------------------- -->
|
||||
<#-- get the column names -->
|
||||
<#macro emit_column_names analysis>
|
||||
<#if analysis.complex && !analysis.tag>
|
||||
<#list analysis.children as child>
|
||||
<#if child.complex && !child.table>
|
||||
<@emit_name value=child.value/>
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
</#macro>
|
||||
<#-- -------------------- -->
|
||||
<#-- get the column names to display at the top of the analysis -->
|
||||
<#macro emit_column_names_with_descriptions analysis>
|
||||
<#if analysis.complex && !analysis.tag>
|
||||
<#list analysis.children as child>
|
||||
<#if child.complex && !child.table>
|
||||
${child.value?right_pad(40)}${child.description}
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
</#macro>
|
||||
<#-- -------------------- -->
|
||||
<#-- get the tag values -->
|
||||
<#macro emit_tag_values analysis>
|
||||
<#list analysis.children as child>
|
||||
<#if child.tag>
|
||||
<@emit_name value=child.value/>
|
||||
</#if>
|
||||
</#list>
|
||||
</#macro>
|
||||
<#-- -------------------- -->
|
||||
<#-- get the tag names -->
|
||||
<#macro emit_tags analysis>
|
||||
<#list analysis.children as child>
|
||||
<#if child.tag>
|
||||
<@emit_name value=child.name/>
|
||||
</#if>
|
||||
</#list>
|
||||
</#macro>
|
||||
|
||||
<#-- -------------------- -->
|
||||
<#-- a macro for formatting emitted names -->
|
||||
<#macro emit_name value>
|
||||
<#if (value?length > colTextWidth)>
|
||||
<#lt>${(value?substring(0, colTextWidth)+"..")?right_pad(colWidth)}<#rt>
|
||||
<#else>
|
||||
<#lt>${value?right_pad(colWidth)}<#rt>
|
||||
</#if>
|
||||
</#macro>
|
||||
Loading…
Reference in New Issue