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

Promote from main to preprod #561

Merged
merged 28 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
20aace7
add: added blaise-api-node-client to package.json as dependency
motalm Sep 29, 2023
fbd6347
refactor: using interfaces from blaise api node client in instrument …
motalm Oct 2, 2023
135a557
refactor: refactored the interfaces file to use questionnaire in plac…
SidraJaved Oct 2, 2023
a2d6625
refactor: instrument handler change to import questionnaire from node…
SidraJaved Oct 2, 2023
66bd6f6
refactor: Made couple of changes in several test and .tsx files to us…
SidraJaved Oct 2, 2023
3ea0f8c
Refactored code
Oct 3, 2023
0141d98
Starter for 10 - loads of room for improvements
jamiestephenkerr Oct 4, 2023
0b7368d
fixed and tidied up instrument router tests
jamiestephenkerr Oct 5, 2023
47076d3
stopped google auth errors on server tests
jamiestephenkerr Oct 5, 2023
07c134e
fixed health check test
jamiestephenkerr Oct 5, 2023
4bb0159
renamed instrument router to questioonaire
jamiestephenkerr Oct 5, 2023
67c1609
simplified passing of env variables
jamiestephenkerr Oct 5, 2023
bc94686
renamed helper
jamiestephenkerr Oct 5, 2023
420d20f
tidied up tests
jamiestephenkerr Oct 5, 2023
49e7bb6
fixed issue with typescript
jamiestephenkerr Oct 5, 2023
99b6270
fix: fixed the failing test cases , updated the readme, refactored th…
SidraJaved Oct 5, 2023
d7ad45a
refactor: using Survey interface from blaise-api-node-client and got …
SidraJaved Oct 6, 2023
ba3d025
try to resolve env var issues
jamiestephenkerr Oct 6, 2023
83ee3cb
revert to getting env vars the same as previously
jamiestephenkerr Oct 6, 2023
f940088
revert to getting env vars the same as previously
jamiestephenkerr Oct 6, 2023
2ec81eb
try again
jamiestephenkerr Oct 6, 2023
283050a
fixed issue where files were no longer in server folder
jamiestephenkerr Oct 6, 2023
003c1a9
fixed build folder as server folder is now gone
jamiestephenkerr Oct 6, 2023
4894100
fixed rookie mistakes
jamiestephenkerr Oct 6, 2023
2ab715a
meh
jamiestephenkerr Oct 6, 2023
959e31f
fml
jamiestephenkerr Oct 6, 2023
24c2995
refactor: typo error and removing try catch block in the unit test fo…
SidraJaved Oct 10, 2023
997eeb5
Merge pull request #560 from ONSdigital/BLAIS5-3811-jam
cal-nic Oct 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions Interfaces/index.ts

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ can [create an IAP tunnel](https://cloud.google.com/sdk/gcloud/reference/compute
Instance running the rest API in a sandbox.

```shell
gcloud compute start-iap-tunnel restapi-1 90 --local-host-port=localhost:90 --zone europe-west2-a
gcloud compute start-iap-tunnel restapi-1 80 --local-host-port=localhost:5011 --zone europe-west2-a
```

#### Setup locally steps
Expand All @@ -56,7 +56,7 @@ The `.env` file should be setup as below
```.env
VM_EXTERNAL_WEB_URL='tel-client-server.uk'
VM_EXTERNAL_CLIENT_URL='tel-web-server.uk'
BLAISE_API_URL='localhost:90'
BLAISE_API_URL='http://localhost:5011'
BIMS_API_URL='https://bims-url'
```

Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "",
"main": "index.ts",
"scripts": {
"start": "node ./dist/server/index.js",
"start-server": "tsc --project tsconfig.server.json && node ./dist/server/index.js",
"start": "node ./dist/index.js",
"start-server": "tsc --project tsconfig.server.json && node ./dist/index.js",
"start-react": "react-scripts start",
"build-react": "react-scripts build",
"test": "jest --coverage --watchAll=false",
Expand All @@ -30,6 +30,7 @@
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"axios": "^0.24.0",
"blaise-api-node-client": "https://github.com/ONSdigital/blaise-api-node-client",
"blaise-design-system-react-components": "git+https://github.com/ONSdigital/blaise-design-system-react-components#0.13.2",
"concurrently": "^7.6.0",
"dotenv": "^16.0.3",
Expand Down Expand Up @@ -62,7 +63,8 @@
"eslint": "^7.13.0",
"eslint-plugin-react": "^7.21.5",
"jest-extended": "^0.11.5",
"supertest": "^6.3.3"
"supertest": "^6.3.3",
"typemoq": "^2.1.0"
},
"browserslist": {
"production": [
Expand Down
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
-->
<script>
// Passing in variables from express to the react app
window.VM_EXTERNAL_CLIENT_URL = "\<\%= VM_EXTERNAL_CLIENT_URL \%\>";
window.CATI_DASHBOARD_URL = "\<\%= CATI_DASHBOARD_URL \%\>";
window.VM_EXTERNAL_CLIENT_URL = "\<\%= clientUrl \%\>";
window.CATI_DASHBOARD_URL = "\<\%= dashboardUrl \%\>";
</script>
</body>
</html>
11 changes: 9 additions & 2 deletions server/Config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface EnvironmentVariables {
export interface EnvironmentVariables {
VM_EXTERNAL_CLIENT_URL: string
VM_EXTERNAL_WEB_URL: string
BLAISE_API_URL: string
Expand Down Expand Up @@ -42,8 +42,15 @@ export function getEnvironmentVariables(): EnvironmentVariables {

return {VM_EXTERNAL_CLIENT_URL,
VM_EXTERNAL_WEB_URL,
BLAISE_API_URL,
BLAISE_API_URL: fixURL(BLAISE_API_URL),
CATI_DASHBOARD_URL,
BIMS_CLIENT_ID,
BIMS_API_URL};
}

function fixURL(url: string): string {
if (url.startsWith("ENV_VAR_NOT_SET") || url.startsWith("http")) {
return url;
}
return `http://${url}`;
}
283 changes: 0 additions & 283 deletions server/Instuments/index.test.ts

This file was deleted.

Loading
Loading