Final changes to be tested against component failures

This commit is contained in:
Cyrus 2020-11-12 09:58:18 -05:00
parent 67b70a386d
commit f7912908e0
2 changed files with 3 additions and 15 deletions

View File

@ -31,7 +31,6 @@ public final class CertificateStringMapBuilder {
private static final Logger LOGGER =
LogManager.getLogger(CertificateStringMapBuilder.class);
private static final int VALUE_INDEX = 1;
private CertificateStringMapBuilder() {
@ -341,19 +340,7 @@ public final class CertificateStringMapBuilder {
//CPSuri
data.put("CPSuri", certificate.getCPSuri());
//component failure
StringBuilder savedFailures = new StringBuilder();
String[] serialSplit;
for (String str : certificate.getComponentFailures().split(",")) {
if (str.contains("Model")) {
serialSplit = str.split("=");
if (serialSplit.length > VALUE_INDEX) {
savedFailures.append(serialSplit[VALUE_INDEX]);
} else {
savedFailures.append(str);
}
}
}
data.put("failures", savedFailures.toString());
data.put("failures", certificate.getComponentFailures());
//Get platform Configuration values and set map with it
PlatformConfiguration platformConfiguration = certificate.getPlatformConfiguration();

View File

@ -614,10 +614,11 @@
<div class="panel-body">
<div id="componentIdentifier" class="row">
<c:forEach items="${initialData.componentsIdentifier}" var="component">
<c:set var="combined" value="${component.getComponentManufacturer()}${component.getComponentModel()}" scope="page"/>
<div class="component col col-md-4">
<div class="panel panel-default">
<c:choose>
<c:when test="${fn:contains(initialData.failures, component.getComponentSerial()) && not empty fn:trim(component.getComponentSerial())}">
<c:when test="${fn:contains(initialData.failures, combined)}">
<div class="panel-heading" style="background-color: red; color: white">
</c:when>
<c:otherwise>