Skip to content

Commit

Permalink
Merge branch 'master' into fix-deleting-profile
Browse files Browse the repository at this point in the history
  • Loading branch information
zFernand0 authored May 7, 2020
2 parents 22a4416 + a702e9c commit fc9882b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 5 additions & 2 deletions src/Profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,11 @@ export class Profiles {
}

public async getUrl(urlInputBox): Promise<string | undefined> {
return new Promise<string | undefined> ((resolve) => {
urlInputBox.onDidHide(() => { resolve(urlInputBox.value); });
return new Promise<string | undefined> ((resolve, reject) => {
urlInputBox.onDidHide(() => {
reject(undefined);
resolve(urlInputBox.value);
});
urlInputBox.onDidAccept(() => {
if (this.validateAndParseUrl(urlInputBox.value).valid) {
resolve(urlInputBox.value);
Expand Down
7 changes: 3 additions & 4 deletions src/abstract/ZoweTreeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,14 @@ export class ZoweTreeProvider {
return undefined;
}

public async editSession(node: IZoweDatasetTreeNode) {
public async editSession(node: IZoweTreeNode) {
const profile = node.getProfile();
const profileName = node.getProfileName();
const EditSession = await Profiles.getInstance().editSession(profile, profileName);

if (EditSession) {
node.getProfile().profile= EditSession as IProfile;
setProfile(node, EditSession as IProfile);
setSession(node, EditSession as ISession);
await setProfile(node, EditSession as IProfile);
await setSession(node, EditSession as ISession);
this.refresh();
}
}
Expand Down

0 comments on commit fc9882b

Please sign in to comment.