mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AlertBox: Merged Alertbox into Alert (#19212)
* refatoring alert box and using alert * refactoring alertbox to alert * Changed default to Error * added buttonText, onButtonClick, omRemove * Minor fix to buttons * fixed onRemove
This commit is contained in:
@@ -8,6 +8,7 @@ import find from 'lodash/find';
|
||||
import { UrlQueryMap } from '@grafana/runtime';
|
||||
import { StoreState, AppNotificationSeverity } from 'app/types';
|
||||
import {
|
||||
Alert,
|
||||
PluginType,
|
||||
GrafanaPlugin,
|
||||
PluginInclude,
|
||||
@@ -30,7 +31,6 @@ import { PluginDashboards } from './PluginDashboards';
|
||||
import { appEvents } from 'app/core/core';
|
||||
import { config } from 'app/core/config';
|
||||
import { ContextSrv } from '../../core/services/context_srv';
|
||||
import { AlertBox } from 'app/core/components/AlertBox/AlertBox';
|
||||
|
||||
export function getLoadingNav(): NavModel {
|
||||
const node = {
|
||||
@@ -141,7 +141,7 @@ class PluginPage extends PureComponent<Props, State> {
|
||||
const { plugin, nav } = this.state;
|
||||
|
||||
if (!plugin) {
|
||||
return <AlertBox severity={AppNotificationSeverity.Error} title="Plugin Not Found" />;
|
||||
return <Alert severity={AppNotificationSeverity.Error} title="Plugin Not Found" />;
|
||||
}
|
||||
|
||||
const active = nav.main.children.find(tab => tab.active);
|
||||
@@ -300,10 +300,10 @@ class PluginPage extends PureComponent<Props, State> {
|
||||
<div className="sidebar-container">
|
||||
<div className="sidebar-content">
|
||||
{plugin.loadError && (
|
||||
<AlertBox
|
||||
<Alert
|
||||
severity={AppNotificationSeverity.Error}
|
||||
title="Error Loading Plugin"
|
||||
body={
|
||||
children={
|
||||
<>
|
||||
Check the server startup logs for more information. <br />
|
||||
If this plugin was loaded from git, make sure it was compiled.
|
||||
|
||||
Reference in New Issue
Block a user