Skip to content

Commit

Permalink
use problem title for grouped results table
Browse files Browse the repository at this point in the history
  • Loading branch information
manV committed Jul 15, 2024
1 parent 2f3ed7b commit 7c1846e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion deepfence_frontend/apps/dashboard/api-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -13784,6 +13784,7 @@
"description": { "type": "string" },
"enabled": { "type": "boolean" },
"node_id": { "type": "string" },
"problem_title": { "type": "string" },
"service": { "type": "string" },
"title": { "type": "string" }
}
Expand Down Expand Up @@ -14055,7 +14056,7 @@
"properties": {
"benchmark_types": { "type": "array", "items": { "type": "string" } },
"counts": { "type": "object", "additionalProperties": { "type": "integer" } },
"title": { "type": "string" }
"problem_title": { "type": "string" }
}
},
"ModelComplianceScanResultsGroupResp": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ export interface ModelCloudNodeComplianceControl {
* @memberof ModelCloudNodeComplianceControl
*/
node_id?: string;
/**
*
* @type {string}
* @memberof ModelCloudNodeComplianceControl
*/
problem_title?: string;
/**
*
* @type {string}
Expand Down Expand Up @@ -101,6 +107,7 @@ export function ModelCloudNodeComplianceControlFromJSONTyped(json: any, ignoreDi
'description': !exists(json, 'description') ? undefined : json['description'],
'enabled': !exists(json, 'enabled') ? undefined : json['enabled'],
'node_id': !exists(json, 'node_id') ? undefined : json['node_id'],
'problem_title': !exists(json, 'problem_title') ? undefined : json['problem_title'],
'service': !exists(json, 'service') ? undefined : json['service'],
'title': !exists(json, 'title') ? undefined : json['title'],
};
Expand All @@ -122,6 +129,7 @@ export function ModelCloudNodeComplianceControlToJSON(value?: ModelCloudNodeComp
'description': value.description,
'enabled': value.enabled,
'node_id': value.node_id,
'problem_title': value.problem_title,
'service': value.service,
'title': value.title,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface ModelComplianceScanResultControlGroup {
* @type {string}
* @memberof ModelComplianceScanResultControlGroup
*/
title?: string;
problem_title?: string;
}

/**
Expand All @@ -60,7 +60,7 @@ export function ModelComplianceScanResultControlGroupFromJSONTyped(json: any, ig

'benchmark_types': !exists(json, 'benchmark_types') ? undefined : json['benchmark_types'],
'counts': !exists(json, 'counts') ? undefined : json['counts'],
'title': !exists(json, 'title') ? undefined : json['title'],
'problem_title': !exists(json, 'problem_title') ? undefined : json['problem_title'],
};
}

Expand All @@ -75,7 +75,7 @@ export function ModelComplianceScanResultControlGroupToJSON(value?: ModelComplia

'benchmark_types': value.benchmark_types,
'counts': value.counts,
'title': value.title,
'problem_title': value.problem_title,
};
}

Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const useGetControls = ({ nodeType }: { nodeType: string }) => {
results.push({
controlId,
benchmarkTypes: countsByControlsData[controlId].benchmark_types ?? [],
title: countsByControlsData[controlId].title ?? controlId,
title: countsByControlsData[controlId].problem_title ?? controlId,
counts: countsByControlsData[controlId].counts ?? {},
totalCount,
});
Expand Down

0 comments on commit 7c1846e

Please sign in to comment.