Compare commits

...

9 Commits

Author SHA1 Message Date
Abhi kumar
d50395e58a Merge branch 'main' into issue/3360 2025-12-16 16:44:08 +05:30
Abhi kumar
9453e4482b Merge branch 'main' into issue/3360 2025-12-16 12:50:34 +05:30
Abhi kumar
c3e5d4a573 Merge branch 'main' into issue/3360 2025-12-16 10:51:16 +05:30
Abhi kumar
73fdacf895 Merge branch 'main' into issue/3360 2025-12-06 01:33:44 +05:30
Abhi Kumar
49470a0bf6 chore: removed debug console log 2025-12-06 01:33:05 +05:30
Abhi kumar
c6fb5b4797 Merge branch 'main' into issue/3360 2025-12-04 21:29:45 +05:30
Abhi kumar
fce3b34628 Merge branch 'main' into issue/3360 2025-12-03 18:44:34 +05:30
Abhi kumar
7e60a83f7a Merge branch 'main' into issue/3360 2025-12-03 18:09:29 +05:30
Abhi Kumar
26426d4b61 fix: added fix free text with quick filter issue 2025-12-03 18:02:09 +05:30
3 changed files with 57 additions and 2 deletions

View File

@@ -163,6 +163,10 @@ function formatSingleValueForFilter(
if (trimmed === 'true' || trimmed === 'false') {
return trimmed === 'true';
}
if (isQuoted(value)) {
return unquote(value);
}
}
// Return non-string values as-is, or string values that couldn't be converted

View File

@@ -61,6 +61,58 @@ describe('extractQueryPairs', () => {
]);
});
test('should test for filer expression with freeText', () => {
const input = "disconnected deployment.env not in ['mq-kafka']";
const result = extractQueryPairs(input);
expect(result).toEqual([
{
key: 'disconnected',
operator: '',
valueList: [],
valuesPosition: [],
hasNegation: false,
isMultiValue: false,
value: undefined,
position: {
keyStart: 0,
keyEnd: 11,
operatorStart: 0,
operatorEnd: 0,
negationStart: 0,
negationEnd: 0,
valueStart: undefined,
valueEnd: undefined,
},
isComplete: false,
},
{
key: 'deployment.env',
operator: 'in',
value: "['mq-kafka']",
valueList: ["'mq-kafka'"],
valuesPosition: [
{
start: 36,
end: 45,
},
],
hasNegation: true,
isMultiValue: true,
position: {
keyStart: 13,
keyEnd: 26,
operatorStart: 32,
operatorEnd: 33,
valueStart: 35,
valueEnd: 46,
negationStart: 28,
negationEnd: 30,
},
isComplete: true,
},
]);
});
test('should extract IN with numeric list inside parentheses', () => {
const input = 'id IN (1, 2, 3)';
const result = extractQueryPairs(input);

View File

@@ -1339,8 +1339,7 @@ export function extractQueryPairs(query: string): IQueryPair[] {
else if (
currentPair &&
currentPair.key &&
(isConjunctionToken(token.type) ||
(token.type === FilterQueryLexer.KEY && isQueryPairComplete(currentPair)))
(isConjunctionToken(token.type) || token.type === FilterQueryLexer.KEY)
) {
queryPairs.push({
key: currentPair.key,