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
e4dad780
Commit
e4dad780
authored
Feb 04, 2019
by
Peter Holmberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added flags to vizpicker from query param
parent
f6b46f7a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
15 deletions
+37
-15
public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx
+35
-13
public/app/features/dashboard/panel_editor/VisualizationTab.tsx
+2
-2
No files found.
public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx
View file @
e4dad780
...
...
@@ -17,6 +17,17 @@ export interface State {
copiedPanelPlugins
:
any
[];
}
type
Location
=
{
query
:
{
panelId
:
number
;
edit
:
boolean
;
fullscreen
:
boolean
;
tab
?:
string
;
isVizPickerOpen
?:
boolean
;
};
partial
:
boolean
;
};
export
class
AddPanelWidget
extends
React
.
Component
<
Props
,
State
>
{
constructor
(
props
)
{
super
(
props
);
...
...
@@ -62,18 +73,8 @@ export class AddPanelWidget extends React.Component<Props, State> {
);
}
moveToEdit
(
panel
,
tab
)
{
reduxStore
.
dispatch
(
updateLocation
({
query
:
{
panelId
:
panel
.
id
,
edit
:
true
,
fullscreen
:
true
,
tab
:
tab
,
},
partial
:
true
,
})
);
moveToEdit
(
location
)
{
reduxStore
.
dispatch
(
updateLocation
(
location
));
}
onCreateNewPanel
=
(
tab
=
'queries'
)
=>
{
...
...
@@ -89,7 +90,28 @@ export class AddPanelWidget extends React.Component<Props, State> {
dashboard
.
addPanel
(
newPanel
);
dashboard
.
removePanel
(
this
.
props
.
panel
);
this
.
moveToEdit
(
newPanel
,
tab
);
let
location
:
Location
=
{
query
:
{
panelId
:
newPanel
.
id
,
edit
:
true
,
fullscreen
:
true
,
},
partial
:
true
,
};
if
(
tab
===
'visualization'
)
{
location
=
{
...
location
,
query
:
{
...
location
.
query
,
tab
:
'visualization'
,
isVizPickerOpen
:
true
,
},
};
this
.
moveToEdit
(
location
);
}
else
{
this
.
moveToEdit
(
location
);
}
};
onPasteCopiedPanel
=
panelPluginInfo
=>
{
...
...
public/app/features/dashboard/panel_editor/VisualizationTab.tsx
View file @
e4dad780
...
...
@@ -3,7 +3,7 @@ import React, { PureComponent } from 'react';
// Utils & Services
import
{
AngularComponent
,
getAngularLoader
}
from
'app/core/services/AngularLoader'
;
//TODO: See PanelEdit
import
{
store
}
from
'app/store/store'
;
// Components
import
{
EditorTabBody
,
EditorToolbarView
}
from
'./EditorTabBody'
;
...
...
@@ -39,7 +39,7 @@ export class VisualizationTab extends PureComponent<Props, State> {
super
(
props
);
this
.
state
=
{
isVizPickerOpen
:
fals
e
,
isVizPickerOpen
:
store
.
getState
().
location
.
query
.
isVizPickerOpen
===
tru
e
,
searchQuery
:
''
,
scrollTop
:
0
,
};
...
...
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