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
a3d76583
Unverified
Commit
a3d76583
authored
Feb 01, 2021
by
Torkel Ödegaard
Committed by
GitHub
Feb 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Menu: Mark menu components as internal (#30740)
* Menu: Mark menu components are internal * Update * minor fix
parent
e0087490
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
8 deletions
+15
-8
packages/grafana-ui/src/components/GraphNG/GraphNG.tsx
+8
-2
packages/grafana-ui/src/components/Menu/Menu.tsx
+4
-1
packages/grafana-ui/src/components/uPlot/types.ts
+1
-1
public/app/plugins/panel/timeseries/TimeSeriesPanel.tsx
+2
-4
No files found.
packages/grafana-ui/src/components/GraphNG/GraphNG.tsx
View file @
a3d76583
...
...
@@ -14,10 +14,10 @@ import {
outerJoinDataFrames
,
reduceField
,
TimeRange
,
TimeZone
,
}
from
'@grafana/data'
;
import
{
useTheme
}
from
'../../themes'
;
import
{
UPlotChart
}
from
'../uPlot/Plot'
;
import
{
PlotProps
}
from
'../uPlot/types'
;
import
{
AxisPlacement
,
DrawStyle
,
...
...
@@ -41,12 +41,18 @@ export interface XYFieldMatchers {
x
:
FieldMatcher
;
// first match
y
:
FieldMatcher
;
}
export
interface
GraphNGProps
extends
Omit
<
PlotProps
,
'data'
|
'config'
>
{
export
interface
GraphNGProps
{
width
:
number
;
height
:
number
;
data
:
DataFrame
[];
timeRange
:
TimeRange
;
legend
:
VizLegendOptions
;
timeZone
:
TimeZone
;
fields
?:
XYFieldMatchers
;
// default will assume timeseries data
onLegendClick
?:
(
event
:
GraphNGLegendEvent
)
=>
void
;
onSeriesColorChange
?:
(
label
:
string
,
color
:
string
)
=>
void
;
children
?:
React
.
ReactNode
;
}
const
defaultConfig
:
GraphFieldConfig
=
{
...
...
packages/grafana-ui/src/components/Menu/Menu.tsx
View file @
a3d76583
...
...
@@ -6,6 +6,7 @@ import { styleMixins, useStyles } from '../../themes';
import
{
Icon
}
from
'../Icon/Icon'
;
import
{
IconName
}
from
'../../types'
;
/** @internal */
export
interface
MenuItem
{
/** Label of the menu item */
label
:
string
;
...
...
@@ -23,6 +24,7 @@ export interface MenuItem {
active
?:
boolean
;
}
/** @internal */
export
interface
MenuItemsGroup
{
/** Label for the menu items group */
label
?:
string
;
...
...
@@ -30,6 +32,7 @@ export interface MenuItemsGroup {
items
:
MenuItem
[];
}
/** @internal */
export
interface
MenuProps
extends
React
.
HTMLAttributes
<
HTMLDivElement
>
{
/** React element rendered at the top of the menu */
header
?:
React
.
ReactNode
;
...
...
@@ -39,7 +42,7 @@ export interface MenuProps extends React.HTMLAttributes<HTMLDivElement> {
onClose
?:
()
=>
void
;
}
/** @
alpha
*/
/** @
internal
*/
export
const
Menu
=
React
.
forwardRef
<
HTMLDivElement
,
MenuProps
>
(({
header
,
items
,
onClose
,
...
otherProps
},
ref
)
=>
{
const
styles
=
useStyles
(
getMenuStyles
);
const
onClick
=
useCallback
(()
=>
{
...
...
packages/grafana-ui/src/components/uPlot/types.ts
View file @
a3d76583
...
...
@@ -23,7 +23,7 @@ export interface PlotProps {
width
:
number
;
height
:
number
;
config
:
UPlotConfigBuilder
;
children
?:
React
.
React
Element
[]
;
children
?:
React
.
React
Node
;
}
export
abstract
class
PlotConfigBuilder
<
P
,
T
>
{
...
...
public/app/plugins/panel/timeseries/TimeSeriesPanel.tsx
View file @
a3d76583
...
...
@@ -55,12 +55,10 @@ export const TimeSeriesPanel: React.FC<TimeSeriesPanelProps> = ({
<
TooltipPlugin
mode=
{
options
.
tooltipOptions
.
mode
}
timeZone=
{
timeZone
}
/>
<
ZoomPlugin
onZoom=
{
onChangeTimeRange
}
/>
<
ContextMenuPlugin
timeZone=
{
timeZone
}
replaceVariables=
{
replaceVariables
}
/>
{
data
.
annotations
?
(
{
data
.
annotations
&&
(
<
ExemplarsPlugin
exemplars=
{
data
.
annotations
}
timeZone=
{
timeZone
}
getFieldLinks=
{
getFieldLinks
}
/>
)
:
(
<></>
)
}
{
data
.
annotations
?
<
AnnotationsPlugin
annotations=
{
data
.
annotations
}
timeZone=
{
timeZone
}
/>
:
<><
/>
}
{
data
.
annotations
&&
<
AnnotationsPlugin
annotations=
{
data
.
annotations
}
timeZone=
{
timeZone
}
/>
}
</
GraphNG
>
);
};
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