Skip to content

Commit bf1f605

Browse files
committed
fix(dltfilterassistant): support delete and patch
Show the source uri decoded for better readability. Dont show the number of lifecycles filtered (as it will be known only later on).
1 parent 388bbd1 commit bf1f605

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/webview/src/components/dltFilterAssistant.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function nameForFilterObj(filter) {
9595
if (filter.ctid) { nameStr += `CTID:${filter.ctid} `; }
9696
if (filter.payload) { nameStr += `payload contains '${filter.payload}' `; }
9797
if (filter.payloadRegex !== undefined) { nameStr += `payload matches '${filter.payloadRegex}'`; }
98-
if (filter.lifecycles !== undefined) { nameStr += ` in ${filter.lifecycles.length} LCs`; }
98+
if (filter.lifecycles !== undefined) { nameStr += ` in sel. LCs`; }
9999

100100
return `${enabled}${type}${nameStr}`;
101101
}
@@ -154,7 +154,10 @@ function parseFilters(request, applyMode) {
154154
commandList.push(filterFromObj(JSON.parse(commandParams), true));
155155
break;
156156
case 'delete':
157-
commandList.push({ name: commandStr, restCommand: command, value: commandParams });
157+
commandList.push({ name: `delete=${commandParams}`, restCommand: command, value: commandParams });
158+
break;
159+
case 'patch':
160+
commandList.push({ name: `patch=${commandParams}`, restCommand: command, value: commandParams });
158161
break;
159162
case 'report':
160163
const params = JSON.parse(commandParams);
@@ -422,7 +425,7 @@ export default function DLTFilterAssistantDialog(props) {
422425
</Grid>
423426
</Grid>
424427
<Grid item>
425-
source:<React.Fragment>{dataSource ? dataSource.split('&').map((fra, index) => <React.Fragment><br />{index > 0 ? <React.Fragment>&emsp;</React.Fragment> : null}{index > 0 ? '&' + fra : fra}</React.Fragment>) : ''}</React.Fragment>
428+
source:<React.Fragment>{dataSource ? dataSource.split('&').map((fra, index) => <React.Fragment><br />{index > 0 ? <React.Fragment>&emsp;</React.Fragment> : null}{index > 0 ? '&' + decodeURIComponent(fra) : decodeURIComponent(fra)}</React.Fragment>) : ''}</React.Fragment>
426429
</Grid>
427430
<Grid item>
428431
<Paper>

0 commit comments

Comments
 (0)