Skip to content

Commit

Permalink
fix: Honour rejectUnauthorized in WUDetails
Browse files Browse the repository at this point in the history
  • Loading branch information
GordonSmith committed Jul 18, 2023
1 parent 4151b75 commit 48c3f46
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/ecl/eclWatchPanelView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ interface PartialLaunchRequestArgumentss {
path: string;
user?: string;
password?: string;
rejectUnauthorized?: boolean;
}

interface NavigateParams extends PartialLaunchRequestArgumentss {
Expand Down Expand Up @@ -130,8 +131,8 @@ export class ECLWatchPanelView implements vscode.WebviewViewProvider {

private _prevHash: string;
navigateTo(launchRequestArgs: PartialLaunchRequestArgumentss, wuid: string, result?: number, show = true) {
const { protocol, serverAddress, port, path, user, password } = launchRequestArgs;
this._currParams = { protocol, serverAddress, port, path, user, password, wuid, result, show };
const { protocol, serverAddress, port, path, user, password, rejectUnauthorized } = launchRequestArgs;
this._currParams = { protocol, serverAddress, port, path, user, password, rejectUnauthorized, wuid, result, show };
if (!this._webviewView) {
this._initialParams = this._currParams;
if (show) {
Expand Down
2 changes: 2 additions & 0 deletions src/eclwatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function render(state: State) {
vscode.setState(state);
ReactDOM.render(<WUDetails
baseUrl={join(`${state.protocol}://${state.serverAddress}:${state.port}`, state.path)}
rejectUnauthorized={state.rejectUnauthorized}
wuid={state.wuid}
user={state.user}
password={state.password}
Expand All @@ -97,6 +98,7 @@ if (document.location.protocol === "file:") {
path: "",
user: "gosmith",
password: "",
rejectUnauthorized: false,
wuid: "W20210304-144316"
});
}
Expand Down
6 changes: 4 additions & 2 deletions src/eclwatch/WUDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ export interface WUDetailsProps {
password: string;
wuid: string;
sequence?: number;
rejectUnauthorized: boolean;
}

export const WUDetails: React.FunctionComponent<WUDetailsProps> = ({
baseUrl,
user,
password,
wuid,
sequence
sequence,
rejectUnauthorized
}) => {

const pivotRef = React.useRef<HTMLDivElement>(null);
Expand Down Expand Up @@ -78,7 +80,7 @@ export const WUDetails: React.FunctionComponent<WUDetailsProps> = ({
if (wuid) {
setSpinnerMessage("Loading...");
update(false, [], []);
const wu = Workunit.attach({ baseUrl, userID: user, password }, wuid);
const wu = Workunit.attach({ baseUrl, userID: user, password, rejectUnauthorized }, wuid);
wu.refresh().then(() => {
if (!canceled) {
if (wu.isComplete()) {
Expand Down
1 change: 1 addition & 0 deletions src/eclwatch/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface State {
path: string;
user: string;
password: string;
rejectUnauthorized: boolean;
wuid: string;
result?: number;
}
Expand Down

0 comments on commit 48c3f46

Please sign in to comment.