forked from openshift/console
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 2080260: Update OLM pages to use details and list page extensions…
… for operands when they exist - Update the CSV details page to load and render list and details page extensions for the operands it manages - Remove container security route extensions that collide with olm create operand routes
- Loading branch information
1 parent
1ba5f5a
commit 0553a9c
Showing
8 changed files
with
86 additions
and
50 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
frontend/packages/console-shared/src/hooks/useResourceDetailsPage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as React from 'react'; | ||
import { useResourceDetailsPages } from './useResourceDetailsPages'; | ||
|
||
export const useResourceDetailsPage = (key: string) => { | ||
const detailsPages = useResourceDetailsPages(); | ||
return React.useMemo(() => detailsPages.get(key), [detailsPages, key]); | ||
}; |
19 changes: 19 additions & 0 deletions
19
frontend/packages/console-shared/src/hooks/useResourceDetailsPages.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as React from 'react'; | ||
import { | ||
ResourceDetailsPage as DynamicResourceDetailsPage, | ||
isResourceDetailsPage as isDynamicResourceDetailsPage, | ||
} from '@console/dynamic-plugin-sdk/src'; | ||
import { getResourceDetailsPages } from '@console/internal/components/resource-pages'; | ||
import { isResourceDetailsPage, ResourceDetailsPage, useExtensions } from '@console/plugin-sdk/src'; | ||
|
||
export const useResourceDetailsPages = () => { | ||
const resourceDetailsPageExtensions = useExtensions<ResourceDetailsPage>(isResourceDetailsPage); | ||
const dynamicResourceDetailsPageExtensions = useExtensions<DynamicResourceDetailsPage>( | ||
isDynamicResourceDetailsPage, | ||
); | ||
return React.useMemo( | ||
() => | ||
getResourceDetailsPages(resourceDetailsPageExtensions, dynamicResourceDetailsPageExtensions), | ||
[resourceDetailsPageExtensions, dynamicResourceDetailsPageExtensions], | ||
); | ||
}; |
7 changes: 7 additions & 0 deletions
7
frontend/packages/console-shared/src/hooks/useResourceListPage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { useMemo } from 'react'; | ||
import { useResourceListPages } from './useResourceListPages'; | ||
|
||
export const useResourceListPage = (key: string) => { | ||
const listPages = useResourceListPages(); | ||
return useMemo(() => listPages.get(key), [listPages, key]); | ||
}; |
18 changes: 18 additions & 0 deletions
18
frontend/packages/console-shared/src/hooks/useResourceListPages.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as React from 'react'; | ||
import { | ||
ResourceListPage as DynamicResourceListPage, | ||
isResourceListPage as isDynamicResourceListPage, | ||
} from '@console/dynamic-plugin-sdk/src'; | ||
import { getResourceListPages } from '@console/internal/components/resource-pages'; | ||
import { isResourceListPage, ResourceListPage, useExtensions } from '@console/plugin-sdk/src'; | ||
|
||
export const useResourceListPages = () => { | ||
const resourceListPageExtensions = useExtensions<ResourceListPage>(isResourceListPage); | ||
const dynamicResourceListPageExtensions = useExtensions<DynamicResourceListPage>( | ||
isDynamicResourceListPage, | ||
); | ||
return React.useMemo( | ||
() => getResourceListPages(resourceListPageExtensions, dynamicResourceListPageExtensions), | ||
[resourceListPageExtensions, dynamicResourceListPageExtensions], | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters