-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCodeCoverage.page
More file actions
58 lines (51 loc) · 3.21 KB
/
CodeCoverage.page
File metadata and controls
58 lines (51 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<apex:page controller="CodeCoverageController" showHeader="true" sidebar="false" docType="html-5.0">
<apex:slds />
<apex:form id="codeCoverageForm">
<apex:outputPanel id="codeCoverageRepeat" style="justify-content: left;">
<br/>
<div class="centered">
<div class="slds-text-heading_large">
<span>
<h2 style="justify-content: center;">Code Coverage information: </h2>
</span>
</div>
</div>
<br/>
<apex:outputPanel id="buttonsPanel">
<div class="text-center">
<apex:outputPanel>
<apex:commandButton action="{!populateCodeCoverageByName}" value="Sort by Name" reRender="codeCoverageForm" styleClass="slds-button slds-button_outline-brand slds-button--neutral slds-not-selected" />
</apex:outputPanel>
<span> or </span>
<apex:outputPanel>
<apex:commandButton action="{!populateCodeCoverageByCoverage}" value="Sort by Coverage" reRender="codeCoverageForm" styleClass="slds-button slds-button_outline-brand slds-button--neutral slds-not-selected" />
</apex:outputPanel>
</div>
</apex:outputPanel>
<br/>
<apex:repeat value="{!codeCoverageMessages}" var="codeCoverageMessage">
<!-- Code coverage is below 10% -->
<apex:outputPanel rendered="{!if(contains(codeCoverageMessage,messageUnder10),'true','false')}" style="justify-content: left;">
<div class="slds-notify slds-notify_alert slds-theme_alert-texture slds-theme_error" role="alert" style="justify-content: left;">
<span class="slds-assistive-text">error</span>
<h2 style="justify-content: left;">{!codeCoverageMessage}</h2>
</div>
</apex:outputPanel>
<!-- Code coverage is under 75% -->
<apex:outputPanel rendered="{!if(contains(codeCoverageMessage,messageUnder75),'true','false')}" style="justify-content: left;">
<div class="slds-notify slds-notify_alert slds-theme_alert-texture slds-theme_warning" role="alert" style="justify-content: left;">
<span class="slds-assistive-text">warning</span>
<h2 style="justify-content: left;">{!codeCoverageMessage}</h2>
</div>
</apex:outputPanel>
<!-- Code coverage is above 75% -->
<apex:outputPanel rendered="{!if(contains(codeCoverageMessage,messageAbove75),'true','false')}" style="justify-content: left;">
<div class="slds-notify slds-notify_alert slds-theme_alert-texture slds-theme_info" role="alert" style="justify-content: left;">
<span class="slds-assistive-text">info</span>
<h2 style="justify-content: left;">{!codeCoverageMessage}</h2>
</div>
</apex:outputPanel>
</apex:repeat>
</apex:outputPanel>
</apex:form>
</apex:page>