diff --git a/services/web-ui/src/api/api.ts b/services/web-ui/src/api/api.ts index cc97baeb3..218ccba87 100644 --- a/services/web-ui/src/api/api.ts +++ b/services/web-ui/src/api/api.ts @@ -932,7 +932,7 @@ export interface GithubComKaytuIoKaytuEnginePkgComplianceApiFindingFilters { /** @example ["alarm"] */ conformanceStatus?: GithubComKaytuIoKaytuEnginePkgComplianceApiConformanceStatus[] /** @example ["8e0f8e7a-1b1c-4e6f-b7e4-9c6af9d2b1c8"] */ - connectionID?: string[] + integrationID?: string[] /** @example ["Azure"] */ connector?: SourceType[] /** @example ["azure_cis_v140_7_5"] */ @@ -963,7 +963,7 @@ export interface GithubComKaytuIoKaytuEnginePkgComplianceApiFindingFilters { export interface GithubComKaytuIoKaytuEnginePkgComplianceApiFindingFiltersWithMetadata { benchmarkID?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[] conformanceStatus?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[] - connectionID?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[] + integrationID?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[] connector?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[] controlID?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[] resourceCollection?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[] @@ -5265,14 +5265,14 @@ export class Api< apiV1FindingsTopDetail: ( field: | 'resourceType' - | 'connectionID' + | 'integrationID' | 'resourceID' | 'service' | 'controlID', count: number, query?: { /** Connection IDs to filter by (inclusive) */ - connectionId?: string[] + integrationID?: string[] /** Connection IDs to filter by (exclusive) */ notConnectionId?: string[] /** Connection groups to filter by */ @@ -5380,7 +5380,7 @@ export class Api< */ apiV1FindingsCountDetail: ( benchmarkId: string, - field: 'resourceType' | 'connectionID' | 'resourceID' | 'service', + field: 'resourceType' | 'integrationID' | 'resourceID' | 'service', query?: { /** Connection IDs to filter by */ connectionId?: string[] diff --git a/services/web-ui/src/api/compliance.gen.ts b/services/web-ui/src/api/compliance.gen.ts index c2cca92e7..5d8f9b874 100755 --- a/services/web-ui/src/api/compliance.gen.ts +++ b/services/web-ui/src/api/compliance.gen.ts @@ -4365,13 +4365,13 @@ interface IuseComplianceApiV1FindingsTopDetailState { export const useComplianceApiV1FindingsTopDetail = ( field: | 'resourceType' - | 'connectionID' + | 'integrationID' | 'resourceID' | 'service' | 'controlID', count: number, query?: { - connectionId?: string[] + integrationID?: string[] notConnectionId?: string[] @@ -4412,14 +4412,14 @@ export const useComplianceApiV1FindingsTopDetail = ( abortCtrl: AbortController, reqfield: | 'resourceType' - | 'connectionID' + | 'integrationID' | 'resourceID' | 'service' | 'controlID', reqcount: number, reqquery: | { - connectionId?: string[] + integrationID?: string[] notConnectionId?: string[] @@ -4537,14 +4537,14 @@ export const useComplianceApiV1FindingsTopDetail = ( const sendNowWithParams = ( reqfield: | 'resourceType' - | 'connectionID' + | 'integrationID' | 'resourceID' | 'service' | 'controlID', reqcount: number, reqquery: | { - connectionId?: string[] + integrationID?: string[] notConnectionId?: string[] @@ -4926,7 +4926,7 @@ interface IuseComplianceApiV1FindingsCountDetailState { */ export const useComplianceApiV1FindingsCountDetail = ( benchmarkId: string, - field: 'resourceType' | 'connectionID' | 'resourceID' | 'service', + field: 'resourceType' | 'integrationID' | 'resourceID' | 'service', query?: { connectionId?: string[] @@ -4962,7 +4962,7 @@ export const useComplianceApiV1FindingsCountDetail = ( const sendRequest = ( abortCtrl: AbortController, reqbenchmarkId: string, - reqfield: 'resourceType' | 'connectionID' | 'resourceID' | 'service', + reqfield: 'resourceType' | 'integrationID' | 'resourceID' | 'service', reqquery: | { connectionId?: string[] @@ -5079,7 +5079,7 @@ export const useComplianceApiV1FindingsCountDetail = ( const sendNowWithParams = ( reqbenchmarkId: string, - reqfield: 'resourceType' | 'connectionID' | 'resourceID' | 'service', + reqfield: 'resourceType' | 'integrationID' | 'resourceID' | 'service', reqquery: | { connectionId?: string[] diff --git a/services/web-ui/src/components/Cards/ConnectorCard/index.tsx b/services/web-ui/src/components/Cards/ConnectorCard/index.tsx index 034c00b67..951c5e20f 100644 --- a/services/web-ui/src/components/Cards/ConnectorCard/index.tsx +++ b/services/web-ui/src/components/Cards/ConnectorCard/index.tsx @@ -144,7 +144,7 @@ export default function ConnectorCard({ const onClick = () => { if (status === 'enabled' && (count || 0) > 0) { - navigate(`${name}`, { state: { connector,id } }) + navigate(`${connector}`, { state: { name, id } }) return } if (status === 'first-time') { @@ -157,10 +157,10 @@ export default function ConnectorCard({ tier === GithubComKaytuIoKaytuEngineServicesIntegrationApiEntityTier.TierCommunity ) { - navigate(`${name}`, { state: { connector, id } }) + navigate(`${connector}`, { state: { name, id } }) return } - navigate(`${name}/../../request-access?connector=${title}`) // it's a hack! + navigate(`${connector}/../../request-access?connector=${title}`) // it's a hack! } return ( diff --git a/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Filter/Others/index.tsx b/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Filter/Others/index.tsx index 0ed4a5806..4467c4bb5 100644 --- a/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Filter/Others/index.tsx +++ b/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Filter/Others/index.tsx @@ -13,7 +13,7 @@ interface IOthers { | GithubComKaytuIoKaytuEnginePkgComplianceApiFindingFiltersWithMetadata | undefined condition: string - type: 'benchmarkID' | 'connectionID' | 'controlID' | 'resourceTypeID' + type: 'benchmarkID' | 'integrationID' | 'controlID' | 'resourceTypeID' onChange: (o: string[]) => void } diff --git a/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Filter/index.tsx b/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Filter/index.tsx index 9cf3bf109..4bc67a128 100644 --- a/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Filter/index.tsx +++ b/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Filter/index.tsx @@ -243,7 +243,7 @@ export default function Filter({ onApply, type ,id}: IFilters) { defaultValue={[]} data={filters} condition={connectionCon} - type="connectionID" + type="integrationID" onChange={(o) => setConnectionID(o)} /> ), @@ -252,7 +252,7 @@ export default function Filter({ onApply, type ,id}: IFilters) { value: connectionID, defaultValue: [], onDelete: () => setConnectionID([]), - data: filters?.connectionID, + data: filters?.integrationID, types: ['findings', 'resources', 'events', 'controls', 'accounts'], }, // { diff --git a/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/FailingCloudAccounts/Detail/index.tsx b/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/FailingCloudAccounts/Detail/index.tsx index 475352b3c..d00a997ae 100644 --- a/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/FailingCloudAccounts/Detail/index.tsx +++ b/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/FailingCloudAccounts/Detail/index.tsx @@ -27,7 +27,7 @@ export default function CloudAccountDetail({ const { response: filters, sendNow } = useComplianceApiV1FindingsFiltersCreate( { - connectionID: [account?.id || ''], + integrationID: [account?.id || ''], }, {}, false diff --git a/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/FailingCloudAccounts/index.tsx b/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/FailingCloudAccounts/index.tsx index 143c76e37..0f3594880 100644 --- a/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/FailingCloudAccounts/index.tsx +++ b/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/FailingCloudAccounts/index.tsx @@ -149,7 +149,7 @@ export default function FailingCloudAccounts({ query }: ICount) { } const { response: accounts, isLoading: accountsLoading } = - useComplianceApiV1FindingsTopDetail('connectionID', 10000, topQuery) + useComplianceApiV1FindingsTopDetail('integrationID', 10000, topQuery) return ( <> diff --git a/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/Filter/Others/index.tsx b/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/Filter/Others/index.tsx index 19c330db9..12912b05d 100644 --- a/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/Filter/Others/index.tsx +++ b/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/Filter/Others/index.tsx @@ -15,9 +15,9 @@ interface IOthers { | GithubComKaytuIoKaytuEnginePkgComplianceApiFindingFiltersWithMetadata | undefined condition: string - type: 'benchmarkID' | 'connectionID' | 'controlID' | 'resourceTypeID' - onChange: (o: string[]) => void, - name: string, + type: 'benchmarkID' | 'integrationID' | 'controlID' | 'resourceTypeID' + onChange: (o: string[]) => void + name: string } export default function Others({ diff --git a/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/Filter/index.tsx b/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/Filter/index.tsx index 54b820111..7fa044227 100644 --- a/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/Filter/index.tsx +++ b/services/web-ui/src/pages/Governance/Compliance/NewBenchmarkSummary/Findings/Filter/index.tsx @@ -468,7 +468,7 @@ export default function Filter({ onApply, type, setDate }: IFilters) { defaultValue={[]} data={filters} condition={connectionCon} - type="connectionID" + type="integrationID" onChange={(o) => setConnectionID(o)} name={'Integration'} /> @@ -480,7 +480,7 @@ export default function Filter({ onApply, type, setDate }: IFilters) { defaultValue: [], onDelete: () => setConnectionID([]), - data: filters?.connectionID, + data: filters?.integrationID, types: ['findings', 'resources', 'events', 'controls', 'accounts'], }, { diff --git a/services/web-ui/src/pages/Governance/Controls/ControlSummary/Tabs/ControlFindings/Filter/index.tsx b/services/web-ui/src/pages/Governance/Controls/ControlSummary/Tabs/ControlFindings/Filter/index.tsx index 2b93b0eb0..6f996ab6e 100644 --- a/services/web-ui/src/pages/Governance/Controls/ControlSummary/Tabs/ControlFindings/Filter/index.tsx +++ b/services/web-ui/src/pages/Governance/Controls/ControlSummary/Tabs/ControlFindings/Filter/index.tsx @@ -435,7 +435,7 @@ export default function Filter({ onApply, type, setDate }: IFilters) { defaultValue: [], onDelete: () => setConnectionID([]), - data: filters?.connectionID, + data: filters?.integrationID, types: ['findings', 'resources', 'events', 'controls', 'accounts'], }, // { diff --git a/services/web-ui/src/pages/Governance/Controls/ControlSummary/Tabs/ImpactedAccounts/index.tsx b/services/web-ui/src/pages/Governance/Controls/ControlSummary/Tabs/ImpactedAccounts/index.tsx index e5e865e65..1cfb84eb4 100644 --- a/services/web-ui/src/pages/Governance/Controls/ControlSummary/Tabs/ImpactedAccounts/index.tsx +++ b/services/web-ui/src/pages/Governance/Controls/ControlSummary/Tabs/ImpactedAccounts/index.tsx @@ -114,7 +114,7 @@ export const topConnections = ( export default function ImpactedAccounts({ controlId }: IImpactedAccounts) { const isDemo = useAtomValue(isDemoAtom) const { response: accounts, isLoading: accountsLoading } = - useComplianceApiV1FindingsTopDetail('connectionID', 10000, { + useComplianceApiV1FindingsTopDetail('integrationID', 10000, { controlId: [String(controlId)], }) const [page, setPage] = useState(0) @@ -171,8 +171,8 @@ export default function ImpactedAccounts({ controlId }: IImpactedAccounts) { { // @ts-ignore - item?.Connection?.metadata - ?.account_name + item?.Integration?.name + } ), @@ -188,8 +188,7 @@ export default function ImpactedAccounts({ controlId }: IImpactedAccounts) { <> { // @ts-ignore - item?.Connection?.metadata - ?.account_id + item?.Integration?.provider_id } ), diff --git a/services/web-ui/src/pages/Governance/Findings/FailingCloudAccounts/Detail/index.tsx b/services/web-ui/src/pages/Governance/Findings/FailingCloudAccounts/Detail/index.tsx index 3b45b47ad..99c5076ce 100644 --- a/services/web-ui/src/pages/Governance/Findings/FailingCloudAccounts/Detail/index.tsx +++ b/services/web-ui/src/pages/Governance/Findings/FailingCloudAccounts/Detail/index.tsx @@ -27,7 +27,7 @@ export default function CloudAccountDetail({ const { response: filters, sendNow } = useComplianceApiV1FindingsFiltersCreate( { - connectionID: [account?.id || ''], + integrationID: [account?.id || ''], }, {}, false diff --git a/services/web-ui/src/pages/Governance/Findings/FailingCloudAccounts/index.tsx b/services/web-ui/src/pages/Governance/Findings/FailingCloudAccounts/index.tsx index 50f010f1b..33d2874cc 100644 --- a/services/web-ui/src/pages/Governance/Findings/FailingCloudAccounts/index.tsx +++ b/services/web-ui/src/pages/Governance/Findings/FailingCloudAccounts/index.tsx @@ -165,7 +165,7 @@ export default function FailingCloudAccounts({ query }: ICount) { } const { response: accounts, isLoading: accountsLoading } = - useComplianceApiV1FindingsTopDetail('connectionID', 10000, topQuery) + useComplianceApiV1FindingsTopDetail('integrationID', 10000, topQuery) const [page, setPage] = useState(0) return ( diff --git a/services/web-ui/src/pages/Governance/Findings/Filter/Others/index.tsx b/services/web-ui/src/pages/Governance/Findings/Filter/Others/index.tsx index e49fd0e77..0a6c468e0 100644 --- a/services/web-ui/src/pages/Governance/Findings/Filter/Others/index.tsx +++ b/services/web-ui/src/pages/Governance/Findings/Filter/Others/index.tsx @@ -15,9 +15,9 @@ interface IOthers { | GithubComKaytuIoKaytuEnginePkgComplianceApiFindingFiltersWithMetadata | undefined condition: string - type: 'benchmarkID' | 'connectionID' | 'controlID' | 'resourceTypeID' - onChange: (o: string[]) => void, - name: string, + type: 'benchmarkID' | 'integrationID' | 'controlID' | 'resourceTypeID' + onChange: (o: string[]) => void + name: string } export default function Others({ diff --git a/services/web-ui/src/pages/Governance/Findings/Filter/index.tsx b/services/web-ui/src/pages/Governance/Findings/Filter/index.tsx index a60cb77fa..0fbba58a3 100644 --- a/services/web-ui/src/pages/Governance/Findings/Filter/index.tsx +++ b/services/web-ui/src/pages/Governance/Findings/Filter/index.tsx @@ -338,7 +338,7 @@ export default function Filter({ onApply, type, setDate }: IFilters) { const filterOptions = [ { id: 'conformance_status', - name: 'Conformance Status', + name: 'Compliance Status', icon: CheckCircleIcon, component: ( undefined, value: [connector], defaultValue: [defConnector], - data: Types?.integration_types?.map((d)=>{ + data: Types?.integration_types?.map((d) => { return { label: d.label, - value: d.platform_name + value: d.platform_name, } }), onDelete: () => setConnector(defConnector), - types: [ 'controls'], + types: ['controls'], }, // { // id: 'lifecycle', @@ -458,7 +458,7 @@ export default function Filter({ onApply, type, setDate }: IFilters) { defaultValue: defSeverity, data: severity_data, onDelete: () => setSeverity(defSeverity), - types: ['findings', 'events','controls'], + types: ['findings', 'events', 'controls'], }, // { // id: 'limit_healthy', @@ -488,7 +488,7 @@ export default function Filter({ onApply, type, setDate }: IFilters) { defaultValue={[]} data={filters} condition={connectionCon} - type="connectionID" + type="integrationID" onChange={(o) => setConnectionID(o)} name={'Integration'} /> @@ -500,7 +500,7 @@ export default function Filter({ onApply, type, setDate }: IFilters) { defaultValue: [], onDelete: () => setConnectionID([]), - data: filters?.connectionID, + data: filters?.integrationID, types: ['findings', 'resources', 'events', 'controls', 'accounts'], }, { diff --git a/services/web-ui/src/pages/Governance/Findings/FindingsWithFailure/index.tsx b/services/web-ui/src/pages/Governance/Findings/FindingsWithFailure/index.tsx index ed66a3336..1261bf036 100644 --- a/services/web-ui/src/pages/Governance/Findings/FindingsWithFailure/index.tsx +++ b/services/web-ui/src/pages/Governance/Findings/FindingsWithFailure/index.tsx @@ -357,7 +357,7 @@ export default function FindingsWithFailure({ query }: ICount) { benchmarkID: queries.benchmarkID, severity: queries.severity, resourceTypeID: queries.resourceTypeID, - conformanceStatus: queries.conformanceStatus, + complianceStatus: queries.conformanceStatus, stateActive: queries.lifecycle, jobID: queries?.jobID, integrationGroup: queries.connectionGroup, @@ -410,8 +410,8 @@ export default function FindingsWithFailure({ query }: ICount) { setTotalCount(resp.data.totalCount) // @ts-ignore - if (resp.data.findings) { - setRows(resp.data.findings) + if (resp.data.complianceResults) { + setRows(resp.data.complianceResults) } else { setRows([]) } @@ -597,19 +597,19 @@ export default function FindingsWithFailure({ query }: ICount) { ), }, { - id: 'conformanceStatus', + id: 'complianceStatus', header: 'Status', sortingField: 'severity', cell: (item) => ( - {item.conformanceStatus} + {item.complianceStatus} ), maxWidth: 50, @@ -644,7 +644,7 @@ export default function FindingsWithFailure({ query }: ICount) { { id: 'resourceName', visible: true }, { id: 'benchmarkID', visible: true }, { id: 'controlID', visible: true }, - { id: 'conformanceStatus', visible: true }, + { id: 'complianceStatus', visible: true }, { id: 'severity', visible: true }, { id: 'evaluatedAt', visible: true }, diff --git a/services/web-ui/src/pages/Integrations/TypeDetailNew/Credentials/index.tsx b/services/web-ui/src/pages/Integrations/TypeDetailNew/Credentials/index.tsx index 28aaeb312..d6236eb0a 100644 --- a/services/web-ui/src/pages/Integrations/TypeDetailNew/Credentials/index.tsx +++ b/services/web-ui/src/pages/Integrations/TypeDetailNew/Credentials/index.tsx @@ -34,7 +34,7 @@ import UpdateCredentials from './Update' interface CredentialsListProps { name?: string - integration_type: string + integration_type?: string schema?: Schema } @@ -374,7 +374,7 @@ export default function CredentialsList({ } className="w-full" > - {name} Accounts{' '} + {name} Credentials{' '} ({total_count}) diff --git a/services/web-ui/src/pages/Integrations/TypeDetailNew/Integration/index.tsx b/services/web-ui/src/pages/Integrations/TypeDetailNew/Integration/index.tsx index c96cea433..193f12f0f 100644 --- a/services/web-ui/src/pages/Integrations/TypeDetailNew/Integration/index.tsx +++ b/services/web-ui/src/pages/Integrations/TypeDetailNew/Integration/index.tsx @@ -426,7 +426,7 @@ export default function IntegrationList({ } className="w-full" > - {name} Accounts{' '} + {name} Integrations{' '} ({total_count}) diff --git a/services/web-ui/src/pages/Integrations/TypeDetailNew/index.tsx b/services/web-ui/src/pages/Integrations/TypeDetailNew/index.tsx index 45f402e24..573d6a1b7 100644 --- a/services/web-ui/src/pages/Integrations/TypeDetailNew/index.tsx +++ b/services/web-ui/src/pages/Integrations/TypeDetailNew/index.tsx @@ -37,7 +37,7 @@ import { OpenGovernance } from '../../../icons/icons' export default function TypeDetail() { const navigate = useNavigate() const searchParams = useAtomValue(searchAtom) - const { name } = useParams() + const { type } = useParams() const { state } = useLocation() const [shcema, setSchema] = useState() const [loading, setLoading] = useState(false) @@ -61,7 +61,7 @@ export default function TypeDetail() { axios .get( - `${url}/main/integration/api/v1/integrations/types/${state.connector}/ui/spec `, + `${url}/main/integration/api/v1/integrations/types/${type}/ui/spec `, config ) .then((res) => { @@ -81,7 +81,7 @@ export default function TypeDetail() { return ( <> - + {shcema && shcema?.integration_type_id ? ( <> @@ -93,8 +93,8 @@ export default function TypeDetail() { content: ( ), }, @@ -104,8 +104,8 @@ export default function TypeDetail() { content: ( ), }, @@ -116,7 +116,7 @@ export default function TypeDetail() { <> {loading ? ( <> - + ) : ( <> diff --git a/services/web-ui/src/pages/Settings/Jobs/index.tsx b/services/web-ui/src/pages/Settings/Jobs/index.tsx index 3e8583a3b..ab11d061a 100644 --- a/services/web-ui/src/pages/Settings/Jobs/index.tsx +++ b/services/web-ui/src/pages/Settings/Jobs/index.tsx @@ -79,7 +79,7 @@ const columns = () => { resizable: true, }, { - field: 'connectionID', + field: 'integrationID', headerName: 'OpenGovernance Connection ID', type: 'string', sortable: true, diff --git a/services/web-ui/src/router/index.tsx b/services/web-ui/src/router/index.tsx index a290968cb..a5748b2d1 100644 --- a/services/web-ui/src/router/index.tsx +++ b/services/web-ui/src/router/index.tsx @@ -236,7 +236,7 @@ const authRoutes = [ { key: 'connector detail', - path: '/integrations/:name', + path: '/integrations/:type', element: , },