Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue #845] Do not show undefined spool files for a job #1584

Merged
merged 2 commits into from
Nov 25, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
58 changes: 32 additions & 26 deletions packages/zowe-explorer/src/job/ZoweJobNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,32 +103,38 @@ export class Job extends ZoweTreeNode implements IZoweJobTreeNode {
}
);
const refreshTimestamp = Date.now();
spools.forEach((spool) => {
let prefix = spool.stepname;
if (prefix === undefined) {
prefix = spool.procstep;
}
const sessionName = this.getProfileName();
const spoolNode = new Spool(
`${spool.stepname}:${spool.ddname}(${spool.id})`,
vscode.TreeItemCollapsibleState.None,
this,
this.session,
spool,
this.job,
this
);
const icon = getIconByNode(spoolNode);
if (icon) {
spoolNode.iconPath = icon.path;
}
spoolNode.command = {
command: "zowe.jobs.zosJobsOpenspool",
title: "",
arguments: [sessionName, spool, refreshTimestamp],
};
elementChildren.push(spoolNode);
});
spools
// filter out all the objects which do not seem to be correct Job File Document types
// see an issue #845 for the details
.filter(
(item) => !(item.id === undefined && item.ddname === undefined && item.stepname === undefined)
)
.forEach((spool) => {
let prefix = spool.stepname;
if (prefix === undefined) {
prefix = spool.procstep;
}
const sessionName = this.getProfileName();
const spoolNode = new Spool(
`${spool.stepname}:${spool.ddname}(${spool.id})`,
vscode.TreeItemCollapsibleState.None,
this,
this.session,
spool,
this.job,
this
);
const icon = getIconByNode(spoolNode);
if (icon) {
spoolNode.iconPath = icon.path;
}
spoolNode.command = {
command: "zowe.jobs.zosJobsOpenspool",
title: "",
arguments: [sessionName, spool, refreshTimestamp],
};
elementChildren.push(spoolNode);
});
} else {
const jobs = await vscode.window.withProgress(
{
Expand Down