Skip to content

Commit ef2063e

Browse files
twou12031travilyu
authored andcommitted
[bugfix] querier datasource, infinity loop
**Phenomenon and reproduction steps** none **Root cause and solution** none **Impactions** none **Test method** - `Network` dashboard - `Flow Log` panel edit page - can use editor **Affected branch(es)** - main - v6.4 **Checklist** - [ ] Dependencies update required - [ ] Common bug (similar problem in other repo)
1 parent a9d9974 commit ef2063e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

deepflow-querier-datasource/src/components/QueryEditorFormRow.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,15 +393,20 @@ export class QueryEditorFormRow extends PureComponent<Props> {
393393
if (!hasCurrentItem) {
394394
this.onColumnSelect('')
395395
} else {
396-
const fields = ['func', 'params', 'subFuncs', 'preFunc']
396+
const fields = ['func', 'params', 'subFuncs']
397397
const current = _.pick(basicData, fields)
398+
if ('preFunc' in current) {
399+
fields.push('preFunc')
400+
}
398401
if (rowType === 'select') {
399402
if (!usingGroupBy && basicData.type === 'metric') {
400403
const target = {
401404
func: '',
402405
params: [],
403-
subFuncs: [],
404-
preFunc: undefined
406+
subFuncs: []
407+
}
408+
if ('preFunc' in current) {
409+
_.set(target, 'preFunc', undefined)
405410
}
406411
if (!_.isEqual(current, target)) {
407412
this.props.onRowValChange({

0 commit comments

Comments
 (0)