mirror of https://github.com/grafana/grafana
Prometheus: Set default query type values in Explore only for new queries (#41263)
* Prometheus: Override query type only for new queries * Update comment * Add tests * Fix testpull/41457/head
parent
ed030f9c21
commit
9e996eaca7
@ -1,93 +0,0 @@ |
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
||||
|
||||
exports[`PromExploreQueryEditor should render component 1`] = ` |
||||
<PromQueryField |
||||
ExtraFieldElement={ |
||||
<Memo |
||||
datasource={ |
||||
Object { |
||||
"languageProvider": Object { |
||||
"getLabelKeys": [Function], |
||||
"metrics": Array [], |
||||
"syntax": [Function], |
||||
}, |
||||
} |
||||
} |
||||
onChange={[MockFunction]} |
||||
onRunQuery={[MockFunction]} |
||||
query={ |
||||
Object { |
||||
"expr": "", |
||||
"interval": "1s", |
||||
"refId": "A", |
||||
} |
||||
} |
||||
/> |
||||
} |
||||
app="explore" |
||||
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", |
||||
}, |
||||
"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 { |
||||
"from": "2020-01-01T00:00:00.000Z", |
||||
"to": "2020-01-02T00:00:00.000Z", |
||||
}, |
||||
"to": "2020-01-02T00:00:00.000Z", |
||||
}, |
||||
} |
||||
} |
||||
datasource={ |
||||
Object { |
||||
"languageProvider": Object { |
||||
"getLabelKeys": [Function], |
||||
"metrics": Array [], |
||||
"syntax": [Function], |
||||
}, |
||||
} |
||||
} |
||||
history={Array []} |
||||
onBlur={[Function]} |
||||
onChange={[MockFunction]} |
||||
onRunQuery={[MockFunction]} |
||||
query={ |
||||
Object { |
||||
"expr": "", |
||||
"interval": "1s", |
||||
"refId": "A", |
||||
} |
||||
} |
||||
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", |
||||
} |
||||
} |
||||
/> |
||||
`; |
Loading…
Reference in new issue