diff --git a/frontend/src/lib/components/SmartNodeSelector/private-utils/treeData.ts b/frontend/src/lib/components/SmartNodeSelector/private-utils/treeData.ts index 47771a77d..23b71c166 100644 --- a/frontend/src/lib/components/SmartNodeSelector/private-utils/treeData.ts +++ b/frontend/src/lib/components/SmartNodeSelector/private-utils/treeData.ts @@ -12,21 +12,25 @@ export class TreeData { private _stringifiedData: string; private _nodeData: TreeDataNodeMetaData[]; private _allowOrOperator: boolean; + private _allowWildcards: boolean; constructor({ treeData, delimiter, allowOrOperator, + allowWildcards, }: { treeData: TreeDataNode[]; delimiter: string; allowOrOperator: boolean; + allowWildcards: boolean; }) { this._treeData = treeData; this._delimiter = delimiter; this._nodeData = []; this._stringifiedData = ""; this._allowOrOperator = allowOrOperator; + this._allowWildcards = allowWildcards; this.populateNodes(); } @@ -125,6 +129,13 @@ export class TreeData { } private adjustNodeName(nodeName: string): string { + if (!this._allowWildcards) { + return this.replaceAll( + this.replaceAll(this.replaceAll(this.escapeRegExp(nodeName), ":", ""), "*", "\\*"), + "?", + "\\." + ); + } return this.activateOrStatements( this.replaceAll( this.replaceAll(this.replaceAll(this.escapeRegExp(nodeName), ":", ""), "*", '[^:"]*'), diff --git a/frontend/src/lib/components/SmartNodeSelector/smartNodeSelector.tsx b/frontend/src/lib/components/SmartNodeSelector/smartNodeSelector.tsx index f9f967fd3..ea60350ad 100644 --- a/frontend/src/lib/components/SmartNodeSelector/smartNodeSelector.tsx +++ b/frontend/src/lib/components/SmartNodeSelector/smartNodeSelector.tsx @@ -160,6 +160,7 @@ export class SmartNodeSelectorComponent extends React.Component