diff --git a/.github/workflows/frontend_lint_and_test.yml b/.github/workflows/frontend_lint_and_test.yml index 61109ff9b..2990aff6b 100644 --- a/.github/workflows/frontend_lint_and_test.yml +++ b/.github/workflows/frontend_lint_and_test.yml @@ -33,6 +33,7 @@ jobs: - run: npm test env: PORT: 3001 + REACT_APP_AI_CONNECTION_STRING: "" REACT_APP_BACKEND_URL: https://localhost:8000 REACT_APP_BACKEND_API_SCOPE: api://ea4c7b92-47b3-45fb-bd25-a8070f0c495c/user_impersonation REACT_APP_FRONTEND_URL: http://localhost:3001 diff --git a/docker-compose.yml b/docker-compose.yml index 910fe4b10..c80cc0dda 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,7 @@ services: ports: - "3001:3001" environment: + - REACT_APP_AI_CONNECTION_STRING= - REACT_APP_BACKEND_URL=http://localhost:8000 - REACT_APP_BACKEND_API_SCOPE=api://ea4c7b92-47b3-45fb-bd25-a8070f0c495c/user_impersonation - REACT_APP_FRONTEND_URL=http://localhost:3001 diff --git a/frontend/.env.example b/frontend/.env.example index 80e32e376..0f9fc18b0 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -1,4 +1,5 @@ PORT=3001 +REACT_APP_AI_CONNECTION_STRING="" REACT_APP_BACKEND_URL=https://localhost:8000 REACT_APP_BACKEND_API_SCOPE=api://ea4c7b92-47b3-45fb-bd25-a8070f0c495c/user_impersonation REACT_APP_FRONTEND_URL=http://localhost:3001 diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 008eace54..cd7e7f259 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -13,6 +13,7 @@ "@equinor/eds-core-react": "^0.20.4", "@equinor/eds-icons": "^0.18.0", "@equinor/eds-tokens": "^0.7.1", + "@microsoft/applicationinsights-web": "^3.0.7", "@microsoft/signalr": "^7.0.12", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", @@ -2723,6 +2724,149 @@ "version": "2.0.4", "license": "MIT" }, + "node_modules/@microsoft/applicationinsights-analytics-js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-analytics-js/-/applicationinsights-analytics-js-3.0.7.tgz", + "integrity": "sha512-HOcFA4JJUTz+KOqVQoE5g1ExL7Wm+sL2czLKQq1hDkmU4PeO4Oq/pi9SeR6iHDQpXCenMTvAkzvZ9A41ZKIOQA==", + "dependencies": { + "@microsoft/applicationinsights-common": "3.0.7", + "@microsoft/applicationinsights-core-js": "3.0.7", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" + }, + "peerDependencies": { + "tslib": "*" + } + }, + "node_modules/@microsoft/applicationinsights-cfgsync-js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-cfgsync-js/-/applicationinsights-cfgsync-js-3.0.7.tgz", + "integrity": "sha512-lp+FP5mg35KO1LuCss2wEOR3dYTFLeDbBkqIoQ9TnJje7Yt3gNKHANl9/b8nMmJyL9u2Lp0pc3wzM+InfO5xHw==", + "dependencies": { + "@microsoft/applicationinsights-common": "3.0.7", + "@microsoft/applicationinsights-core-js": "3.0.7", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-async": ">= 0.3.0 < 2.x", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" + }, + "peerDependencies": { + "tslib": "*" + } + }, + "node_modules/@microsoft/applicationinsights-channel-js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-channel-js/-/applicationinsights-channel-js-3.0.7.tgz", + "integrity": "sha512-3y8ct8V2bGo7QaYVrfQcWZeOci2tUZhXkme3k7nKa2P7upSX/1d+dPF12EelxrtWVLxtfCQJkk+2W4M1AyejGQ==", + "dependencies": { + "@microsoft/applicationinsights-common": "3.0.7", + "@microsoft/applicationinsights-core-js": "3.0.7", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-async": ">= 0.3.0 < 2.x", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" + }, + "peerDependencies": { + "tslib": "*" + } + }, + "node_modules/@microsoft/applicationinsights-common": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-common/-/applicationinsights-common-3.0.7.tgz", + "integrity": "sha512-boumvLA7LZu0NmwT9ThpTAI64BNYUlOkFNcjUbYeKNEaE6CBPGX/z25XXlYu+j4hHldDaCn9zC1LuN7AuoMJSA==", + "dependencies": { + "@microsoft/applicationinsights-core-js": "3.0.7", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" + }, + "peerDependencies": { + "tslib": "*" + } + }, + "node_modules/@microsoft/applicationinsights-core-js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-3.0.7.tgz", + "integrity": "sha512-sVnnVW4fWXzZdtUTVjuwH3xGa1cj+tW7r72voMZzyuNOZ41fBOCK9AqoV0nKP5VCgNjySwn6Rpbw82I4TKKosQ==", + "dependencies": { + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-async": ">= 0.3.0 < 2.x", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" + }, + "peerDependencies": { + "tslib": "*" + } + }, + "node_modules/@microsoft/applicationinsights-dependencies-js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-dependencies-js/-/applicationinsights-dependencies-js-3.0.7.tgz", + "integrity": "sha512-nylC373IWXHUoz3FS9LclMIvGvX/KEeFFCPzZ0i1vjEsBwIB4LJ/5XwvtEk4F/kAXPZr6wFNoxecMhS9nKOfNg==", + "dependencies": { + "@microsoft/applicationinsights-common": "3.0.7", + "@microsoft/applicationinsights-core-js": "3.0.7", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-async": ">= 0.3.0 < 2.x", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" + }, + "peerDependencies": { + "tslib": "*" + } + }, + "node_modules/@microsoft/applicationinsights-properties-js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-properties-js/-/applicationinsights-properties-js-3.0.7.tgz", + "integrity": "sha512-vWSs16AJ7bsZxsT34Cv81d/5+SjjniNxNhI+XNzKSBnjhxITrhmRTEbhBbYQAP9118qQsEYW9liQBeLnxg6QSg==", + "dependencies": { + "@microsoft/applicationinsights-common": "3.0.7", + "@microsoft/applicationinsights-core-js": "3.0.7", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" + }, + "peerDependencies": { + "tslib": "*" + } + }, + "node_modules/@microsoft/applicationinsights-shims": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-shims/-/applicationinsights-shims-3.0.1.tgz", + "integrity": "sha512-DKwboF47H1nb33rSUfjqI6ryX29v+2QWcTrRvcQDA32AZr5Ilkr7whOOSsD1aBzwqX0RJEIP1Z81jfE3NBm/Lg==", + "dependencies": { + "@nevware21/ts-utils": ">= 0.9.4 < 2.x" + } + }, + "node_modules/@microsoft/applicationinsights-web": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-web/-/applicationinsights-web-3.0.7.tgz", + "integrity": "sha512-UfX/Fl4Fe2Q72/MXJLCb5MBwTGdMBXmB/JW+eF2dDt6zDZa2OOe8u7daGXjh2ewFdBqb4feb02PDCSDg+nsBeA==", + "dependencies": { + "@microsoft/applicationinsights-analytics-js": "3.0.7", + "@microsoft/applicationinsights-cfgsync-js": "3.0.7", + "@microsoft/applicationinsights-channel-js": "3.0.7", + "@microsoft/applicationinsights-common": "3.0.7", + "@microsoft/applicationinsights-core-js": "3.0.7", + "@microsoft/applicationinsights-dependencies-js": "3.0.7", + "@microsoft/applicationinsights-properties-js": "3.0.7", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-async": ">= 0.3.0 < 2.x", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" + }, + "peerDependencies": { + "tslib": "*" + } + }, + "node_modules/@microsoft/dynamicproto-js": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@microsoft/dynamicproto-js/-/dynamicproto-js-2.0.2.tgz", + "integrity": "sha512-MB8trWaFREpmb037k/d0bB7T2BP7Ai24w1e1tbz3ASLB0/lwphsq3Nq8S9I5AsI5vs4zAQT+SB5nC5/dLYTiOg==", + "dependencies": { + "@nevware21/ts-utils": ">= 0.9.4 < 2.x" + } + }, "node_modules/@microsoft/signalr": { "version": "7.0.12", "resolved": "https://registry.npmjs.org/@microsoft/signalr/-/signalr-7.0.12.tgz", @@ -2735,6 +2879,19 @@ "ws": "^7.4.5" } }, + "node_modules/@nevware21/ts-async": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@nevware21/ts-async/-/ts-async-0.4.0.tgz", + "integrity": "sha512-dbV826TTehQIBIJjh8GDSbwn1Z6+cnkyNbRlpcpdBPH8mROD2zabIUKqWcw9WRdTjjUIm21K+OR4DXWlAyOVTQ==", + "dependencies": { + "@nevware21/ts-utils": ">= 0.10.0 < 2.x" + } + }, + "node_modules/@nevware21/ts-utils": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@nevware21/ts-utils/-/ts-utils-0.10.3.tgz", + "integrity": "sha512-tr386H8iI9DsqF8DcmdrcTFusU2BgiAX+OrLJcka6G/AOBwauVwIbAR0asuKDjKy/5Tu9jAozPxGgwP9CMx7LA==" + }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "license": "MIT", diff --git a/frontend/package.json b/frontend/package.json index 07615ab52..7571514e9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,6 +9,7 @@ "@equinor/eds-core-react": "^0.20.4", "@equinor/eds-icons": "^0.18.0", "@equinor/eds-tokens": "^0.7.1", + "@microsoft/applicationinsights-web": "^3.0.7", "@microsoft/signalr": "^7.0.12", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", diff --git a/frontend/public/index.html b/frontend/public/index.html index 83ac06a5c..c3de965cb 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -39,6 +39,7 @@ To create a production bundle, use `npm run build` or `yarn build`. -->