mirror of
https://github.com/SigNoz/signoz.git
synced 2026-02-03 08:33:26 +00:00
chore: add fillZero function to query builder functions list (#9651)
This commit is contained in:
committed by
GitHub
parent
479cba7dd2
commit
e9afbede24
@@ -68,8 +68,8 @@ export const metricQueryFunctionOptions: SelectOption<string, string>[] = [
|
||||
label: 'Time Shift',
|
||||
},
|
||||
{
|
||||
value: QueryFunctionsTypes.TIME_SHIFT,
|
||||
label: 'Time Shift',
|
||||
value: QueryFunctionsTypes.FILL_ZERO,
|
||||
label: 'Fill Zero',
|
||||
},
|
||||
];
|
||||
|
||||
@@ -156,4 +156,7 @@ export const queryFunctionsTypesConfig: QueryFunctionConfigType = {
|
||||
showInput: true,
|
||||
inputType: 'text',
|
||||
},
|
||||
fillZero: {
|
||||
showInput: false,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -208,6 +208,7 @@ export enum QueryFunctionsTypes {
|
||||
MEDIAN_5 = 'median5',
|
||||
MEDIAN_7 = 'median7',
|
||||
TIME_SHIFT = 'timeShift',
|
||||
FILL_ZERO = 'fillZero',
|
||||
}
|
||||
|
||||
export type PanelTypeKeys =
|
||||
|
||||
@@ -59,6 +59,9 @@ describe('functionNameNormalizer', () => {
|
||||
expect(normalizeFunctionName('median5')).toBe(QueryFunctionsTypes.MEDIAN_5);
|
||||
expect(normalizeFunctionName('median7')).toBe(QueryFunctionsTypes.MEDIAN_7);
|
||||
expect(normalizeFunctionName('anomaly')).toBe(QueryFunctionsTypes.ANOMALY);
|
||||
expect(normalizeFunctionName('fillzero')).toBe(
|
||||
QueryFunctionsTypes.FILL_ZERO,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ export const normalizeFunctionName = (functionName: string): string => {
|
||||
median5: QueryFunctionsTypes.MEDIAN_5,
|
||||
median7: QueryFunctionsTypes.MEDIAN_7,
|
||||
anomaly: QueryFunctionsTypes.ANOMALY,
|
||||
fillzero: QueryFunctionsTypes.FILL_ZERO,
|
||||
};
|
||||
|
||||
// Convert to lowercase for case-insensitive matching
|
||||
|
||||
Reference in New Issue
Block a user