Merge pull request #4571 from influxdata/flux/save-ceo
Allow Flux query cell to always be savedpull/4574/head
commit
d2c6e9a42f
|
@ -164,16 +164,11 @@ class CellEditorOverlay extends Component<Props, State> {
|
|||
|
||||
private get isSaveable(): boolean {
|
||||
const {queryDrafts, type} = this.props
|
||||
const {scriptStatus} = this.state
|
||||
|
||||
if (type === 'note') {
|
||||
if (type === 'note' || this.isFluxQuery) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (this.isFluxSource) {
|
||||
return _.get(scriptStatus, 'type', '') === 'success'
|
||||
}
|
||||
|
||||
return queryDrafts.every(queryDraft => {
|
||||
const queryConfig = getDeep<QueriesModels.QueryConfig | null>(
|
||||
queryDraft,
|
||||
|
@ -190,7 +185,7 @@ class CellEditorOverlay extends Component<Props, State> {
|
|||
})
|
||||
}
|
||||
|
||||
private get isFluxSource(): boolean {
|
||||
private get isFluxQuery(): boolean {
|
||||
const {queryDrafts} = this.props
|
||||
|
||||
if (getDeep<string>(queryDrafts, '0.type', '') === QueryType.Flux) {
|
||||
|
@ -228,7 +223,7 @@ class CellEditorOverlay extends Component<Props, State> {
|
|||
|
||||
let queries: CellQuery[] = queryDrafts
|
||||
|
||||
if (this.isFluxSource) {
|
||||
if (this.isFluxQuery) {
|
||||
queries = [
|
||||
{
|
||||
query: script,
|
||||
|
|
Loading…
Reference in New Issue