Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Commit 1707174

Browse files
committed
add busServ and busApp to response
1 parent 0237419 commit 1707174

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main/java/com/capitalone/dashboard/service/DashboardAuditServiceImpl.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -303,25 +303,27 @@ public JSONObject getAuditReport(DashboardAuditRequest dashboardAuditRequest) {
303303
Cmdb busAppItem = cmdbRepository.findByConfigurationItemAndItemType(businessApplication, "component");
304304

305305
if(busServItem == null){
306-
JSONObject invalidBAResponse = createLookupResponseWhenEmpty(DashboardAuditStatus.DASHBOARD_INVALID_BA);
306+
JSONObject invalidBAResponse = createLookupResponseWhenEmpty(DashboardAuditStatus.DASHBOARD_INVALID_BA, businessApplication, businessService);
307307
return invalidBAResponse;
308308
}else if(busAppItem == null){
309-
JSONObject invalidComponentResponse = createLookupResponseWhenEmpty(DashboardAuditStatus.DASHBOARD_INVALID_COMPONENT);
309+
JSONObject invalidComponentResponse = createLookupResponseWhenEmpty(DashboardAuditStatus.DASHBOARD_INVALID_COMPONENT, businessApplication, businessService);
310310
return invalidComponentResponse;
311311
}else if(!componentInfoMatch(busServItem, businessApplication)){
312-
JSONObject componentBAMismatchResponse = createLookupResponseWhenEmpty(DashboardAuditStatus.DASHBOARD_COMPONENT_BA_MISMATCH);
312+
JSONObject componentBAMismatchResponse = createLookupResponseWhenEmpty(DashboardAuditStatus.DASHBOARD_COMPONENT_BA_MISMATCH, businessApplication, businessService);
313313
return componentBAMismatchResponse;
314314
}else{
315-
JSONObject noDataResponse = createLookupResponseWhenEmpty(DashboardAuditStatus.DASHBOARD_AUDIT_NO_DATA);
315+
JSONObject noDataResponse = createLookupResponseWhenEmpty(DashboardAuditStatus.DASHBOARD_AUDIT_NO_DATA, businessApplication, businessService);
316316
return noDataResponse;
317317
}
318318
}
319319

320320

321321
}
322322

323-
private JSONObject createLookupResponseWhenEmpty(DashboardAuditStatus dashboardAuditStatus){
323+
private JSONObject createLookupResponseWhenEmpty(DashboardAuditStatus dashboardAuditStatus, String businessApplication, String businessService){
324324
JSONObject auditResponse = new JSONObject();
325+
auditResponse.put("businessApplication", businessApplication);
326+
auditResponse.put("businessService", businessService);
325327
auditResponse.put("auditStatuses", Collections.singleton(dashboardAuditStatus));
326328
auditResponse.put("lastUpdated", 0);
327329
auditResponse.put("auditEntity", new JSONObject());

0 commit comments

Comments
 (0)