Skip to content

Commit a6d342a

Browse files
committed
frontend: Details: Add support for cluster via URL var
This is so that in multi cluster mode the URL can keep the group of clusters in the URL, but the details still know which cluster to use for fetching details. Signed-off-by: René Dudfield <[email protected]>
1 parent 81d82be commit a6d342a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

frontend/src/components/pod/Details.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import _ from 'lodash';
1010
import React from 'react';
1111
import { useTranslation } from 'react-i18next';
1212
import { useParams } from 'react-router-dom';
13+
import { useClusterFromURLVar } from '../../lib/k8s';
1314
import { KubeContainerStatus } from '../../lib/k8s/cluster';
1415
import Pod from '../../lib/k8s/pod';
1516
import { DefaultHeaderAction } from '../../redux/actionButtonsSlice';
@@ -392,12 +393,14 @@ export default function PodDetails(props: PodDetailsProps) {
392393
const { t } = useTranslation('glossary');
393394
const [isAttached, setIsAttached] = React.useState(false);
394395
const dispatchHeadlampEvent = useEventCallback();
396+
const cluster = useClusterFromURLVar();
395397

396398
return (
397399
<DetailsGrid
398400
resourceType={Pod}
399401
name={name}
400402
namespace={namespace}
403+
cluster={cluster}
401404
withEvents
402405
actions={item =>
403406
item && [

0 commit comments

Comments
 (0)