From 0259f894c995f87cf4d20faf745bbc1fd9bfd0c9 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Tue, 15 Nov 2022 17:48:16 -0800 Subject: [PATCH] adding credential links to sandbox builds. --- .../src/app/pages/auth-signin/auth-signin.component.ts | 2 +- .../pages/medical-sources/medical-sources.component.html | 7 +++++++ .../app/pages/medical-sources/medical-sources.component.ts | 3 +++ frontend/src/environments/environment.cloud_sandbox.ts | 3 ++- frontend/src/environments/environment.prod.ts | 3 ++- frontend/src/environments/environment.sandbox.ts | 3 ++- frontend/src/environments/environment.ts | 5 ++++- 7 files changed, 21 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/pages/auth-signin/auth-signin.component.ts b/frontend/src/app/pages/auth-signin/auth-signin.component.ts index 5f9624e3..84411954 100644 --- a/frontend/src/app/pages/auth-signin/auth-signin.component.ts +++ b/frontend/src/app/pages/auth-signin/auth-signin.component.ts @@ -18,7 +18,7 @@ export class AuthSigninComponent implements OnInit { submitted: boolean = false existingUser: User = new User() errorMsg: string = "" - showExternalIdP: boolean = environment.is_cloud + showExternalIdP: boolean = environment.environment_cloud loading: boolean = false diff --git a/frontend/src/app/pages/medical-sources/medical-sources.component.html b/frontend/src/app/pages/medical-sources/medical-sources.component.html index d9a2f02f..1f090661 100644 --- a/frontend/src/app/pages/medical-sources/medical-sources.component.html +++ b/frontend/src/app/pages/medical-sources/medical-sources.component.html @@ -14,6 +14,13 @@ Some sources may require frequent re-connection, as background refresh has not been implemented yet.
If you have feedback regarding healthcare sources, please file a ticket + + +
+
+ In Sandbox mode Fasten Health cannot access real patient information. You must use Sandbox credentials when authenticating to healthcare sources. + These credentials are available on Github +
diff --git a/frontend/src/app/pages/medical-sources/medical-sources.component.ts b/frontend/src/app/pages/medical-sources/medical-sources.component.ts index 1c940239..4d6b91f8 100644 --- a/frontend/src/app/pages/medical-sources/medical-sources.component.ts +++ b/frontend/src/app/pages/medical-sources/medical-sources.component.ts @@ -15,6 +15,7 @@ import {ToastService} from '../../services/toast.service'; import {ToastNotification, ToastType} from '../../models/fasten/toast'; import {SourceSyncMessage} from '../../models/queue/source-sync-message'; import {UpsertSummary} from '../../../lib/models/fasten/upsert-summary'; +import {environment} from '../../../environments/environment'; // If you dont import this angular will import the wrong "Location" export const sourceConnectWindowTimeout = 24*5000 //wait 2 minutes (5 * 24 = 120) @@ -42,6 +43,8 @@ export class MedicalSourcesComponent implements OnInit { private queueService: QueueService, private toastService: ToastService ) { } + + environment_name = environment.environment_name status: { [name: string]: string } = {} metadataSources: {[name:string]: MetadataSource} = {} diff --git a/frontend/src/environments/environment.cloud_sandbox.ts b/frontend/src/environments/environment.cloud_sandbox.ts index 2f48942c..fe5cc17c 100644 --- a/frontend/src/environments/environment.cloud_sandbox.ts +++ b/frontend/src/environments/environment.cloud_sandbox.ts @@ -1,6 +1,7 @@ export const environment = { production: true, - is_cloud: true, + environment_cloud: true, + environment_name: "sandbox", lighthouse_api_endpoint_base: 'https://lighthouse.fastenhealth.com/sandbox', //used to specify the couchdb server that we're going to use (can be relative or absolute). Must not have trailing slash diff --git a/frontend/src/environments/environment.prod.ts b/frontend/src/environments/environment.prod.ts index a3c71662..99bc1ad9 100644 --- a/frontend/src/environments/environment.prod.ts +++ b/frontend/src/environments/environment.prod.ts @@ -1,6 +1,7 @@ export const environment = { production: true, - is_cloud: false, + environment_cloud: false, + environment_name: "prod", lighthouse_api_endpoint_base: 'https://lighthouse.fastenhealth.com/v1', diff --git a/frontend/src/environments/environment.sandbox.ts b/frontend/src/environments/environment.sandbox.ts index 0c6e4cd5..c4cf337c 100644 --- a/frontend/src/environments/environment.sandbox.ts +++ b/frontend/src/environments/environment.sandbox.ts @@ -4,7 +4,8 @@ export const environment = { production: true, - is_cloud: false, + environment_cloud: false, + environment_name: "sandbox", lighthouse_api_endpoint_base: 'https://lighthouse.fastenhealth.com/sandbox', diff --git a/frontend/src/environments/environment.ts b/frontend/src/environments/environment.ts index d328660c..4e32a9f2 100644 --- a/frontend/src/environments/environment.ts +++ b/frontend/src/environments/environment.ts @@ -7,7 +7,10 @@ export const environment = { production: false, // is the application running in the cloud? (enables 3rd party IdP's and token based couchdb authentication) - is_cloud: false, + environment_cloud: false, + + // the environment name, `sandbox`, `prod`, `beta` + environment_name: "sandbox", //specify the lighthouse server that we're going to use to authenticate against all our source/providers. Must not have trailing slash lighthouse_api_endpoint_base: 'https://lighthouse.fastenhealth.com/sandbox',