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

Choose resources to appear under a region #221

Draft
wants to merge 18 commits into
base: resource-tree-refactor
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,577 changes: 1,333 additions & 244 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
},
"repository": "https://github.com/zowe/cics-for-zowe-client",
"workspaces": [
"packages/*"
"packages/*",
"packages/vsce/src/webviews"
],
"scripts": {
"build": "turbo build",
Expand Down Expand Up @@ -63,5 +64,8 @@
"typedoc": "^0.25.9",
"typescript": "^5.3.3",
"uuid": "^9.0.0"
},
"dependencies": {
"@vscode/l10n": "^0.0.18"
}
}
4 changes: 3 additions & 1 deletion packages/sdk/src/doc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ export * from "./ICacheParms";
export * from "./ICMCIApiResponse";
export * from "./ICMCIResponseResultSummary";
export * from "./ICSDGroupParms";
export * from "./IGetResourceUriOptions";
export * from "./IProgramParms";
export * from "./IResourceParms";
export * from "./IResourceQueryParms";
export * from "./IResultCacheParms";
export * from "./ITransactionParms";
export * from "./IURIMapParms";
export * from "./IWebServiceParms";
export * from "./IGetResourceUriOptions";
export * from "./resources";

17 changes: 17 additions & 0 deletions packages/sdk/src/doc/resources/ILibrary.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { IResource } from "./IResource";

export interface ILibrary extends IResource {
name: string;
}

19 changes: 19 additions & 0 deletions packages/sdk/src/doc/resources/ILocalFile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { IResource } from "./IResource";

export interface ILocalFile extends IResource {
file: string;
enablestatus: string;
openstatus: string;
}

16 changes: 16 additions & 0 deletions packages/sdk/src/doc/resources/IPipeline.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { IResource } from "./IResource";

export interface IPipeline extends IResource {
name: string;
}
18 changes: 18 additions & 0 deletions packages/sdk/src/doc/resources/IProgram.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { IResource } from "./IResource";

export interface IProgram extends IResource {
program: string;
status: string;
newcopycnt?: string;
}
20 changes: 20 additions & 0 deletions packages/sdk/src/doc/resources/IRegion.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { IResource } from "./IResource";

export interface IRegion extends IResource {
applid: string;
cicsstate: string;
cicsstatus: string;
cicsname: string;
}

15 changes: 15 additions & 0 deletions packages/sdk/src/doc/resources/IResource.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/


export interface IResource {
eyu_cicsname: string;
}
17 changes: 17 additions & 0 deletions packages/sdk/src/doc/resources/ITCPIP.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { IResource } from "./IResource";

export interface ITCPIP extends IResource {
name: string;
port: string;
}
18 changes: 18 additions & 0 deletions packages/sdk/src/doc/resources/ITask.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { IResource } from "./IResource";

export interface ITask extends IResource {
task: string;
runstatus: string;
tranid: string;
}
18 changes: 18 additions & 0 deletions packages/sdk/src/doc/resources/ITransaction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { IResource } from "./IResource";

export interface ITransaction extends IResource {
tranid: string;
program: string;
status: string;
}
18 changes: 18 additions & 0 deletions packages/sdk/src/doc/resources/IUriMap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { IResource } from "./IResource";

export interface IUriMap extends IResource {
name: string;
scheme: string;
path: string;
}
16 changes: 16 additions & 0 deletions packages/sdk/src/doc/resources/IWebService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { IResource } from "./IResource";

export interface IWebService extends IResource {
name: string;
}
24 changes: 24 additions & 0 deletions packages/sdk/src/doc/resources/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/


export * from './ILibrary';
export * from './ILocalFile';
export * from './IPipeline';
export * from './IProgram';
export * from './IRegion';
export * from './IResource';
export * from './ITask';
export * from './ITCPIP';
export * from './ITransaction';
export * from './IUriMap';
export * from './IWebService';

1 change: 1 addition & 0 deletions packages/vsce/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to the "cics-extension-for-zowe" extension will be documente
## Recent Changes

- BugFix: Update documentation to reflect changes to fully support V3 profiles. [#209](https://github.com/zowe/cics-for-zowe-client/issues/209)
- Moved web-based resources in tree out of `Web` folder inline with others.

## `3.3.1`

Expand Down
112 changes: 112 additions & 0 deletions packages/vsce/__tests__/__unit__/doc/meta.localfile.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

import { ILocalFile } from "@zowe/cics-for-zowe-sdk";
import { LocalFileMeta } from "../../../src/doc/LocalFileMeta";

describe("Local File Meta", () => {

let localFileMock: ILocalFile;

beforeEach(() => {
localFileMock = {
file: "MYFILE",
enablestatus: "ENABLED",
eyu_cicsname: "MYREG",
openstatus: "OPEN"
};
});

it("should return label", () => {
const label = LocalFileMeta.getLabel(localFileMock);
expect(label).toEqual(`MYFILE`);
});
it("should return label with disabled", () => {
localFileMock.enablestatus = "DISABLED";
const label = LocalFileMeta.getLabel(localFileMock);
expect(label).toEqual(`MYFILE (Disabled)`);
});
it("should return label with unenabled", () => {
localFileMock.enablestatus = "UNENABLED";
const label = LocalFileMeta.getLabel(localFileMock);
expect(label).toEqual(`MYFILE (Unenabled)`);
});
it("should return label with closed", () => {
localFileMock.openstatus = "CLOSED";
const label = LocalFileMeta.getLabel(localFileMock);
expect(label).toEqual(`MYFILE (Closed)`);
});
it("should return label with disabled and closed", () => {
localFileMock.openstatus = "CLOSED";
localFileMock.enablestatus = "DISABLED";
const label = LocalFileMeta.getLabel(localFileMock);
expect(label).toEqual(`MYFILE (Disabled) (Closed)`);
});
it("should return label with unenabled and closed", () => {
localFileMock.openstatus = "CLOSED";
localFileMock.enablestatus = "UNENABLED";
const label = LocalFileMeta.getLabel(localFileMock);
expect(label).toEqual(`MYFILE (Unenabled) (Closed)`);
});

it("should return context", () => {
const context = LocalFileMeta.getContext(localFileMock);
expect(context).toEqual(`cicslocalfile.enabled.open.MYFILE`);
});
it("should return context with disabled", () => {
localFileMock.enablestatus = "DISABLED";
const context = LocalFileMeta.getContext(localFileMock);
expect(context).toEqual(`cicslocalfile.disabled.open.MYFILE`);
});
it("should return context with unenabled", () => {
localFileMock.enablestatus = "UNENABLED";
const context = LocalFileMeta.getContext(localFileMock);
expect(context).toEqual(`cicslocalfile.unenabled.open.MYFILE`);
});
it("should return context with closed", () => {
localFileMock.openstatus = "closed";
const context = LocalFileMeta.getContext(localFileMock);
expect(context).toEqual(`cicslocalfile.enabled.closed.MYFILE`);
});
it("should return context with disabled and closed", () => {
localFileMock.openstatus = "closed";
localFileMock.enablestatus = "DISABLED";
const context = LocalFileMeta.getContext(localFileMock);
expect(context).toEqual(`cicslocalfile.disabled.closed.MYFILE`);
});
it("should return context with unenabled and closed", () => {
localFileMock.openstatus = "closed";
localFileMock.enablestatus = "UNENABLED";
const context = LocalFileMeta.getContext(localFileMock);
expect(context).toEqual(`cicslocalfile.unenabled.closed.MYFILE`);
});

it("should return icon name", () => {
const iconName = LocalFileMeta.getIconName(localFileMock);
expect(iconName).toEqual(`local-file`);
});
it("should return icon name with disabled", () => {
localFileMock.enablestatus = "DISABLED";
const iconName = LocalFileMeta.getIconName(localFileMock);
expect(iconName).toEqual(`local-file-disabled`);
});
it("should return icon name with closed", () => {
localFileMock.openstatus = "CLOSED";
const iconName = LocalFileMeta.getIconName(localFileMock);
expect(iconName).toEqual(`local-file-closed`);
});
it("should return icon name with closed and disabled", () => {
localFileMock.openstatus = "CLOSED";
localFileMock.enablestatus = "DISABLED";
const iconName = LocalFileMeta.getIconName(localFileMock);
expect(iconName).toEqual(`local-file-disabled-closed`);
});
});
Loading
Loading