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
fb7d036f
Unverified
Commit
fb7d036f
authored
Jun 16, 2020
by
Marcus Andersson
Committed by
GitHub
Jun 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typescript: Fixed strict null errors. (#25609)
parent
bd76c66e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
11 deletions
+9
-11
public/app/plugins/panel/bargauge/BarGaugePanel.tsx
+1
-1
public/app/plugins/panel/gauge/GaugePanel.tsx
+1
-1
public/app/plugins/panel/graph/module.ts
+2
-3
public/app/plugins/panel/news/module.tsx
+2
-1
public/app/plugins/panel/singlestat/specs/singlestat.test.ts
+1
-1
public/app/plugins/panel/stat/StatPanel.tsx
+1
-1
scripts/ci-frontend-metrics.sh
+1
-3
No files found.
public/app/plugins/panel/bargauge/BarGaugePanel.tsx
View file @
fb7d036f
...
@@ -45,7 +45,7 @@ export class BarGaugePanel extends PureComponent<PanelProps<BarGaugeOptions>> {
...
@@ -45,7 +45,7 @@ export class BarGaugePanel extends PureComponent<PanelProps<BarGaugeOptions>> {
const
{
value
}
=
valueProps
;
const
{
value
}
=
valueProps
;
const
{
hasLinks
,
getLinks
}
=
value
;
const
{
hasLinks
,
getLinks
}
=
value
;
if
(
!
hasLinks
)
{
if
(
!
hasLinks
||
!
getLinks
)
{
return
this
.
renderComponent
(
valueProps
,
{});
return
this
.
renderComponent
(
valueProps
,
{});
}
}
...
...
public/app/plugins/panel/gauge/GaugePanel.tsx
View file @
fb7d036f
...
@@ -35,7 +35,7 @@ export class GaugePanel extends PureComponent<PanelProps<GaugeOptions>> {
...
@@ -35,7 +35,7 @@ export class GaugePanel extends PureComponent<PanelProps<GaugeOptions>> {
const
{
value
}
=
valueProps
;
const
{
value
}
=
valueProps
;
const
{
getLinks
,
hasLinks
}
=
value
;
const
{
getLinks
,
hasLinks
}
=
value
;
if
(
!
hasLinks
)
{
if
(
!
hasLinks
||
!
getLinks
)
{
return
this
.
renderComponent
(
valueProps
,
{});
return
this
.
renderComponent
(
valueProps
,
{});
}
}
...
...
public/app/plugins/panel/graph/module.ts
View file @
fb7d036f
...
@@ -246,7 +246,7 @@ class GraphCtrl extends MetricsPanelCtrl {
...
@@ -246,7 +246,7 @@ class GraphCtrl extends MetricsPanelCtrl {
);
);
}
}
getDataWarning
():
DataWarning
{
getDataWarning
():
DataWarning
|
undefined
{
const
datapointsCount
=
this
.
seriesList
.
reduce
((
prev
,
series
)
=>
{
const
datapointsCount
=
this
.
seriesList
.
reduce
((
prev
,
series
)
=>
{
return
prev
+
series
.
datapoints
.
length
;
return
prev
+
series
.
datapoints
.
length
;
},
0
);
},
0
);
...
@@ -302,8 +302,7 @@ class GraphCtrl extends MetricsPanelCtrl {
...
@@ -302,8 +302,7 @@ class GraphCtrl extends MetricsPanelCtrl {
return
dataWarning
;
return
dataWarning
;
}
}
return
undefined
;
return
null
;
}
}
onRender
()
{
onRender
()
{
...
...
public/app/plugins/panel/news/module.tsx
View file @
fb7d036f
import
{
isString
}
from
'lodash'
;
import
{
PanelPlugin
}
from
'@grafana/data'
;
import
{
PanelPlugin
}
from
'@grafana/data'
;
import
{
NewsPanel
}
from
'./NewsPanel'
;
import
{
NewsPanel
}
from
'./NewsPanel'
;
import
{
NewsOptions
}
from
'./types'
;
import
{
NewsOptions
}
from
'./types'
;
...
@@ -18,7 +19,7 @@ export const plugin = new PanelPlugin<NewsOptions>(NewsPanel).setPanelOptions(bu
...
@@ -18,7 +19,7 @@ export const plugin = new PanelPlugin<NewsOptions>(NewsPanel).setPanelOptions(bu
name
:
'Use Proxy'
,
name
:
'Use Proxy'
,
description
:
'If the feed is unable to connect, consider a CORS proxy'
,
description
:
'If the feed is unable to connect, consider a CORS proxy'
,
showIf
:
(
currentConfig
:
NewsOptions
)
=>
{
showIf
:
(
currentConfig
:
NewsOptions
)
=>
{
return
currentConfig
.
feedUrl
&&
!
currentConfig
.
feedUrl
.
startsWith
(
PROXY_PREFIX
);
return
isString
(
currentConfig
.
feedUrl
)
&&
!
currentConfig
.
feedUrl
.
startsWith
(
PROXY_PREFIX
);
},
},
});
});
});
});
public/app/plugins/panel/singlestat/specs/singlestat.test.ts
View file @
fb7d036f
...
@@ -90,7 +90,7 @@ describe('SingleStatCtrl', () => {
...
@@ -90,7 +90,7 @@ describe('SingleStatCtrl', () => {
});
});
it
(
'Should use series avg as default main value'
,
()
=>
{
it
(
'Should use series avg as default main value'
,
()
=>
{
const
name
=
getFieldDisplayName
(
ctx
.
data
.
field
);
const
name
=
getFieldDisplayName
(
ctx
.
data
.
field
!
);
expect
(
name
).
toBe
(
'test.cpu1'
);
expect
(
name
).
toBe
(
'test.cpu1'
);
});
});
...
...
public/app/plugins/panel/stat/StatPanel.tsx
View file @
fb7d036f
...
@@ -65,7 +65,7 @@ export class StatPanel extends PureComponent<PanelProps<StatPanelOptions>> {
...
@@ -65,7 +65,7 @@ export class StatPanel extends PureComponent<PanelProps<StatPanelOptions>> {
const
{
value
}
=
valueProps
;
const
{
value
}
=
valueProps
;
const
{
getLinks
,
hasLinks
}
=
value
;
const
{
getLinks
,
hasLinks
}
=
value
;
if
(
!
hasLinks
)
{
if
(
!
hasLinks
||
!
getLinks
)
{
return
this
.
renderComponent
(
valueProps
,
{});
return
this
.
renderComponent
(
valueProps
,
{});
}
}
...
...
scripts/ci-frontend-metrics.sh
View file @
fb7d036f
...
@@ -2,9 +2,7 @@
...
@@ -2,9 +2,7 @@
echo
-e
"Collecting code stats (typescript errors & more)"
echo
-e
"Collecting code stats (typescript errors & more)"
ERROR_COUNT_LIMIT
=
724
ERROR_COUNT_LIMIT
=
726
DIRECTIVES_LIMIT
=
172
DIRECTIVES_LIMIT
=
172
CONTROLLERS_LIMIT
=
139
CONTROLLERS_LIMIT
=
139
...
...
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