mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-20 21:43:18 +00:00
Final changes to be tested against component failures
This commit is contained in:
parent
67b70a386d
commit
f7912908e0
@ -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();
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user