Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Himani1519 <[email protected]>
  • Loading branch information
Himani1519 committed Oct 11, 2023
1 parent 655c9ff commit 5c5fbe4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
13 changes: 7 additions & 6 deletions src/renderer/components/stages/Planning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,14 @@ const Planning = () => {
dispatch(setSchema(schema));
let installationDir = '';
if (res.details.config?.zowe?.runtimeDirectory && res.details.config?.zowe?.workspaceDirectory) {
const getParentDir = (path: string): string => path.split('/').filter((i: string, ind: number) => i || !ind).slice(0, -1).join('/');
const runtimeParent = getParentDir(res.details.config.zowe.runtimeDirectory);
const workspaceParent = getParentDir(res.details.config.zowe.workspaceDirectory);
if (runtimeParent === workspaceParent) installationDir = runtimeParent;
const getParentDir = (path: string): string => path.split('/').filter((i: string, ind: number) => i || !ind).slice(0, -1).join('/');
const runtimeParent = getParentDir(res.details.config.zowe.runtimeDirectory);
const workspaceParent = getParentDir(res.details.config.zowe.workspaceDirectory);
if (runtimeParent === workspaceParent) installationDir = runtimeParent;
}
javaHome = (res.details.config?.java?.home) ? res.details.config.java.home : '';
nodeHome = (res.details.config?.node?.home) ? res.details.config.node.home : '';

const javaHome = (res.details.config?.java?.home) ? res.details.config.java.home : '';
const nodeHome = (res.details.config?.node?.home) ? res.details.config.node.home : '';
dispatch(setInstallationArgs({...installationArgs, installationDir, javaHome, nodeHome}));
} else {
window.electron.ipcRenderer.getExampleZowe().then((res: IResponse) => {
Expand Down
2 changes: 1 addition & 1 deletion src/services/SubmitJcl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {IIpcConnectionArgs, IJobResults, JobOutput} from "../types/interfaces";
export function submitJcl(config: IIpcConnectionArgs, jcl: string, returnDDs: string[]): Promise<IJobResults> {
return new Promise((resolve, reject) => {
let jobOutput: IJobResults;
let client;
let client: any;

async function submitAndResolve() {
try {
Expand Down
1 change: 1 addition & 0 deletions src/services/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Header from "../renderer/components/Header"
import { AlertColor } from "@mui/material/Alert";
import zos from 'zos-node-accessor';


export async function connectFTPServer(config: IIpcConnectionArgs): Promise<any> {

const client = new zos();
Expand Down
11 changes: 11 additions & 0 deletions src/types/zos-node-accessor.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* 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.
*/

declare module 'zos-node-accessor';

0 comments on commit 5c5fbe4

Please sign in to comment.