Skip to content

Commit

Permalink
fix(ds): deconstruct date, time, seconds from API response
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Oct 3, 2023
1 parent 6a268a7 commit 735703c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,13 @@ export class ZoweDatasetNode extends ZoweTreeNode implements IZoweDatasetTreeNod
msg: localize("getChildren.invalidMember", "Cannot access member with control characters in the name: {0}", item.member),
});
}
if (item.m4date) {

// get user and last modified date for sorting, if available
const { m4date, mtime, msec }: { m4date: string; mtime: string; msec: string } = item;
if (m4date) {
temp.stats = {
user: item.user,
m4date: new Date(`${item.m4date.replace(/\//g, "-")}T${item.mtime as string}:${item.msec as string}`),
m4date: new Date(`${m4date.replace(/\//g, "-")}T${mtime}:${msec}`),
};
}
elementChildren[temp.label.toString()] = temp;
Expand Down
4 changes: 2 additions & 2 deletions packages/zowe-explorer/src/job/ZoweJobNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ export class Job extends ZoweTreeNode implements IZoweJobTreeNode {
this.iconPath = icon.path;
}

if (!globals.ISTHEIA && !(this instanceof Spool)) {
this.id = `${mParent?.id ?? mParent?.label?.toString() ?? "<root>"}.${this.label as string}`;
if (!globals.ISTHEIA && contextually.isSession(this)) {
this.id = this.label as string;
}
}

Expand Down

0 comments on commit 735703c

Please sign in to comment.