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
541a691a
Commit
541a691a
authored
Dec 04, 2018
by
Erik Sundell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only display scan button if there is at least one existing selector that returned an empty result
parent
e21ca3f5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
public/app/core/logs_model.ts
+1
-0
public/app/core/utils/explore.ts
+11
-4
public/app/features/explore/Explore.tsx
+1
-1
public/app/features/explore/Logs.tsx
+1
-1
No files found.
public/app/core/logs_model.ts
View file @
541a691a
...
...
@@ -62,6 +62,7 @@ export interface LogsModel {
meta
?:
LogsMetaItem
[];
rows
:
LogRow
[];
series
?:
TimeSeries
[];
queryEmpty
?:
boolean
;
}
export
interface
LogsStream
{
...
...
public/app/core/utils/explore.ts
View file @
541a691a
...
...
@@ -133,7 +133,12 @@ export function ensureQueries(queries?: DataQuery[]): DataQuery[] {
* A target is non-empty when it has keys other than refId and key.
*/
export
function
hasNonEmptyQuery
(
queries
:
DataQuery
[]):
boolean
{
return
queries
.
some
(
query
=>
Object
.
keys
(
query
).
length
>
2
);
return
queries
.
some
(
query
=>
Object
.
keys
(
query
)
.
map
(
k
=>
query
[
k
])
.
filter
(
v
=>
v
).
length
>
2
);
}
export
function
calculateResultsFromQueryTransactions
(
...
...
@@ -148,15 +153,17 @@ export function calculateResultsFromQueryTransactions(
new
TableModel
(),
...
queryTransactions
.
filter
(
qt
=>
qt
.
resultType
===
'Table'
&&
qt
.
done
&&
qt
.
result
).
map
(
qt
=>
qt
.
result
)
);
const
logsResult
=
datasource
&&
datasource
.
mergeStreams
const
logsResult
=
{
...
datasource
&&
datasource
.
mergeStreams
?
datasource
.
mergeStreams
(
_
.
flatten
(
queryTransactions
.
filter
(
qt
=>
qt
.
resultType
===
'Logs'
&&
qt
.
done
&&
qt
.
result
).
map
(
qt
=>
qt
.
result
)
),
graphInterval
)
:
undefined
;
:
undefined
,
queryEmpty
:
queryTransactions
.
filter
(
qt
=>
qt
.
resultType
===
'Logs'
&&
qt
.
done
).
every
(
qt
=>
qt
.
result
.
length
===
0
),
};
return
{
graphResult
,
...
...
public/app/features/explore/Explore.tsx
View file @
541a691a
...
...
@@ -220,7 +220,7 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
modifiedQueries
=
[...
this
.
modifiedQueries
];
}
else
if
(
datasource
.
importQueries
)
{
// Datasource-specific importers
modifiedQueries
=
await
datasource
.
importQueries
(
this
.
modifiedQueries
,
origin
.
meta
);
modifiedQueries
=
await
datasource
.
importQueries
(
this
.
modifiedQueries
,
datasource
.
meta
);
}
else
{
// Default is blank queries
modifiedQueries
=
ensureQueries
();
...
...
public/app/features/explore/Logs.tsx
View file @
541a691a
...
...
@@ -358,7 +358,7 @@ export default class Logs extends PureComponent<LogsProps, LogsState> {
{
hasData
&&
deferLogs
&&
<
span
>
Rendering
{
dedupedData
.
rows
.
length
}
rows...
</
span
>
}
</
div
>
{
!
loading
&&
!
hasData
&&
data
.
queryEmpty
&&
!
scanning
&&
(
<
div
className=
"logs-nodata"
>
No logs found.
...
...
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