Skip to content

adminwebclient

Brian Jang edited this page Jul 21, 2022 · 5 revisions

Admin WebClient

The Admin WebClient provides Administrators of Health Gateway the ability to manaage various tasks.

Admin Web Client Configuration

cd $GATEWAYHOME/Apps/AdminWebClient/src/
code appsetttings.local.json

Add the following text:

{
  "OpenIdConnect": {
    "ClientSecret": "[Ask team for Client Secret]"
  },
  "ContentSecurityPolicy": {
        "connect-src": "https://spt.apps.gov.bc.ca/com.snowplowanalytics.snowplow/tp2 https://dev.oidc.gov.bc.ca/ http://localhost:*/  http:/[YOUR IP]:*/ ws://[YOUR IP]:*/",
        "frame-src": "https://dev.oidc.gov.bc.ca/"
  }
}

Save the file and make sure to replace [YOUR IP] with your local IPV4 address. Get a Client Secret from the Health Gateway team.

In order to make changes and then have the admin web client application to refresh without having to restart the server when developing locally, a local environment file i.e., '.env.local' will need to be created in the project's root directory.

The VUE environment variable defined in the local environment file will disable 'Integrity' in VUE config file. When working locally. Integrity will be disabled.

Using this '.env.local' file will allow developers to utilize refresh without having to restart the server. Do not check in this file. Please create one for local use. This file has been applied to git ignore.

cd $GATEWAYHOME/Apps/AdminWebClient/src/ClientApp/
code .env.local

Add the following text:

VUE_APP_CONFIG_INTEGRITY=false

Save the file.

Run Admin WebClient

Command line

Open a new terminal Window to run the .Net application

cd $GATEWAYHOME/Apps/AdminWebClient/src/
dotnet run

Open another terminal Window to run the VUE Cli

cd $GATEWAYHOME/Apps/AdminWebClient/src/ClientApp
npm run serve

VS Code

  • Select the AdminWebClient project
  • Say Yes or Accept any popups regarding adding assets for debugging
    • Select the AdminWebClient Solution and click Enter which should create a .vscode/launch.json
  • Click F5 or Run/Start Debugging

Visual Studio

  • Right Click on the solution and select Properties
  • Select Multiple startup projects
  • Set AdminWebClient action to Start
  • Click Ok
  • Click F5 or Debug/Start Debugging

Visual Studio for Mac

  • Right Click on the solution and select set startup project
  • Ensure that the AdminWebClient solution item is checked
  • Click Ok
  • Select Run Menu then Start Debugging

Admin WebClient Verification

Troubleshooting

Correlation failed

Sometimes the browser prevents a cookie required by the oidc flow to be set. The error message would contain System.Exception: Correlation failed

  • Fix: In Chrome set SameSite by default cookies setting under chrome://flags/ to Disabled
Clone this wiki locally