chore: more logs, better naming
parent
5652be86fe
commit
42332aa514
|
@ -68,7 +68,7 @@ class InfluxQLEditor extends Component<Props, State> {
|
|||
const {submitted, editedQueryText} = prevState
|
||||
const isSubmitted = submitted.get(nextProps.activeQueryIndex)??true
|
||||
console.log(
|
||||
`getDerivedStateFromProps: ${nextProps.activeQueryIndex}, isSubmitted: ${isSubmitted}, submitted: ${JSON.stringify(submitted)}, editedQueryText: ${editedQueryText}, query: ${nextProps.query}`
|
||||
`getDerivedStateFromProps: ${nextProps.activeQueryIndex}, isSubmitted: ${isSubmitted}, submitted: ${JSON.stringify(submitted)}, editedQueryText: ${editedQueryText.substring(0, Math.min(editedQueryText.length, 20))}, query: ${nextProps.query.substring(0, Math.min(nextProps.query.length, 20))}`
|
||||
)
|
||||
const isQueryConfigChanged = nextProps.config.id !== prevState.configID
|
||||
const isQueryTextChanged = editedQueryText.trim() !== nextProps.query.trim()
|
||||
|
@ -247,9 +247,10 @@ class InfluxQLEditor extends Component<Props, State> {
|
|||
const {templates, query, activeQueryIndex} = this.props
|
||||
//const {templates, activeQueryIndex} = this.props
|
||||
const isEditedChanged = value !== this.state.editedQueryText
|
||||
const isSubmitted = value.trim() === query.trim()
|
||||
const isSubmittedState = this.state.submitted.get(activeQueryIndex)??true
|
||||
console.log(`handleChange: ${activeQueryIndex}, isSubmitted ${isSubmitted}, isSubmittedState: ${isSubmittedState}`)
|
||||
//const isSubmitted = isExcludedStatement(value)? isSubmittedState :value.trim() === query.trim()
|
||||
const isSubmitted = value.trim() === query.trim()
|
||||
console.log(`handleChange: ${activeQueryIndex}, isSubmitted ${isSubmitted}, isSubmittedState: ${isSubmittedState}, isEditedChanged: ${isEditedChanged}`)
|
||||
|
||||
if (!isEditedChanged || this.state.isShowingTemplateValues) {
|
||||
return
|
||||
|
|
|
@ -36,8 +36,9 @@ export function executeQueries(
|
|||
for (let i = 0; i < queries.length; i++) {
|
||||
if (
|
||||
isExcludedStatement(queries[i].text) &&
|
||||
!queries[i].queryConfig.isSubmitted
|
||||
!queries[i].queryConfig.isManuallySubmitted
|
||||
) {
|
||||
console.log('skipping query', queries[i].text)
|
||||
results[i] = {value: null, error: 'skipped'}
|
||||
counter -= 1
|
||||
continue
|
||||
|
|
|
@ -432,7 +432,7 @@ class TimeMachine extends PureComponent<Props, State> {
|
|||
|
||||
try {
|
||||
newQueryConfig = await getConfig(url, activeID, text, templates)
|
||||
newQueryConfig.isSubmitted = !isAutoSubmitted
|
||||
newQueryConfig.isManuallySubmitted = !isAutoSubmitted
|
||||
} catch {
|
||||
notify(analyzeQueryFailed)
|
||||
return
|
||||
|
|
|
@ -26,7 +26,7 @@ export interface QueryConfig {
|
|||
lower?: string
|
||||
upper?: string
|
||||
isQuerySupportedByExplorer?: boolean // doesn't come from server -- is set in CellEditorOverlay
|
||||
isSubmitted?: boolean // doesn't come from server -- is set in InfluxQLEditor
|
||||
isManuallySubmitted?: boolean // doesn't come from server -- is set in InfluxQLEditor
|
||||
originalQuery?: string
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue