|
|
|
@ -2,7 +2,7 @@ import { AnnotationQuery, EventBus, GrafanaTheme2 } from '@grafana/data'; |
|
|
|
import React, { useEffect, useState } from 'react'; |
|
|
|
import React, { useEffect, useState } from 'react'; |
|
|
|
import { getDashboardQueryRunner } from '../../../query/state/DashboardQueryRunner/DashboardQueryRunner'; |
|
|
|
import { getDashboardQueryRunner } from '../../../query/state/DashboardQueryRunner/DashboardQueryRunner'; |
|
|
|
import { AnnotationQueryFinished, AnnotationQueryStarted } from '../../../../types/events'; |
|
|
|
import { AnnotationQueryFinished, AnnotationQueryStarted } from '../../../../types/events'; |
|
|
|
import { InlineField, InlineSwitch, useStyles2 } from '@grafana/ui'; |
|
|
|
import { InlineField, InlineFieldRow, InlineSwitch, useStyles2 } from '@grafana/ui'; |
|
|
|
import { LoadingIndicator } from '@grafana/ui/src/components/PanelChrome/LoadingIndicator'; |
|
|
|
import { LoadingIndicator } from '@grafana/ui/src/components/PanelChrome/LoadingIndicator'; |
|
|
|
import { css } from '@emotion/css'; |
|
|
|
import { css } from '@emotion/css'; |
|
|
|
|
|
|
|
|
|
|
|
@ -41,14 +41,14 @@ export const AnnotationPicker = ({ annotation, events, onEnabledChanged }: Annot |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div key={annotation.name} className={styles.annotation}> |
|
|
|
<div key={annotation.name} className={styles.annotation}> |
|
|
|
<InlineField label={annotation.name} disabled={loading}> |
|
|
|
<InlineFieldRow> |
|
|
|
<> |
|
|
|
<InlineField label={annotation.name} disabled={loading}> |
|
|
|
<InlineSwitch value={annotation.enable} onChange={() => onEnabledChanged(annotation)} disabled={loading} /> |
|
|
|
<InlineSwitch value={annotation.enable} onChange={() => onEnabledChanged(annotation)} disabled={loading} /> |
|
|
|
<div className={styles.indicator}> |
|
|
|
</InlineField> |
|
|
|
<LoadingIndicator loading={loading} onCancel={onCancel} /> |
|
|
|
<div className={styles.indicator}> |
|
|
|
</div> |
|
|
|
<LoadingIndicator loading={true} onCancel={onCancel} /> |
|
|
|
</> |
|
|
|
</div> |
|
|
|
</InlineField> |
|
|
|
</InlineFieldRow> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|