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.
Merge pull request openshift#8930 from cyril-ui-developer/display-ope…
…rand-instances-managed-namespaces CONSOLE-2321: Allow operators installed globally to display operand instances for all managed namespaces in their details
- Loading branch information
Showing
9 changed files
with
547 additions
and
251 deletions.
There are no files selected for viewing
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
32 changes: 32 additions & 0 deletions
32
...erator-lifecycle-manager/src/components/operand/ShowOperandsInAllNamespacesRadioGroup.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,32 @@ | ||
import * as React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { RadioGroup } from '@console/internal/components/radio'; | ||
import { useShowOperandsInAllNamespaces } from './useShowOperandsInAllNamespaces'; | ||
|
||
export const ShowOperandsInAllNamespacesRadioGroup: React.FC = () => { | ||
const { t } = useTranslation(); | ||
const [ | ||
showOperandsInAllNamespaces, | ||
setShowOperandsInAllNamespaces, | ||
] = useShowOperandsInAllNamespaces(); | ||
return ( | ||
<RadioGroup | ||
label={t('olm~Show operands in:')} | ||
currentValue={showOperandsInAllNamespaces ? 'true' : 'false'} | ||
inline | ||
items={[ | ||
{ | ||
value: 'true', | ||
title: t('olm~All namespaces'), | ||
}, | ||
{ | ||
value: 'false', | ||
title: t('olm~Current namespace only'), | ||
}, | ||
]} | ||
onChange={({ currentTarget }) => | ||
setShowOperandsInAllNamespaces(currentTarget.value === 'true') | ||
} | ||
/> | ||
); | ||
}; |
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
Oops, something went wrong.