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
5ccefed7
Commit
5ccefed7
authored
Apr 04, 2020
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NewPanelEditor: Tab rename and minor fix
parent
c4ba425d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
12 deletions
+13
-12
public/app/core/services/keybindingSrv.ts
+1
-0
public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx
+2
-2
public/app/features/dashboard/components/PanelEditor/PanelEditorTabs.tsx
+2
-2
public/app/features/dashboard/components/PanelEditor/state/selectors.ts
+6
-6
public/app/features/dashboard/components/PanelEditor/types.ts
+2
-2
No files found.
public/app/core/services/keybindingSrv.ts
View file @
5ccefed7
...
@@ -128,6 +128,7 @@ export class KeybindingSrv {
...
@@ -128,6 +128,7 @@ export class KeybindingSrv {
if
(
search
.
editPanel
)
{
if
(
search
.
editPanel
)
{
delete
search
.
editPanel
;
delete
search
.
editPanel
;
delete
search
.
tab
;
this
.
$location
.
search
(
search
);
this
.
$location
.
search
(
search
);
return
;
return
;
}
}
...
...
public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx
View file @
5ccefed7
...
@@ -77,7 +77,7 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
...
@@ -77,7 +77,7 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
onPanelExit
=
()
=>
{
onPanelExit
=
()
=>
{
this
.
props
.
updateLocation
({
this
.
props
.
updateLocation
({
query
:
{
editPanel
:
null
},
query
:
{
editPanel
:
null
,
tab
:
null
},
partial
:
true
,
partial
:
true
,
});
});
};
};
...
@@ -85,7 +85,7 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
...
@@ -85,7 +85,7 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
onDiscard
=
()
=>
{
onDiscard
=
()
=>
{
this
.
props
.
setDiscardChanges
(
true
);
this
.
props
.
setDiscardChanges
(
true
);
this
.
props
.
updateLocation
({
this
.
props
.
updateLocation
({
query
:
{
editPanel
:
null
},
query
:
{
editPanel
:
null
,
tab
:
null
},
partial
:
true
,
partial
:
true
,
});
});
};
};
...
...
public/app/features/dashboard/components/PanelEditor/PanelEditorTabs.tsx
View file @
5ccefed7
...
@@ -46,9 +46,9 @@ export const PanelEditorTabs: React.FC<PanelEditorTabsProps> = ({ panel, dashboa
...
@@ -46,9 +46,9 @@ export const PanelEditorTabs: React.FC<PanelEditorTabsProps> = ({ panel, dashboa
})
}
})
}
</
TabsBar
>
</
TabsBar
>
<
TabContent
className=
{
styles
.
tabContent
}
>
<
TabContent
className=
{
styles
.
tabContent
}
>
{
activeTab
.
id
===
PanelEditorTabId
.
Quer
ies
&&
<
QueriesTab
panel=
{
panel
}
dashboard=
{
dashboard
}
/>
}
{
activeTab
.
id
===
PanelEditorTabId
.
Quer
y
&&
<
QueriesTab
panel=
{
panel
}
dashboard=
{
dashboard
}
/>
}
{
activeTab
.
id
===
PanelEditorTabId
.
Alert
&&
<
AlertTab
panel=
{
panel
}
dashboard=
{
dashboard
}
/>
}
{
activeTab
.
id
===
PanelEditorTabId
.
Alert
&&
<
AlertTab
panel=
{
panel
}
dashboard=
{
dashboard
}
/>
}
{
activeTab
.
id
===
PanelEditorTabId
.
Visualiz
ation
&&
<
VisualizationTab
panel=
{
panel
}
/>
}
{
activeTab
.
id
===
PanelEditorTabId
.
Visualiz
e
&&
<
VisualizationTab
panel=
{
panel
}
/>
}
{
activeTab
.
id
===
PanelEditorTabId
.
Transform
&&
data
.
state
!==
LoadingState
.
NotStarted
&&
(
{
activeTab
.
id
===
PanelEditorTabId
.
Transform
&&
data
.
state
!==
LoadingState
.
NotStarted
&&
(
<
TransformationsEditor
<
TransformationsEditor
transformations=
{
panel
.
transformations
||
[]
}
transformations=
{
panel
.
transformations
||
[]
}
...
...
public/app/features/dashboard/components/PanelEditor/state/selectors.ts
View file @
5ccefed7
...
@@ -10,14 +10,14 @@ export const getPanelEditorTabs = memoizeOne((location: LocationState, plugin?:
...
@@ -10,14 +10,14 @@ export const getPanelEditorTabs = memoizeOne((location: LocationState, plugin?:
return
tabs
;
return
tabs
;
}
}
let
defaultTab
=
PanelEditorTabId
.
Visualiz
ation
;
let
defaultTab
=
PanelEditorTabId
.
Visualiz
e
;
if
(
!
plugin
.
meta
.
skipDataQuery
)
{
if
(
!
plugin
.
meta
.
skipDataQuery
)
{
defaultTab
=
PanelEditorTabId
.
Quer
ies
;
defaultTab
=
PanelEditorTabId
.
Quer
y
;
tabs
.
push
({
tabs
.
push
({
id
:
PanelEditorTabId
.
Quer
ies
,
id
:
PanelEditorTabId
.
Quer
y
,
text
:
'Quer
ies
'
,
text
:
'Quer
y
'
,
icon
:
'gicon gicon-datasources'
,
icon
:
'gicon gicon-datasources'
,
active
:
false
,
active
:
false
,
});
});
...
@@ -31,8 +31,8 @@ export const getPanelEditorTabs = memoizeOne((location: LocationState, plugin?:
...
@@ -31,8 +31,8 @@ export const getPanelEditorTabs = memoizeOne((location: LocationState, plugin?:
}
}
tabs
.
push
({
tabs
.
push
({
id
:
PanelEditorTabId
.
Visualiz
ation
,
id
:
PanelEditorTabId
.
Visualiz
e
,
text
:
'Visualiz
ation
'
,
text
:
'Visualiz
e
'
,
icon
:
'fa fa-bar-chart'
,
icon
:
'fa fa-bar-chart'
,
active
:
false
,
active
:
false
,
});
});
...
...
public/app/features/dashboard/components/PanelEditor/types.ts
View file @
5ccefed7
...
@@ -6,9 +6,9 @@ export interface PanelEditorTab {
...
@@ -6,9 +6,9 @@ export interface PanelEditorTab {
}
}
export
enum
PanelEditorTabId
{
export
enum
PanelEditorTabId
{
Quer
ies
=
'queries
'
,
Quer
y
=
'Query
'
,
Transform
=
'transform'
,
Transform
=
'transform'
,
Visualiz
ation
=
'visualization
'
,
Visualiz
e
=
'visualize
'
,
Alert
=
'alert'
,
Alert
=
'alert'
,
}
}
...
...
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