Skip to content

Commit

Permalink
feat: add settings for pagination toggle, max records
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Dec 27, 2024
1 parent b3019b8 commit 7cff764
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
12 changes: 12 additions & 0 deletions packages/zowe-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1828,6 +1828,18 @@
"default": 5000,
"description": "%zowe.pollInterval.info%",
"scope": "window"
},
"zowe.pagination.enabled": {
"type": "boolean",
"default": false,
"description": "%zowe.pagination.enabled%",
"scope": "window"
},
"zowe.pagination.numRecords": {
"type": "integer",
"default": 250,
"description": "%zowe.pagination.numRecords%",
"scope": "window"
}
}
},
Expand Down
2 changes: 2 additions & 0 deletions packages/zowe-explorer/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@
"zowe.pollInterval.info": "Default interval (in milliseconds) when polling spool files.",
"zowe.security.checkForCustomCredentialManagers": "Check for any installed VS Code extensions for handling credentials when activating Zowe Explorer",
"zowe.security.secureCredentialsEnabled": "Allow credentials to be stored securely. If disabled and autoStore is set to true, z/OS credentials are stored as clear text in zowe.config.json.",
"zowe.pagination.enabled": "Enable pagination for tree items and resources. Instead of loading all items or resource contents, data is loaded in chunks.",
"zowe.pagination.numRecords": "Maximum number of records to load at once for a job spool. Set this value to 0 to disable pagination for spools.",
"issueTsoCmd": "Issue TSO Command",
"deleteProfile": "Delete a Profile Permanently...",
"renameDataSet": "Rename Data Set",
Expand Down
9 changes: 8 additions & 1 deletion packages/zowe-explorer/src/trees/job/JobFSProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { Profiles } from "../../configuration/Profiles";
import { ZoweExplorerApiRegister } from "../../extending/ZoweExplorerApiRegister";
import { SharedContext } from "../shared/SharedContext";
import { AuthUtils } from "../../utils/AuthUtils";
import { SettingsConfig } from "../../configuration/SettingsConfig";

export class JobFSProvider extends BaseProvider implements vscode.FileSystemProvider {
private static _instance: JobFSProvider;
Expand Down Expand Up @@ -210,14 +211,20 @@ export class JobFSProvider extends BaseProvider implements vscode.FileSystemProv

const queryParams = new URLSearchParams(uri.query);
const startRecord = queryParams.has("startRecord") ? Number(queryParams.get("startRecord")) : undefined;
let numRecords: number;
if (queryParams.has("numRecords")) {
numRecords = Number(queryParams.get("numRecords"));
} else if (SettingsConfig.getDirectValue("zowe.pagination.enabled")) {
numRecords = SettingsConfig.getDirectValue("zowe.pagination.numRecords");
}

try {
if (jesApi.downloadSingleSpool) {
const spoolDownloadObject: IDownloadSpoolContentParms = {
jobFile: spoolEntry.spool,
stream: bufBuilder,
startRecord,
numRecords: 250,
numRecords,
};

// Handle encoding and binary options
Expand Down

0 comments on commit 7cff764

Please sign in to comment.