mirror of
https://github.com/grafana/grafana.git
synced 2025-01-28 17:24:59 -06:00
align alert (#33919)
This commit is contained in:
parent
10a25ba4e5
commit
ac44a679a7
@ -200,6 +200,19 @@ export class DataSourceSettingsPage extends PureComponent<Props> {
|
||||
return <div>Page not found: {page}</div>;
|
||||
}
|
||||
|
||||
renderAlertDetails() {
|
||||
const { testingStatus } = this.props;
|
||||
|
||||
return (
|
||||
<>
|
||||
{testingStatus?.details?.message}
|
||||
{testingStatus?.details?.verboseMessage ? (
|
||||
<details style={{ whiteSpace: 'pre-wrap' }}>{testingStatus?.details?.verboseMessage}</details>
|
||||
) : null}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
renderSettings() {
|
||||
const { dataSourceMeta, setDataSourceName, setIsDefault, dataSource, plugin, testingStatus } = this.props;
|
||||
|
||||
@ -233,20 +246,17 @@ export class DataSourceSettingsPage extends PureComponent<Props> {
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="gf-form-group p-t-2">
|
||||
{testingStatus?.message && (
|
||||
{testingStatus?.message && (
|
||||
<div className="gf-form-group p-t-2">
|
||||
<Alert
|
||||
severity={testingStatus.status === 'error' ? 'error' : 'success'}
|
||||
title={testingStatus.message}
|
||||
aria-label={selectors.pages.DataSource.alert}
|
||||
>
|
||||
{testingStatus.details?.message ?? null}
|
||||
{testingStatus.details?.verboseMessage ? (
|
||||
<details style={{ whiteSpace: 'pre-wrap' }}>{testingStatus.details?.verboseMessage}</details>
|
||||
) : null}
|
||||
{testingStatus.details && this.renderAlertDetails()}
|
||||
</Alert>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<ButtonRow
|
||||
onSubmit={(event) => this.onSubmit(event)}
|
||||
|
Loading…
Reference in New Issue
Block a user