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
5e487508
Commit
5e487508
authored
Apr 10, 2019
by
Ryan McKinley
Committed by
Torkel Ödegaard
Apr 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Panels: Add types for DataList and range (#16500)
parent
ef44a05b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
public/app/features/dashboard/dashgrid/DataPanel.tsx
+2
-1
public/app/features/panel/metrics_panel_ctrl.ts
+6
-5
public/app/plugins/panel/heatmap/heatmap_ctrl.ts
+2
-2
No files found.
public/app/features/dashboard/dashgrid/DataPanel.tsx
View file @
5e487508
...
...
@@ -15,6 +15,7 @@ import {
ScopedVars
,
toSeriesData
,
guessFieldTypes
,
DataQuery
,
}
from
'@grafana/ui'
;
interface
RenderProps
{
...
...
@@ -24,7 +25,7 @@ interface RenderProps {
export
interface
Props
{
datasource
:
string
|
null
;
queries
:
an
y
[];
queries
:
DataQuer
y
[];
panelId
:
number
;
dashboardId
?:
number
;
isVisible
?:
boolean
;
...
...
public/app/features/panel/metrics_panel_ctrl.ts
View file @
5e487508
...
...
@@ -6,7 +6,8 @@ import { PanelCtrl } from 'app/features/panel/panel_ctrl';
import
{
getExploreUrl
}
from
'app/core/utils/explore'
;
import
{
applyPanelTimeOverrides
,
getResolution
}
from
'app/features/dashboard/utils/panel'
;
import
{
ContextSrv
}
from
'app/core/services/context_srv'
;
import
{
toLegacyResponseData
,
isSeriesData
}
from
'@grafana/ui'
;
import
{
toLegacyResponseData
,
isSeriesData
,
LegacyResponseData
,
TimeRange
}
from
'@grafana/ui'
;
import
{
Unsubscribable
}
from
'rxjs'
;
class
MetricsPanelCtrl
extends
PanelCtrl
{
scope
:
any
;
...
...
@@ -17,15 +18,15 @@ class MetricsPanelCtrl extends PanelCtrl {
datasourceSrv
:
any
;
timeSrv
:
any
;
templateSrv
:
any
;
range
:
any
;
range
:
TimeRange
;
interval
:
any
;
intervalMs
:
any
;
resolution
:
any
;
timeInfo
:
any
;
timeInfo
?:
string
;
skipDataOnInit
:
boolean
;
dataStream
:
any
;
dataSubscription
:
any
;
dataList
:
any
;
dataSubscription
?:
Unsubscribable
;
dataList
:
LegacyResponseData
[]
;
constructor
(
$scope
,
$injector
)
{
super
(
$scope
,
$injector
);
...
...
public/app/plugins/panel/heatmap/heatmap_ctrl.ts
View file @
5e487508
...
...
@@ -164,7 +164,7 @@ export class HeatmapCtrl extends MetricsPanelCtrl {
const
logBase
=
this
.
panel
.
yAxis
.
logBase
;
const
xBucketNumber
=
this
.
panel
.
xBucketNumber
||
X_BUCKET_NUMBER_DEFAULT
;
const
xBucketSizeByNumber
=
Math
.
floor
((
this
.
range
.
to
-
this
.
range
.
from
)
/
xBucketNumber
);
const
xBucketSizeByNumber
=
Math
.
floor
((
this
.
range
.
to
.
valueOf
()
-
this
.
range
.
from
.
valueOf
()
)
/
xBucketNumber
);
// Parse X bucket size (number or interval)
const
isIntervalString
=
kbn
.
interval_regex
.
test
(
this
.
panel
.
xBucketSize
);
...
...
@@ -333,7 +333,7 @@ export class HeatmapCtrl extends MetricsPanelCtrl {
if
(
datapoints
&&
datapoints
.
length
>
0
)
{
const
last
=
datapoints
[
datapoints
.
length
-
1
][
1
];
const
from
=
this
.
range
.
from
;
if
(
last
-
from
<
-
10000
)
{
if
(
last
-
from
.
valueOf
()
<
-
10000
)
{
series
.
isOutsideRange
=
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