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
c7e29630
Commit
c7e29630
authored
Nov 21, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
panel edit ux experiments
parent
e47fc40b
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
34 additions
and
38 deletions
+34
-38
public/app/features/dashboard/dashgrid/EditorTabBody.tsx
+6
-6
public/app/features/dashboard/dashgrid/GeneralTab.tsx
+1
-1
public/app/features/dashboard/dashgrid/PanelEditor.tsx
+6
-11
public/app/features/dashboard/dashgrid/QueriesTab.tsx
+1
-1
public/app/features/dashboard/dashgrid/VisualizationTab.tsx
+1
-1
public/img/panel-tabs/alert.svg
+0
-0
public/img/panel-tabs/queries-selected.svg
+0
-0
public/img/panel-tabs/queries.svg
+0
-0
public/img/panel-tabs/visualization-selected.svg
+0
-0
public/img/panel-tabs/visualization.svg
+0
-0
public/sass/components/_panel_editor.scss
+13
-15
public/sass/components/_toolbar.scss
+6
-3
No files found.
public/app/features/dashboard/dashgrid/EditorTabBody.tsx
View file @
c7e29630
...
...
@@ -4,6 +4,7 @@ import { FadeIn } from 'app/core/components/Animations/FadeIn';
interface
Props
{
children
:
JSX
.
Element
;
heading
:
string
;
main
?:
EditorToolBarView
;
toolbarItems
:
EditorToolBarView
[];
}
...
...
@@ -94,17 +95,16 @@ export class EditorTabBody extends PureComponent<Props, State> {
}
render
()
{
const
{
children
,
toolbarItems
,
main
}
=
this
.
props
;
const
{
children
,
toolbarItems
,
main
,
heading
}
=
this
.
props
;
const
{
openView
}
=
this
.
state
;
return
(
<>
{
main
&&
(
<
div
className=
"panel-editor__right"
>
<
div
className=
"toolbar"
>
{
this
.
renderMainSelection
(
main
)
}
<
div
className=
"toolbar__heading"
>
{
heading
}
</
div
>
{
main
&&
this
.
renderMainSelection
(
main
)
}
<
div
className=
"gf-form--grow"
/>
{
toolbarItems
.
map
(
item
=>
this
.
renderButton
(
item
))
}
</
div
>
)
}
<
div
className=
"panel-editor__scroll"
>
<
CustomScrollbar
autoHide=
{
false
}
>
<
div
className=
"panel-editor__content"
>
...
...
@@ -115,7 +115,7 @@ export class EditorTabBody extends PureComponent<Props, State> {
</
div
>
</
CustomScrollbar
>
</
div
>
</>
</
div
>
);
}
}
public/app/features/dashboard/dashgrid/GeneralTab.tsx
View file @
c7e29630
...
...
@@ -50,7 +50,7 @@ export class GeneralTab extends PureComponent<Props> {
};
return
(
<
EditorTabBody
main=
{
currentDataSource
}
toolbarItems=
{
[]
}
>
<
EditorTabBody
toolbarItems=
{
[]
}
>
<
div
ref=
{
element
=>
(
this
.
element
=
element
)
}
/>
</
EditorTabBody
>
);
...
...
public/app/features/dashboard/dashgrid/PanelEditor.tsx
View file @
c7e29630
...
...
@@ -26,7 +26,6 @@ interface PanelEditorProps {
interface
PanelEditorTab
{
id
:
string
;
text
:
string
;
icon
:
string
;
}
export
class
PanelEditor
extends
PureComponent
<
PanelEditorProps
>
{
...
...
@@ -74,16 +73,14 @@ export class PanelEditor extends PureComponent<PanelEditorProps> {
const
activeTab
=
store
.
getState
().
location
.
query
.
tab
||
'queries'
;
const
tabs
=
[
{
id
:
'general'
,
text
:
'General'
,
icon
:
'gicon gicon-preferences'
},
{
id
:
'queries'
,
text
:
'Queries'
,
icon
:
'fa fa-database'
},
{
id
:
'visualization'
,
text
:
'Visualization'
,
icon
:
'fa fa-line-chart'
},
{
id
:
'queries'
,
text
:
'Queries'
},
{
id
:
'visualization'
,
text
:
'Visualization'
},
];
if
(
config
.
alertingEnabled
&&
plugin
.
id
===
'graph'
)
{
tabs
.
push
({
id
:
'alert'
,
text
:
'Alert'
,
icon
:
'gicon gicon-alert'
,
});
}
...
...
@@ -96,11 +93,9 @@ export class PanelEditor extends PureComponent<PanelEditorProps> {
</
div
>
<
div
className=
"panel-editor-tabs"
>
<
ul
className=
"gf-tabs"
>
{
tabs
.
map
(
tab
=>
{
return
<
TabItem
tab=
{
tab
}
activeTab=
{
activeTab
}
onClick=
{
this
.
onChangeTab
}
key=
{
tab
.
id
}
/>;
})
}
</
ul
>
</
div
>
{
this
.
renderCurrentTab
(
activeTab
)
}
</
div
>
...
...
@@ -116,15 +111,15 @@ interface TabItemParams {
function
TabItem
({
tab
,
activeTab
,
onClick
}:
TabItemParams
)
{
const
tabClasses
=
classNames
({
'
gf-tabs-
link'
:
true
,
'
panel-editor-tabs__
link'
:
true
,
active
:
activeTab
===
tab
.
id
,
});
return
(
<
li
className=
"gf-tabs-
item"
onClick=
{
()
=>
onClick
(
tab
)
}
>
<
div
className=
"panel-editor-tabs__
item"
onClick=
{
()
=>
onClick
(
tab
)
}
>
<
a
className=
{
tabClasses
}
>
<
i
className=
{
tab
.
icon
}
/>
{
tab
.
text
}
<
i
mg
src=
{
`public/img/panel-tabs/${tab.id}${activeTab === tab.id ? '-selected' : ''}.svg`
}
/>
</
a
>
</
li
>
</
div
>
);
}
public/app/features/dashboard/dashgrid/QueriesTab.tsx
View file @
c7e29630
...
...
@@ -238,7 +238,7 @@ export class QueriesTab extends PureComponent<Props, State> {
};
return
(
<
EditorTabBody
main=
{
dsInformation
}
toolbarItems=
{
[
queryInspector
,
dsHelp
,
options
]
}
>
<
EditorTabBody
heading=
"Queries"
main=
{
dsInformation
}
toolbarItems=
{
[
queryInspector
,
dsHelp
,
options
]
}
>
<
div
ref=
{
element
=>
(
this
.
element
=
element
)
}
style=
{
{
width
:
'100%'
}
}
/>
</
EditorTabBody
>
);
...
...
public/app/features/dashboard/dashgrid/VisualizationTab.tsx
View file @
c7e29630
...
...
@@ -127,7 +127,7 @@ export class VisualizationTab extends PureComponent<Props> {
};
return
(
<
EditorTabBody
main=
{
panelSelection
}
toolbarItems=
{
[]
}
>
<
EditorTabBody
heading=
"Visualization"
main=
{
panelSelection
}
toolbarItems=
{
[]
}
>
{
this
.
renderPanelOptions
()
}
</
EditorTabBody
>
);
...
...
public/img/
Alerts
.svg
→
public/img/
panel-tabs/alert
.svg
View file @
c7e29630
File moved
public/img/
QueriesS
elected.svg
→
public/img/
panel-tabs/queries-s
elected.svg
View file @
c7e29630
File moved
public/img/
Q
ueries.svg
→
public/img/
panel-tabs/q
ueries.svg
View file @
c7e29630
File moved
public/img/
VisualizationS
elected.svg
→
public/img/
panel-tabs/visualization-s
elected.svg
View file @
c7e29630
File moved
public/img/
V
isualization.svg
→
public/img/
panel-tabs/v
isualization.svg
View file @
c7e29630
File moved
public/sass/components/_panel_editor.scss
View file @
c7e29630
...
...
@@ -24,11 +24,17 @@
.panel-editor-container__editor
{
margin-top
:
$panel-margin
*
2
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
row
;
height
:
65%
;
position
:
relative
;
}
.panel-editor__right
{
display
:
flex
;
flex-direction
:
column
;
flex-grow
:
1
;
}
.panel-editor__scroll
{
flex-grow
:
1
;
min-width
:
0
;
...
...
@@ -37,6 +43,7 @@
.panel-editor__content
{
padding
:
40px
20px
;
background
:
$input-label-bg
;
}
.panel-in-fullscreen
{
...
...
@@ -149,22 +156,13 @@
.panel-editor-tabs
{
position
:
relative
;
z-index
:
2
;
box-shadow
:
$page-header-shadow
;
border-bottom
:
1px
solid
$page-header-border-color
;
padding
:
0
$dashboard-padding
;
@include
clearfix
();
.active.gf-tabs-link
{
background
:
$toolbar-tab-bg
;
}
display
:
flex
;
flex-direction
:
column
;
padding
:
40px
10px
10px
10px
;
}
.panel-editor-tabs__close
{
padding
:
5px
9px
;
border-radius
:
$border-radius
;
float
:
right
;
@include
buttonBackground
(
$btn-primary-bg
,
$btn-primary-bg-hl
);
.panel-editor-tabs__item
{
margin-bottom
:
25px
;
}
.ds-picker-list
{
...
...
public/sass/components/_toolbar.scss
View file @
c7e29630
...
...
@@ -2,14 +2,17 @@
display
:
flex
;
align-content
:
center
;
align-items
:
center
;
background
:
$toolbar-bg
;
box-shadow
:
$toolbar-shadow
;
padding
:
7px
20px
7px
20px
;
padding
:
3px
20px
3px
20px
;
position
:
relative
;
z-index
:
1
;
flex
:
0
0
auto
;
}
.toolbar__heading
{
font-size
:
$font-size-lg
;
padding-right
:
10px
;
}
.toolbar__main
{
padding
:
$input-padding-y
$input-padding-x
;
font-size
:
$font-size-md
;
...
...
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