mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
RestoreDashboards: Add search (#89692)
* feat: add search * feat: run i18n extraction * refactor: styling issue for smaller screen sizes
This commit is contained in:
parent
190892bc88
commit
c9a5ee616e
@ -1,7 +1,7 @@
|
|||||||
import { memo, useEffect } from 'react';
|
import { memo, useEffect } from 'react';
|
||||||
import AutoSizer from 'react-virtualized-auto-sizer';
|
import AutoSizer from 'react-virtualized-auto-sizer';
|
||||||
|
|
||||||
import { EmptyState } from '@grafana/ui';
|
import { FilterInput, EmptyState, Stack } from '@grafana/ui';
|
||||||
import { Page } from 'app/core/components/Page/Page';
|
import { Page } from 'app/core/components/Page/Page';
|
||||||
import { t } from 'app/core/internationalization';
|
import { t } from 'app/core/internationalization';
|
||||||
import { ActionRow } from 'app/features/search/page/components/ActionRow';
|
import { ActionRow } from 'app/features/search/page/components/ActionRow';
|
||||||
@ -53,18 +53,26 @@ const RecentlyDeletedPage = memo(() => {
|
|||||||
<Page.Contents>
|
<Page.Contents>
|
||||||
{searchState.result && (
|
{searchState.result && (
|
||||||
<>
|
<>
|
||||||
<ActionRow
|
<Stack direction="column">
|
||||||
state={searchState}
|
<FilterInput
|
||||||
getTagOptions={stateManager.getTagOptions}
|
placeholder={t('recentlyDeleted.filter.placeholder', 'Search for dashboards')}
|
||||||
getSortOptions={getGrafanaSearcher().getSortOptions}
|
value={searchState.query}
|
||||||
sortPlaceholder={getGrafanaSearcher().sortPlaceholder}
|
escapeRegex={false}
|
||||||
onLayoutChange={stateManager.onLayoutChange}
|
onChange={stateManager.onQueryChange}
|
||||||
onSortChange={stateManager.onSortChange}
|
/>
|
||||||
onTagFilterChange={stateManager.onTagFilterChange}
|
<ActionRow
|
||||||
onDatasourceChange={stateManager.onDatasourceChange}
|
state={searchState}
|
||||||
onPanelTypeChange={stateManager.onPanelTypeChange}
|
getTagOptions={stateManager.getTagOptions}
|
||||||
onSetIncludePanels={stateManager.onSetIncludePanels}
|
getSortOptions={getGrafanaSearcher().getSortOptions}
|
||||||
/>
|
sortPlaceholder={getGrafanaSearcher().sortPlaceholder}
|
||||||
|
onLayoutChange={stateManager.onLayoutChange}
|
||||||
|
onSortChange={stateManager.onSortChange}
|
||||||
|
onTagFilterChange={stateManager.onTagFilterChange}
|
||||||
|
onDatasourceChange={stateManager.onDatasourceChange}
|
||||||
|
onPanelTypeChange={stateManager.onPanelTypeChange}
|
||||||
|
onSetIncludePanels={stateManager.onSetIncludePanels}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
<RecentlyDeletedActions />
|
<RecentlyDeletedActions />
|
||||||
<AutoSizer>
|
<AutoSizer>
|
||||||
{({ width, height }) => (
|
{({ width, height }) => (
|
||||||
|
@ -117,6 +117,10 @@ const getStyles = (theme: GrafanaTheme2) => ({
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
gap: theme.spacing(1),
|
gap: theme.spacing(1),
|
||||||
marginBottom: theme.spacing(2),
|
margin: theme.spacing(2, 0),
|
||||||
|
|
||||||
|
[theme.breakpoints.up('md')]: {
|
||||||
|
marginTop: 0,
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
@ -1625,6 +1625,11 @@
|
|||||||
"title": "Restore Dashboards"
|
"title": "Restore Dashboards"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"recentlyDeleted": {
|
||||||
|
"filter": {
|
||||||
|
"placeholder": "Search for dashboards"
|
||||||
|
}
|
||||||
|
},
|
||||||
"refresh-picker": {
|
"refresh-picker": {
|
||||||
"aria-label": {
|
"aria-label": {
|
||||||
"choose-interval": "Auto refresh turned off. Choose refresh time interval",
|
"choose-interval": "Auto refresh turned off. Choose refresh time interval",
|
||||||
|
@ -1625,6 +1625,11 @@
|
|||||||
"title": "Ŗęşŧőřę Đäşĥþőäřđş"
|
"title": "Ŗęşŧőřę Đäşĥþőäřđş"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"recentlyDeleted": {
|
||||||
|
"filter": {
|
||||||
|
"placeholder": "Ŝęäřčĥ ƒőř đäşĥþőäřđş"
|
||||||
|
}
|
||||||
|
},
|
||||||
"refresh-picker": {
|
"refresh-picker": {
|
||||||
"aria-label": {
|
"aria-label": {
|
||||||
"choose-interval": "Åūŧő řęƒřęşĥ ŧūřʼnęđ őƒƒ. Cĥőőşę řęƒřęşĥ ŧįmę įʼnŧęřväľ",
|
"choose-interval": "Åūŧő řęƒřęşĥ ŧūřʼnęđ őƒƒ. Cĥőőşę řęƒřęşĥ ŧįmę įʼnŧęřväľ",
|
||||||
|
Loading…
Reference in New Issue
Block a user