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
76f4c114
Unverified
Commit
76f4c114
authored
Nov 09, 2020
by
Andrej Ocenas
Committed by
GitHub
Nov 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CloudWatch Logs: Change what we use to measure progress (#28912)
parent
f22d7710
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
public/app/plugins/datasource/cloudwatch/datasource.ts
+1
-1
public/app/plugins/datasource/cloudwatch/specs/datasource.test.ts
+5
-5
No files found.
public/app/plugins/datasource/cloudwatch/datasource.ts
View file @
76f4c114
...
...
@@ -336,7 +336,7 @@ export class CloudWatchDatasource extends DataSourceApi<CloudWatchQuery, CloudWa
({
failures
,
prevRecordsMatched
},
frames
)
=>
{
failures
++
;
for
(
const
frame
of
frames
)
{
const
recordsMatched
=
frame
.
meta
?.
stats
?.
find
(
stat
=>
stat
.
displayName
===
'Records
match
ed'
)?.
value
!
;
const
recordsMatched
=
frame
.
meta
?.
stats
?.
find
(
stat
=>
stat
.
displayName
===
'Records
scann
ed'
)?.
value
!
;
if
(
recordsMatched
>
(
prevRecordsMatched
[
frame
.
refId
!
]
??
0
))
{
failures
=
0
;
}
...
...
public/app/plugins/datasource/cloudwatch/specs/datasource.test.ts
View file @
76f4c114
...
...
@@ -186,23 +186,23 @@ describe('CloudWatchDatasource', () => {
it
(
'should stop querying when no more data received a number of times in a row'
,
async
()
=>
{
const
fakeFrames
=
genMockFrames
(
20
);
const
initialRecordsMatched
=
fakeFrames
[
0
].
meta
!
.
stats
!
.
find
(
stat
=>
stat
.
displayName
===
'Records
match
ed'
)
!
const
initialRecordsMatched
=
fakeFrames
[
0
].
meta
!
.
stats
!
.
find
(
stat
=>
stat
.
displayName
===
'Records
scann
ed'
)
!
.
value
!
;
for
(
let
i
=
1
;
i
<
4
;
i
++
)
{
fakeFrames
[
i
].
meta
!
.
stats
=
[
{
displayName
:
'Records
match
ed'
,
displayName
:
'Records
scann
ed'
,
value
:
initialRecordsMatched
,
},
];
}
const
finalRecordsMatched
=
fakeFrames
[
9
].
meta
!
.
stats
!
.
find
(
stat
=>
stat
.
displayName
===
'Records
match
ed'
)
!
const
finalRecordsMatched
=
fakeFrames
[
9
].
meta
!
.
stats
!
.
find
(
stat
=>
stat
.
displayName
===
'Records
scann
ed'
)
!
.
value
!
;
for
(
let
i
=
10
;
i
<
fakeFrames
.
length
;
i
++
)
{
fakeFrames
[
i
].
meta
!
.
stats
=
[
{
displayName
:
'Records
match
ed'
,
displayName
:
'Records
scann
ed'
,
value
:
finalRecordsMatched
,
},
];
...
...
@@ -1198,7 +1198,7 @@ function genMockFrames(numResponses: number): DataFrame[] {
},
stats
:
[
{
displayName
:
'Records
match
ed'
,
displayName
:
'Records
scann
ed'
,
value
:
(
i
+
1
)
*
recordIncrement
,
},
],
...
...
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