The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/public/app/features/plugins/PluginStateInfo.tsx

33 lines
806 B

import React, { FC } from 'react';
import { PluginState, AlphaNotice } from '@grafana/ui';
import { css } from 'emotion';
interface Props {
state?: PluginState;
}
function getPluginStateInfoText(state?: PluginState): string | null {
switch (state) {
case PluginState.alpha:
return 'Alpha Plugin: This plugin is a work in progress and updates may include breaking changes';
case PluginState.beta:
return 'Beta Plugin: There could be bugs and minor breaking changes to this plugin';
}
return null;
}
const PluginStateinfo: FC<Props> = props => {
const text = getPluginStateInfoText(props.state);
return (
<AlphaNotice
state={props.state}
text={text}
className={css`
margin-left: 16px;
`}
/>
);
};
export default PluginStateinfo;