All Downloads are FREE. Search and download functionalities are using the official Maven repository.

htmlTemplates.macros.ftl Maven / Gradle / Ivy

There is a newer version: 1.0.25
Show newest version
<#setting number_format="#">

<#macro currentScope>Current scope: <#if reportTitle?has_content>${reportTitle}|

<#macro coverageStatCell statEntry showEmpty=false>
<#if statEntry.percent >= 0>

  
    ${(statEntry.percent)?string("0.#")}%<#if statEntry.diff?has_content> <@showDiff diffValue=statEntry.diff.percentDiff>${statEntry.diff.percentDiff?string("0.##")}%
  
  
    (${statEntry.covered}<#if statEntry.diff?has_content
           > <@showDiff diffValue=statEntry.diff.coveredDiff>${statEntry.diff.coveredDiff}/${statEntry.total}<#if statEntry.diff?has_content
           ><@showDiff diffValue=statEntry.diff.totalDiff>${statEntry.diff.totalDiff})
  

<#else>
  <#if showEmpty>
    
  



<#macro showDiff diffValue showBrackets=false>
<#if diffValue > 0>
<#if showBrackets>(+<#nested/>)<#else>+<#nested/>

<#if diffValue < 0>
<#if showBrackets>(<#nested/>)<#else><#nested/>



<#macro coverageStatHeaderCell label statEntry sorted sortOption=sort_option_none showEmpty=false>
<#if statEntry.percent >= 0 || showEmpty>

  <#if !sorted && sortOption.name() == "NONE">${label}<#else><@sortableCellLabel label=label sortOption=sortOption/>




<#macro sortableCellClass sorted sortedDesc>
<#if sorted && sortedDesc>sortedDesc<#if sorted && !sortedDesc>sortedAsc


<#macro sortableCellLabel label sortOption>${label}

<#macro coverageStatRow coverageStatistics showForClass=true showEmptyBlocks=false>
<#if showForClass>
<@coverageStatCell statEntry=coverageStatistics.classStats/>

<@coverageStatCell statEntry=coverageStatistics.methodStats/>
<@coverageStatCell statEntry=coverageStatistics.blockStats showEmpty=showEmptyBlocks || resources['coverage.show.empty.blocks'] == "true"/>
<@coverageStatCell statEntry=coverageStatistics.lineStats/>
<@coverageStatCell statEntry=coverageStatistics.statementStats/>


<#macro coverageStatHeaderRow coverageStatistics sortOption=sort_option_none showForClass=true>
<#if showForClass>
<@coverageStatHeaderCell statEntry=coverageStatistics.classStats label="Class, %" sorted=sortOption.orderByClass() sortOption=sortOption.nextOrderByClass()/>

<@coverageStatHeaderCell statEntry=coverageStatistics.methodStats label="Method, %" sorted=sortOption.orderByMethod()  sortOption=sortOption.nextOrderByMethod()/>
<@coverageStatHeaderCell statEntry=coverageStatistics.blockStats label="${resources['coverage.block']?cap_first}, %" sorted=sortOption.orderByBlock()  sortOption=sortOption.nextOrderByBlock() showEmpty=resources['coverage.show.empty.blocks'] == "true"/>
<@coverageStatHeaderCell statEntry=coverageStatistics.lineStats label="Line, %" sorted=sortOption.orderByLine()  sortOption=sortOption.nextOrderByLine()/>
<@coverageStatHeaderCell statEntry=coverageStatistics.statementStats label="${resources['coverage.statement']?cap_first}, %" sorted=sortOption.orderByStatement()  sortOption=sortOption.nextOrderByStatement()/>


<#function ternaryOp condition positiveExpr negativeExpr>
  <#if condition><#return positiveExpr/>
  <#return negativeExpr/>


<#macro overallStatTable labelName labelValue coverageStatistics>

    <@coverageStatHeaderRow coverageStatistics=coverageStatistics/>
  
    <@coverageStatRow coverageStatistics=coverageStatistics/>
  
${labelName}
${labelValue}
<#macro moduleName module><#if module.empty><unknown ${resources['coverage.module']}><#else>${module.name?html} <#macro namespaceName namespace><#if namespace?length = 0><empty ${resources['coverage.namespace']} name><#else>${namespace?html} <#macro className clazz><#if clazz.name?length = 0><empty ${resources['coverage.class']} name><#else>${clazz.name?html} <#macro page title=""> <#if charset?has_content> <#if reportTitle?has_content>${reportTitle} </#if>Coverage Report > ${title}
<#nested/>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy