diff --git a/web-console/src/components/header-bar/__snapshots__/header-bar.spec.tsx.snap b/web-console/src/components/header-bar/__snapshots__/header-bar.spec.tsx.snap index 6b899838449..61ae684d18a 100644 --- a/web-console/src/components/header-bar/__snapshots__/header-bar.spec.tsx.snap +++ b/web-console/src/components/header-bar/__snapshots__/header-bar.spec.tsx.snap @@ -15,6 +15,7 @@ exports[`header bar matches snapshot 1`] = ` diff --git a/web-console/src/components/header-bar/header-bar.spec.tsx b/web-console/src/components/header-bar/header-bar.spec.tsx index 0e596c32e3a..8e79ddfd1df 100644 --- a/web-console/src/components/header-bar/header-bar.spec.tsx +++ b/web-console/src/components/header-bar/header-bar.spec.tsx @@ -23,7 +23,9 @@ import { HeaderBar } from './header-bar'; describe('header bar', () => { it('matches snapshot', () => { - const headerBar = shallow(); + const headerBar = shallow( + , + ); expect(headerBar).toMatchSnapshot(); }); }); diff --git a/web-console/src/components/header-bar/header-bar.tsx b/web-console/src/components/header-bar/header-bar.tsx index 12b4a756c03..3a87b40812b 100644 --- a/web-console/src/components/header-bar/header-bar.tsx +++ b/web-console/src/components/header-bar/header-bar.tsx @@ -36,6 +36,7 @@ import { AboutDialog } from '../../dialogs/about-dialog/about-dialog'; import { CoordinatorDynamicConfigDialog } from '../../dialogs/coordinator-dynamic-config-dialog/coordinator-dynamic-config-dialog'; import { DoctorDialog } from '../../dialogs/doctor-dialog/doctor-dialog'; import { OverlordDynamicConfigDialog } from '../../dialogs/overlord-dynamic-config-dialog/overlord-dynamic-config-dialog'; +import { Capabilities } from '../../utils/capabilities'; import { DRUID_ASF_SLACK, DRUID_DOCS, @@ -130,10 +131,11 @@ function LegacyMenu() { export interface HeaderBarProps { active: HeaderActiveTab; hideLegacy: boolean; + capabilities: Capabilities; } export const HeaderBar = React.memo(function HeaderBar(props: HeaderBarProps) { - const { active, hideLegacy } = props; + const { active, hideLegacy, capabilities } = props; const [aboutDialogOpen, setAboutDialogOpen] = useState(false); const [doctorDialogOpen, setDoctorDialogOpen] = useState(false); const [coordinatorDynamicConfigDialogOpen, setCoordinatorDynamicConfigDialogOpen] = useState( @@ -198,6 +200,7 @@ export const HeaderBar = React.memo(function HeaderBar(props: HeaderBarProps) { href="#load-data" minimal={!loadDataPrimary} intent={loadDataPrimary ? Intent.PRIMARY : Intent.NONE} + disabled={capabilities === 'no-proxy'} /> @@ -241,12 +244,25 @@ export const HeaderBar = React.memo(function HeaderBar(props: HeaderBarProps) { {!hideLegacy && ( - } position={Position.BOTTOM_RIGHT}> -