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
c4ad0690
Commit
c4ad0690
authored
Nov 10, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring & cleaning up css
parent
f74f7b01
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
125 additions
and
145 deletions
+125
-145
public/app/features/dashboard/dashgrid/EditorTabBody.tsx
+9
-11
public/app/features/dashboard/dashgrid/VisualizationTab.tsx
+2
-2
public/app/features/dashboard/dashgrid/VizTypePicker.tsx
+1
-1
public/app/features/panel/partials/metrics_tab.html
+1
-1
public/sass/_grafana.scss
+2
-1
public/sass/components/_navbar.scss
+4
-0
public/sass/components/_panel_editor.scss
+47
-129
public/sass/components/_toolbar.scss
+59
-0
No files found.
public/app/features/dashboard/dashgrid/EditorTabBody.tsx
View file @
c4ad0690
...
...
@@ -40,9 +40,9 @@ export class EditorTabBody extends PureComponent<Props, State> {
renderMainSelection
(
view
:
EditorToolBarView
)
{
return
(
<
div
className=
"
edit-section__selected
"
onClick=
{
()
=>
this
.
onToggleToolBarView
(
view
)
}
key=
{
view
.
title
}
>
<
img
className=
"
edit-section__selected
-image"
src=
{
view
.
imgSrc
}
/>
<
div
className=
"
edit-section__selected
-name"
>
{
view
.
title
}
</
div
>
<
div
className=
"
toolbar__main
"
onClick=
{
()
=>
this
.
onToggleToolBarView
(
view
)
}
key=
{
view
.
title
}
>
<
img
className=
"
toolbar__main
-image"
src=
{
view
.
imgSrc
}
/>
<
div
className=
"
toolbar__main
-name"
>
{
view
.
title
}
</
div
>
<
i
className=
"fa fa-caret-down"
/>
</
div
>
);
...
...
@@ -60,8 +60,8 @@ export class EditorTabBody extends PureComponent<Props, State> {
renderOpenView
(
view
:
EditorToolBarView
)
{
return
(
<
div
className=
"
editor-toolbar-
view"
>
<
button
className=
"
editor-toolbar-
view__close"
onClick=
{
this
.
onCloseOpenView
}
>
<
div
className=
"
toolbar-sub
view"
>
<
button
className=
"
toolbar-sub
view__close"
onClick=
{
this
.
onCloseOpenView
}
>
<
i
className=
"fa fa-chevron-up"
/>
</
button
>
{
view
.
render
()
}
...
...
@@ -75,12 +75,10 @@ export class EditorTabBody extends PureComponent<Props, State> {
return
(
<>
<
div
className=
"edit-section"
>
<
div
className=
"edit-section__header"
>
{
this
.
renderMainSelection
(
main
)
}
<
div
className=
"gf-form--grow"
/>
{
toolbarItems
.
map
(
item
=>
this
.
renderButton
(
item
))
}
</
div
>
<
div
className=
"toolbar"
>
{
this
.
renderMainSelection
(
main
)
}
<
div
className=
"gf-form--grow"
/>
{
toolbarItems
.
map
(
item
=>
this
.
renderButton
(
item
))
}
</
div
>
<
div
className=
"panel-editor__scroll"
>
<
CustomScrollbar
>
...
...
public/app/features/dashboard/dashgrid/VisualizationTab.tsx
View file @
c4ad0690
import
React
,
{
PureComponent
}
from
'react'
;
import
{
getAngularLoader
,
AngularComponent
}
from
'app/core/services/AngularLoader'
;
import
{
EditorTabBody
}
from
'./EditorTabBody'
;
import
{
VizTypePicker
}
from
'./VizTypePicker'
;
import
{
PanelModel
}
from
'../panel_model'
;
import
{
DashboardModel
}
from
'../dashboard_model'
;
import
{
PanelPlugin
}
from
'app/types/plugins'
;
interface
Props
{
panel
:
PanelModel
;
dashboard
:
DashboardModel
;
plugin
:
P
luginModel
;
plugin
:
P
anelPlugin
;
onTypeChanged
:
(
newType
:
PanelPlugin
)
=>
void
;
}
...
...
public/app/features/dashboard/dashgrid/VizTypePicker.tsx
View file @
c4ad0690
...
...
@@ -85,7 +85,7 @@ export class VizTypePicker extends PureComponent<Props, State> {
<
div
className=
"gf-form--grow"
/>
</
div
>
<
div
className=
"viz-picker
__items
"
>
{
pluginList
.
map
(
this
.
renderVizPlugin
)
}
</
div
>
<
div
className=
"viz-picker"
>
{
pluginList
.
map
(
this
.
renderVizPlugin
)
}
</
div
>
</>
);
}
...
...
public/app/features/panel/partials/metrics_tab.html
View file @
c4ad0690
<div
class=
"gf-form-group
hide
"
>
<div
class=
"gf-form-group"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label"
>
Data Source
</label>
...
...
public/sass/_grafana.scss
View file @
c4ad0690
...
...
@@ -97,7 +97,8 @@
@import
'components/form_select_box'
;
@import
'components/user-picker'
;
@import
'components/description-picker'
;
@import
'components/viz_editor'
;
@import
'components/panel_editor'
;
@import
'components/toolbar'
;
@import
'components/delete_button'
;
@import
'components/add_data_source.scss'
;
@import
'components/page_loader'
;
...
...
public/sass/components/_navbar.scss
View file @
c4ad0690
...
...
@@ -40,6 +40,10 @@
}
.panel-in-fullscreen
{
.navbar
{
padding-left
:
15px
;
}
.navbar-button--add-panel
,
.navbar-button--star
,
.navbar-button--tv
,
...
...
public/sass/components/_
viz
_editor.scss
→
public/sass/components/_
panel
_editor.scss
View file @
c4ad0690
...
...
@@ -28,18 +28,10 @@
}
.panel-in-fullscreen
{
// .scroll-canvas--dashboard {
// height: 100%;
// }
.sidemenu
{
display
:
none
;
}
// .main-view {
// background: unset;
// }
.dashboard-container
{
padding
:
0
;
}
...
...
@@ -53,57 +45,6 @@
}
}
.viz-picker
{
margin-bottom
:
$spacer
;
}
.viz-picker__items
{
display
:
flex
;
flex-wrap
:
wrap
;
margin-bottom
:
13px
;
}
.viz-picker__item
{
background
:
$card-background
;
box-shadow
:
$card-shadow
;
border-radius
:
3px
;
height
:
90px
;
width
:
150px
;
flex-shrink
:
0
;
flex-direction
:
column
;
text-align
:
center
;
cursor
:
pointer
;
display
:
flex
;
margin-right
:
10px
;
margin-bottom
:
10px
;
border
:
1px
solid
transparent
;
align-items
:
center
;
&
:hover
{
background
:
$card-background-hover
;
}
&
--selected
{
box-shadow
:
0
0
12px
#ff4d00
;
}
}
.viz-picker__item-name
{
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
font-size
:
$font-size-sm
;
display
:
flex
;
flex-direction
:
column
;
align-self
:
center
;
height
:
23px
;
}
.viz-picker__item-img
{
height
:
55px
;
}
.panel-editor-resizer
{
position
:
absolute
;
height
:
2px
;
...
...
@@ -146,73 +87,61 @@
top
:
4px
;
}
.panel-editor
{
height
:
calc
(
100%
-
10px
);
}
.form-option-box
{
margin-bottom
:
20px
;
}
.form-option-box__header
{
border-bottom
:
2px
solid
$blue-dark
;
padding
:
5px
0px
;
font-size
:
$font-size-lg
;
margin-bottom
:
20px
;
.viz-picker
{
display
:
flex
;
flex-wrap
:
wrap
;
margin-bottom
:
13px
;
}
.
edit-section
{
position
:
relative
;
}
.
viz-picker__item
{
background
:
$card-background
;
box-shadow
:
$card-shadow
;
.edit-section__header
{
display
:
flex
;
align-content
:
center
;
align-items
:
center
;
background
:
$page-header-bg
;
box-shadow
:
0
0
20px
black
;
padding
:
7px
30px
7px
20px
;
border-radius
:
3px
;
height
:
90px
;
width
:
150px
;
flex-shrink
:
0
;
flex-direction
:
column
;
text-align
:
center
;
cursor
:
pointer
;
position
:
relative
;
z-index
:
1
;
}
.edit-section__selected
{
padding
:
$input-padding-y
$input-padding-x
;
font-size
:
$font-size-md
;
line-height
:
$input-line-height
;
color
:
$input-color
;
background-color
:
$input-bg
;
border
:
$input-border
;
border-radius
:
$input-border-radius
;
display
:
flex
;
margin-right
:
10px
;
margin-bottom
:
10px
;
border
:
1px
solid
transparent
;
align-items
:
center
;
.fa
{
margin-left
:
20px
;
display
:
inline-block
;
position
:
relative
;
&
:hover
{
background
:
$card-background-hover
;
}
&
--selected
{
box-shadow
:
0
0
12px
#ff4d00
;
}
}
.edit-section__title
{
font-size
:
$font-size-lg
;
padding-right
:
20px
;
width
:
150px
;
.viz-picker__item-name
{
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
font-size
:
$font-size-sm
;
display
:
flex
;
flex-direction
:
column
;
align-self
:
center
;
height
:
23px
;
}
.edit-section__selected-image
{
margin-right
:
10px
;
display
:
inline-block
;
width
:
20px
;
height
:
20px
;
.viz-picker__item-img
{
height
:
55px
;
}
.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
{
...
...
@@ -238,28 +167,6 @@
}
}
.editor-toolbar-view
{
position
:
relative
;
padding
:
20px
20px
;
background-color
:
$empty-list-cta-bg
;
top
:
-45px
;
margin
:
0
30px
20px
0px
;
}
.editor-toolbar-view__close
{
background
:
transparent
;
padding
:
4px
8px
4px
9px
;
border
:
none
;
position
:
absolute
;
right
:
15px
;
top
:
20px
;
font-size
:
$font-size-md
;
&
:hover
{
color
:
$text-color-strong
;
}
}
.ds-picker-list
{
display
:
flex
;
flex-wrap
:
wrap
;
...
...
@@ -300,3 +207,14 @@
.ds-picker-list__img
{
width
:
30px
;
}
.form-option-box
{
margin-bottom
:
20px
;
}
.form-option-box__header
{
border-bottom
:
2px
solid
$blue-dark
;
padding
:
5px
0px
;
font-size
:
$font-size-lg
;
margin-bottom
:
20px
;
}
public/sass/components/_toolbar.scss
0 → 100644
View file @
c4ad0690
.toolbar
{
display
:
flex
;
align-content
:
center
;
align-items
:
center
;
background
:
$page-header-bg
;
box-shadow
:
0
0
20px
black
;
padding
:
7px
30px
7px
20px
;
cursor
:
pointer
;
position
:
relative
;
z-index
:
1
;
flex
:
0
0
auto
;
}
.toolbar__main
{
padding
:
$input-padding-y
$input-padding-x
;
font-size
:
$font-size-md
;
line-height
:
$input-line-height
;
color
:
$input-color
;
background-color
:
$input-bg
;
border
:
$input-border
;
border-radius
:
$input-border-radius
;
display
:
flex
;
align-items
:
center
;
.fa
{
margin-left
:
20px
;
display
:
inline-block
;
position
:
relative
;
}
}
.toolbar__main-image
{
margin-right
:
10px
;
display
:
inline-block
;
width
:
20px
;
height
:
20px
;
}
.toolbar-subview
{
position
:
relative
;
padding
:
20px
20px
;
background-color
:
$empty-list-cta-bg
;
top
:
-45px
;
margin
:
0
30px
20px
0px
;
}
.toolbar-subview__close
{
background
:
transparent
;
padding
:
4px
8px
4px
9px
;
border
:
none
;
position
:
absolute
;
right
:
15px
;
top
:
20px
;
font-size
:
$font-size-md
;
&
:hover
{
color
:
$text-color-strong
;
}
}
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