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

Feature/merge develop and project manager connection #123

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c3e5d1b
wip
MatsJohansen87 Dec 19, 2023
ec50f0b
feat(negotiate): add base64 query to request
MatsJohansen87 Dec 21, 2023
7a12896
feat: WIP - project manager connection
torbrenner Jan 16, 2024
51b1ed7
fix: make requests work
torbrenner Feb 28, 2024
2a4fe75
feature: send CQL to project manager
torbrenner Mar 19, 2024
1b0f87d
fix: get site from siteCollectionMap
torbrenner Mar 19, 2024
eccb36a
fix: send collectionId to project manager
torbrenner Mar 19, 2024
3e1e5ab
fix: send return url only with params if user defined criteria
torbrenner Mar 19, 2024
8c48e00
docs: added test environment
torbrenner Mar 28, 2024
28a92ec
docs: added test environment
torbrenner Mar 28, 2024
a8a815b
feat(env): set ports
MatsJohansen87 Apr 3, 2024
1052bdc
Merge branch 'feat/project-manager-connection' of https://github.com/…
MatsJohansen87 Apr 9, 2024
959fdb1
feat(environment): add environment variables to the project
MatsJohansen87 Apr 11, 2024
80f1a60
feat(project manager): add jump to project manager
MatsJohansen87 Apr 22, 2024
8dfd37b
feat(WIP: project manager): add refresh token support
MatsJohansen87 Apr 24, 2024
d558973
Merge branch 'develop' into feat/project-manager-connection
MatsJohansen87 Apr 25, 2024
e32ecba
feat(authentication wip): get refresh token
MatsJohansen87 Apr 30, 2024
39a4258
feat(wip authentication): refactor authentication
MatsJohansen87 Jun 5, 2024
e1e88d7
feat(wip negotiate): get auth from project manager
MatsJohansen87 Jun 18, 2024
3d77029
feat(wip negotiate): get correct tokens
MatsJohansen87 Aug 19, 2024
8fd8b3a
feat(auth): add proper token refreshing via forward proxy
MatsJohansen87 Aug 20, 2024
60a67e0
Merge branch 'feat/project-manager-connection' into feature/merge-dev…
MatsJohansen87 Sep 2, 2024
5275d03
feat(negotiate): add schema for options and move from demo to dev
MatsJohansen87 Sep 2, 2024
353533e
feat(catalogues): add staging catalogue
MatsJohansen87 Sep 4, 2024
02a3502
feat(negotiate): add config to change negotiation service
MatsJohansen87 Sep 5, 2024
945fb4c
fix(auth): remove negotiator authentiation from frontend code
MatsJohansen87 Sep 5, 2024
bfceafa
refactor: adjust deployment configuration
torbrenner Sep 6, 2024
7fdcc1a
refactor: add project-manager.env to gitignore
torbrenner Sep 6, 2024
56de19f
Merge pull request #125 from samply/review-project-manager-connection…
MatsJohansen87 Sep 6, 2024
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ TODO
docker-compose.override.yml
*.priv.pem
traefik.yaml

project-manager.env
22 changes: 22 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,28 @@ services:
profiles:
- "beam"

project-manager:
image: samply/project-manager:develop
ports:
- 8097:8097
env_file:
- env/project-manager.env
volumes:
- "./templates:/templates"
- "./documents:/documents"
- "./public-documents:/public-documents"
profiles:
- "project-manager"

project-manager-db:
image: postgres:alpine
environment:
POSTGRES_DB: dev
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
profiles:
- "project-manager"

secrets:
proxy.pem:
file: /etc/lens/pki/${LOCAL_BEAM_ID}.priv.pem
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ services:
- OAUTH2_PROXY_CLIENT_SECRET=${OAUTH_CLIENT_SECRET}
- OAUTH2_PROXY_COOKIE_SECRET=${AUTHENTICATION_SECRET}
- OAUTH2_PROXY_COOKIE_DOMAINS=.${GUI_HOST}
- OAUTH2_PROXY_COOKIE_REFRESH=4m
- OAUTH2_PROXY_COOKIE_EXPIRE=24h
- OAUTH2_PROXY_HTTP_ADDRESS=:4180
- OAUTH2_PROXY_REVERSE_PROXY=true
- OAUTH2_PROXY_WHITELIST_DOMAINS=.${GUI_HOST}
Expand Down
20,409 changes: 20,409 additions & 0 deletions packages/demo/public/catalogues/catalogue-dktk-staging.json

Large diffs are not rendered by default.

51 changes: 0 additions & 51 deletions packages/demo/public/catalogues/catalogue-dktk.json
Original file line number Diff line number Diff line change
Expand Up @@ -20354,56 +20354,5 @@
]
}
]
},
{
"key": "project",
"name": "Forschungsprojekte",
"infoButtonText": ["Projekt-Übersicht"],
"childCategories": [
{
"key": "pseudo_projects",
"name": "Projektname",
"fieldType": "single-select",
"type": "EQUALS",
"system": "",
"criteria": [
{
"key": "DKTK000002089",
"name": "EXLIQUID",
"description": ""
},
{
"key": "DKTK000001985",
"name": "RiskY-AML",
"description": ""
},
{
"key": "DKTK000001986",
"name": "MASTER-Programm",
"description": ""
},
{
"key": "DKTK000001950",
"name": "IRCC",
"description": ""
},
{
"key": "DKTK000001951",
"name": "ARMANI",
"description": ""
},
{
"key": "DKTK999999999",
"name": "Testprojekt",
"description": ""
},
{
"key": "DKTK000000791",
"name": "ReKo",
"description": ""
}
]
}
]
}
]
88 changes: 88 additions & 0 deletions packages/demo/public/options-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,5 +279,93 @@
"url": "http://localhost:8080"
}
]
},
"negotiateOptions": {
"negotiateApp": "project-manager",
"newProjectUrl": "http://localhost:8097/create-query-and-design-project",
"editProjectUrl": "http://localhost:8097/edit-project",
"siteMapping": [
{
"site": "Dresden",
"collection": "dresden"
},
{
"site": "Frankfurt",
"collection": "bbmri-eric:ID:DE_iBDF:collection:UCT"
},
{
"site": "Berlin",
"collection": "bbmri-eric:ID:DE_ZeBanC:collection:Onoloy"
},
{
"site": "Würzburg",
"collection": "bbmri-eric:ID:DE_ibdw:collection:bc"
},
{
"site": "Brno",
"collection": "bbmri-eric:ID:CZ_MMCI:collection:LTS"
},
{
"site": "Aachen",
"collection": "bbmri-eric:ID:DE_RWTHCBMB:collection:RWTHCBMB_BC"
},
{
"site": "Leipzig",
"collection": "bbmri-eric:ID:DE_LMB:collection:LIFE_ADULT"
},
{
"site": "München (HMGU)",
"collection": "bbmri-eric:ID:DE_Helmholtz-MuenchenBiobank:collection:DE_KORA"
},
{
"site": "Pilsen",
"collection": "bbmri-eric:ID:CZ_CUNI_PILS:collection:serum_plasma"
},
{
"site": "Regensburg",
"collection": "bbmri-eric:ID:DE_ZBR:collection:Tissue"
},
{
"site": "Heidelberg",
"collection": "bbmri-eric:ID:DE_BMBH:collection:Lungenbiobank"
},
{
"site": "Lübeck",
"collection": "bbmri-eric:ID:DE_ICBL:collection:ICBL"
},
{
"site": "Augsburg",
"collection": "bbmri-eric:ID:DE_ACBB:collection:TISSUE"
},
{
"site": "Mannheim",
"collection": "bbmri-eric:ID:DE_BioPsy:collection:Main_collecion"
},
{
"site": "Marburg",
"collection": "bbmri-eric:ID:DE_CBBMR:collection:main"
},
{
"site": "Göttingen",
"collection": "bbmri-eric:ID:DE_UMGB:collection:UMG-startegy"
},
{
"site": "Hanover",
"collection": "bbmri-eric:ID:DE_HUB:collection:ProBase"
},
{
"site": "Olomouc",
"collection": "bbmri-eric:ID:CZ_UPOL_LF:collection:all_samples"
},
{
"site": "Prague (FFM)",
"collection": "bbmri-eric:ID:CZ_CUNI_PILS:collection:serum_plasma"
},
{
"site": "Prague (IOR)",
"collection": "bbmri-eric:ID:CZ_CUNI_LF1:collection"
}

]
}
}
39 changes: 26 additions & 13 deletions packages/demo/src/AppCCP.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,35 @@
dktkHistologyMeasure,
} from "./measures";

let catalogueData = "";
let libraryOptions = "";
let catalogueData: string = "";
let libraryOptions: string = "";
let catalogueUrl: string = "";
let optionsFilePath: string = "";

fetch("catalogues/catalogue-dktk.json")
if (import.meta.env.VITE_TARGET_ENVIRONMENT === "production") {
catalogueUrl = "catalogues/catalogue-dktk.json";
optionsFilePath = "options.json";
} else {
catalogueUrl = "catalogues/catalogue-dktk-staging.json";
optionsFilePath = "options-ccp-demo.json";
}

/**
* VITE_TARGET_ENVIRONMENT is set by the ci pipeline
*/

/**
* get catalogue file
*/
fetch(catalogueUrl)
.then((response) => response.text())
.then((data) => {
catalogueData = data;
});

// VITE_TARGET_ENVIRONMENT should be set by the ci pipeline
let optionsFilePath: string = "options-dev.json";

if (import.meta.env.VITE_TARGET_ENVIRONMENT === "production") {
optionsFilePath = "options-ccp-prod.json";
} else if (import.meta.env.VITE_TARGET_ENVIRONMENT === "staging") {
optionsFilePath = "options-ccp-demo.json";
}

/**
* get options file
*/
fetch(optionsFilePath)
.then((response) => response.json())
.then((data) => {
Expand All @@ -52,7 +63,7 @@
];

/**
* move to config file
* TODO: move to config file
*/
const catalogueText = {
group: "Group",
Expand Down Expand Up @@ -138,6 +149,8 @@
<lens-search-modified-display
>Diagramme repräsentieren nicht mehr die aktuelle Suche!</lens-search-modified-display
>
<!-- TODO: comment in when backend is ready -->
<!-- <lens-negotiate-button /> -->
</div>
<div class="chart-wrapper">
<lens-chart
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<svelte:options
customElement={{
tag: "lens-negotiate-button",
}}
/>

<script lang="ts">
import { negotiate } from "../../stores/negotiate";
import { negotiate, negotiateStore } from "../../stores/negotiate";

export let title: string = "Negotiate with biobanks";
let disabled: boolean = false;

/**
* TODO: implement negotiator connection
*/
</script>

<button
part={`lens-negotiate-button lens-negotiate-button-${
disabled ? "disabled" : "active"
}`}
on:click={() => negotiate([])}
on:click={() => negotiate($negotiateStore)}
{disabled}
>
<div part="lens-negotiate-button-title">
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/src/stores/catalogue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const activeNumberInputs = writable<QueryItem[]>([]);
* @returns array of strings containing the bottom level items' keys
*/
export const getCriteria = (category: string): string[] => {
let bottomLevelItems = [] as string[];
let bottomLevelItems: string[] = [];

catalogue.subscribe((catalogue) => {
bottomLevelItems = getBottomLevelItems(catalogue, category);
Expand Down
Loading
Loading