Allow Flux query cell to always be saved
parent
79efa8bb0a
commit
878c1abe89
|
@ -164,16 +164,11 @@ class CellEditorOverlay extends Component<Props, State> {
|
||||||
|
|
||||||
private get isSaveable(): boolean {
|
private get isSaveable(): boolean {
|
||||||
const {queryDrafts, type} = this.props
|
const {queryDrafts, type} = this.props
|
||||||
const {scriptStatus} = this.state
|
|
||||||
|
|
||||||
if (type === 'note') {
|
if (type === 'note' || this.isFluxQuery) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isFluxSource) {
|
|
||||||
return _.get(scriptStatus, 'type', '') === 'success'
|
|
||||||
}
|
|
||||||
|
|
||||||
return queryDrafts.every(queryDraft => {
|
return queryDrafts.every(queryDraft => {
|
||||||
const queryConfig = getDeep<QueriesModels.QueryConfig | null>(
|
const queryConfig = getDeep<QueriesModels.QueryConfig | null>(
|
||||||
queryDraft,
|
queryDraft,
|
||||||
|
@ -190,7 +185,7 @@ class CellEditorOverlay extends Component<Props, State> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private get isFluxSource(): boolean {
|
private get isFluxQuery(): boolean {
|
||||||
const {queryDrafts} = this.props
|
const {queryDrafts} = this.props
|
||||||
|
|
||||||
if (getDeep<string>(queryDrafts, '0.type', '') === QueryType.Flux) {
|
if (getDeep<string>(queryDrafts, '0.type', '') === QueryType.Flux) {
|
||||||
|
@ -228,7 +223,7 @@ class CellEditorOverlay extends Component<Props, State> {
|
||||||
|
|
||||||
let queries: CellQuery[] = queryDrafts
|
let queries: CellQuery[] = queryDrafts
|
||||||
|
|
||||||
if (this.isFluxSource) {
|
if (this.isFluxQuery) {
|
||||||
queries = [
|
queries = [
|
||||||
{
|
{
|
||||||
query: script,
|
query: script,
|
||||||
|
|
Loading…
Reference in New Issue