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
0633dba3
Commit
0633dba3
authored
Feb 19, 2019
by
corpglory-dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes after merging #15468
parent
a053fb59
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
13 deletions
+17
-13
public/app/plugins/panel/piechart/PieChartPanelEditor.tsx
+2
-11
public/app/plugins/panel/piechart/module.tsx
+8
-2
public/app/plugins/panel/piechart/types.ts
+7
-0
No files found.
public/app/plugins/panel/piechart/Pie
chartPanelOptions
.tsx
→
public/app/plugins/panel/piechart/Pie
ChartPanelEditor
.tsx
View file @
0633dba3
import
React
,
{
PureComponent
}
from
'react'
;
import
{
Panel
Options
Props
,
PanelOptionsGrid
}
from
'@grafana/ui'
;
import
{
Panel
Editor
Props
,
PanelOptionsGrid
}
from
'@grafana/ui'
;
import
ValueOptions
from
'./ValueOptions'
;
import
{
PiechartOptions
}
from
'./types'
;
export
const
defaultProps
=
{
options
:
{
pieType
:
'pie'
,
unit
:
'short'
,
stat
:
'current'
,
strokeWidth
:
1
,
},
};
export
default
class
PiechartPanelOptions
extends
PureComponent
<
PanelOptionsProps
<
PiechartOptions
>>
{
export
default
class
PiechartPanelOptions
extends
PureComponent
<
PanelEditorProps
<
PiechartOptions
>>
{
static
defaultProps
=
defaultProps
;
render
()
{
...
...
public/app/plugins/panel/piechart/module.tsx
View file @
0633dba3
import
PiechartPanelOptions
,
{
defaultProps
}
from
'./PiechartPanelOptions'
;
import
{
ReactPanelPlugin
}
from
'@grafana/ui'
;
import
PiechartPanelEditor
from
'./PiechartPanelEditor'
;
import
{
PiechartPanel
}
from
'./PiechartPanel'
;
import
{
PiechartOptions
,
defaults
}
from
'./types'
;
export
const
reactPanel
=
new
ReactPanelPlugin
<
PiechartOptions
>
(
PiechartPanel
);
export
{
PiechartPanel
as
Panel
,
PiechartPanelOptions
as
PanelOptions
,
defaultProps
as
PanelDefaults
};
reactPanel
.
setEditor
(
PiechartPanelEditor
);
reactPanel
.
setDefaults
(
defaults
);
public/app/plugins/panel/piechart/types.ts
View file @
0633dba3
...
...
@@ -5,3 +5,10 @@ export interface PiechartOptions {
strokeWidth
:
number
;
// TODO: Options for Legend / Combine components
}
export
const
defaults
:
PiechartOptions
=
{
pieType
:
'pie'
,
unit
:
'short'
,
stat
:
'current'
,
strokeWidth
:
1
,
};
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