File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
src/onboarding/containers Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 5252 "cy" : " CYPRESS_dexUrl=https://$INGRESS_HOST:$PORT_HTTPS CYPRESS_baseUrl=http://localhost:9999 cypress open" ,
5353 "cy:dev" : " source ../monitor-ci/.env && CYPRESS_dexUrl=CLOUD CYPRESS_baseUrl=https://$INGRESS_HOST:$PORT_HTTPS cypress open --config testFiles='{cloud,shared}/**/*.*'" ,
5454 "cy:dev-oss" : " source ../monitor-ci/.env && CYPRESS_dexUrl=OSS CYPRESS_baseUrl=https://$INGRESS_HOST:$PORT_HTTPS cypress open --config testFiles='{oss,shared}/**/*.*'" ,
55- "generate" : " export SHA=e1f962c76616d830c2f819a3783ae217a799ce61 && export REMOTE=https://raw.githubusercontent.com/influxdata/openapi/${SHA}/ && yarn generate-meta" ,
55+ "generate" : " export SHA=b320a258a7a908662c3f36f73a9e5673d60700d5 && export REMOTE=https://raw.githubusercontent.com/influxdata/openapi/${SHA}/ && yarn generate-meta" ,
5656 "generate-local" : " export REMOTE=../openapi/ && yarn generate-meta" ,
5757 "generate-local-cloud" : " export REMOTE=../openapi/ && yarn generate-meta-cloud" ,
5858 "generate-meta" : " if [ -z \" ${CLOUD_URL}\" ]; then yarn generate-meta-oss; else yarn generate-meta-cloud; fi" ,
Original file line number Diff line number Diff line change @@ -17,9 +17,16 @@ import {fetchIdentity, fetchLegacyIdentity} from 'src/identity/apis/auth'
1717// Components
1818import ErrorBoundary from 'src/shared/components/ErrorBoundary'
1919import LoginPageContents from 'src/onboarding/containers/LoginPageContents'
20- import { CLOUD , CLOUD_QUARTZ_URL } from 'src/shared/constants'
20+ import { CLOUD } from 'src/shared/constants'
2121import { isFlagEnabled } from 'src/shared/utils/featureFlag'
2222
23+ let getQuartzLoginUrl
24+
25+ if ( CLOUD ) {
26+ getQuartzLoginUrl =
27+ require ( 'src/client/uiproxydRoutes' ) . getUiproxyQuartzLoginUrl
28+ }
29+
2330const EMPTY_HISTORY_STACK_LENGTH = 2
2431
2532export const LoginPage : FC = ( ) => {
@@ -56,10 +63,13 @@ export const LoginPage: FC = () => {
5663 } else {
5764 if ( isFlagEnabled ( 'universalLogin' ) ) {
5865 if ( CLOUD ) {
59- const url = new URL ( `${ CLOUD_QUARTZ_URL } ` ) . href
60-
61- console . warn ( 'Redirect to cloud url: ' , url )
62- window . location . replace ( url )
66+ getQuartzLoginUrl ( { } )
67+ . then ( response => {
68+ const redirectUrl = response . data
69+ console . warn ( 'Redirect to cloud url: ' , redirectUrl )
70+ window . location . replace ( redirectUrl )
71+ } )
72+ . catch ( error => console . error ( error ) )
6373 return
6474 }
6575 }
You can’t perform that action at this time.
0 commit comments