Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
f2ca3abf
Unverified
Commit
f2ca3abf
authored
Sep 11, 2019
by
Torkel Ödegaard
Committed by
GitHub
Sep 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AlphaNotice: replaced big popover tooltip with native tooltip (#18997)
parent
196f8503
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
30 deletions
+12
-30
packages/grafana-ui/src/components/AlphaNotice/AlphaNotice.tsx
+5
-14
public/app/features/dashboard/panel_editor/QueriesTab.tsx
+1
-1
public/app/features/dashboard/panel_editor/QueryOptions.tsx
+3
-1
public/app/features/plugins/PluginStateInfo.tsx
+3
-14
No files found.
packages/grafana-ui/src/components/AlphaNotice/AlphaNotice.tsx
View file @
f2ca3abf
import
React
,
{
FC
,
useContext
}
from
'react'
;
import
{
css
,
cx
}
from
'emotion'
;
import
{
PluginState
,
ThemeContext
}
from
'../../index'
;
import
{
Tooltip
}
from
'../index'
;
interface
Props
{
state
?:
PluginState
;
text
?:
JSX
.
Element
;
text
?:
string
;
className
?:
string
;
}
export
const
AlphaNotice
:
FC
<
Props
>
=
({
state
,
text
,
className
})
=>
{
const
tooltipContent
=
text
||
(
<
div
>
<
h5
>
Alpha Feature
</
h5
>
<
p
>
This feature is a work in progress and updates may include breaking changes.
</
p
>
</
div
>
);
const
tooltipContent
=
text
||
'This feature is a work in progress and updates may include breaking changes'
;
const
theme
=
useContext
(
ThemeContext
);
const
styles
=
cx
(
...
...
@@ -35,10 +28,8 @@ export const AlphaNotice: FC<Props> = ({ state, text, className }) => {
);
return
(
<
Tooltip
content=
{
tooltipContent
}
theme=
{
'info'
}
placement=
{
'top'
}
>
<
div
className=
{
styles
}
>
<
i
className=
"fa fa-warning"
/>
{
state
}
</
div
>
</
Tooltip
>
<
div
className=
{
styles
}
title=
{
tooltipContent
}
>
<
i
className=
"fa fa-warning"
/>
{
state
}
</
div
>
);
};
public/app/features/dashboard/panel_editor/QueriesTab.tsx
View file @
f2ca3abf
...
...
@@ -287,7 +287,7 @@ export class QueriesTab extends PureComponent<Props, State> {
<
PanelOptionsGroup
title=
{
<>
Transform q
uery results
Q
uery results
<
AlphaNotice
state=
{
PluginState
.
alpha
}
className=
{
css
`
...
...
public/app/features/dashboard/panel_editor/QueryOptions.tsx
View file @
f2ca3abf
...
...
@@ -168,9 +168,11 @@ export class QueryOptions extends PureComponent<Props, State> {
return
Object
.
keys
(
this
.
allOptions
).
map
(
key
=>
{
const
options
=
this
.
allOptions
[
key
];
const
panelKey
=
options
.
panelKey
||
key
;
// @ts-ignore
const
value
=
this
.
state
[
panelKey
];
if
(
value
||
queryOptions
[
key
])
{
if
(
queryOptions
[
key
])
{
return
(
<
DataSourceOption
key=
{
key
}
...
...
public/app/features/plugins/PluginStateInfo.tsx
View file @
f2ca3abf
...
...
@@ -6,23 +6,12 @@ interface Props {
state
?:
PluginState
;
}
function
getPluginStateInfoText
(
state
?:
PluginState
):
JSX
.
Element
|
null
{
function
getPluginStateInfoText
(
state
?:
PluginState
):
string
|
null
{
switch
(
state
)
{
case
PluginState
.
alpha
:
return
(
<
div
>
<
h5
>
Alpha Plugin
</
h5
>
<
p
>
This plugin is a work in progress and updates may include breaking changes.
</
p
>
</
div
>
);
return
'Alpha Plugin: This plugin is a work in progress and updates may include breaking changes'
;
case
PluginState
.
beta
:
return
(
<
div
>
<
h5
>
Beta Plugin
</
h5
>
<
p
>
There could be bugs and minor breaking changes to this plugin.
</
p
>
</
div
>
);
return
'Beta Plugin: There could be bugs and minor breaking changes to this plugin'
;
}
return
null
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment