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
c11ec790
Commit
c11ec790
authored
Jan 13, 2019
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor renames and other fixes
parent
5b59d59a
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
61 additions
and
62 deletions
+61
-62
packages/grafana-ui/src/components/PanelOptionsGrid/PanelOptionsGrid.tsx
+2
-2
packages/grafana-ui/src/components/PanelOptionsGrid/_PanelOptionsGrid.scss
+3
-4
packages/grafana-ui/src/components/PanelOptionsGroup/PanelOptionsGroup.tsx
+4
-4
packages/grafana-ui/src/components/PanelOptionsGroup/_PanelOptionsGroup.scss
+5
-5
packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx
+3
-3
packages/grafana-ui/src/components/index.scss
+2
-2
packages/grafana-ui/src/components/index.ts
+2
-2
public/app/features/alerting/partials/alert_tab.html
+5
-5
public/app/features/dashboard/dashgrid/EditorTabBody.tsx
+3
-3
public/app/features/dashboard/dashgrid/QueriesTab.tsx
+5
-5
public/app/features/dashboard/dashgrid/VisualizationTab.tsx
+3
-3
public/app/features/panel/partials/general_tab.html
+8
-8
public/app/plugins/panel/gauge/GaugeOptionsEditor.tsx
+3
-3
public/app/plugins/panel/gauge/GaugePanelOptions.tsx
+3
-3
public/app/plugins/panel/gauge/ValueMappings.tsx
+3
-3
public/app/plugins/panel/gauge/ValueOptions.tsx
+3
-3
public/sass/_variables.dark.scss
+2
-2
public/sass/_variables.light.scss
+2
-2
No files found.
packages/grafana-ui/src/components/PanelOption
Grid/PanelOption
Grid.tsx
→
packages/grafana-ui/src/components/PanelOption
sGrid/PanelOptions
Grid.tsx
View file @
c11ec790
...
...
@@ -5,10 +5,10 @@ interface Props {
children
:
JSX
.
Element
[]
|
JSX
.
Element
;
}
export
const
PanelOptionGrid
:
SFC
<
Props
>
=
({
children
})
=>
{
export
const
PanelOption
s
Grid
:
SFC
<
Props
>
=
({
children
})
=>
{
return
(
<
div
className=
"panel-option-grid"
>
<
div
className=
"panel-option
s
-grid"
>
{
children
}
</
div
>
);
...
...
packages/grafana-ui/src/components/PanelOption
Grid/_PanelOption
Grid.scss
→
packages/grafana-ui/src/components/PanelOption
sGrid/_PanelOptions
Grid.scss
View file @
c11ec790
.panel-option-grid
{
.panel-option
s
-grid
{
display
:
grid
;
grid-template-columns
:
repeat
(
2
,
1fr
);
grid-template-columns
:
repeat
(
1
,
1fr
);
grid-row-gap
:
10px
;
grid-column-gap
:
10px
;
margin-bottom
:
10px
;
@include
media-breakpoint-up
(
md
)
{
@include
media-breakpoint-up
(
lg
)
{
grid-template-columns
:
repeat
(
3
,
1fr
);
}
}
packages/grafana-ui/src/components/PanelOption
Section/PanelOptionSection
.tsx
→
packages/grafana-ui/src/components/PanelOption
sGroup/PanelOptionsGroup
.tsx
View file @
c11ec790
...
...
@@ -7,11 +7,11 @@ interface Props {
children
:
JSX
.
Element
|
JSX
.
Element
[];
}
export
const
PanelOption
Section
:
SFC
<
Props
>
=
props
=>
{
export
const
PanelOption
sGroup
:
SFC
<
Props
>
=
props
=>
{
return
(
<
div
className=
"panel-option
-section
"
>
<
div
className=
"panel-option
s-group
"
>
{
props
.
title
&&
(
<
div
className=
"panel-option
-section
__header"
>
<
div
className=
"panel-option
s-group
__header"
>
{
props
.
title
}
{
props
.
onClose
&&
(
<
button
className=
"btn btn-link"
onClick=
{
props
.
onClose
}
>
...
...
@@ -20,7 +20,7 @@ export const PanelOptionSection: SFC<Props> = props => {
)
}
</
div
>
)
}
<
div
className=
"panel-option
-section
__body"
>
{
props
.
children
}
</
div
>
<
div
className=
"panel-option
s-group
__body"
>
{
props
.
children
}
</
div
>
</
div
>
);
};
packages/grafana-ui/src/components/PanelOption
Section/_PanelOptionSection
.scss
→
packages/grafana-ui/src/components/PanelOption
sGroup/_PanelOptionsGroup
.scss
View file @
c11ec790
.panel-option
-section
{
.panel-option
s-group
{
margin-bottom
:
10px
;
border
:
$panel-option
-section
-border
;
border
:
$panel-option
s-group
-border
;
border-radius
:
$border-radius
;
background
:
$page-bg
;
}
.panel-option
-section
__header
{
.panel-option
s-group
__header
{
padding
:
4px
20px
;
font-size
:
1
.1rem
;
background
:
$panel-option
-section
-header-bg
;
background
:
$panel-option
s-group
-header-bg
;
position
:
relative
;
.btn
{
...
...
@@ -18,7 +18,7 @@
}
}
.panel-option
-section
__body
{
.panel-option
s-group
__body
{
padding
:
20px
;
&
--queries
{
...
...
packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx
View file @
c11ec790
...
...
@@ -3,7 +3,7 @@ import tinycolor, { ColorInput } from 'tinycolor2';
import
{
Threshold
,
BasicGaugeColor
}
from
'../../types'
;
import
{
ColorPicker
}
from
'../ColorPicker/ColorPicker'
;
import
{
PanelOption
Section
}
from
'../PanelOptionSection/PanelOptionSection
'
;
import
{
PanelOption
sGroup
}
from
'../PanelOptionsGroup/PanelOptionsGroup
'
;
export
interface
Props
{
thresholds
:
Threshold
[];
...
...
@@ -205,7 +205,7 @@ export class ThresholdsEditor extends PureComponent<Props, State> {
render
()
{
return
(
<
PanelOption
Section
title=
"Thresholds"
>
<
PanelOption
sGroup
title=
"Thresholds"
>
<
div
className=
"thresholds"
>
<
div
className=
"color-indicators"
>
{
this
.
renderIndicator
()
}
...
...
@@ -216,7 +216,7 @@ export class ThresholdsEditor extends PureComponent<Props, State> {
{
this
.
renderBase
()
}
</
div
>
</
div
>
</
PanelOption
Section
>
</
PanelOption
sGroup
>
);
}
}
packages/grafana-ui/src/components/index.scss
View file @
c11ec790
...
...
@@ -3,5 +3,5 @@
@import
'ThresholdsEditor/ThresholdsEditor'
;
@import
'Tooltip/Tooltip'
;
@import
'Select/Select'
;
@import
'PanelOption
Section/PanelOptionSection
'
;
@import
'PanelOption
Grid/PanelOption
Grid'
;
@import
'PanelOption
sGroup/PanelOptionsGroup
'
;
@import
'PanelOption
sGrid/PanelOptions
Grid'
;
packages/grafana-ui/src/components/index.ts
View file @
c11ec790
...
...
@@ -16,5 +16,5 @@ export { SeriesColorPicker } from './ColorPicker/SeriesColorPicker';
export
{
ThresholdsEditor
}
from
'./ThresholdsEditor/ThresholdsEditor'
;
export
{
GfFormLabel
}
from
'./GfFormLabel/GfFormLabel'
;
export
{
Graph
}
from
'./Graph/Graph'
;
export
{
PanelOption
Section
}
from
'./PanelOptionSection/PanelOptionSection
'
;
export
{
PanelOption
Grid
}
from
'./PanelOptionGrid/PanelOption
Grid'
;
export
{
PanelOption
sGroup
}
from
'./PanelOptionsGroup/PanelOptionsGroup
'
;
export
{
PanelOption
sGrid
}
from
'./PanelOptionsGrid/PanelOptions
Grid'
;
public/app/features/alerting/partials/alert_tab.html
View file @
c11ec790
...
...
@@ -2,8 +2,8 @@
<div
class=
"alert alert-error m-b-2"
ng-show=
"ctrl.error"
>
<i
class=
"fa fa-warning"
></i>
{{ctrl.error}}
</div>
<div
class=
"panel-option
-section
"
>
<div
class=
"panel-option
-section
__body"
>
<div
class=
"panel-option
s-group
"
>
<div
class=
"panel-option
s-group
__body"
>
<div
class=
"gf-form-group"
>
<h4
class=
"section-heading"
>
Rule
</h4>
<div
class=
"gf-form-inline"
>
...
...
@@ -125,9 +125,9 @@
</div>
</div>
<div
class=
"panel-option
-section
"
>
<div
class=
"panel-option
-section
__header"
>
Notifications
</div>
<div
class=
"panel-option
-section
__body"
>
<div
class=
"panel-option
s-group
"
>
<div
class=
"panel-option
s-group
__header"
>
Notifications
</div>
<div
class=
"panel-option
s-group
__body"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-8"
>
Send to
</span>
...
...
public/app/features/dashboard/dashgrid/EditorTabBody.tsx
View file @
c11ec790
...
...
@@ -2,7 +2,7 @@
import
React
,
{
PureComponent
}
from
'react'
;
// Components
import
{
CustomScrollbar
,
PanelOption
Section
}
from
'@grafana/ui'
;
import
{
CustomScrollbar
,
PanelOption
sGroup
}
from
'@grafana/ui'
;
import
{
FadeIn
}
from
'app/core/components/Animations/FadeIn'
;
interface
Props
{
...
...
@@ -96,9 +96,9 @@ export class EditorTabBody extends PureComponent<Props, State> {
renderOpenView
(
view
:
EditorToolbarView
)
{
return
(
<
PanelOption
Section
title=
{
view
.
title
||
view
.
heading
}
onClose=
{
this
.
onCloseOpenView
}
>
<
PanelOption
sGroup
title=
{
view
.
title
||
view
.
heading
}
onClose=
{
this
.
onCloseOpenView
}
>
{
view
.
render
()
}
</
PanelOption
Section
>
</
PanelOption
sGroup
>
);
}
...
...
public/app/features/dashboard/dashgrid/QueriesTab.tsx
View file @
c11ec790
...
...
@@ -9,7 +9,7 @@ import { DataSourcePicker } from 'app/core/components/Select/DataSourcePicker';
import
{
QueryInspector
}
from
'./QueryInspector'
;
import
{
QueryOptions
}
from
'./QueryOptions'
;
import
{
AngularQueryComponentScope
}
from
'app/features/panel/metrics_tab'
;
import
{
PanelOption
Section
}
from
'@grafana/ui'
;
import
{
PanelOption
sGroup
}
from
'@grafana/ui'
;
// Services
import
{
getDatasourceSrv
}
from
'app/features/plugins/datasource_srv'
;
...
...
@@ -216,7 +216,7 @@ export class QueriesTab extends PureComponent<Props, State> {
return
(
<
EditorTabBody
heading=
"Queries"
renderToolbar=
{
this
.
renderToolbar
}
toolbarItems=
{
[
queryInspector
,
dsHelp
]
}
>
<>
<
PanelOption
Section
>
<
PanelOption
sGroup
>
<
div
className=
"query-editor-rows"
>
<
div
ref=
{
element
=>
(
this
.
element
=
element
)
}
/>
...
...
@@ -239,10 +239,10 @@ export class QueriesTab extends PureComponent<Props, State> {
</
div
>
</
div
>
</
div
>
</
PanelOption
Section
>
<
PanelOption
Section
>
</
PanelOption
sGroup
>
<
PanelOption
sGroup
>
<
QueryOptions
panel=
{
panel
}
datasource=
{
currentDS
}
/>
</
PanelOption
Section
>
</
PanelOption
sGroup
>
</>
</
EditorTabBody
>
);
...
...
public/app/features/dashboard/dashgrid/VisualizationTab.tsx
View file @
c11ec790
...
...
@@ -111,9 +111,9 @@ export class VisualizationTab extends PureComponent<Props, State> {
for
(
let
i
=
0
;
i
<
panelCtrl
.
editorTabs
.
length
;
i
++
)
{
template
+=
`
<div class="panel-option
-section
" ng-cloak>`
+
(
i
>
0
?
`<div class="panel-option
-section
__header">{{ctrl.editorTabs[
${
i
}
].title}}</div>`
:
''
)
+
`<div class="panel-option
-section
__body">
<div class="panel-option
s-group
" ng-cloak>`
+
(
i
>
0
?
`<div class="panel-option
s-group
__header">{{ctrl.editorTabs[
${
i
}
].title}}</div>`
:
''
)
+
`<div class="panel-option
s-group
__body">
<panel-editor-tab editor-tab="ctrl.editorTabs[
${
i
}
]" ctrl="ctrl"></panel-editor-tab>
</div>
</div>
...
...
public/app/features/panel/partials/general_tab.html
View file @
c11ec790
<div
class=
"panel-option
-section
"
>
<div
class=
"panel-option
s-group
"
>
<!-- <div class="panel-option-section__header">Information</div> -->
<div
class=
"panel-option
-section
__body"
>
<div
class=
"panel-option
s-group
__body"
>
<div
class=
"section"
>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-7"
>
Title
</span>
...
...
@@ -17,9 +17,9 @@
</div>
</div>
<div
class=
"panel-option
-section
"
>
<div
class=
"panel-option
-section
__header"
>
Repeating
</div>
<div
class=
"panel-option
-section
__body"
>
<div
class=
"panel-option
s-group
"
>
<div
class=
"panel-option
s-group
__header"
>
Repeating
</div>
<div
class=
"panel-option
s-group
__body"
>
<div
class=
"section"
>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-9"
>
Repeat
</span>
...
...
@@ -46,9 +46,9 @@
</div>
</div>
<div
class=
"panel-option
-section
"
>
<div
class=
"panel-option
-section
__header"
>
Drilldown Links
</div>
<div
class=
"panel-option
-section
__body"
>
<div
class=
"panel-option
s-group
"
>
<div
class=
"panel-option
s-group
__header"
>
Drilldown Links
</div>
<div
class=
"panel-option
s-group
__body"
>
<panel-links-editor
panel=
"ctrl.panel"
></panel-links-editor>
</div>
</div>
public/app/plugins/panel/gauge/GaugeOptionsEditor.tsx
View file @
c11ec790
import
React
,
{
PureComponent
}
from
'react'
;
import
{
GaugeOptions
,
PanelOptionsProps
,
PanelOption
Section
}
from
'@grafana/ui'
;
import
{
GaugeOptions
,
PanelOptionsProps
,
PanelOption
sGroup
}
from
'@grafana/ui'
;
import
{
Switch
}
from
'app/core/components/Switch/Switch'
;
import
{
Label
}
from
'../../../core/components/Label/Label'
;
...
...
@@ -20,7 +20,7 @@ export default class GaugeOptionsEditor extends PureComponent<PanelOptionsProps<
const
{
maxValue
,
minValue
,
showThresholdLabels
,
showThresholdMarkers
}
=
options
;
return
(
<
PanelOption
Section
title=
"Gauge"
>
<
PanelOption
sGroup
title=
"Gauge"
>
<
div
className=
"gf-form"
>
<
Label
width=
{
8
}
>
Min value
</
Label
>
<
input
type=
"text"
className=
"gf-form-input width-12"
onChange=
{
this
.
onMinValueChange
}
value=
{
minValue
}
/>
...
...
@@ -41,7 +41,7 @@ export default class GaugeOptionsEditor extends PureComponent<PanelOptionsProps<
checked=
{
showThresholdMarkers
}
onChange=
{
this
.
onToggleThresholdMarkers
}
/>
</
PanelOption
Section
>
</
PanelOption
sGroup
>
);
}
}
public/app/plugins/panel/gauge/GaugePanelOptions.tsx
View file @
c11ec790
...
...
@@ -5,7 +5,7 @@ import {
PanelOptionsProps
,
ThresholdsEditor
,
Threshold
,
PanelOptionGrid
,
PanelOption
s
Grid
,
}
from
'@grafana/ui'
;
import
ValueOptions
from
'app/plugins/panel/gauge/ValueOptions'
;
...
...
@@ -38,11 +38,11 @@ export default class GaugePanelOptions extends PureComponent<PanelOptionsProps<G
const
{
onChange
,
options
}
=
this
.
props
;
return
(
<>
<
PanelOptionGrid
>
<
PanelOption
s
Grid
>
<
ValueOptions
onChange=
{
onChange
}
options=
{
options
}
/>
<
GaugeOptionsEditor
onChange=
{
onChange
}
options=
{
options
}
/>
<
ThresholdsEditor
onChange=
{
this
.
onThresholdsChanged
}
thresholds=
{
options
.
thresholds
}
/>
</
PanelOptionGrid
>
</
PanelOption
s
Grid
>
<
ValueMappings
onChange=
{
onChange
}
options=
{
options
}
/>
</>
...
...
public/app/plugins/panel/gauge/ValueMappings.tsx
View file @
c11ec790
import
React
,
{
PureComponent
}
from
'react'
;
import
{
GaugeOptions
,
PanelOptionsProps
,
MappingType
,
RangeMap
,
ValueMap
,
PanelOption
Section
}
from
'@grafana/ui'
;
import
{
GaugeOptions
,
PanelOptionsProps
,
MappingType
,
RangeMap
,
ValueMap
,
PanelOption
sGroup
}
from
'@grafana/ui'
;
import
MappingRow
from
'./MappingRow'
;
...
...
@@ -75,7 +75,7 @@ export default class ValueMappings extends PureComponent<PanelOptionsProps<Gauge
const
{
mappings
}
=
this
.
state
;
return
(
<
PanelOption
Section
title=
"Value Mappings"
>
<
PanelOption
sGroup
title=
"Value Mappings"
>
<
div
>
{
mappings
.
length
>
0
&&
mappings
.
map
((
mapping
,
index
)
=>
(
...
...
@@ -93,7 +93,7 @@ export default class ValueMappings extends PureComponent<PanelOptionsProps<Gauge
</
div
>
<
div
className=
"add-mapping-row-label"
>
Add mapping
</
div
>
</
div
>
</
PanelOption
Section
>
</
PanelOption
sGroup
>
);
}
}
public/app/plugins/panel/gauge/ValueOptions.tsx
View file @
c11ec790
import
React
,
{
PureComponent
}
from
'react'
;
import
{
GaugeOptions
,
PanelOptionsProps
,
PanelOption
Section
}
from
'@grafana/ui'
;
import
{
GaugeOptions
,
PanelOptionsProps
,
PanelOption
sGroup
}
from
'@grafana/ui'
;
import
{
Label
}
from
'app/core/components/Label/Label'
;
import
{
Select
}
from
'@grafana/ui'
;
...
...
@@ -40,7 +40,7 @@ export default class ValueOptions extends PureComponent<PanelOptionsProps<GaugeO
const
{
stat
,
unit
,
decimals
,
prefix
,
suffix
}
=
this
.
props
.
options
;
return
(
<
PanelOption
Section
title=
"Value"
>
<
PanelOption
sGroup
title=
"Value"
>
<
div
className=
"gf-form"
>
<
Label
width=
{
labelWidth
}
>
Stat
</
Label
>
<
Select
...
...
@@ -72,7 +72,7 @@ export default class ValueOptions extends PureComponent<PanelOptionsProps<GaugeO
<
Label
width=
{
labelWidth
}
>
Suffix
</
Label
>
<
input
className=
"gf-form-input width-12"
type=
"text"
value=
{
suffix
||
''
}
onChange=
{
this
.
onSuffixChange
}
/>
</
div
>
</
PanelOption
Section
>
</
PanelOption
sGroup
>
);
}
}
public/sass/_variables.dark.scss
View file @
c11ec790
...
...
@@ -391,8 +391,8 @@ $panel-editor-tabs-line-color: #e3e3e3;
$panel-editor-viz-item-bg-hover
:
darken
(
$blue
,
47%
);
$panel-editor-viz-item-bg-hover-active
:
darken
(
$orange
,
45%
);
$panel-option
-section
-border
:
1px
solid
$dark-3
;
$panel-option
-section
-header-bg
:
linear-gradient
(
0deg
,
$gray-blue
,
$dark-1
);
$panel-option
s-group
-border
:
1px
solid
$dark-3
;
$panel-option
s-group
-header-bg
:
linear-gradient
(
0deg
,
$gray-blue
,
$dark-1
);
$panel-grid-placeholder-bg
:
darken
(
$blue
,
47%
);
$panel-grid-placeholder-shadow
:
0
0
4px
$blue
;
...
...
public/sass/_variables.light.scss
View file @
c11ec790
...
...
@@ -399,8 +399,8 @@ $panel-editor-tabs-line-color: $dark-5;
$panel-editor-viz-item-bg-hover
:
lighten
(
$blue
,
62%
);
$panel-editor-viz-item-bg-hover-active
:
lighten
(
$orange
,
34%
);
$panel-option
-section
-border
:
1px
solid
$gray-6
;
$panel-option
-section
-header-bg
:
linear-gradient
(
0deg
,
$gray-6
,
$gray-7
);
$panel-option
s-group
-border
:
1px
solid
$gray-6
;
$panel-option
s-group
-header-bg
:
linear-gradient
(
0deg
,
$gray-6
,
$gray-7
);
$panel-grid-placeholder-bg
:
lighten
(
$blue
,
62%
);
$panel-grid-placeholder-shadow
:
0
0
4px
$blue-light
;
...
...
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