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
a9fc77b4
Unverified
Commit
a9fc77b4
authored
Dec 09, 2018
by
Torkel Ödegaard
Committed by
GitHub
Dec 09, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14408 from grafana/davkal/fix-14407
Explore: Hide scanning again after result was found
parents
837a6215
1bcc8663
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
public/app/features/explore/Explore.tsx
+12
-5
No files found.
public/app/features/explore/Explore.tsx
View file @
a9fc77b4
...
...
@@ -675,7 +675,8 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
}
this
.
setState
(
state
=>
{
const
{
history
,
queryTransactions
,
scanning
}
=
state
;
const
{
history
,
queryTransactions
}
=
state
;
let
{
scanning
}
=
state
;
// Transaction might have been discarded
const
transaction
=
queryTransactions
.
find
(
qt
=>
qt
.
id
===
transactionId
);
...
...
@@ -712,15 +713,21 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
const
nextHistory
=
updateHistory
(
history
,
datasourceId
,
queries
);
// Keep scanning for results if this was the last scanning transaction
if
(
_
.
size
(
result
)
===
0
&&
scanning
)
{
const
other
=
nextQueryTransactions
.
find
(
qt
=>
qt
.
scanning
&&
!
qt
.
done
);
if
(
!
other
)
{
this
.
scanTimer
=
setTimeout
(
this
.
scanPreviousRange
,
1000
);
if
(
scanning
)
{
if
(
_
.
size
(
result
)
===
0
)
{
const
other
=
nextQueryTransactions
.
find
(
qt
=>
qt
.
scanning
&&
!
qt
.
done
);
if
(
!
other
)
{
this
.
scanTimer
=
setTimeout
(
this
.
scanPreviousRange
,
1000
);
}
}
else
{
// We can stop scanning if we have a result
scanning
=
false
;
}
}
return
{
...
results
,
scanning
,
history
:
nextHistory
,
queryTransactions
:
nextQueryTransactions
,
};
...
...
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