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
2b74b1c4
Commit
2b74b1c4
authored
Sep 05, 2018
by
Patrick O'Carroll
Committed by
Torkel Ödegaard
Sep 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added radix rule and changed files to follow rule (#13153)
parent
5d87aa2f
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
16 additions
and
16 deletions
+16
-16
public/app/containers/Explore/TimePicker.tsx
+1
-1
public/app/core/utils/rangeutil.ts
+1
-1
public/app/features/dashboard/time_srv.ts
+1
-1
public/app/features/dashboard/view_state_srv.ts
+1
-1
public/app/features/panel/solo_panel_ctrl.ts
+1
-1
public/app/features/playlist/playlist_edit_ctrl.ts
+1
-1
public/app/plugins/datasource/elasticsearch/bucket_agg.ts
+1
-1
public/app/plugins/datasource/elasticsearch/metric_agg.ts
+1
-1
public/app/plugins/datasource/influxdb/datasource.ts
+1
-1
public/app/plugins/datasource/opentsdb/datasource.ts
+2
-2
public/app/plugins/datasource/prometheus/result_transformer.ts
+1
-1
public/app/plugins/panel/graph/threshold_manager.ts
+1
-1
public/app/plugins/panel/heatmap/heatmap_data_converter.ts
+1
-1
public/app/plugins/panel/singlestat/module.ts
+1
-1
tslint.json
+1
-1
No files found.
public/app/containers/Explore/TimePicker.tsx
View file @
2b74b1c4
...
@@ -16,7 +16,7 @@ export function parseTime(value, isUtc = false, asString = false) {
...
@@ -16,7 +16,7 @@ export function parseTime(value, isUtc = false, asString = false) {
return
value
;
return
value
;
}
}
if
(
!
isNaN
(
value
))
{
if
(
!
isNaN
(
value
))
{
const
epoch
=
parseInt
(
value
);
const
epoch
=
parseInt
(
value
,
10
);
const
m
=
isUtc
?
moment
.
utc
(
epoch
)
:
moment
(
epoch
);
const
m
=
isUtc
?
moment
.
utc
(
epoch
)
:
moment
(
epoch
);
return
asString
?
m
.
format
(
DATE_FORMAT
)
:
m
;
return
asString
?
m
.
format
(
DATE_FORMAT
)
:
m
;
}
}
...
...
public/app/core/utils/rangeutil.ts
View file @
2b74b1c4
...
@@ -111,7 +111,7 @@ export function describeTextRange(expr: any) {
...
@@ -111,7 +111,7 @@ export function describeTextRange(expr: any) {
const
parts
=
/^now
([
-+
])(\d
+
)(\w)
/
.
exec
(
expr
);
const
parts
=
/^now
([
-+
])(\d
+
)(\w)
/
.
exec
(
expr
);
if
(
parts
)
{
if
(
parts
)
{
const
unit
=
parts
[
3
];
const
unit
=
parts
[
3
];
const
amount
=
parseInt
(
parts
[
2
]);
const
amount
=
parseInt
(
parts
[
2
]
,
10
);
const
span
=
spans
[
unit
];
const
span
=
spans
[
unit
];
if
(
span
)
{
if
(
span
)
{
opt
.
display
=
isLast
?
'Last '
:
'Next '
;
opt
.
display
=
isLast
?
'Last '
:
'Next '
;
...
...
public/app/features/dashboard/time_srv.ts
View file @
2b74b1c4
...
@@ -70,7 +70,7 @@ export class TimeSrv {
...
@@ -70,7 +70,7 @@ export class TimeSrv {
}
}
if
(
!
isNaN
(
value
))
{
if
(
!
isNaN
(
value
))
{
const
epoch
=
parseInt
(
value
);
const
epoch
=
parseInt
(
value
,
10
);
return
moment
.
utc
(
epoch
);
return
moment
.
utc
(
epoch
);
}
}
...
...
public/app/features/dashboard/view_state_srv.ts
View file @
2b74b1c4
...
@@ -49,7 +49,7 @@ export class DashboardViewState {
...
@@ -49,7 +49,7 @@ export class DashboardViewState {
getQueryStringState
()
{
getQueryStringState
()
{
const
state
=
this
.
$location
.
search
();
const
state
=
this
.
$location
.
search
();
state
.
panelId
=
parseInt
(
state
.
panelId
)
||
null
;
state
.
panelId
=
parseInt
(
state
.
panelId
,
10
)
||
null
;
state
.
fullscreen
=
state
.
fullscreen
?
true
:
null
;
state
.
fullscreen
=
state
.
fullscreen
?
true
:
null
;
state
.
edit
=
state
.
edit
===
'true'
||
state
.
edit
===
true
||
null
;
state
.
edit
=
state
.
edit
===
'true'
||
state
.
edit
===
true
||
null
;
state
.
editview
=
state
.
editview
||
null
;
state
.
editview
=
state
.
editview
||
null
;
...
...
public/app/features/panel/solo_panel_ctrl.ts
View file @
2b74b1c4
...
@@ -12,7 +12,7 @@ export class SoloPanelCtrl {
...
@@ -12,7 +12,7 @@ export class SoloPanelCtrl {
appEvents
.
emit
(
'toggle-sidemenu-hidden'
);
appEvents
.
emit
(
'toggle-sidemenu-hidden'
);
const
params
=
$location
.
search
();
const
params
=
$location
.
search
();
panelId
=
parseInt
(
params
.
panelId
);
panelId
=
parseInt
(
params
.
panelId
,
10
);
$scope
.
onAppEvent
(
'dashboard-initialized'
,
$scope
.
initPanelScope
);
$scope
.
onAppEvent
(
'dashboard-initialized'
,
$scope
.
initPanelScope
);
...
...
public/app/features/playlist/playlist_edit_ctrl.ts
View file @
2b74b1c4
...
@@ -37,7 +37,7 @@ export class PlaylistEditCtrl {
...
@@ -37,7 +37,7 @@ export class PlaylistEditCtrl {
filterFoundPlaylistItems
()
{
filterFoundPlaylistItems
()
{
this
.
filteredDashboards
=
_
.
reject
(
this
.
dashboardresult
,
playlistItem
=>
{
this
.
filteredDashboards
=
_
.
reject
(
this
.
dashboardresult
,
playlistItem
=>
{
return
_
.
find
(
this
.
playlistItems
,
listPlaylistItem
=>
{
return
_
.
find
(
this
.
playlistItems
,
listPlaylistItem
=>
{
return
parseInt
(
listPlaylistItem
.
value
)
===
playlistItem
.
id
;
return
parseInt
(
listPlaylistItem
.
value
,
10
)
===
playlistItem
.
id
;
});
});
});
});
...
...
public/app/plugins/datasource/elasticsearch/bucket_agg.ts
View file @
2b74b1c4
...
@@ -208,7 +208,7 @@ export class ElasticBucketAggCtrl {
...
@@ -208,7 +208,7 @@ export class ElasticBucketAggCtrl {
const
id
=
_
.
reduce
(
const
id
=
_
.
reduce
(
$scope
.
target
.
bucketAggs
.
concat
(
$scope
.
target
.
metrics
),
$scope
.
target
.
bucketAggs
.
concat
(
$scope
.
target
.
metrics
),
(
max
,
val
)
=>
{
(
max
,
val
)
=>
{
return
parseInt
(
val
.
id
)
>
max
?
parseInt
(
val
.
id
)
:
max
;
return
parseInt
(
val
.
id
,
10
)
>
max
?
parseInt
(
val
.
id
,
10
)
:
max
;
},
},
0
0
);
);
...
...
public/app/plugins/datasource/elasticsearch/metric_agg.ts
View file @
2b74b1c4
...
@@ -177,7 +177,7 @@ export class ElasticMetricAggCtrl {
...
@@ -177,7 +177,7 @@ export class ElasticMetricAggCtrl {
const
id
=
_
.
reduce
(
const
id
=
_
.
reduce
(
$scope
.
target
.
bucketAggs
.
concat
(
$scope
.
target
.
metrics
),
$scope
.
target
.
bucketAggs
.
concat
(
$scope
.
target
.
metrics
),
(
max
,
val
)
=>
{
(
max
,
val
)
=>
{
return
parseInt
(
val
.
id
)
>
max
?
parseInt
(
val
.
id
)
:
max
;
return
parseInt
(
val
.
id
,
10
)
>
max
?
parseInt
(
val
.
id
,
10
)
:
max
;
},
},
0
0
);
);
...
...
public/app/plugins/datasource/influxdb/datasource.ts
View file @
2b74b1c4
...
@@ -314,7 +314,7 @@ export default class InfluxDatasource {
...
@@ -314,7 +314,7 @@ export default class InfluxDatasource {
const
parts
=
/^now-
(\d
+
)([
d|h|m|s
])
$/
.
exec
(
date
);
const
parts
=
/^now-
(\d
+
)([
d|h|m|s
])
$/
.
exec
(
date
);
if
(
parts
)
{
if
(
parts
)
{
const
amount
=
parseInt
(
parts
[
1
]);
const
amount
=
parseInt
(
parts
[
1
]
,
10
);
const
unit
=
parts
[
2
];
const
unit
=
parts
[
2
];
return
'now() - '
+
amount
+
unit
;
return
'now() - '
+
amount
+
unit
;
}
}
...
...
public/app/plugins/datasource/opentsdb/datasource.ts
View file @
2b74b1c4
...
@@ -408,11 +408,11 @@ export default class OpenTsDatasource {
...
@@ -408,11 +408,11 @@ export default class OpenTsDatasource {
};
};
if
(
target
.
counterMax
&&
target
.
counterMax
.
length
)
{
if
(
target
.
counterMax
&&
target
.
counterMax
.
length
)
{
query
.
rateOptions
.
counterMax
=
parseInt
(
target
.
counterMax
);
query
.
rateOptions
.
counterMax
=
parseInt
(
target
.
counterMax
,
10
);
}
}
if
(
target
.
counterResetValue
&&
target
.
counterResetValue
.
length
)
{
if
(
target
.
counterResetValue
&&
target
.
counterResetValue
.
length
)
{
query
.
rateOptions
.
resetValue
=
parseInt
(
target
.
counterResetValue
);
query
.
rateOptions
.
resetValue
=
parseInt
(
target
.
counterResetValue
,
10
);
}
}
if
(
tsdbVersion
>=
2
)
{
if
(
tsdbVersion
>=
2
)
{
...
...
public/app/plugins/datasource/prometheus/result_transformer.ts
View file @
2b74b1c4
...
@@ -37,7 +37,7 @@ export class ResultTransformer {
...
@@ -37,7 +37,7 @@ export class ResultTransformer {
metricLabel
=
this
.
createMetricLabel
(
metricData
.
metric
,
options
);
metricLabel
=
this
.
createMetricLabel
(
metricData
.
metric
,
options
);
const
stepMs
=
parseInt
(
options
.
step
)
*
1000
;
const
stepMs
=
parseInt
(
options
.
step
,
10
)
*
1000
;
let
baseTimestamp
=
start
*
1000
;
let
baseTimestamp
=
start
*
1000
;
if
(
metricData
.
values
===
undefined
)
{
if
(
metricData
.
values
===
undefined
)
{
...
...
public/app/plugins/panel/graph/threshold_manager.ts
View file @
2b74b1c4
...
@@ -53,7 +53,7 @@ export class ThresholdManager {
...
@@ -53,7 +53,7 @@ export class ThresholdManager {
function
stopped
()
{
function
stopped
()
{
// calculate graph level
// calculate graph level
let
graphValue
=
plot
.
c2p
({
left
:
0
,
top
:
posTop
}).
y
;
let
graphValue
=
plot
.
c2p
({
left
:
0
,
top
:
posTop
}).
y
;
graphValue
=
parseInt
(
graphValue
.
toFixed
(
0
));
graphValue
=
parseInt
(
graphValue
.
toFixed
(
0
)
,
10
);
model
.
value
=
graphValue
;
model
.
value
=
graphValue
;
handleElem
.
off
(
'mousemove'
,
dragging
);
handleElem
.
off
(
'mousemove'
,
dragging
);
...
...
public/app/plugins/panel/heatmap/heatmap_data_converter.ts
View file @
2b74b1c4
...
@@ -271,7 +271,7 @@ function pushToYBuckets(buckets, bucketNum, value, point, bounds) {
...
@@ -271,7 +271,7 @@ function pushToYBuckets(buckets, bucketNum, value, point, bounds) {
let
count
=
1
;
let
count
=
1
;
// Use the 3rd argument as scale/count
// Use the 3rd argument as scale/count
if
(
point
.
length
>
3
)
{
if
(
point
.
length
>
3
)
{
count
=
parseInt
(
point
[
2
]);
count
=
parseInt
(
point
[
2
]
,
10
);
}
}
if
(
buckets
[
bucketNum
])
{
if
(
buckets
[
bucketNum
])
{
buckets
[
bucketNum
].
values
.
push
(
value
);
buckets
[
bucketNum
].
values
.
push
(
value
);
...
...
public/app/plugins/panel/singlestat/module.ts
View file @
2b74b1c4
...
@@ -493,7 +493,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
...
@@ -493,7 +493,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
const
bgColor
=
config
.
bootData
.
user
.
lightTheme
?
'rgb(230,230,230)'
:
'rgb(38,38,38)'
;
const
bgColor
=
config
.
bootData
.
user
.
lightTheme
?
'rgb(230,230,230)'
:
'rgb(38,38,38)'
;
const
fontScale
=
parseInt
(
panel
.
valueFontSize
)
/
100
;
const
fontScale
=
parseInt
(
panel
.
valueFontSize
,
10
)
/
100
;
const
fontSize
=
Math
.
min
(
dimension
/
5
,
100
)
*
fontScale
;
const
fontSize
=
Math
.
min
(
dimension
/
5
,
100
)
*
fontScale
;
// Reduce gauge width if threshold labels enabled
// Reduce gauge width if threshold labels enabled
const
gaugeWidthReduceRatio
=
panel
.
gauge
.
thresholdLabels
?
1.5
:
1
;
const
gaugeWidthReduceRatio
=
panel
.
gauge
.
thresholdLabels
?
1.5
:
1
;
...
...
tslint.json
View file @
2b74b1c4
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
"one-line"
:
[
true
,
"check-open-brace"
,
"check-catch"
,
"check-else"
],
"one-line"
:
[
true
,
"check-open-brace"
,
"check-catch"
,
"check-else"
],
"only-arrow-functions"
:
[
true
,
"allow-declarations"
,
"allow-named-functions"
],
"only-arrow-functions"
:
[
true
,
"allow-declarations"
,
"allow-named-functions"
],
"prefer-const"
:
true
,
"prefer-const"
:
true
,
"radix"
:
fals
e
,
"radix"
:
tru
e
,
"typedef-whitespace"
:
[
"typedef-whitespace"
:
[
true
,
true
,
{
{
...
...
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