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
49430f75
Unverified
Commit
49430f75
authored
Jul 30, 2018
by
Marcus Efraimsson
Committed by
GitHub
Jul 30, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12744 from Worty/master
change units to include characters for power of 2 and 3
parents
e648ed19
4fa97964
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
public/app/core/specs/kbn.jest.ts
+1
-1
public/app/core/utils/kbn.ts
+21
-21
No files found.
public/app/core/specs/kbn.jest.ts
View file @
49430f75
...
...
@@ -402,7 +402,7 @@ describe('duration', function() {
describe
(
'volume'
,
function
()
{
it
(
'1000m3'
,
function
()
{
var
str
=
kbn
.
valueFormats
[
'm3'
](
1000
,
1
,
null
);
expect
(
str
).
toBe
(
'1000.0 m
3
'
);
expect
(
str
).
toBe
(
'1000.0 m
³
'
);
});
});
...
...
public/app/core/utils/kbn.ts
View file @
49430f75
...
...
@@ -500,7 +500,7 @@ kbn.valueFormats.watt = kbn.formatBuilders.decimalSIPrefix('W');
kbn.valueFormats.kwatt = kbn.formatBuilders.decimalSIPrefix('W', 1);
kbn.valueFormats.mwatt = kbn.formatBuilders.decimalSIPrefix('W', -1);
kbn.valueFormats.kwattm = kbn.formatBuilders.decimalSIPrefix('W/Min', 1);
kbn.valueFormats.Wm2 = kbn.formatBuilders.fixedUnit('W/m
2
');
kbn.valueFormats.Wm2 = kbn.formatBuilders.fixedUnit('W/m
²
');
kbn.valueFormats.voltamp = kbn.formatBuilders.decimalSIPrefix('VA');
kbn.valueFormats.kvoltamp = kbn.formatBuilders.decimalSIPrefix('VA', 1);
kbn.valueFormats.voltampreact = kbn.formatBuilders.decimalSIPrefix('var');
...
...
@@ -572,9 +572,9 @@ kbn.valueFormats.accG = kbn.formatBuilders.fixedUnit('g');
// Volume
kbn.valueFormats.litre = kbn.formatBuilders.decimalSIPrefix('
L
');
kbn.valueFormats.mlitre = kbn.formatBuilders.decimalSIPrefix('
L
', -1);
kbn.valueFormats.m3 = kbn.formatBuilders.fixedUnit('
m
3
');
kbn.valueFormats.Nm3 = kbn.formatBuilders.fixedUnit('
Nm
3
');
kbn.valueFormats.dm3 = kbn.formatBuilders.fixedUnit('
dm
3
');
kbn.valueFormats.m3 = kbn.formatBuilders.fixedUnit('
m
³
');
kbn.valueFormats.Nm3 = kbn.formatBuilders.fixedUnit('
Nm
³
');
kbn.valueFormats.dm3 = kbn.formatBuilders.fixedUnit('
dm
³
');
kbn.valueFormats.gallons = kbn.formatBuilders.fixedUnit('
gal
');
// Flow
...
...
@@ -605,14 +605,14 @@ kbn.valueFormats.radsvh = kbn.formatBuilders.decimalSIPrefix('Sv/h');
// Concentration
kbn.valueFormats.ppm = kbn.formatBuilders.fixedUnit('
ppm
');
kbn.valueFormats.conppb = kbn.formatBuilders.fixedUnit('
ppb
');
kbn.valueFormats.conngm3 = kbn.formatBuilders.fixedUnit('
ng
/
m
3
');
kbn.valueFormats.conngNm3 = kbn.formatBuilders.fixedUnit('
ng
/
Nm
3
');
kbn.valueFormats.conμgm3 = kbn.formatBuilders.fixedUnit('
μ
g
/
m
3
');
kbn.valueFormats.conμgNm3 = kbn.formatBuilders.fixedUnit('
μ
g
/
Nm
3
');
kbn.valueFormats.conmgm3 = kbn.formatBuilders.fixedUnit('
mg
/
m
3
');
kbn.valueFormats.conmgNm3 = kbn.formatBuilders.fixedUnit('
mg
/
Nm
3
');
kbn.valueFormats.congm3 = kbn.formatBuilders.fixedUnit('
g
/
m
3
');
kbn.valueFormats.congNm3 = kbn.formatBuilders.fixedUnit('
g
/
Nm
3
');
kbn.valueFormats.conngm3 = kbn.formatBuilders.fixedUnit('
ng
/
m
³
');
kbn.valueFormats.conngNm3 = kbn.formatBuilders.fixedUnit('
ng
/
Nm
³
');
kbn.valueFormats.conμgm3 = kbn.formatBuilders.fixedUnit('
μ
g
/
m
³
');
kbn.valueFormats.conμgNm3 = kbn.formatBuilders.fixedUnit('
μ
g
/
Nm
³
');
kbn.valueFormats.conmgm3 = kbn.formatBuilders.fixedUnit('
mg
/
m
³
');
kbn.valueFormats.conmgNm3 = kbn.formatBuilders.fixedUnit('
mg
/
Nm
³
');
kbn.valueFormats.congm3 = kbn.formatBuilders.fixedUnit('
g
/
m
³
');
kbn.valueFormats.congNm3 = kbn.formatBuilders.fixedUnit('
g
/
Nm
³
');
// Time
kbn.valueFormats.hertz = kbn.formatBuilders.decimalSIPrefix('
Hz
');
...
...
@@ -1021,7 +1021,7 @@ kbn.getUnitFormats = function() {
{ text: '
Watt
(
W
)
', value: '
watt
' },
{ text: '
Kilowatt
(
kW
)
', value: '
kwatt
' },
{ text: '
Milliwatt
(
mW
)
', value: '
mwatt
' },
{ text: '
Watt
per
square
metre
(
W
/
m
2
)
', value: '
Wm2
' },
{ text: '
Watt
per
square
metre
(
W
/
m
²
)
', value: '
Wm2
' },
{ text: '
Volt
-
ampere
(
VA
)
', value: '
voltamp
' },
{ text: '
Kilovolt
-
ampere
(
kVA
)
', value: '
kvoltamp
' },
{ text: '
Volt
-
ampere
reactive
(
var
)
', value: '
voltampreact
' },
...
...
@@ -1118,14 +1118,14 @@ kbn.getUnitFormats = function() {
submenu: [
{ text: '
parts
-
per
-
million
(
ppm
)
', value: '
ppm
' },
{ text: '
parts
-
per
-
billion
(
ppb
)
', value: '
conppb
' },
{ text: '
nanogram
per
cubic
metre
(
ng
/
m
3
)
', value: '
conngm3
' },
{ text: '
nanogram
per
normal
cubic
metre
(
ng
/
Nm
3
)
', value: '
conngNm3
' },
{ text: '
microgram
per
cubic
metre
(
μ
g
/
m
3
)
', value: '
con
μ
gm3
' },
{ text: '
microgram
per
normal
cubic
metre
(
μ
g
/
Nm
3
)
', value: '
con
μ
gNm3
' },
{ text: '
milligram
per
cubic
metre
(
mg
/
m
3
)
', value: '
conmgm3
' },
{ text: '
milligram
per
normal
cubic
metre
(
mg
/
Nm
3
)
', value: '
conmgNm3
' },
{ text: '
gram
per
cubic
metre
(
g
/
m
3
)
', value: '
congm3
' },
{ text: '
gram
per
normal
cubic
metre
(
g
/
Nm
3
)
', value: '
congNm3
' },
{ text: '
nanogram
per
cubic
metre
(
ng
/
m
³
)
', value: '
conngm3
' },
{ text: '
nanogram
per
normal
cubic
metre
(
ng
/
Nm
³
)
', value: '
conngNm3
' },
{ text: '
microgram
per
cubic
metre
(
μ
g
/
m
³
)
', value: '
con
μ
gm3
' },
{ text: '
microgram
per
normal
cubic
metre
(
μ
g
/
Nm
³
)
', value: '
con
μ
gNm3
' },
{ text: '
milligram
per
cubic
metre
(
mg
/
m
³
)
', value: '
conmgm3
' },
{ text: '
milligram
per
normal
cubic
metre
(
mg
/
Nm
³
)
', value: '
conmgNm3
' },
{ text: '
gram
per
cubic
metre
(
g
/
m
³
)
', value: '
congm3
' },
{ text: '
gram
per
normal
cubic
metre
(
g
/
Nm
³
)
', value: '
congNm3
' },
],
},
];
...
...
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