mirror of https://github.com/grafana/grafana
Plugins: Unifying alpha state & options for all plugins (#16530)
* app pages * app pages * workign example * started alpha support * remove app stuff * show warning on alpha/beta panels * put app back on plugin file * fix go * add enum for PluginType and PluginIncludeType * Refactoring and moving settings to plugins section fixes #16529pull/16548/head
parent
30dcf0f6c5
commit
3c21a121eb
@ -0,0 +1,34 @@ |
||||
import React, { FC } from 'react'; |
||||
import { PluginState } from '@grafana/ui'; |
||||
|
||||
interface Props { |
||||
state?: PluginState; |
||||
} |
||||
|
||||
function getPluginStateInfoText(state?: PluginState): string | null { |
||||
switch (state) { |
||||
case PluginState.alpha: |
||||
return ( |
||||
'This plugin is marked as being in alpha state, which means it is in early development phase and updates' + |
||||
' will include breaking changes.' |
||||
); |
||||
|
||||
case PluginState.beta: |
||||
return ( |
||||
'This plugin is marked as being in a beta development state. This means it is in currently in active' + |
||||
' development and could be missing important features.' |
||||
); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
const PluginStateinfo: FC<Props> = props => { |
||||
const text = getPluginStateInfoText(props.state); |
||||
if (!text) { |
||||
return null; |
||||
} |
||||
|
||||
return <div className="grafana-info-box">{text}</div>; |
||||
}; |
||||
|
||||
export default PluginStateinfo; |
Loading…
Reference in new issue