mirror of https://github.com/grafana/grafana
Explore: Remove not running query for collapsed elements (#27026)
* Make graph and table collapsing just a UI thing * Remove showingGraph and showingTable, set them defaultly to true * Remove collaapsing for panels in Explore * UI toggle WiP * WIP, add query type * Refactor, clean up * Update tests * Clean uo * Update rangeAll to range and instant * Remove console logs * Update packages/grafana-data/src/types/datasource.ts Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> * Update public/app/core/utils/explore.ts Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> * Fix prettier error Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>pull/27711/head
parent
32deddbf0b
commit
f6c91d1318
@ -1,62 +1,68 @@ |
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
||||
|
||||
exports[`PromExploreQueryEditor should render component 1`] = ` |
||||
<PromQueryField |
||||
ExtraFieldElement={ |
||||
<PromExploreExtraField |
||||
hasTooltip={true} |
||||
label="Step" |
||||
onChangeFunc={[Function]} |
||||
onKeyDownFunc={[Function]} |
||||
tooltipContent="Time units can be used here, for example: 5s, 1m, 3h, 1d, 1y (Default if no unit is specified: s)" |
||||
value="1s" |
||||
/> |
||||
} |
||||
data={ |
||||
Object { |
||||
"request": Object { |
||||
"app": "Grafana", |
||||
"dashboardId": 1, |
||||
"interval": "1s", |
||||
"intervalMs": 1000, |
||||
"panelId": 1, |
||||
"range": Object { |
||||
"from": "2020-01-01T00:00:00.000Z", |
||||
"raw": Object { |
||||
<Fragment> |
||||
<PromQueryField |
||||
ExtraFieldElement={ |
||||
<PromExploreExtraField |
||||
hasTooltip={true} |
||||
label="Step" |
||||
onChangeFunc={[Function]} |
||||
onKeyDownFunc={[Function]} |
||||
tooltipContent="Time units can be used here, for example: 5s, 1m, 3h, 1d, 1y (Default if no unit is specified: s)" |
||||
value="1s" |
||||
/> |
||||
} |
||||
data={ |
||||
Object { |
||||
"request": Object { |
||||
"app": "Grafana", |
||||
"dashboardId": 1, |
||||
"interval": "1s", |
||||
"intervalMs": 1000, |
||||
"panelId": 1, |
||||
"range": Object { |
||||
"from": "2020-01-01T00:00:00.000Z", |
||||
"raw": Object { |
||||
"from": "2020-01-01T00:00:00.000Z", |
||||
"to": "2020-01-02T00:00:00.000Z", |
||||
}, |
||||
"to": "2020-01-02T00:00:00.000Z", |
||||
}, |
||||
"to": "2020-01-02T00:00:00.000Z", |
||||
"requestId": "1", |
||||
"scopedVars": Object {}, |
||||
"startTime": 0, |
||||
"targets": Array [], |
||||
"timezone": "GMT", |
||||
}, |
||||
"requestId": "1", |
||||
"scopedVars": Object {}, |
||||
"startTime": 0, |
||||
"targets": Array [], |
||||
"timezone": "GMT", |
||||
}, |
||||
"series": Array [], |
||||
"state": "NotStarted", |
||||
"timeRange": Object { |
||||
"from": "2020-01-01T00:00:00.000Z", |
||||
"raw": Object { |
||||
"series": Array [], |
||||
"state": "NotStarted", |
||||
"timeRange": Object { |
||||
"from": "2020-01-01T00:00:00.000Z", |
||||
"raw": Object { |
||||
"from": "2020-01-01T00:00:00.000Z", |
||||
"to": "2020-01-02T00:00:00.000Z", |
||||
}, |
||||
"to": "2020-01-02T00:00:00.000Z", |
||||
}, |
||||
"to": "2020-01-02T00:00:00.000Z", |
||||
}, |
||||
} |
||||
} |
||||
} |
||||
datasource={Object {}} |
||||
history={Array []} |
||||
onBlur={[Function]} |
||||
onChange={[MockFunction]} |
||||
onRunQuery={[MockFunction]} |
||||
query={ |
||||
Object { |
||||
"expr": "", |
||||
"interval": "1s", |
||||
"refId": "A", |
||||
datasource={Object {}} |
||||
history={Array []} |
||||
onBlur={[Function]} |
||||
onChange={[MockFunction]} |
||||
onRunQuery={[MockFunction]} |
||||
query={ |
||||
Object { |
||||
"expr": "", |
||||
"interval": "1s", |
||||
"refId": "A", |
||||
} |
||||
} |
||||
} |
||||
/> |
||||
/> |
||||
<PromExploreRadioButton |
||||
onQueryTypeChange={[Function]} |
||||
selected="range" |
||||
/> |
||||
</Fragment> |
||||
`; |
||||
|
Loading…
Reference in new issue