Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

adding the default filter for Tasks #263

Merged
merged 1 commit into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,12 @@
"description": "Default filter criteria for Local Files",
"scope": "window"
},
"zowe.cics.tasks.filter": {
"type": "string",
"default": "(TRANID=*)",
"description": "Default filter criteria for Tasks",
"scope": "window"
},
"zowe.cics.allPrograms.recordCountIncrement": {
"type": "number",
"default": 500,
Expand Down
8 changes: 6 additions & 2 deletions src/trees/CICSTaskTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
*/

import { TreeItemCollapsibleState, TreeItem, window } from "vscode";
import { TreeItemCollapsibleState, TreeItem, window , workspace} from "vscode";
import { CICSRegionTree } from "./CICSRegionTree";
import { getResource } from "@zowe/cics-for-zowe-cli";
import * as https from "https";
Expand All @@ -36,7 +36,11 @@ export class CICSTaskTree extends TreeItem {
}

public async loadContents() {
let defaultCriteria = '(TRANID=*)';
let defaultCriteria = `${await workspace.getConfiguration().get('zowe.cics.tasks.filter')}`;
if (!defaultCriteria || defaultCriteria.length === 0) {
await workspace.getConfiguration().update('zowe.cics.tasks.filter', '(TRANID=*)');
defaultCriteria = '(TRANID=*)';
}
let criteria;
if (this.activeTransactionFilter) {
criteria = toEscapedCriteriaString(this.activeTransactionFilter, 'TRANID');
Expand Down