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
76f82b00
Commit
76f82b00
authored
Feb 14, 2017
by
Daniel Lee
Committed by
GitHub
Feb 14, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7554 from ryantxu/kbn_physics
Add more physics units
parents
73bec813
7867a24d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
4 deletions
+40
-4
public/app/core/utils/kbn.js
+40
-4
No files found.
public/app/core/utils/kbn.js
View file @
76f82b00
...
...
@@ -459,11 +459,19 @@ function($, _) {
kbn
.
valueFormats
.
humidity
=
kbn
.
formatBuilders
.
fixedUnit
(
'%H'
);
// Pressure
kbn
.
valueFormats
.
pressurembar
=
kbn
.
formatBuilders
.
fixedUnit
(
'mbar'
);
kbn
.
valueFormats
.
pressurebar
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'bar'
);
kbn
.
valueFormats
.
pressurembar
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'bar'
,
-
1
);
kbn
.
valueFormats
.
pressurekbar
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'bar'
,
1
);
kbn
.
valueFormats
.
pressurehpa
=
kbn
.
formatBuilders
.
fixedUnit
(
'hPa'
);
kbn
.
valueFormats
.
pressurehg
=
kbn
.
formatBuilders
.
fixedUnit
(
'"Hg'
);
kbn
.
valueFormats
.
pressurepsi
=
kbn
.
formatBuilders
.
scaledUnits
(
1000
,
[
' psi'
,
' ksi'
,
' Mpsi'
]);
// Force
kbn
.
valueFormats
.
forceNm
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'Nm'
);
kbn
.
valueFormats
.
forcekNm
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'Nm'
,
1
);
kbn
.
valueFormats
.
forceN
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'N'
);
kbn
.
valueFormats
.
forcekN
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'N'
,
1
);
// Length
kbn
.
valueFormats
.
lengthm
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'm'
);
kbn
.
valueFormats
.
lengthmm
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'm'
,
-
1
);
...
...
@@ -480,6 +488,13 @@ function($, _) {
kbn
.
valueFormats
.
litre
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'L'
);
kbn
.
valueFormats
.
mlitre
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'L'
,
-
1
);
kbn
.
valueFormats
.
m3
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'm3'
);
kbn
.
valueFormats
.
gallons
=
kbn
.
formatBuilders
.
fixedUnit
(
'gal'
);
// Flow
kbn
.
valueFormats
.
flowgpm
=
kbn
.
formatBuilders
.
fixedUnit
(
'gpm'
);
kbn
.
valueFormats
.
flowcms
=
kbn
.
formatBuilders
.
fixedUnit
(
'cms'
);
kbn
.
valueFormats
.
flowcfs
=
kbn
.
formatBuilders
.
fixedUnit
(
'cfs'
);
kbn
.
valueFormats
.
flowcfm
=
kbn
.
formatBuilders
.
fixedUnit
(
'cfm'
);
// Time
kbn
.
valueFormats
.
hertz
=
kbn
.
formatBuilders
.
decimalSIPrefix
(
'Hz'
);
...
...
@@ -790,9 +805,10 @@ function($, _) {
{
text
:
'volume'
,
submenu
:
[
{
text
:
'millilitre'
,
value
:
'mlitre'
},
{
text
:
'litre'
,
value
:
'litre'
},
{
text
:
'cubic metre'
,
value
:
'm3'
},
{
text
:
'millilitre'
,
value
:
'mlitre'
},
{
text
:
'litre'
,
value
:
'litre'
},
{
text
:
'cubic metre'
,
value
:
'm3'
},
{
text
:
'gallons'
,
value
:
'gallons'
},
]
},
{
...
...
@@ -827,10 +843,30 @@ function($, _) {
text
:
'pressure'
,
submenu
:
[
{
text
:
'Millibars'
,
value
:
'pressurembar'
},
{
text
:
'Bars'
,
value
:
'pressurebar'
},
{
text
:
'Kilobars'
,
value
:
'pressurekbar'
},
{
text
:
'Hectopascals'
,
value
:
'pressurehpa'
},
{
text
:
'Inches of mercury'
,
value
:
'pressurehg'
},
{
text
:
'PSI'
,
value
:
'pressurepsi'
},
]
},
{
text
:
'force'
,
submenu
:
[
{
text
:
'Newton-meters (Nm)'
,
value
:
'forceNm'
},
{
text
:
'Kilonewton-meters (kNm)'
,
value
:
'forcekNm'
},
{
text
:
'Newtons (N)'
,
value
:
'forceN'
},
{
text
:
'Kilonewtons (kN)'
,
value
:
'forcekN'
},
]
},
{
text
:
'flow'
,
submenu
:
[
{
text
:
'Gallons/min (gpm)'
,
value
:
'flowgpm'
},
{
text
:
'Cubic meters/sec (cms)'
,
value
:
'flowcms'
},
{
text
:
'Cubic feet/sec (cfs)'
,
value
:
'flowcfs'
},
{
text
:
'Cubic feet/min (cfm)'
,
value
:
'flowcfm'
},
]
}
];
};
...
...
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