mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 14:28:59 +08:00
fix: retain the query name,expression and disabled property on changing panel type (#4976)
* fix: retain the query name,expression and disabled property on changing panel type * fix: missing reset and init query for superset query
This commit is contained in:
parent
cf64da2631
commit
2dbe598b2c
@ -50,6 +50,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'having',
|
'having',
|
||||||
'orderBy',
|
'orderBy',
|
||||||
'functions',
|
'functions',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -65,6 +68,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'orderBy',
|
'orderBy',
|
||||||
'functions',
|
'functions',
|
||||||
'spaceAggregation',
|
'spaceAggregation',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -78,6 +84,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'limit',
|
'limit',
|
||||||
'having',
|
'having',
|
||||||
'orderBy',
|
'orderBy',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -94,6 +103,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'having',
|
'having',
|
||||||
'orderBy',
|
'orderBy',
|
||||||
'functions',
|
'functions',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -109,6 +121,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'orderBy',
|
'orderBy',
|
||||||
'functions',
|
'functions',
|
||||||
'spaceAggregation',
|
'spaceAggregation',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -122,6 +137,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'limit',
|
'limit',
|
||||||
'having',
|
'having',
|
||||||
'orderBy',
|
'orderBy',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -138,6 +156,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'having',
|
'having',
|
||||||
'orderBy',
|
'orderBy',
|
||||||
'functions',
|
'functions',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -153,6 +174,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'orderBy',
|
'orderBy',
|
||||||
'functions',
|
'functions',
|
||||||
'spaceAggregation',
|
'spaceAggregation',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -166,6 +190,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'limit',
|
'limit',
|
||||||
'having',
|
'having',
|
||||||
'orderBy',
|
'orderBy',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -182,6 +209,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'having',
|
'having',
|
||||||
'orderBy',
|
'orderBy',
|
||||||
'functions',
|
'functions',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -197,6 +227,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'orderBy',
|
'orderBy',
|
||||||
'functions',
|
'functions',
|
||||||
'spaceAggregation',
|
'spaceAggregation',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -210,6 +243,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'limit',
|
'limit',
|
||||||
'having',
|
'having',
|
||||||
'orderBy',
|
'orderBy',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -241,6 +277,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'reduceTo',
|
'reduceTo',
|
||||||
'having',
|
'having',
|
||||||
'functions',
|
'functions',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -254,6 +293,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'reduceTo',
|
'reduceTo',
|
||||||
'functions',
|
'functions',
|
||||||
'spaceAggregation',
|
'spaceAggregation',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -267,6 +309,9 @@ export const panelTypeDataSourceFormValuesMap: Record<
|
|||||||
'limit',
|
'limit',
|
||||||
'having',
|
'having',
|
||||||
'orderBy',
|
'orderBy',
|
||||||
|
'queryName',
|
||||||
|
'expression',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -229,6 +229,9 @@ export function QueryBuilderProvider({
|
|||||||
setCurrentQuery(
|
setCurrentQuery(
|
||||||
timeUpdated ? merge(currentQuery, newQueryState) : newQueryState,
|
timeUpdated ? merge(currentQuery, newQueryState) : newQueryState,
|
||||||
);
|
);
|
||||||
|
setSupersetQuery(
|
||||||
|
timeUpdated ? merge(currentQuery, newQueryState) : newQueryState,
|
||||||
|
);
|
||||||
setQueryType(type);
|
setQueryType(type);
|
||||||
},
|
},
|
||||||
[prepareQueryBuilderData, currentQuery],
|
[prepareQueryBuilderData, currentQuery],
|
||||||
@ -802,6 +805,7 @@ export function QueryBuilderProvider({
|
|||||||
|
|
||||||
if (newCurrentQuery) {
|
if (newCurrentQuery) {
|
||||||
setCurrentQuery(newCurrentQuery);
|
setCurrentQuery(newCurrentQuery);
|
||||||
|
setSupersetQuery(newCurrentQuery);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user