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(ui): Fix "Using Your Login". Fixes #4707 #4708

Merged
merged 3 commits into from Dec 11, 2020
Merged

Conversation

alexec
Copy link
Contributor

@alexec alexec commented Dec 11, 2020

Signed-off-by: Alex Collins alex_collins@intuit.com
Fixes #4707

Checklist:

Signed-off-by: Alex Collins <alex_collins@intuit.com>
@@ -2,18 +2,19 @@ import * as React from 'react';
import {createRef, useState} from 'react';

export const CliHelp = () => {
const argoSecure = document.location.protocol === 'https';
const argoSecure = document.location.protocol === 'https:';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug #1 - just did not work with https

.map(x => x.trim())
.find(x => x.startsWith('authorization='))
.replace('authorization=', '');
const argoToken = (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug #2 - did not work if there was no token (crashed page)


const text = `export ARGO_SERVER='${document.location.host}'
const text = `export ARGO_SERVER='${document.location.hostname}:${document.location.port || (argoSecure ? 443 : 80)}'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug #3 - did not work if the port was the default for the protocol

@alexec alexec marked this pull request as ready for review December 11, 2020 18:41
@alexec
Copy link
Contributor Author

alexec commented Dec 11, 2020

Flakey test: TestCLIWithServerOverHTTP1Suite/TestSynchronizationWfLevelMutex @sarabala1979

@alexec alexec merged commit 625189d into argoproj:master Dec 11, 2020
@alexec alexec deleted the fix-4707 branch December 11, 2020 20:26
@simster7 simster7 mentioned this pull request Dec 15, 2020
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix "Using Your Login With The CLI"
2 participants