-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Conversation
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:'; |
There was a problem hiding this comment.
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 = ( |
There was a problem hiding this comment.
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)}' |
There was a problem hiding this comment.
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
Flakey test: TestCLIWithServerOverHTTP1Suite/TestSynchronizationWfLevelMutex @sarabala1979 |
Signed-off-by: Alex Collins alex_collins@intuit.com
Fixes #4707
Checklist: