diff --git a/plugins/plugin-codeflare/src/components/ProfileExplorer.tsx b/plugins/plugin-codeflare/src/components/ProfileExplorer.tsx index a4bc9d32..0b1affe9 100644 --- a/plugins/plugin-codeflare/src/components/ProfileExplorer.tsx +++ b/plugins/plugin-codeflare/src/components/ProfileExplorer.tsx @@ -73,6 +73,11 @@ export default class ProfileExplorer extends React.PureComponent { this.init() } + private readonly _handleProfileSelection = (selectedProfile: string) => { + this.setState({ selectedProfile }) + emitSelectProfile(selectedProfile) + } + private readonly _handleBoot = () => handleBoot(this.state.selectedProfile) private readonly _handleShutdown = () => handleShutdown(this.state.selectedProfile) @@ -206,7 +211,11 @@ export default class ProfileExplorer extends React.PureComponent { return ( - + diff --git a/plugins/plugin-codeflare/src/components/ProfileSelect.tsx b/plugins/plugin-codeflare/src/components/ProfileSelect.tsx index d5f390da..f0845399 100644 --- a/plugins/plugin-codeflare/src/components/ProfileSelect.tsx +++ b/plugins/plugin-codeflare/src/components/ProfileSelect.tsx @@ -23,6 +23,7 @@ import { UserIcon } from "@patternfly/react-icons" type Props = { selectedProfile?: string profiles?: Profiles.Profile[] + onSelect: (profile: string) => void } type State = { @@ -67,6 +68,7 @@ export default class ProfileSelect extends React.PureComponent { selectDefaultOption: selection, selectIsOpen: false, }) + this.props.onSelect(selection.toString()) } }