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
49550cce
Commit
49550cce
authored
Nov 06, 2018
by
Johannes Schill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip: panel-header: More merge conflicts during cherry pick
parent
dbf7f3fb
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
15 deletions
+23
-15
public/app/features/dashboard/dashgrid/DashboardPanel.tsx
+1
-1
public/app/features/dashboard/dashgrid/PanelChrome.tsx
+6
-5
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderMenu.tsx
+1
-1
public/app/plugins/panel/graph2/module.tsx
+1
-3
public/app/plugins/panel/graph2/moduleMenu.tsx
+5
-2
public/app/types/panel.ts
+7
-2
public/app/types/plugins.ts
+2
-1
No files found.
public/app/features/dashboard/dashgrid/DashboardPanel.tsx
View file @
49550cce
...
@@ -125,7 +125,7 @@ export class DashboardPanel extends PureComponent<Props, State> {
...
@@ -125,7 +125,7 @@ export class DashboardPanel extends PureComponent<Props, State> {
// withMenuOptions={pluginExports.withMenuOptions}
// withMenuOptions={pluginExports.withMenuOptions}
panel=
{
this
.
props
.
panel
}
panel=
{
this
.
props
.
panel
}
dashboard=
{
this
.
props
.
dashboard
}
dashboard=
{
this
.
props
.
dashboard
}
moduleMenu=
{
pluginExports
.
moduleMenu
}
getMenuAdditional=
{
pluginExports
.
getMenuAdditional
}
/>
/>
</
div
>
</
div
>
{
this
.
props
.
panel
.
isEditing
&&
(
{
this
.
props
.
panel
.
isEditing
&&
(
...
...
public/app/features/dashboard/dashgrid/PanelChrome.tsx
View file @
49550cce
...
@@ -14,14 +14,14 @@ import { PanelHeaderMenu } from './PanelHeader/PanelHeaderMenu';
...
@@ -14,14 +14,14 @@ import { PanelHeaderMenu } from './PanelHeader/PanelHeaderMenu';
import
{
PanelModel
}
from
'../panel_model'
;
import
{
PanelModel
}
from
'../panel_model'
;
import
{
DashboardModel
}
from
'../dashboard_model'
;
import
{
DashboardModel
}
from
'../dashboard_model'
;
import
{
TimeRange
,
PanelProps
,
TimeSeries
}
from
'app/types'
;
import
{
TimeRange
,
PanelProps
,
TimeSeries
}
from
'app/types'
;
import
{
PanelHeaderGetMenuAdditional
}
from
'app/types/panel'
;
import
{
DataSourceApi
}
from
'app/types/series'
;
import
{
DataSourceApi
}
from
'app/types/series'
;
export
interface
PanelChromeProps
{
export
interface
PanelChromeProps
{
panel
:
PanelModel
;
panel
:
PanelModel
;
dashboard
:
DashboardModel
;
dashboard
:
DashboardModel
;
component
:
ComponentClass
<
PanelProps
>
;
component
:
ComponentClass
<
PanelProps
>
;
// withMenuOptions?: (c: typeof PanelHeaderMenu, p: PanelModel) => typeof PanelHeaderMenu;
getMenuAdditional
?:
PanelHeaderGetMenuAdditional
;
moduleMenu
?:
any
;
}
}
export
interface
PanelChromeState
{
export
interface
PanelChromeState
{
...
@@ -52,7 +52,7 @@ export class PanelChrome extends PureComponent<PanelChromeProps, PanelChromeStat
...
@@ -52,7 +52,7 @@ export class PanelChrome extends PureComponent<PanelChromeProps, PanelChromeStat
try
{
try
{
const
dataSourceSrv
=
getDatasourceSrv
();
const
dataSourceSrv
=
getDatasourceSrv
();
const
dataSourceApi
=
await
dataSourceSrv
.
get
(
datasource
);
const
dataSourceApi
=
await
dataSourceSrv
.
get
(
datasource
);
this
.
setState
(
prevState
=>
({
this
.
setState
(
(
prevState
:
PanelChromeState
)
=>
({
...
prevState
,
...
prevState
,
dataSourceApi
,
dataSourceApi
,
}));
}));
...
@@ -95,11 +95,12 @@ export class PanelChrome extends PureComponent<PanelChromeProps, PanelChromeStat
...
@@ -95,11 +95,12 @@ export class PanelChrome extends PureComponent<PanelChromeProps, PanelChromeStat
}
}
render
()
{
render
()
{
const
{
panel
,
dashboard
,
moduleMenu
}
=
this
.
props
;
const
{
panel
,
dashboard
,
getMenuAdditional
}
=
this
.
props
;
const
{
refreshCounter
,
timeRange
,
dataSourceApi
,
timeSeries
,
renderCounter
}
=
this
.
state
;
const
{
refreshCounter
,
timeRange
,
dataSourceApi
,
timeSeries
,
renderCounter
}
=
this
.
state
;
const
{
targets
}
=
panel
;
const
{
targets
}
=
panel
;
const
PanelComponent
=
this
.
props
.
component
;
const
PanelComponent
=
this
.
props
.
component
;
const
panelSpecificMenuOptions
=
moduleMenu
(
panel
,
dataSourceApi
,
timeSeries
);
const
panelSpecificMenuOptions
=
getMenuAdditional
(
panel
,
dataSourceApi
,
timeSeries
);
const
additionalMenuItems
=
panelSpecificMenuOptions
.
additionalMenuItems
||
undefined
;
const
additionalMenuItems
=
panelSpecificMenuOptions
.
additionalMenuItems
||
undefined
;
const
additionalSubMenuItems
=
panelSpecificMenuOptions
.
additionalSubMenuItems
||
undefined
;
const
additionalSubMenuItems
=
panelSpecificMenuOptions
.
additionalSubMenuItems
||
undefined
;
...
...
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderMenu.tsx
View file @
49550cce
...
@@ -4,8 +4,8 @@ import { PanelModel } from 'app/features/dashboard/panel_model';
...
@@ -4,8 +4,8 @@ import { PanelModel } from 'app/features/dashboard/panel_model';
import
{
PanelHeaderMenuItem
}
from
'./PanelHeaderMenuItem'
;
import
{
PanelHeaderMenuItem
}
from
'./PanelHeaderMenuItem'
;
import
{
PanelHeaderMenuItemProps
}
from
'app/types/panel'
;
import
{
PanelHeaderMenuItemProps
}
from
'app/types/panel'
;
import
{
getPanelMenu
}
from
'app/features/dashboard/utils/panel_menu'
;
import
{
getPanelMenu
}
from
'app/features/dashboard/utils/panel_menu'
;
import
{
DataSourceApi
}
from
'app/types/series'
;
import
{
TimeSeries
}
from
'app/types'
;
import
{
TimeSeries
}
from
'app/types'
;
import
{
DataSourceApi
}
from
'app/types/series'
;
export
interface
PanelHeaderMenuProps
{
export
interface
PanelHeaderMenuProps
{
panel
:
PanelModel
;
panel
:
PanelModel
;
...
...
public/app/plugins/panel/graph2/module.tsx
View file @
49550cce
...
@@ -7,8 +7,6 @@ import { Switch } from 'app/core/components/Switch/Switch';
...
@@ -7,8 +7,6 @@ import { Switch } from 'app/core/components/Switch/Switch';
import
{
getTimeSeriesVMs
}
from
'app/viz/state/timeSeries'
;
import
{
getTimeSeriesVMs
}
from
'app/viz/state/timeSeries'
;
import
{
PanelProps
,
PanelOptionsProps
,
NullValueMode
}
from
'app/types'
;
import
{
PanelProps
,
PanelOptionsProps
,
NullValueMode
}
from
'app/types'
;
// import { moduleMenu } from './moduleMenu';
interface
Options
{
interface
Options
{
showBars
:
boolean
;
showBars
:
boolean
;
showLines
:
boolean
;
showLines
:
boolean
;
...
@@ -75,4 +73,4 @@ export class GraphOptions extends PureComponent<PanelOptionsProps<Options>> {
...
@@ -75,4 +73,4 @@ export class GraphOptions extends PureComponent<PanelOptionsProps<Options>> {
}
}
export
{
Graph2
as
PanelComponent
,
GraphOptions
as
PanelOptionsComponent
};
export
{
Graph2
as
PanelComponent
,
GraphOptions
as
PanelOptionsComponent
};
export
{
moduleMenu
}
from
'./moduleMenu'
;
export
{
getMenuAdditional
}
from
'./moduleMenu'
;
public/app/plugins/panel/graph2/moduleMenu.tsx
View file @
49550cce
...
@@ -7,8 +7,11 @@ import { store } from 'app/store/configureStore';
...
@@ -7,8 +7,11 @@ import { store } from 'app/store/configureStore';
import
{
getDatasourceSrv
}
from
'app/features/plugins/datasource_srv'
;
import
{
getDatasourceSrv
}
from
'app/features/plugins/datasource_srv'
;
import
appEvents
from
'app/core/app_events'
;
import
appEvents
from
'app/core/app_events'
;
import
{
PanelHeaderMenuItemProps
,
PanelHeaderMenuItemTypes
}
from
'app/types/panel'
;
import
{
PanelHeaderMenuItemProps
,
PanelHeaderMenuItemTypes
}
from
'app/types/panel'
;
import
{
TimeSeries
}
from
'app/types/series'
;
import
{
DataSource
}
from
'app/types/datasources'
;
import
{
PanelModel
}
from
'app/features/dashboard/panel_model'
;
export
const
moduleMenu
=
(
panel
,
dataSourceApi
,
timeSeries
)
=>
{
export
const
getMenuAdditional
=
(
panel
:
PanelModel
,
dataSourceApi
:
DataSource
,
timeSeries
:
TimeSeries
[]
)
=>
{
const
onExploreClick
=
async
()
=>
{
const
onExploreClick
=
async
()
=>
{
const
datasourceSrv
=
getDatasourceSrv
();
const
datasourceSrv
=
getDatasourceSrv
();
const
timeSrv
=
getTimeSrv
();
const
timeSrv
=
getTimeSrv
();
...
@@ -19,7 +22,7 @@ export const moduleMenu = (panel, dataSourceApi, timeSeries) => {
...
@@ -19,7 +22,7 @@ export const moduleMenu = (panel, dataSourceApi, timeSeries) => {
};
};
const
onExportCsv
=
()
=>
{
const
onExportCsv
=
()
=>
{
const
model
=
{}
as
{
seriesList
:
string
};
const
model
=
{}
as
{
seriesList
:
TimeSeries
[]
};
model
.
seriesList
=
timeSeries
;
model
.
seriesList
=
timeSeries
;
appEvents
.
emit
(
'show-modal'
,
{
appEvents
.
emit
(
'show-modal'
,
{
templateHtml
:
'<export-data-modal data="model.seriesList"></export-data-modal>'
,
templateHtml
:
'<export-data-modal data="model.seriesList"></export-data-modal>'
,
...
...
public/app/types/panel.ts
View file @
49550cce
import
{
LoadingState
,
TimeSeries
,
TimeRange
}
from
'./series'
;
import
{
LoadingState
,
TimeSeries
,
TimeRange
,
DataSourceApi
}
from
'./series'
;
import
{
PanelModel
}
from
'app/features/dashboard/panel_model'
;
export
interface
PanelProps
<
T
=
any
>
{
export
interface
PanelProps
<
T
=
any
>
{
timeSeries
:
TimeSeries
[];
timeSeries
:
TimeSeries
[];
...
@@ -31,7 +32,11 @@ export interface PanelHeaderMenuItemProps {
...
@@ -31,7 +32,11 @@ export interface PanelHeaderMenuItemProps {
role
?:
string
;
role
?:
string
;
}
}
export
interface
Panel
MenuExtras
{
export
interface
Panel
HeaderMenuAdditional
{
additionalMenuItems
:
PanelHeaderMenuItemProps
[];
additionalMenuItems
:
PanelHeaderMenuItemProps
[];
additionalSubMenuItems
:
PanelHeaderMenuItemProps
[];
additionalSubMenuItems
:
PanelHeaderMenuItemProps
[];
}
}
export
interface
PanelHeaderGetMenuAdditional
{
(
panel
:
PanelModel
,
dataSourceApi
:
DataSourceApi
,
timeSeries
:
TimeSeries
[]):
PanelHeaderMenuAdditional
;
}
public/app/types/plugins.ts
View file @
49550cce
import
{
ComponentClass
}
from
'react'
;
import
{
ComponentClass
}
from
'react'
;
import
{
PanelProps
,
PanelOptionsProps
}
from
'./panel'
;
import
{
PanelProps
,
PanelOptionsProps
}
from
'./panel'
;
import
{
PanelHeaderGetMenuAdditional
}
from
'app/types/panel'
;
export
interface
PluginExports
{
export
interface
PluginExports
{
Datasource
?:
any
;
Datasource
?:
any
;
...
@@ -13,7 +14,7 @@ export interface PluginExports {
...
@@ -13,7 +14,7 @@ export interface PluginExports {
PanelCtrl
?;
PanelCtrl
?;
PanelComponent
?:
ComponentClass
<
PanelProps
>
;
PanelComponent
?:
ComponentClass
<
PanelProps
>
;
PanelOptionsComponent
:
ComponentClass
<
PanelOptionsProps
>
;
PanelOptionsComponent
:
ComponentClass
<
PanelOptionsProps
>
;
moduleMenu
?:
any
;
getMenuAdditional
?:
PanelHeaderGetMenuAdditional
;
}
}
export
interface
PanelPlugin
{
export
interface
PanelPlugin
{
...
...
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