Skip to content

Commit

Permalink
frontend: Add search to TopBar
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Dubenko <oldubenko@microsoft.com>
  • Loading branch information
sniok committed Nov 15, 2024
1 parent 0fefa0e commit d4588e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/components/App/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { useTypedSelector } from '../../redux/reducers/reducers';
import { SettingsButton } from '../App/Settings';
import { ClusterTitle } from '../cluster/Chooser';
import ErrorBoundary from '../common/ErrorBoundary';
import { GlobalSearch } from '../globalSearch/GlobalSearch';
import { drawerWidth } from '../Sidebar';
import HeadlampButton from '../Sidebar/HeadlampButton';
import { setWhetherSidebarOpen } from '../Sidebar/sidebarSlice';
Expand Down Expand Up @@ -353,6 +354,10 @@ export function PureTopBar({
);

const allAppBarActions: AppBarAction[] = [
{
id: DefaultAppBarAction.GLOBAL_SEARCH,
action: <GlobalSearch />,
},
{
id: DefaultAppBarAction.CLUSTER,
action: (
Expand Down Expand Up @@ -433,7 +438,6 @@ export function PureTopBar({
) : (
<>
<AppLogo />
<Box sx={{ flexGrow: 1 }} />
<AppBarActions
appBarActions={processAppBarActions(allAppBarActions, appBarActionsProcessors)}
/>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/redux/actionButtonsSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export enum DefaultAppBarAction {
NOTIFICATION = 'NOTIFICATION',
SETTINGS = 'SETTINGS',
USER = 'USER',
GLOBAL_SEARCH = 'GLOBAL_SEARCH',
}

type HeaderActionFuncType = (
Expand Down

0 comments on commit d4588e6

Please sign in to comment.