mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Log Context: Improve loading indicator (#66979)
* remove loadingplaceholder * lint
This commit is contained in:
parent
c11baa3ead
commit
74d3d3cf4a
@ -4,7 +4,7 @@ import { useAsync } from 'react-use';
|
|||||||
|
|
||||||
import { GrafanaTheme2, LogRowModel, SelectableValue } from '@grafana/data';
|
import { GrafanaTheme2, LogRowModel, SelectableValue } from '@grafana/data';
|
||||||
import { reportInteraction } from '@grafana/runtime';
|
import { reportInteraction } from '@grafana/runtime';
|
||||||
import { Collapse, Icon, Label, LoadingPlaceholder, MultiSelect, Tag, Tooltip, useStyles2 } from '@grafana/ui';
|
import { Collapse, Icon, Label, MultiSelect, Tag, Tooltip, useStyles2 } from '@grafana/ui';
|
||||||
import store from 'app/core/store';
|
import store from 'app/core/store';
|
||||||
|
|
||||||
import { RawQuery } from '../../prometheus/querybuilder/shared/RawQuery';
|
import { RawQuery } from '../../prometheus/querybuilder/shared/RawQuery';
|
||||||
@ -34,12 +34,6 @@ function getStyles(theme: GrafanaTheme2) {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
gap: ${theme.spacing(0.5)};
|
gap: ${theme.spacing(0.5)};
|
||||||
`,
|
`,
|
||||||
loadingPlaceholder: css`
|
|
||||||
margin-bottom: 0px;
|
|
||||||
float: right;
|
|
||||||
display: inline;
|
|
||||||
margin-left: auto;
|
|
||||||
`,
|
|
||||||
textWrapper: css`
|
textWrapper: css`
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -167,7 +161,6 @@ export function LokiContextUi(props: LokiContextUiProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.wrapper}>
|
<div className={styles.wrapper}>
|
||||||
<LoadingPlaceholder text="" className={`${styles.loadingPlaceholder} ${loading ? '' : styles.hidden}`} />
|
|
||||||
<Collapse
|
<Collapse
|
||||||
collapsible={true}
|
collapsible={true}
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
@ -208,6 +201,7 @@ export function LokiContextUi(props: LokiContextUiProps) {
|
|||||||
Widen the search
|
Widen the search
|
||||||
</Label>
|
</Label>
|
||||||
<MultiSelect
|
<MultiSelect
|
||||||
|
isLoading={loading}
|
||||||
options={realLabels.map(contextFilterToSelectFilter)}
|
options={realLabels.map(contextFilterToSelectFilter)}
|
||||||
value={realLabelsEnabled.map(contextFilterToSelectFilter)}
|
value={realLabelsEnabled.map(contextFilterToSelectFilter)}
|
||||||
closeMenuOnSelect={true}
|
closeMenuOnSelect={true}
|
||||||
@ -248,6 +242,7 @@ export function LokiContextUi(props: LokiContextUiProps) {
|
|||||||
Refine the search
|
Refine the search
|
||||||
</Label>
|
</Label>
|
||||||
<MultiSelect
|
<MultiSelect
|
||||||
|
isLoading={loading}
|
||||||
options={parsedLabels.map(contextFilterToSelectFilter)}
|
options={parsedLabels.map(contextFilterToSelectFilter)}
|
||||||
value={parsedLabelsEnabled.map(contextFilterToSelectFilter)}
|
value={parsedLabelsEnabled.map(contextFilterToSelectFilter)}
|
||||||
closeMenuOnSelect={true}
|
closeMenuOnSelect={true}
|
||||||
|
Loading…
Reference in New Issue
Block a user