mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-27 15:18:08 +00:00
* feat: fixed panel coorelation not spreading the filter expression in explorer pages * feat: fixed multiagregation not getting sent in create alert * fix: fixed failing test cases * Update frontend/src/api/v5/queryRange/prepareQueryRangePayloadV5.ts Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * fix: fix lint error * fix: stepInterval not updating in panel qb * fix: added test cases for mapQueryDataFromApi and prepareQueryRangePayloadV5 * fix: added convertV5Response test cases - timeseries, pie and table * fix: refactored handleRunQuery * fix: code refactor * fix: refactored the mapQueryDataFromApi function according to new sub_var api * fix: updated test cases * fix: removed isJSON and isColumn from everywhere * fix: fixed code and test cases * fix: fixed bar chart custom - step interval for qb v5 (#8806) * fix: added querytype boolean check for v5 changes * fix: fixed typechecks * fix: fixed typechecks --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
23 lines
643 B
TypeScript
23 lines
643 B
TypeScript
import { OPERATORS } from 'constants/queryBuilder';
|
|
import { ILog } from 'types/api/logs/log';
|
|
import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';
|
|
import { TagFilterItem } from 'types/api/queryBuilder/queryBuilderData';
|
|
import { v4 as uuid } from 'uuid';
|
|
|
|
export const getFiltersFromResources = (
|
|
resources: ILog['resources_string'],
|
|
): TagFilterItem[] =>
|
|
Object.keys(resources).map((key: string) => {
|
|
const resourceValue = resources[key] as string;
|
|
return {
|
|
id: uuid(),
|
|
key: {
|
|
key,
|
|
dataType: DataTypes.String,
|
|
type: 'resource',
|
|
},
|
|
op: OPERATORS['='],
|
|
value: resourceValue,
|
|
};
|
|
});
|