Skip to content

Commit

Permalink
Merge branch 'main' into feat/authSwitch
Browse files Browse the repository at this point in the history
Signed-off-by: SanthoshiBoyina1 <142206957+SanthoshiBoyina1@users.noreply.github.com>
  • Loading branch information
SanthoshiBoyina1 authored Jul 14, 2024
2 parents 99b344f + 61992f1 commit ffe4b40
Show file tree
Hide file tree
Showing 37 changed files with 51 additions and 56 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/theia-zowe-explorer-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ jobs:
run: yarn workspace vscode-extension-for-zowe package

- name: Create extension install directory
run: mkdir -p temp/plugins && chmod -R 777 temp
run: mkdir -p temp/extensions && chmod -R 777 temp

- name: Copy vsix to theia folder
run: cp dist/*.vsix temp/plugins
run: cp dist/*.vsix temp/extensions

# Verify vsix
- run: ls -la temp/plugins
- run: ls -la temp/extensions

- name: Start Theia
run: docker run --name theia --init -d -p 3000:3000 --user theia -v "${PWD}/temp/plugins/:/home/theia/plugins" ghcr.io/zowe/zowe-sample-dockerfiles-ze-theia-slim
run: docker run --name theia --init -d -p 3000:3000 --user theia -v "${PWD}/temp/:/home/theia/.theia" ghcr.io/zowe/zowe-sample-dockerfiles-ze-theia-slim
# NOTE(Kelosky): alternatively, we could run docker via something like this; however, we cannot hot reload
# hosted VS Code extensions after theia is started (at least at the time this was written).
# services:
Expand All @@ -61,14 +61,11 @@ jobs:
# # --health-cmd "curl --fail http://localhost:3000 || exit 1" --health-interval=5s --health-timeout=5s --health-retries 60
# options: --init

- name: Allow some time for the theia server to load
run: sleep 30s
- name: Verify Theia accessible
run: curl --fail --max-time 5 --retry 12 --retry-delay 5 --retry-all-errors http://localhost:3000

- name: Verify plugin loaded
run: docker exec -i theia ls -la /home/theia/plugins

- name: Verify Theia accessible
run: curl --fail http://localhost:3000
run: docker exec -i theia ls -la /home/theia/.theia/deployedPlugins

- name: Prep integration test files
run: yarn workspace vscode-extension-for-zowe build:integration
Expand Down
Binary file removed docs/images/ZE-Configuration.gif
Binary file not shown.
Binary file removed docs/images/ZE-CreateDelete.gif
Binary file not shown.
Binary file removed docs/images/ZE-Jobs-Issue-TSO-Command.gif
Binary file not shown.
Binary file removed docs/images/ZE-Settings.jpg
Binary file not shown.
Binary file removed docs/images/ZE-allocate-like.gif
Binary file not shown.
Binary file modified docs/images/ZE-copy-member.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/ZE-copy.gif
Binary file not shown.
Binary file removed docs/images/ZE-del-pds-member.gif
Binary file not shown.
Binary file removed docs/images/ZE-delete-ds2.gif
Binary file not shown.
Binary file removed docs/images/ZE-download-edit.gif
Binary file not shown.
Binary file modified docs/images/ZE-edit-upload.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/ZE-editUSS.gif
Binary file not shown.
Binary file removed docs/images/ZE-jobs-download-spool.gif
Binary file not shown.
Binary file removed docs/images/ZE-jobs-get-jcl.gif
Binary file not shown.
Binary file removed docs/images/ZE-mult-profiles.gif
Binary file not shown.
Binary file modified docs/images/ZE-multiple-search.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ZE-newProfiles.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/ZE-path.gif
Binary file not shown.
Binary file removed docs/images/ZE-profile-api.gif
Binary file not shown.
Binary file removed docs/images/ZE-profile-links.gif
Binary file not shown.
Binary file removed docs/images/ZE-profile2.gif
Binary file not shown.
Binary file removed docs/images/ZE-refresh-all.gif
Binary file not shown.
Binary file removed docs/images/ZE-refreshUSS.gif
Binary file not shown.
Binary file modified docs/images/ZE-safe-save.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ZE-submit-jcl.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ze-access-multiple-profiles-simultaneously.gif
6 changes: 2 additions & 4 deletions packages/eslint-plugin-zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ All notable changes to the "eslint-plugin-zowe-explorer" package will be documen

### Bug fixes

## `2.16.2`

### New features and enhancements
## `2.16.3`

### Bug fixes
## `2.16.2`

## `2.16.1`

Expand Down
2 changes: 2 additions & 0 deletions packages/zowe-explorer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t

- Removed `handlebars` dependency in favor of `mustache` for technical currency purposes. [#2974](https://github.com/zowe/zowe-explorer-vscode/pull/2974)

## `2.16.3`

## `2.16.2`

### Bug fixes
Expand Down
2 changes: 2 additions & 0 deletions packages/zowe-explorer-ftp-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum

### Bug fixes

## `2.16.3`

## `2.16.2`

### Bug fixes
Expand Down
7 changes: 6 additions & 1 deletion packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen

### New features and enhancements

- To add the ability to open a Favorited Job Search under Favorites [#2630](https://github.com/zowe/zowe-explorer-vscode/pull/2930)
- Added the ability to switch between basic authentication and token-based authentication. [#2944](https://github.com/zowe/zowe-explorer-vscode/pull/2944)

### Bug fixes

- To add the ability to open a Favorited Job Search under Favorites [#2630](https://github.com/zowe/zowe-explorer-vscode/pull/2930)
## `2.16.3`

### Bug fixes

- Fixed issue where USS files could not be submitted as JCL. [#2991](https://github.com/zowe/zowe-explorer-vscode/issues/2991)

## `2.16.2`

Expand Down
6 changes: 2 additions & 4 deletions packages/zowe-explorer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
[![slack](https://img.shields.io/badge/chat-on%20Slack-blue)](https://slack.openmainframeproject.org/)

> ## v3 Pre-release is now available in our [Github Releases](https://github.com/zowe/zowe-explorer-vscode/releases) with the removal of v1 profile support. Keep an eye on [changes affecting users and extenders](https://github.com/zowe/zowe-explorer-vscode/wiki/v3-Changes-for-Users-and-Extenders) for the full list of changes
>
> ## With the removal of the keytar shim from VS Code, we have replaced `node-keytar` with `@zowe/secrets-for-zowe-sdk` in the v2.10.0 release to avoid user interruptions. Extenders, please check out the usage [documentation](https://github.com/zowe/zowe-explorer-vscode/wiki/Secure-Credentials-for-Extenders)
## Introduction

Expand Down Expand Up @@ -60,7 +58,7 @@ Review the following use cases and their procedures to understand how to work wi

This section includes steps for the tasks you need to complete to get started using Zowe Explorer.

Configure Zowe Explorer, create a [team configuration file](#create-a-team-configuration-file) or a [v1 profile (deprecated)](#create-a-v1-profile) for profile manangement, review the [sample use cases](#sample-use-cases) to familiarize yourself with the capabilities of Zowe Explorer, and you are ready to use Zowe Explorer.
Configure Zowe Explorer, create a [team configuration file](#create-a-team-configuration-file) or a [v1 profile (deprecated)](#create-a-v1-profile) for profile management, review the [sample use cases](#sample-use-cases) to familiarize yourself with the capabilities of Zowe Explorer, and you are ready to use Zowe Explorer.

### Configuring Zowe Explorer

Expand Down Expand Up @@ -452,7 +450,7 @@ As a result, VS Code extensions like Zowe Explorer, Zowe Explorer CICS Extension

5. Confirm the deletion by clicking **Delete** in the drop-down menu.

![Delete Data Sets and Members](/docs/images/ZE-delete-ds2.gif?raw=true "Delete Data Sets and Members")
![Delete Data Sets and Members](/docs/images/ZE-delete-ds.gif?raw=true "Delete Data Sets and Members")
<br /><br />

[Back to sample list](#sample-use-cases)
Expand Down
8 changes: 4 additions & 4 deletions packages/zowe-explorer/__tests__/__theia__/theia/Locators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

export const TheiaLocator = {
theiaUrl: "http://localhost:3000",
zoweExplorerxId: "shell-tab-plugin-view-container:zowe",
zoweExplorerxId: "shell-tab-plugin-view-container:workbench.view.extension.zowe",
};

export const DatasetsLocators = {
datasetTabId: "plugin-view-container:zowe--plugin-view:zowe.ds.explorer",
datasetTabId: "plugin-view-container:workbench.view.extension.zowe--plugin-view:zowe.ds.explorer",
datasetTabXpath: "//span[@title='Data Sets']",
datasetsPanelId: "plugin-view:zowe.ds.explorer",
datasetsAddSessionId: "zowe.ds.addSession-as-tabbar-toolbar-item",
Expand All @@ -32,7 +32,7 @@ export const DatasetsLocators = {
};

export const UssLocators = {
ussTabId: "plugin-view-container:zowe--plugin-view:zowe.uss.explorer",
ussTabId: "plugin-view-container:workbench.view.extension.zowe--plugin-view:zowe.uss.explorer",
ussTabXpath: "//span[@title='Unix System Services (USS)']",
ussPanelId: "plugin-view:zowe.uss.explorer",
ussAddSessionId: "zowe.uss.addSession-as-tabbar-toolbar-item",
Expand All @@ -48,7 +48,7 @@ export const UssLocators = {
};

export const JobsLocators = {
jobTabId: "plugin-view-container:zowe--plugin-view:zowe.jobs.explorer",
jobTabId: "plugin-view-container:workbench.view.extension.zowe--plugin-view:zowe.jobs.explorer",
jobTabXpath: "//span[@title='Jobs']",
jobsPanelId: "zowe.jobs.explorer",
jobsAddSessionId: "zowe.jobs.addJobsSession-as-tabbar-toolbar-item",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function OpenTheiaInChrome() {
}

export async function clickOnZoweExplorer() {
await driverChrome.wait(until.elementLocated(By.id(TheiaLocator.zoweExplorerxId))).click();
await driverChrome.wait(until.elementLocated(By.id(TheiaLocator.zoweExplorerxId)), WAITTIME).click();
}

export async function clickOnFavoriteTabInDatasets() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function OpenTheiaInFirefox() {
}

export async function clickOnZoweExplorer() {
driverFirefox.wait(until.elementLocated(By.id(TheiaLocator.zoweExplorerxId))).click();
driverFirefox.wait(until.elementLocated(By.id(TheiaLocator.zoweExplorerxId)), WAITTIME).click();
}

export async function clickOnDatasetsTab() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import { ProfileManagement } from "../../../src/utils/ProfileManagement";
import { TreeProviders } from "../../../src/shared/TreeProviders";
import { mocked } from "../../../__mocks__/mockUtils";
import { TreeViewUtils } from "../../../src/utils/TreeViewUtils";
import * as path from "path";

const activeTextEditorDocument = jest.fn();

Expand Down Expand Up @@ -423,8 +424,6 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => {
const imperativeProfile = createIProfile();
const datasetSessionNode = createDatasetSessionNode(session, imperativeProfile);
const textDocument = createTextDocument("HLQ.TEST.AFILE(mem)", datasetSessionNode);
(textDocument.languageId as any) = "jcl";
(textDocument.uri.fsPath as any) = "/user/temp/textdocument.txt";
const profileInstance = createInstanceOfProfile(imperativeProfile);
const jesApi = createJesApi(imperativeProfile);
const mockCheckCurrentProfile = jest.fn();
Expand Down Expand Up @@ -651,22 +650,25 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => {
expect(showMessagespy).toBeCalledWith("No profiles available");
});
it("Getting session name from the path itself", async () => {
globals.defineGlobals("/user/");
globals.defineGlobals(__dirname);
createGlobalMocks();
const blockMocks: any = createBlockMocks();
mocked(zowe.ZosmfSession.createSessCfgFromArgs).mockReturnValue(blockMocks.session);
mocked(Profiles.getInstance).mockReturnValue(blockMocks.profileInstance);
const loadNamedProfileSpy = jest.spyOn(blockMocks.profileInstance, "loadNamedProfile");
blockMocks.testDatasetTree.getChildren.mockResolvedValueOnce([
new ZoweDatasetNode({ label: "node", collapsibleState: vscode.TreeItemCollapsibleState.None, parentNode: blockMocks.datasetSessionNode }),
blockMocks.datasetSessionNode,
]);
blockMocks.datasetSessionNode.label = "temp";
blockMocks.textDocument.fileName = path.join(globals.USS_DIR, "lpar1_zosmf", "file.txt");
blockMocks.textDocument.uri = vscode.Uri.file(blockMocks.textDocument.fileName);
activeTextEditorDocument.mockReturnValue(blockMocks.textDocument);
const submitJclSpy = jest.spyOn(blockMocks.jesApi, "submitJcl");
submitJclSpy.mockClear();
submitJclSpy.mockResolvedValueOnce(blockMocks.iJob);
await dsActions.submitJcl(blockMocks.testDatasetTree, undefined);

expect(loadNamedProfileSpy).toBeCalledWith("lpar1_zosmf");
expect(submitJclSpy).toBeCalled();
expect(mocked(Gui.showMessage)).toBeCalled();
expect(mocked(Gui.showMessage).mock.calls.length).toBe(1);
Expand Down
45 changes: 18 additions & 27 deletions packages/zowe-explorer/src/dataset/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -933,39 +933,30 @@ export async function submitJcl(datasetProvider: api.IZoweTree<api.IZoweDatasetT
}

// get session name
const sessionregex = /\[(.*)(\])(?!.*\])/;
const regExp = sessionregex.exec(doc.fileName);
const profiles = Profiles.getInstance();
let sessProfileName;
if (regExp === null) {
if (!doc.uri.fsPath.includes(globals.ZOWETEMPFOLDER)) {
const profileNamesList = ProfileManagement.getRegisteredProfileNameList(globals.Trees.JES);
if (profileNamesList.length > 1) {
const quickPickOptions: vscode.QuickPickOptions = {
placeHolder: localize("submitJcl.qp.placeholder", "Select the Profile to use to submit the job"),
ignoreFocusOut: true,
canPickMany: false,
};
sessProfileName = await api.Gui.showQuickPick(profileNamesList, quickPickOptions);
if (!sessProfileName) {
api.Gui.infoMessage(localizedStrings.opCancelled);
return;
}
} else if (profileNamesList.length > 0) {
sessProfileName = profileNamesList[0];
} else {
api.Gui.showMessage(localize("submitJcl.noProfile", "No profiles available"));
if (!doc.uri.fsPath.includes(globals.ZOWETEMPFOLDER)) {
const profileNamesList = ProfileManagement.getRegisteredProfileNameList(globals.Trees.JES);
if (profileNamesList.length > 1) {
const quickPickOptions: vscode.QuickPickOptions = {
placeHolder: localize("submitJcl.qp.placeholder", "Select the Profile to use to submit the job"),
ignoreFocusOut: true,
canPickMany: false,
};
sessProfileName = await api.Gui.showQuickPick(profileNamesList, quickPickOptions);
if (!sessProfileName) {
api.Gui.infoMessage(localizedStrings.opCancelled);
return;
}
} else if (profileNamesList.length > 0) {
sessProfileName = profileNamesList[0];
} else {
const filePathArray = doc.uri.fsPath.split(path.sep);
sessProfileName = filePathArray[filePathArray.length - 2];
api.Gui.showMessage(localize("submitJcl.noProfile", "No profiles available"));
}
} else {
sessProfileName = regExp[1];
if (sessProfileName.includes("[")) {
// if submitting from favorites, sesName might be the favorite node, so extract further
sessProfileName = sessionregex.exec(sessProfileName)[1];
}
const start = path.join(globals.ZOWETEMPFOLDER + path.sep).length;
const pathSegments = doc.fileName.substring(start).split(path.sep);
sessProfileName = pathSegments[1];
}

// get profile from session name
Expand Down

0 comments on commit ffe4b40

Please sign in to comment.