Skip to content

Commit

Permalink
feat: change names
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadch91 committed Nov 13, 2024
1 parent e1852e0 commit 42e6c47
Show file tree
Hide file tree
Showing 21 changed files with 65 additions and 66 deletions.
10 changes: 5 additions & 5 deletions services/web-ui/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"] */
Expand Down Expand Up @@ -963,7 +963,7 @@ export interface GithubComKaytuIoKaytuEnginePkgComplianceApiFindingFilters {
export interface GithubComKaytuIoKaytuEnginePkgComplianceApiFindingFiltersWithMetadata {
benchmarkID?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[]
conformanceStatus?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[]
connectionID?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[]
integrationID?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[]
connector?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[]
controlID?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[]
resourceCollection?: GithubComKaytuIoKaytuEnginePkgComplianceApiFilterWithMetadata[]
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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[]
Expand Down
18 changes: 9 additions & 9 deletions services/web-ui/src/api/compliance.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]

Expand Down Expand Up @@ -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[]

Expand Down Expand Up @@ -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[]

Expand Down Expand Up @@ -4926,7 +4926,7 @@ interface IuseComplianceApiV1FindingsCountDetailState {
*/
export const useComplianceApiV1FindingsCountDetail = (
benchmarkId: string,
field: 'resourceType' | 'connectionID' | 'resourceID' | 'service',
field: 'resourceType' | 'integrationID' | 'resourceID' | 'service',
query?: {
connectionId?: string[]

Expand Down Expand Up @@ -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[]
Expand Down Expand Up @@ -5079,7 +5079,7 @@ export const useComplianceApiV1FindingsCountDetail = (

const sendNowWithParams = (
reqbenchmarkId: string,
reqfield: 'resourceType' | 'connectionID' | 'resourceID' | 'service',
reqfield: 'resourceType' | 'integrationID' | 'resourceID' | 'service',
reqquery:
| {
connectionId?: string[]
Expand Down
6 changes: 3 additions & 3 deletions services/web-ui/src/components/Cards/ConnectorCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface IOthers {
| GithubComKaytuIoKaytuEnginePkgComplianceApiFindingFiltersWithMetadata
| undefined
condition: string
type: 'benchmarkID' | 'connectionID' | 'controlID' | 'resourceTypeID'
type: 'benchmarkID' | 'integrationID' | 'controlID' | 'resourceTypeID'
onChange: (o: string[]) => void
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
/>
),
Expand All @@ -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'],
},
// {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function CloudAccountDetail({
const { response: filters, sendNow } =
useComplianceApiV1FindingsFiltersCreate(
{
connectionID: [account?.id || ''],
integrationID: [account?.id || ''],
},
{},
false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default function FailingCloudAccounts({ query }: ICount) {
}

const { response: accounts, isLoading: accountsLoading } =
useComplianceApiV1FindingsTopDetail('connectionID', 10000, topQuery)
useComplianceApiV1FindingsTopDetail('integrationID', 10000, topQuery)

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
/>
Expand All @@ -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'],
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
},
// {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -171,8 +171,8 @@ export default function ImpactedAccounts({ controlId }: IImpactedAccounts) {
{
// @ts-ignore

item?.Connection?.metadata
?.account_name
item?.Integration?.name

}
</>
),
Expand All @@ -188,8 +188,7 @@ export default function ImpactedAccounts({ controlId }: IImpactedAccounts) {
<>
{
// @ts-ignore
item?.Connection?.metadata
?.account_id
item?.Integration?.provider_id
}
</>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function CloudAccountDetail({
const { response: filters, sendNow } =
useComplianceApiV1FindingsFiltersCreate(
{
connectionID: [account?.id || ''],
integrationID: [account?.id || ''],
},
{},
false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
16 changes: 8 additions & 8 deletions services/web-ui/src/pages/Governance/Findings/Filter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: (
<ConformanceStatus
Expand Down Expand Up @@ -374,7 +374,7 @@ export default function Filter({ onApply, type, setDate }: IFilters) {
defaultValue: defConformanceStatus,
onDelete: undefined,
data: connectionGroup_data,
types: ['controls','resources'],
types: ['controls', 'resources'],
},
{
id: 'job_id',
Expand Down Expand Up @@ -412,14 +412,14 @@ export default function Filter({ onApply, type, setDate }: IFilters) {
setCondition: (c: string) => 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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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'}
/>
Expand All @@ -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'],
},
{
Expand Down
Loading

0 comments on commit 42e6c47

Please sign in to comment.