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
a532f463
Unverified
Commit
a532f463
authored
Aug 03, 2020
by
Ryan McKinley
Committed by
GitHub
Aug 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Heatmap: use the standard unit picker component (#26751)
parent
df11cdad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
13 deletions
+6
-13
public/app/plugins/panel/heatmap/axes_editor.ts
+3
-6
public/app/plugins/panel/heatmap/partials/axes_editor.html
+3
-7
No files found.
public/app/plugins/panel/heatmap/axes_editor.ts
View file @
a532f463
import
kbn
from
'app/core/utils/kbn'
;
export
class
AxesEditorCtrl
{
panel
:
any
;
panelCtrl
:
any
;
unitFormats
:
any
;
logScales
:
any
;
dataFormats
:
any
;
yBucketBoundModes
:
any
;
...
...
@@ -12,7 +10,6 @@ export class AxesEditorCtrl {
$scope
.
editor
=
this
;
this
.
panelCtrl
=
$scope
.
ctrl
;
this
.
panel
=
this
.
panelCtrl
.
panel
;
this
.
unitFormats
=
kbn
.
getUnitFormats
();
this
.
logScales
=
{
linear
:
1
,
...
...
@@ -35,10 +32,10 @@ export class AxesEditorCtrl {
};
}
setUnitFormat
(
subItem
:
any
)
{
this
.
panel
.
yAxis
.
format
=
subItem
.
value
;
setUnitFormat
=
(
unit
:
string
)
=>
{
this
.
panel
.
yAxis
.
format
=
unit
;
this
.
panelCtrl
.
render
();
}
}
;
}
/** @ngInject */
...
...
public/app/plugins/panel/heatmap/partials/axes_editor.html
View file @
a532f463
...
...
@@ -3,11 +3,7 @@
<h5
class=
"section-heading"
>
Y Axis
</h5>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-8"
>
Unit
</label>
<div
class=
"gf-form-dropdown-typeahead width-12"
ng-model=
"ctrl.panel.yAxis.format"
dropdown-typeahead2=
"editor.unitFormats"
dropdown-typeahead-on-select=
"editor.setUnitFormat($subItem)"
>
</div>
<unit-picker
onChange=
"editor.setUnitFormat"
value=
"ctrl.panel.yAxis.format"
class=
"width-12"
></unit-picker>
</div>
<div
ng-if=
"ctrl.panel.dataFormat == 'timeseries'"
>
<div
class=
"gf-form"
>
...
...
@@ -51,7 +47,7 @@
<h5
class=
"section-heading"
>
Buckets
</h5>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-
5
"
>
Y Axis
</label>
<label
class=
"gf-form-label width-
4
"
>
Y Axis
</label>
</div>
<div
class=
"gf-form"
ng-show=
"ctrl.panel.yAxis.logBase === 1"
>
<label
class=
"gf-form-label width-5"
>
Buckets
</label>
...
...
@@ -78,7 +74,7 @@
</div>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-
5
"
>
X Axis
</label>
<label
class=
"gf-form-label width-
4
"
>
X Axis
</label>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-5"
>
Buckets
</label>
...
...
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