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
7569a860
Unverified
Commit
7569a860
authored
Jan 27, 2020
by
kay delaney
Committed by
GitHub
Jan 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explore/Loki: Fix handling of legacy log row context request (#21767)
Closes #21695
parent
00fa30f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
public/app/plugins/datasource/loki/datasource.ts
+19
-15
No files found.
public/app/plugins/datasource/loki/datasource.ts
View file @
7569a860
...
...
@@ -491,22 +491,26 @@ export class LokiDatasource extends DataSourceApi<LokiQuery, LokiOptions> {
switchMap
((
res
:
{
data
:
LokiStreamResponse
;
status
:
number
})
=>
iif
(
()
=>
res
.
status
===
404
,
this
.
_request
(
LEGACY_QUERY_ENDPOINT
,
target
).
pipe
(
catchError
((
err
:
any
)
=>
{
const
error
:
DataQueryError
=
{
message
:
'Error during context query. Please check JS console logs.'
,
status
:
err
.
status
,
statusText
:
err
.
statusText
,
};
throw
error
;
}),
map
((
res
:
{
data
:
LokiLegacyStreamResponse
})
=>
({
data
:
res
.
data
?
res
.
data
.
streams
.
map
(
stream
=>
legacyLogStreamToDataFrame
(
stream
,
reverse
))
:
[],
}))
defer
(()
=>
this
.
_request
(
LEGACY_QUERY_ENDPOINT
,
target
).
pipe
(
catchError
((
err
:
any
)
=>
{
const
error
:
DataQueryError
=
{
message
:
'Error during context query. Please check JS console logs.'
,
status
:
err
.
status
,
statusText
:
err
.
statusText
,
};
throw
error
;
}),
map
((
res
:
{
data
:
LokiLegacyStreamResponse
})
=>
({
data
:
res
.
data
?
res
.
data
.
streams
.
map
(
stream
=>
legacyLogStreamToDataFrame
(
stream
,
reverse
))
:
[],
}))
)
),
of
({
data
:
res
.
data
?
res
.
data
.
data
.
result
.
map
(
stream
=>
lokiStreamResultToDataFrame
(
stream
,
reverse
))
:
[],
})
defer
(()
=>
of
({
data
:
res
.
data
?
res
.
data
.
data
.
result
.
map
(
stream
=>
lokiStreamResultToDataFrame
(
stream
,
reverse
))
:
[],
})
)
)
)
)
...
...
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