Skip to content

Commit

Permalink
Add class placeholders for HTML elements which need to be styled [ci …
Browse files Browse the repository at this point in the history
…skip]
  • Loading branch information
MathieuBuisson committed Jul 7, 2017
1 parent aa5ab26 commit 9d86c1b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
48 changes: 24 additions & 24 deletions PSCodeHealth/Assets/HealthReport.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h2>{NUMBER_OF_FUNCTIONS}</h2>
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{LINES_OF_CODE_TOTAL_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-arrows-v" aria-hidden="true">&nbsp;</i> Lines of Code - Total</h3>
</div>
Expand All @@ -86,20 +86,20 @@ <h2>{LINES_OF_CODE_TOTAL}</h2>
</div>
<div class="row col-sm-offset-3 col-md-offset-1 col-lg-offset-2">
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{SCRIPTANALYZER_TOTAL_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-plus-square-o" aria-hidden="true">&nbsp;</i> ScriptAnalyzer Findings</h3>
</div>
<table class="table">
<tr class="text-success"><td>Errors</td><td>{SCRIPTANALYZER_ERRORS}</td></tr>
<tr class="text-success"><td>Warnings</td><td>{SCRIPTANALYZER_WARNINGS}</td></tr>
<tr class="text-success"><td>Information</td><td>{SCRIPTANALYZER_INFO}</td></tr>
<tr class="text-success"><td>Total</td><td>{SCRIPTANALYZER_TOTAL}</td></tr>
<tr class="text-{SCRIPTANALYZER_ERRORS_COMPLIANCE}"><td>Errors</td><td>{SCRIPTANALYZER_ERRORS}</td></tr>
<tr class="text-{SCRIPTANALYZER_WARNINGS_COMPLIANCE}"><td>Warnings</td><td>{SCRIPTANALYZER_WARNINGS}</td></tr>
<tr class="text-{SCRIPTANALYZER_INFO_COMPLIANCE}"><td>Information</td><td>{SCRIPTANALYZER_INFO}</td></tr>
<tr class="text-{SCRIPTANALYZER_TOTAL_COMPLIANCE}"><td>Total</td><td>{SCRIPTANALYZER_TOTAL}</td></tr>
</table>
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-danger">
<div class="panel panel-{TESTS_PASS_RATE_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-check-square-o" aria-hidden="true">&nbsp;</i> Tests Pass Rate (%)</h3>
</div>
Expand All @@ -109,7 +109,7 @@ <h3 class="panel-title"><i class="fa fa-check-square-o" aria-hidden="true">&nbsp
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-danger">
<div class="panel panel-{TEST_COVERAGE_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pie-chart" aria-hidden="true">&nbsp;</i> Test Coverage (%)</h3>
</div>
Expand All @@ -123,7 +123,7 @@ <h3 class="panel-title"><i class="fa fa-pie-chart" aria-hidden="true">&nbsp;</i>
<section id="bestPractices" class="tab-pane fade">
<div class="row col-sm-offset-3 col-md-offset-1 col-lg-offset-2">
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{SCRIPTANALYZER_TOTAL_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-plus-square-o" aria-hidden="true">&nbsp;</i> ScriptAnalyzer Findings - Total</h3>
</div>
Expand All @@ -133,7 +133,7 @@ <h2>{SCRIPTANALYZER_TOTAL}</h2>
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{SCRIPTANALYZER_ERRORS_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-ban" aria-hidden="true">&nbsp;</i> ScriptAnalyzer Errors</h3>
</div>
Expand All @@ -143,7 +143,7 @@ <h2>{SCRIPTANALYZER_ERRORS}</h2>
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{SCRIPTANALYZER_WARNINGS_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-exclamation-triangle" aria-hidden="true">&nbsp;</i> ScriptAnalyzer Warnings</h3>
</div>
Expand All @@ -155,7 +155,7 @@ <h2>{SCRIPTANALYZER_WARNINGS}</h2>
</div>
<div class="row col-sm-offset-3 col-md-offset-1 col-lg-offset-2">
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{SCRIPTANALYZER_AVERAGE_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-bar-chart" aria-hidden="true">&nbsp;</i> ScriptAnalyzer Findings - Average</h3>
</div>
Expand All @@ -165,7 +165,7 @@ <h2>{SCRIPTANALYZER_AVERAGE}</h2>
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{SCRIPTANALYZER_INFO_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-info-circle" aria-hidden="true">&nbsp;</i> ScriptAnalyzer Info</h3>
</div>
Expand All @@ -175,7 +175,7 @@ <h2>{SCRIPTANALYZER_INFO}</h2>
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-danger">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-question-circle" aria-hidden="true">&nbsp;</i> Functions Without Help</h3>
</div>
Expand Down Expand Up @@ -211,7 +211,7 @@ <h2 class="panel-title"> Per Function Information</h2>
<section id="maintainability" class="tab-pane fade">
<div class="row col-sm-offset-3 col-md-offset-1 col-lg-offset-2">
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{LINES_OF_CODE_TOTAL_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-arrows-v" aria-hidden="true">&nbsp;</i> Lines of Code - Total</h3>
</div>
Expand All @@ -221,7 +221,7 @@ <h2>{LINES_OF_CODE_TOTAL}</h2>
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{COMPLEXITY_HIGHEST_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-arrows-alt" aria-hidden="true">&nbsp;</i> Complexity - Highest</h3>
</div>
Expand All @@ -231,7 +231,7 @@ <h2>{COMPLEXITY_HIGHEST}</h2>
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{NESTING_DEPTH_HIGHEST_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-object-group" aria-hidden="true">&nbsp;</i> Nesting Depth - Highest</h3>
</div>
Expand All @@ -243,7 +243,7 @@ <h2>{NESTING_DEPTH_HIGHEST}</h2>
</div>
<div class="row col-sm-offset-3 col-md-offset-1 col-lg-offset-2">
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{LINES_OF_CODE_AVERAGE_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-arrows-v" aria-hidden="true">&nbsp;</i> Lines of Code - Average</h3>
</div>
Expand All @@ -253,7 +253,7 @@ <h2>{LINES_OF_CODE_AVERAGE}</h2>
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{COMPLEXITY_AVERAGE_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-arrows-alt" aria-hidden="true">&nbsp;</i> Complexity - Average</h3>
</div>
Expand All @@ -263,7 +263,7 @@ <h2>{COMPLEXITY_AVERAGE}</h2>
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{NESTING_DEPTH_AVERAGE_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-object-group" aria-hidden="true">&nbsp;</i> Nesting Depth - Average</h3>
</div>
Expand Down Expand Up @@ -309,7 +309,7 @@ <h2>{NUMBER_OF_TESTS}</h2>
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-success">
<div class="panel panel-{NUMBER_OF_FAILED_TESTS_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-times" aria-hidden="true">&nbsp;</i> Number of Failed Tests</h3>
</div>
Expand All @@ -331,7 +331,7 @@ <h2>{NUMBER_OF_PASSED_TESTS}</h2>
</div>
<div class="row col-sm-offset-3 col-md-offset-1 col-lg-offset-2">
<div class="col-sm-3 panelContainer">
<div class="panel panel-danger">
<div class="panel panel-{COMMANDS_MISSED_TOTAL_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-times" aria-hidden="true">&nbsp;</i> Number of Missed Commands</h3>
</div>
Expand All @@ -341,7 +341,7 @@ <h2>{COMMANDS_MISSED}</h2>
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-danger">
<div class="panel panel-{TESTS_PASS_RATE_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-check-square-o" aria-hidden="true">&nbsp;</i> Tests Pass Rate (%)</h3>
</div>
Expand All @@ -351,7 +351,7 @@ <h3 class="panel-title"><i class="fa fa-check-square-o" aria-hidden="true">&nbsp
</div>
</div>
<div class="col-sm-3 panelContainer">
<div class="panel panel-danger">
<div class="panel panel-{TEST_COVERAGE_COMPLIANCE}">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pie-chart" aria-hidden="true">&nbsp;</i> Test Coverage (%)</h3>
</div>
Expand Down
20 changes: 10 additions & 10 deletions PSCodeHealth/Private/HtmlReport/New-PSCodeHealthTableData.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ Function New-PSCodeHealthTableData {
If ( $Function.ScriptAnalyzerFindings -gt 0 ) {
[System.Collections.ArrayList]$FindingsDetails = @()
$Null = $FindingsDetails.Add(@"
`n <button type="button" class="btn btn-sm cell-expand-collapse"> Expand</button>
`n <button type="button" class="btn btn-{$($Function.FunctionName)_FINDINGS_DETAILS} btn-sm cell-expand-collapse"> Expand</button>
<table>`n
"@)
Foreach ( $Finding in $Function.ScriptAnalyzerResultDetails ) {

$ScriptName = Split-Path -Path $Function.FilePath -Leaf
$FindingDetail = @"
<tr>
<td class="cell-largeContent">ScriptName : $ScriptName<br>
<td class="{$($Function.FunctionName)_FINDINGS_DETAILS} cell-largeContent">ScriptName : $ScriptName<br>
Line (in the function) : $($Finding.Line)<br>
Severity : $($Finding.Severity)<br>
RuleName : $($Finding.RuleName)<br>
Expand All @@ -67,9 +67,9 @@ Message : $($Finding.Message)<br>
$Row = @"
<tr>
<td>$($Function.FunctionName)</td>
<td>$($Function.ScriptAnalyzerFindings)</td>
<td>$($FindingsDetails)</td>
<td>$($Function.ContainsHelp)</td>
<td class="{$($Function.FunctionName)_SCRIPTANALYZER_FINDINGS}">$($Function.ScriptAnalyzerFindings)</td>
<td class="{$($Function.FunctionName)_FINDINGS_DETAILS}">$($FindingsDetails)</td>
<td class="{$($Function.FunctionName)_CONTAINS_HELP}">$($Function.ContainsHelp)</td>
</tr>
"@
$Null = $BestPracticesRows.Add($Row)
Expand All @@ -81,9 +81,9 @@ Message : $($Finding.Message)<br>
$Row = @"
<tr>
<td>$($Function.FunctionName)</td>
<td>$($Function.LinesOfCode)</td>
<td>$($Function.Complexity)</td>
<td>$($Function.MaximumNestingDepth)</td>
<td class="{$($Function.FunctionName)_LINES_OF_CODE_COMPLIANCE}">$($Function.LinesOfCode)</td>
<td class="{$($Function.FunctionName)_COMPLEXITY_COMPLIANCE}">$($Function.Complexity)</td>
<td class="{$($Function.FunctionName)_MAXIMUM_NESTING_DEPTH_COMPLIANCE}">$($Function.MaximumNestingDepth)</td>
</tr>
"@
$Null = $MaintainabilityRows.Add($Row)
Expand Down Expand Up @@ -115,8 +115,8 @@ Message : $($Finding.Message)<br>
$Row = @"
<tr>
<td>$($Function.FunctionName)</td>
<td>$($Function.TestCoverage)</td>
<td>$($Function.CommandsMissed)</td>
<td class="{$($Function.FunctionName)_TEST_COVERAGE_COMPLIANCE}">$($Function.TestCoverage)</td>
<td class="{$($Function.FunctionName)_COMMANDS_MISSED_COMPLIANCE}">$($Function.CommandsMissed)</td>
</tr>
"@
$Null = $CoverageRows.Add($Row)
Expand Down

0 comments on commit 9d86c1b

Please sign in to comment.