Skip to content

Commit

Permalink
Merge pull request #2574 from headlamp-k8s/global-search
Browse files Browse the repository at this point in the history
frontend: Add global search
  • Loading branch information
joaquimrocha authored Nov 21, 2024
2 parents 32b1879 + b5b773f commit fe20e5d
Show file tree
Hide file tree
Showing 22 changed files with 1,150 additions and 16 deletions.
10 changes: 10 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^4.1.3",
"fake-indexeddb": "^6.0.0",
"fuse.js": "^7.0.0",
"https-browserify": "^1.0.0",
"humanize-duration": "^3.27.2",
"i18next": "^23.15.1",
Expand Down
7 changes: 6 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 @@ -419,6 +424,7 @@ export function PureTopBar({
<>
<HeadlampButton open={openSideBar} onToggleOpen={onToggleOpen} />
<Box sx={{ flexGrow: 1 }} />
<GlobalSearch isIconButton />
<IconButton
aria-label={t('show more')}
aria-controls={mobileMenuId}
Expand All @@ -433,7 +439,6 @@ export function PureTopBar({
) : (
<>
<AppLogo />
<Box sx={{ flexGrow: 1 }} />
<AppBarActions
appBarActions={processAppBarActions(allAppBarActions, appBarActionsProcessors)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,63 @@
/>
</svg>
<div
class="MuiBox-root css-i9gxme"
/>
class="MuiBox-root css-p8ekiu"
>
<div
class="MuiBox-root css-xqhmuz"
>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-sizeSmall MuiInputBase-adornedStart MuiInputBase-adornedEnd css-1442447-MuiInputBase-root-MuiOutlinedInput-root"
>
<div
class="MuiInputAdornment-root MuiInputAdornment-positionStart MuiInputAdornment-outlined MuiInputAdornment-sizeSmall css-16yk9m0-MuiInputAdornment-root"
>
<span
class="notranslate"
>
</span>
</div>
<input
aria-invalid="false"
class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall MuiInputBase-inputAdornedStart MuiInputBase-inputAdornedEnd css-12yjm75-MuiInputBase-input-MuiOutlinedInput-input"
id=":mock-test-id:"
placeholder="Search"
type="text"
value=""
/>
<div
class="MuiBox-root css-1rstwa7"
>
Press
<div
class="MuiBox-root css-1y54l5z"
>
/
</div>
to search
</div>
<fieldset
aria-hidden="true"
class="MuiOutlinedInput-notchedOutline css-1d3z3hw-MuiOutlinedInput-notchedOutline"
>
<legend
class="css-ihdtdm"
>
<span
class="notranslate"
>
</span>
</legend>
</fieldset>
</div>
</div>
</div>
</div>
<div
class="MuiBox-root css-3n7f37"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,63 @@
/>
</svg>
<div
class="MuiBox-root css-i9gxme"
/>
class="MuiBox-root css-p8ekiu"
>
<div
class="MuiBox-root css-xqhmuz"
>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-sizeSmall MuiInputBase-adornedStart MuiInputBase-adornedEnd css-1442447-MuiInputBase-root-MuiOutlinedInput-root"
>
<div
class="MuiInputAdornment-root MuiInputAdornment-positionStart MuiInputAdornment-outlined MuiInputAdornment-sizeSmall css-16yk9m0-MuiInputAdornment-root"
>
<span
class="notranslate"
>
</span>
</div>
<input
aria-invalid="false"
class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall MuiInputBase-inputAdornedStart MuiInputBase-inputAdornedEnd css-12yjm75-MuiInputBase-input-MuiOutlinedInput-input"
id=":mock-test-id:"
placeholder="Search"
type="text"
value=""
/>
<div
class="MuiBox-root css-1rstwa7"
>
Press
<div
class="MuiBox-root css-1y54l5z"
>
/
</div>
to search
</div>
<fieldset
aria-hidden="true"
class="MuiOutlinedInput-notchedOutline css-1d3z3hw-MuiOutlinedInput-notchedOutline"
>
<legend
class="css-ihdtdm"
>
<span
class="notranslate"
>
</span>
</legend>
</fieldset>
</div>
</div>
</div>
</div>
<div
class="MuiBox-root css-3n7f37"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,63 @@
/>
</svg>
<div
class="MuiBox-root css-i9gxme"
/>
class="MuiBox-root css-p8ekiu"
>
<div
class="MuiBox-root css-xqhmuz"
>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-sizeSmall MuiInputBase-adornedStart MuiInputBase-adornedEnd css-1442447-MuiInputBase-root-MuiOutlinedInput-root"
>
<div
class="MuiInputAdornment-root MuiInputAdornment-positionStart MuiInputAdornment-outlined MuiInputAdornment-sizeSmall css-16yk9m0-MuiInputAdornment-root"
>
<span
class="notranslate"
>
</span>
</div>
<input
aria-invalid="false"
class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall MuiInputBase-inputAdornedStart MuiInputBase-inputAdornedEnd css-12yjm75-MuiInputBase-input-MuiOutlinedInput-input"
id=":mock-test-id:"
placeholder="Search"
type="text"
value=""
/>
<div
class="MuiBox-root css-1rstwa7"
>
Press
<div
class="MuiBox-root css-1y54l5z"
>
/
</div>
to search
</div>
<fieldset
aria-hidden="true"
class="MuiOutlinedInput-notchedOutline css-1d3z3hw-MuiOutlinedInput-notchedOutline"
>
<legend
class="css-ihdtdm"
>
<span
class="notranslate"
>
</span>
</legend>
</fieldset>
</div>
</div>
</div>
</div>
<div
class="MuiBox-root css-3n7f37"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,63 @@
/>
</svg>
<div
class="MuiBox-root css-i9gxme"
/>
class="MuiBox-root css-p8ekiu"
>
<div
class="MuiBox-root css-xqhmuz"
>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-sizeSmall MuiInputBase-adornedStart MuiInputBase-adornedEnd css-1442447-MuiInputBase-root-MuiOutlinedInput-root"
>
<div
class="MuiInputAdornment-root MuiInputAdornment-positionStart MuiInputAdornment-outlined MuiInputAdornment-sizeSmall css-16yk9m0-MuiInputAdornment-root"
>
<span
class="notranslate"
>
</span>
</div>
<input
aria-invalid="false"
class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall MuiInputBase-inputAdornedStart MuiInputBase-inputAdornedEnd css-12yjm75-MuiInputBase-input-MuiOutlinedInput-input"
id=":mock-test-id:"
placeholder="Search"
type="text"
value=""
/>
<div
class="MuiBox-root css-1rstwa7"
>
Press
<div
class="MuiBox-root css-1y54l5z"
>
/
</div>
to search
</div>
<fieldset
aria-hidden="true"
class="MuiOutlinedInput-notchedOutline css-1d3z3hw-MuiOutlinedInput-notchedOutline"
>
<legend
class="css-ihdtdm"
>
<span
class="notranslate"
>
</span>
</legend>
</fieldset>
</div>
</div>
</div>
</div>
<div
class="MuiBox-root css-3n7f37"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,63 @@
/>
</svg>
<div
class="MuiBox-root css-i9gxme"
/>
class="MuiBox-root css-p8ekiu"
>
<div
class="MuiBox-root css-xqhmuz"
>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-sizeSmall MuiInputBase-adornedStart MuiInputBase-adornedEnd css-1442447-MuiInputBase-root-MuiOutlinedInput-root"
>
<div
class="MuiInputAdornment-root MuiInputAdornment-positionStart MuiInputAdornment-outlined MuiInputAdornment-sizeSmall css-16yk9m0-MuiInputAdornment-root"
>
<span
class="notranslate"
>
</span>
</div>
<input
aria-invalid="false"
class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall MuiInputBase-inputAdornedStart MuiInputBase-inputAdornedEnd css-12yjm75-MuiInputBase-input-MuiOutlinedInput-input"
id=":mock-test-id:"
placeholder="Search"
type="text"
value=""
/>
<div
class="MuiBox-root css-1rstwa7"
>
Press
<div
class="MuiBox-root css-1y54l5z"
>
/
</div>
to search
</div>
<fieldset
aria-hidden="true"
class="MuiOutlinedInput-notchedOutline css-1d3z3hw-MuiOutlinedInput-notchedOutline"
>
<legend
class="css-ihdtdm"
>
<span
class="notranslate"
>
</span>
</legend>
</fieldset>
</div>
</div>
</div>
</div>
<div
class="MuiBox-root css-3n7f37"
>
Expand Down
Loading

0 comments on commit fe20e5d

Please sign in to comment.