Skip to content

Commit

Permalink
Changes for V1 code
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
  • Loading branch information
awharn committed May 1, 2024
1 parent 7859aaf commit 1004116
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions packages/vsce/src/trees/CICSCombinedLocalFileTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,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];
Expand Down
1 change: 1 addition & 0 deletions packages/vsce/src/trees/CICSCombinedProgramTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,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];
Expand Down
1 change: 1 addition & 0 deletions packages/vsce/src/trees/CICSCombinedTransactionTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,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];
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 @@ -124,10 +124,10 @@ export const addProfileHtml = (message?: IUpdateProfile) => {
<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 @@ -157,7 +157,7 @@ export const addProfileHtml = (message?: IUpdateProfile) => {
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 @@ -170,7 +170,7 @@ export const addProfileHtml = (message?: IUpdateProfile) => {
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 @@ -187,7 +187,7 @@ export const addProfileHtml = (message?: IUpdateProfile) => {
<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 @@ -197,7 +197,7 @@ export const addProfileHtml = (message?: IUpdateProfile) => {
<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 @@ -238,7 +238,7 @@ export const addProfileHtml = (message?: IUpdateProfile) => {
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 @@ -251,7 +251,7 @@ export const addProfileHtml = (message?: IUpdateProfile) => {
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 @@ -269,7 +269,7 @@ export const addProfileHtml = (message?: IUpdateProfile) => {
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 @@ -282,7 +282,7 @@ export const addProfileHtml = (message?: IUpdateProfile) => {
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 @@ -331,9 +331,9 @@ export const addProfileHtml = (message?: IUpdateProfile) => {
}
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

0 comments on commit 1004116

Please sign in to comment.