diff --git a/README.md b/README.md index 456acb9..4ccb6d1 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ go to http://localhost:3000 To have a consistent code style and quality, we use Eslint in combination with prettier. +Node.js version known to work well as of 2024-12: v20.14.0 +NPM version known to work well as of 2024-12: v10.7.0 + ### Selecting backend You can modify which backend you want to connect to by modifying the `package.json` file. E.g. to point to a remote backend: diff --git a/package-lock.json b/package-lock.json index 5fbdf20..3a39a8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,10 +8,13 @@ "name": "more-studymanager-frontend", "version": "0.0.0", "dependencies": { + "@types/dompurify": "^3.2.0", "axios": "1.7.2", "chart.js": "^4.4.3", "cron-validate": "1.4.5", + "dompurify": "^3.2.3", "keycloak-js": "25.0.1", + "node": "^20.13.1", "normalize.css": "8.0.1", "pg": "8.12.0", "pinia": "2.1.7", @@ -2581,6 +2584,15 @@ "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", "dev": true }, + "node_modules/@types/dompurify": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.2.0.tgz", + "integrity": "sha512-Fgg31wv9QbLDA0SpTOXO3MaxySc4DKGLi8sna4/Utjo4r3ZRPdCt4UQee8BWr+Q5z21yifghREPJGYaEOEIACg==", + "deprecated": "This is a stub types definition. dompurify provides its own type definitions, so you do not need this installed.", + "dependencies": { + "dompurify": "*" + } + }, "node_modules/@types/eslint": { "version": "8.56.10", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", @@ -2641,6 +2653,12 @@ "integrity": "sha512-PR+BOIrI+rxteHwFvkfIOty+PDJwTG4ute3alxSSXpF/xKpryO1room265m46Auyae0VwqUYs3PuVEOF9Oil3w==", "dev": true }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "optional": true + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.16.0.tgz", @@ -4790,6 +4808,14 @@ "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "dev": true }, + "node_modules/dompurify": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.3.tgz", + "integrity": "sha512-U1U5Hzc2MO0oW3DF+G9qYN0aT7atAou4AgI0XjWz061nyBPbdxkfdhfy5uMgGn6+oLFCfn44ZGbdDqCzVmlOWA==", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -8198,6 +8224,26 @@ "dev": true, "peer": true }, + "node_modules/node": { + "version": "20.13.1", + "resolved": "https://registry.npmjs.org/node/-/node-20.13.1.tgz", + "integrity": "sha512-DKI6TQbWLE9ikl66/1QV7AxFprU8E6QL/p1Sj1hvV3raQ+OWc++axzI4eiEz6N+ruqn+eGWon/dLFhVtVyK1LQ==", + "hasInstallScript": true, + "dependencies": { + "node-bin-setup": "^1.0.0" + }, + "bin": { + "node": "bin/node" + }, + "engines": { + "npm": ">=5.0.0" + } + }, + "node_modules/node-bin-setup": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.1.3.tgz", + "integrity": "sha512-opgw9iSCAzT2+6wJOETCpeRYAQxSopqQ2z+N6BXwIMsQQ7Zj5M8MaafQY8JMlolRR6R1UXg2WmhKp0p9lSOivg==" + }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", diff --git a/package.json b/package.json index 4d95fbc..9087bcd 100644 --- a/package.json +++ b/package.json @@ -23,10 +23,13 @@ "npm": "9.8.1" }, "dependencies": { + "@types/dompurify": "^3.2.0", "axios": "1.7.2", "chart.js": "^4.4.3", "cron-validate": "1.4.5", + "dompurify": "^3.2.3", "keycloak-js": "25.0.1", + "node": "^20.13.1", "normalize.css": "8.0.1", "pg": "8.12.0", "pinia": "2.1.7", diff --git a/src/components/subComponents/ParticipationDataAISenseMaking.vue b/src/components/subComponents/ParticipationDataAISenseMaking.vue new file mode 100644 index 0000000..6c5f12e --- /dev/null +++ b/src/components/subComponents/ParticipationDataAISenseMaking.vue @@ -0,0 +1,306 @@ + + + + + diff --git a/src/i18n/de.json b/src/i18n/de.json index bb14525..d4a56cb 100644 --- a/src/i18n/de.json +++ b/src/i18n/de.json @@ -402,6 +402,12 @@ "dataDownload": { "title": "Studiendaten herunterladen", "description": "Hier können die Studiendaten basierend auf diverse Filter heruntergeladen werden." + }, + "AISenseMaking": { + "title": "AI Data Sense Making", + "filterForAI": "Daten filtern für KI-gestützte Analyse", + "customPrompt": "Benutzerdefinierter Prompt", + "customPromptDescription": "Geben Sie einen benutzerdefinierten Prompt ein, um z. B. eine bestimmte Analyse oder Visualisierung zu erwirken." } }, diff --git a/src/i18n/en.json b/src/i18n/en.json index a3a3895..e95fe5f 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -402,6 +402,12 @@ "dataDownload": { "title": "Download study data", "description": "Here you can download the study data based on various filters." + }, + "AISenseMaking": { + "title": "AI Data Sense Making", + "filterForAI": "Filter data to pass to AI-enabled sense-making", + "customPrompt": "Custom Prompt", + "customPromptDescription": "Enter a custom prompt to describe desired analysis or visualization approach(es)." } }, diff --git a/src/views/MonitoringData.vue b/src/views/MonitoringData.vue index 1f90602..8939c8f 100644 --- a/src/views/MonitoringData.vue +++ b/src/views/MonitoringData.vue @@ -13,6 +13,7 @@ Licensed under the Elastic License 2.0. */ import TabPanel from 'primevue/tabpanel'; import DatapointList from '../components/subComponents/DatapointList.vue'; import ParticipationDataList from '../components/ParticipationDataList.vue'; + import ParticipationDataAISenseMaking from '../components/subComponents/ParticipationDataAISenseMaking.vue'; const studyStore = useStudyStore(); const accessRoles: StudyRole[] = [StudyRole.Admin, StudyRole.Viewer]; @@ -45,6 +46,11 @@ Licensed under the Elastic License 2.0. */ + + + + +