mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-02 19:26:50 +00:00
Added the AppraisalStatus message for a failure tagged into a Platform
Certificate. It will display on the details page as a tool tip on a red component. However it is not refined. [no ci]
This commit is contained in:
parent
e7b0f5396d
commit
5f3be5915b
@ -781,6 +781,7 @@ public class SupplyChainValidationServiceImpl implements SupplyChainValidationSe
|
|||||||
case FAIL:
|
case FAIL:
|
||||||
if (!result.getAdditionalInfo().isEmpty()) {
|
if (!result.getAdditionalInfo().isEmpty()) {
|
||||||
pc.setComponentFailures(result.getAdditionalInfo());
|
pc.setComponentFailures(result.getAdditionalInfo());
|
||||||
|
pc.setComponentFailureMessage(result.getMessage());
|
||||||
this.certificateManager.update(pc);
|
this.certificateManager.update(pc);
|
||||||
}
|
}
|
||||||
return buildValidationRecord(validationType, AppraisalStatus.Status.FAIL,
|
return buildValidationRecord(validationType, AppraisalStatus.Status.FAIL,
|
||||||
@ -817,6 +818,7 @@ public class SupplyChainValidationServiceImpl implements SupplyChainValidationSe
|
|||||||
case FAIL:
|
case FAIL:
|
||||||
if (!result.getAdditionalInfo().isEmpty()) {
|
if (!result.getAdditionalInfo().isEmpty()) {
|
||||||
base.setComponentFailures(result.getAdditionalInfo());
|
base.setComponentFailures(result.getAdditionalInfo());
|
||||||
|
base.setComponentFailureMessage(result.getMessage());
|
||||||
this.certificateManager.update(base);
|
this.certificateManager.update(base);
|
||||||
}
|
}
|
||||||
// we are adding things to componentFailures
|
// we are adding things to componentFailures
|
||||||
|
@ -373,6 +373,7 @@ public final class CertificateStringMapBuilder {
|
|||||||
|
|
||||||
if (!certificate.getComponentFailures().isEmpty()) {
|
if (!certificate.getComponentFailures().isEmpty()) {
|
||||||
data.put("failures", certificate.getComponentFailures());
|
data.put("failures", certificate.getComponentFailures());
|
||||||
|
data.put("failureMessages", certificate.getComponentFailureMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get platform Configuration values and set map with it
|
//Get platform Configuration values and set map with it
|
||||||
|
@ -619,7 +619,8 @@
|
|||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${fn:contains(initialData.failures, combined)}">
|
<c:when test="${fn:contains(initialData.failures, combined)}">
|
||||||
<div class="panel-heading" style="background-color: red; color: white">
|
<div class="tooltip" style="background-color: red; color: white">
|
||||||
|
<span class="tooltiptext">
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
@ -633,6 +634,9 @@
|
|||||||
<span data-toggle="tooltip" data-placement="top" title="Component Class">Platform Components</span>
|
<span data-toggle="tooltip" data-placement="top" title="Component Class">Platform Components</span>
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
|
<c:when test="${fn:contains(initialData.failures, combined)}">
|
||||||
|
</span>
|
||||||
|
</c:when>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<span class="fieldHeader">Manufacturer:</span>
|
<span class="fieldHeader">Manufacturer:</span>
|
||||||
|
@ -64,3 +64,30 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Tooltip container */
|
||||||
|
.tooltip {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tooltip text */
|
||||||
|
.tooltip .tooltiptext {
|
||||||
|
visibility: hidden;
|
||||||
|
width: 120px;
|
||||||
|
background-color: black;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
padding: 5px 0;
|
||||||
|
border-radius: 6px;
|
||||||
|
|
||||||
|
/* Position the tooltip text - see examples below! */
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Show the tooltip text when you mouse over the tooltip container */
|
||||||
|
.tooltip:hover .tooltiptext {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
@ -255,6 +255,8 @@ public class PlatformCredential extends DeviceAssociatedCertificate {
|
|||||||
|
|
||||||
@Column(length = MAX_MESSAGE_LENGTH)
|
@Column(length = MAX_MESSAGE_LENGTH)
|
||||||
private String componentFailures = Strings.EMPTY;
|
private String componentFailures = Strings.EMPTY;
|
||||||
|
@Column(length = MAX_MESSAGE_LENGTH)
|
||||||
|
private String componentFailureMessage = Strings.EMPTY;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private EndorsementCredential endorsementCredential = null;
|
private EndorsementCredential endorsementCredential = null;
|
||||||
@ -736,6 +738,22 @@ public class PlatformCredential extends DeviceAssociatedCertificate {
|
|||||||
this.componentFailures = componentFailures;
|
this.componentFailures = componentFailures;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for the component failures message.
|
||||||
|
* @return string of failures.
|
||||||
|
*/
|
||||||
|
public String getComponentFailureMessage() {
|
||||||
|
return componentFailureMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for the component failure message instance.
|
||||||
|
* @param componentFailureMessage a string of failures.
|
||||||
|
*/
|
||||||
|
public void setComponentFailureMessage(final String componentFailureMessage) {
|
||||||
|
this.componentFailureMessage = componentFailureMessage;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the Platform Configuration Attribute from the Platform Certificate.
|
* Get the Platform Configuration Attribute from the Platform Certificate.
|
||||||
* @return a map with all the attributes
|
* @return a map with all the attributes
|
||||||
|
Loading…
Reference in New Issue
Block a user