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

Fix code issues v3 #122

Merged
merged 6 commits into from
May 4, 2024
Merged
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
720 changes: 159 additions & 561 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zowe/cics_monorepo",
"private": true,
"version": "6.0.0-next.202403021451",
"version": "6.0.0-next.202403042201",
"publishConfig": {
"registry": "https://zowe.jfrog.io/zowe/api/npm/npm-local-release/"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to the IBM® CICS® Plug-in for Zowe CLI will be documented in this file.

## Recent Changes
## `6.0.0-next.202403042201`

- V3 Breaking: Increased Node Engine to 18.12.0

Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to the IBM® CICS® Plug-in for Zowe CLI will be documented in this file.

## Recent Changes
## `6.0.0-next.202403042201`

- V3 Breaking: Increased Node Engine to 18.12.0

Expand Down
4 changes: 4 additions & 0 deletions packages/vsce/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the "cics-extension-for-zowe" extension will be documented in this file.

## Recent Changes

- BugFix: Fixed several identified problems with possible null values in the tree and web views. [#122](https://github.com/zowe/cics-for-zowe-client/issues/122)

## `3.0.0-next.202403011419`

- BugFix: Fixed icons not displaying.[#112](https://github.com/zowe/cics-for-zowe-client/issues/112)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export class CICSCombinedLibraryTree extends TreeItem {
public addLibrariesUtil(newChildren: (CICSLibraryTreeItem | ViewMore)[], allLibraries: any, count: number | undefined) {
for (const library of allLibraries) {
const regionsContainer = this.parentPlex.children.filter((child) => child instanceof CICSRegionsContainer)?.[0];
if (regionsContainer == null) { continue; }
const parentRegion = regionsContainer
.getChildren()!
.filter((child) => child instanceof CICSRegionTree && child.getRegionName() === library.eyu_cicsname)?.[0] as CICSRegionTree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export class CICSCombinedLocalFileTree extends TreeItem {
public addLocalFilesUtil(newChildren: (CICSLocalFileTreeItem | ViewMore)[], allLocalFiles: any, count: number | undefined) {
for (const localfile of allLocalFiles) {
const regionsContainer = this.parentPlex.children.filter((child) => child instanceof CICSRegionsContainer)?.[0];
if (regionsContainer == null) { continue; }
const parentRegion = regionsContainer
.getChildren()!
.filter((child) => child instanceof CICSRegionTree && child.getRegionName() === localfile.eyu_cicsname)?.[0] as CICSRegionTree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export class CICSCombinedPipelineTree extends TreeItem {
public addPipelinesUtil(newChildren: (CICSPipelineTreeItem | ViewMore)[], allPipelines: any, count: number | undefined) {
for (const pipeline of allPipelines) {
const regionsContainer = this.parentPlex.children.filter((child) => child instanceof CICSRegionsContainer)?.[0];
if (regionsContainer == null) { continue; }
const parentRegion = regionsContainer
.getChildren()!
.filter((child) => child instanceof CICSRegionTree && child.getRegionName() === pipeline.eyu_cicsname)?.[0] as CICSRegionTree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export class CICSCombinedProgramTree extends TreeItem {
for (const program of allPrograms) {
// Regions container must exist if all programs tree exists
const regionsContainer = this.parentPlex.children.filter((child) => child instanceof CICSRegionsContainer)?.[0];
if (regionsContainer == null) { continue; }
const parentRegion = regionsContainer
.getChildren()!
.filter((child) => child instanceof CICSRegionTree && child.getRegionName() === program.eyu_cicsname)?.[0] as CICSRegionTree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export class CICSCombinedTCPIPServiceTree extends TreeItem {
for (const tcpips of allTCPIPS) {
// Regions container must exist if all TCPIP Services tree exists
const regionsContainer = this.parentPlex.children.filter((child) => child instanceof CICSRegionsContainer)?.[0];
if (regionsContainer == null) { continue; }
const parentRegion = regionsContainer
.getChildren()!
.filter((child) => child instanceof CICSRegionTree && child.getRegionName() === tcpips.eyu_cicsname)?.[0] as CICSRegionTree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export class CICSCombinedTaskTree extends TreeItem {
public addTasksUtil(newChildren: (CICSTaskTreeItem | ViewMore)[], allTasks: any, count: number | undefined) {
for (const task of allTasks) {
const regionsContainer = this.parentPlex.children.filter((child) => child instanceof CICSRegionsContainer)?.[0];
if (regionsContainer == null) { continue; }
const parentRegion = regionsContainer
.getChildren()!
.filter((child) => child instanceof CICSRegionTree && child.getRegionName() === task.eyu_cicsname)?.[0] as CICSRegionTree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export class CICSCombinedTransactionsTree extends TreeItem {
public addLocalTransactionsUtil(newChildren: (CICSTransactionTreeItem | ViewMore)[], allLocalTransactions: any, count: number | undefined) {
for (const transaction of allLocalTransactions) {
const regionsContainer = this.parentPlex.children.filter((child) => child instanceof CICSRegionsContainer)?.[0];
if (regionsContainer == null) { continue; }
const parentRegion = regionsContainer
.getChildren()!
.filter((child) => child instanceof CICSRegionTree && child.getRegionName() === transaction.eyu_cicsname)?.[0] as CICSRegionTree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export class CICSCombinedURIMapTree extends TreeItem {
for (const urimaps of allURIMaps) {
// Regions container must exist if all URI Maps tree exists
const regionsContainer = this.parentPlex.children.filter((child) => child instanceof CICSRegionsContainer)?.[0];
if (regionsContainer == null) { continue; }
const parentRegion = regionsContainer
.getChildren()!
.filter((child) => child instanceof CICSRegionTree && child.getRegionName() === urimaps.eyu_cicsname)?.[0] as CICSRegionTree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export class CICSCombinedWebServiceTree extends TreeItem {
for (const webservice of allWebServices) {
// Regions container must exist if all web services tree exists
const regionsContainer = this.parentPlex.children.filter((child) => child instanceof CICSRegionsContainer)?.[0];
if (regionsContainer == null) { continue; }
const parentRegion = regionsContainer
.getChildren()!
.filter((child) => child instanceof CICSRegionTree && child.getRegionName() === webservice.eyu_cicsname)?.[0] as CICSRegionTree;
Expand Down
24 changes: 12 additions & 12 deletions packages/vsce/src/utils/webviewHTML.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ export const addProfileHtml = (message?: imperative.IUpdateProfile): string => {
<label for="protocol-select" class="bx--label">Protocol</label>
<div class="bx--select-input__wrapper">
<select id="protocol-select" class="bx--select-input" onload="renderRU()" onchange="renderRU()">
<option class="bx--select-option" value="http" ${message?.profile.protocol === "http" ? `selected="selected"` : ""}>
<option class="bx--select-option" value="http" ${message?.profile?.protocol === "http" ? `selected="selected"` : ""}>
HTTP
</option>
<option class="bx--select-option" value="https" ${message?.profile.protocol === "https" ? `selected="selected"` : ""}>
<option class="bx--select-option" value="https" ${message?.profile?.protocol === "https" ? `selected="selected"` : ""}>
HTTPS
</option>
</select>
Expand Down Expand Up @@ -163,7 +163,7 @@ export const addProfileHtml = (message?: imperative.IUpdateProfile): string => {
class="bx--text-input"
placeholder="example.cics.host.com"
oninput="handleHostInputName()"
${message?.profile.host ? `value =${message.profile.host}` : undefined}
${message?.profile?.host ? `value =${message.profile.host}` : undefined}
/>
</div>
</div>
Expand All @@ -176,7 +176,7 @@ export const addProfileHtml = (message?: imperative.IUpdateProfile): string => {
type="text"
class="bx--text-input"
placeholder="12345"
${message?.profile.port ? `value =${message.profile.port}` : undefined}
${message?.profile?.port ? `value =${message.profile.port}` : undefined}
/>
</div>
</div>
Expand All @@ -193,7 +193,7 @@ export const addProfileHtml = (message?: imperative.IUpdateProfile): string => {
<div class="bx--radio-button-group ">
<div class="bx--radio-button-wrapper">
<input id="radio-button-true" class="bx--radio-button" type="radio" value="true" name="radio-button" tabindex="0" ${
message?.profile.rejectUnauthorized ? `checked="checked"` : ""
message?.profile?.rejectUnauthorized ? `checked="checked"` : ""
}>
<label for="radio-button-true" class="bx--radio-button__label">
<span class="bx--radio-button__appearance" style="background-color:white"></span>
Expand All @@ -203,7 +203,7 @@ export const addProfileHtml = (message?: imperative.IUpdateProfile): string => {

<div class="bx--radio-button-wrapper">
<input id="radio-button-false" class="bx--radio-button" type="radio" value="false" name="radio-button" tabindex="0" ${
!message?.profile.rejectUnauthorized ? `checked="checked""` : ""
!message?.profile?.rejectUnauthorized ? `checked="checked""` : ""
}>
<label for="radio-button-false" class="bx--radio-button__label">
<span class="bx--radio-button__appearance" style="background-color:white"></span>
Expand Down Expand Up @@ -244,7 +244,7 @@ export const addProfileHtml = (message?: imperative.IUpdateProfile): string => {
type="text"
class="bx--text-input"
placeholder=""
${message?.profile.user ? `value =${message.profile.user}` : undefined}
${message?.profile?.user ? `value =${message.profile.user}` : undefined}
/>
</div>
</div>
Expand All @@ -257,7 +257,7 @@ export const addProfileHtml = (message?: imperative.IUpdateProfile): string => {
type="password"
class="bx--text-input"
placeholder=""
${message?.profile.password ? `value =${message.profile.password}` : undefined}
${message?.profile?.password ? `value =${message.profile.password}` : undefined}
/>
</div>
</div>
Expand All @@ -276,7 +276,7 @@ export const addProfileHtml = (message?: imperative.IUpdateProfile): string => {
type="text"
class="bx--text-input"
placeholder=""
${message?.profile.regionName ? `value =${message.profile.regionName}` : undefined}
${message?.profile?.regionName ? `value =${message.profile.regionName}` : undefined}
/>
</div>
</div>
Expand All @@ -289,7 +289,7 @@ export const addProfileHtml = (message?: imperative.IUpdateProfile): string => {
type="text"
class="bx--text-input"
placeholder=""
${message?.profile.cicsPlex ? `value =${message.profile.cicsPlex}` : undefined}
${message?.profile?.cicsPlex ? `value =${message.profile.cicsPlex}` : undefined}
/>
</div>
</div>
Expand Down Expand Up @@ -340,9 +340,9 @@ export const addProfileHtml = (message?: imperative.IUpdateProfile): string => {
}

function onLoadRenderRU() {
if (${message?.profile.protocol === "https"}) {
if (${message?.profile?.protocol === "https"}) {
setContentsEnabled("ru-selection-container");
} else if (${message?.profile.protocol === "http"}) {
} else if (${message?.profile?.protocol === "http"}) {
setContentsDisabled("ru-selection-container");
}
}
Expand Down