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
6d9246d4
Unverified
Commit
6d9246d4
authored
Jan 28, 2019
by
Torkel Ödegaard
Committed by
GitHub
Jan 28, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15093 from grafana/fix/explore-do-not-clear-results
Do not clear query results on transaction start
parents
50b140f6
fd06e517
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
15 deletions
+23
-15
public/app/features/explore/GraphContainer.tsx
+5
-0
public/app/features/explore/Logs.tsx
+6
-1
public/app/features/explore/LogsContainer.tsx
+2
-1
public/app/features/explore/TableContainer.tsx
+5
-0
public/app/features/explore/state/reducers.ts
+1
-7
public/sass/pages/_explore.scss
+4
-6
No files found.
public/app/features/explore/GraphContainer.tsx
View file @
6d9246d4
...
...
@@ -30,6 +30,11 @@ export class GraphContainer extends PureComponent<GraphContainerProps> {
render
()
{
const
{
exploreId
,
graphResult
,
loading
,
onChangeTime
,
showingGraph
,
showingTable
,
range
,
split
}
=
this
.
props
;
const
graphHeight
=
showingGraph
&&
showingTable
?
'200px'
:
'400px'
;
if
(
!
graphResult
)
{
return
null
;
}
return
(
<
Panel
label=
"Graph"
isOpen=
{
showingGraph
}
loading=
{
loading
}
onToggle=
{
this
.
onClickGraphButton
}
>
<
Graph
...
...
public/app/features/explore/Logs.tsx
View file @
6d9246d4
...
...
@@ -49,7 +49,7 @@ function renderMetaItem(value: any, kind: LogsMetaKind) {
}
interface
Props
{
data
:
LogsModel
;
data
?
:
LogsModel
;
exploreId
:
string
;
highlighterExpressions
:
string
[];
loading
:
boolean
;
...
...
@@ -165,6 +165,11 @@ export default class Logs extends PureComponent<Props, State> {
scanning
,
scanRange
,
}
=
this
.
props
;
if
(
!
data
)
{
return
null
;
}
const
{
dedup
,
deferLogs
,
hiddenLogLevels
,
renderAll
,
showLocalTime
,
showUtc
}
=
this
.
state
;
let
{
showLabels
}
=
this
.
state
;
const
hasData
=
data
&&
data
.
rows
&&
data
.
rows
.
length
>
0
;
...
...
public/app/features/explore/LogsContainer.tsx
View file @
6d9246d4
...
...
@@ -47,12 +47,13 @@ export class LogsContainer extends PureComponent<LogsContainerProps> {
scanning
,
scanRange
,
}
=
this
.
props
;
return
(
<
Panel
label=
"Logs"
loading=
{
loading
}
isOpen=
{
showingLogs
}
onToggle=
{
this
.
onClickLogsButton
}
>
<
Logs
data=
{
logsResult
}
exploreId=
{
exploreId
}
key=
{
logsResult
.
id
}
key=
{
logsResult
&&
logsResult
.
id
}
highlighterExpressions=
{
logsHighlighterExpressions
}
loading=
{
loading
}
onChangeTime=
{
onChangeTime
}
...
...
public/app/features/explore/TableContainer.tsx
View file @
6d9246d4
...
...
@@ -26,6 +26,11 @@ export class TableContainer extends PureComponent<TableContainerProps> {
render
()
{
const
{
loading
,
onClickCell
,
showingTable
,
tableResult
}
=
this
.
props
;
if
(
!
tableResult
)
{
return
null
;
}
return
(
<
Panel
label=
"Table"
loading=
{
loading
}
isOpen=
{
showingTable
}
onToggle=
{
this
.
onClickTableButton
}
>
<
Table
data=
{
tableResult
}
loading=
{
loading
}
onClickCell=
{
onClickCell
}
/>
...
...
public/app/features/explore/state/reducers.ts
View file @
6d9246d4
...
...
@@ -278,7 +278,7 @@ export const itemReducer = (state, action: Action): ExploreItemState => {
}
case
ActionTypes
.
QueryTransactionStart
:
{
const
{
datasourceInstance
,
queryIntervals
,
queryTransactions
}
=
state
;
const
{
queryTransactions
}
=
state
;
const
{
resultType
,
rowIndex
,
transaction
}
=
action
.
payload
;
// Discarding existing transactions of same type
const
remainingTransactions
=
queryTransactions
.
filter
(
...
...
@@ -288,15 +288,9 @@ export const itemReducer = (state, action: Action): ExploreItemState => {
// Append new transaction
const
nextQueryTransactions
:
QueryTransaction
[]
=
[...
remainingTransactions
,
transaction
];
const
results
=
calculateResultsFromQueryTransactions
(
nextQueryTransactions
,
datasourceInstance
,
queryIntervals
.
intervalMs
);
return
{
...
state
,
...
results
,
queryTransactions
:
nextQueryTransactions
,
showingStartPage
:
false
,
};
...
...
public/sass/pages/_explore.scss
View file @
6d9246d4
...
...
@@ -292,11 +292,6 @@
overflow
:
hidden
;
background
:
none
;
margin
:
$panel-margin
/
2
;
transition
:
background-color
1s
ease
;
}
.explore-panel__loader--active
{
background
:
$text-color-faint
;
}
.explore-panel__loader--active
:after
{
...
...
@@ -307,17 +302,20 @@
top
:
-50%
;
height
:
250%
;
position
:
absolute
;
animation
:
loader
2s
cubic-bezier
(
0
.17
,
0
.67
,
0
.83
,
0
.67
);
animation
:
loader
2s
cubic-bezier
(
0
.17
,
0
.67
,
0
.83
,
0
.67
)
500ms
;
animation-iteration-count
:
100
;
left
:
-25%
;
background
:
$blue
;
}
@keyframes
loader
{
from
{
left
:
-25%
;
opacity
:
0
.1
;
}
to
{
left
:
100%
;
opacity
:
1
;
}
}
...
...
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