Skip to content

Commit 357b6bd

Browse files
committed
Merge remote-tracking branch 'origin/main' into 48-ractivate-gunicorn
2 parents 493d41f + 590d808 commit 357b6bd

5 files changed

Lines changed: 25 additions & 19 deletions

File tree

.github/workflows/cicd-actions.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
branches:
99
- '**'
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
1115
env:
1216
DOCKER_DRIVER: overlay2
1317
DOCKER_TLS_CERTDIR: ""
@@ -16,7 +20,7 @@ env:
1620

1721
jobs:
1822
create_dotenv_file:
19-
runs-on: [ self-hosted ]
23+
runs-on: ubuntu-latest
2024
steps:
2125
- name: Checkout code
2226
uses: actions/checkout@v4
@@ -60,7 +64,7 @@ jobs:
6064
include-hidden-files: true
6165

6266
testing:
63-
runs-on: [ self-hosted ]
67+
runs-on: ubuntu-latest
6468
needs: create_dotenv_file
6569
steps:
6670
- name: Checkout code
@@ -114,7 +118,7 @@ jobs:
114118
path: backend/htmlcov
115119

116120
cleanup:
117-
runs-on: [ self-hosted ]
121+
runs-on: ubuntu-latest
118122
needs: testing
119123
if: always()
120124
steps:
@@ -133,7 +137,7 @@ jobs:
133137
docker compose -f docker-compose.ci.yml down
134138
135139
build_frontend_files:
136-
runs-on: [ self-hosted ]
140+
runs-on: ubuntu-latest
137141
if: github.ref == 'refs/heads/main'
138142
needs: cleanup
139143
steps:
@@ -153,7 +157,7 @@ jobs:
153157
path: backend/assets/*
154158

155159
build_and_push_container:
156-
runs-on: [ self-hosted ]
160+
runs-on: ubuntu-latest
157161
permissions:
158162
packages: write
159163
contents: read
@@ -198,7 +202,7 @@ jobs:
198202
labels: ${{ steps.meta.outputs.labels }}
199203

200204
build_and_push_adapter:
201-
runs-on: [ self-hosted ]
205+
runs-on: ubuntu-latest
202206
permissions:
203207
packages: write
204208
contents: read

frontend/src/components/DropdownMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ const dropdownStyle = (props: DropdownProps, backgroundColor: string) => {
5555
}
5656
}
5757

58-
export default DropdownMenu
58+
export default DropdownMenu

frontend/src/components/ImageDropDown.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {useState} from "react";
2-
import {colors, ListItemIcon, ListItemText, MenuItem, Select} from "@mui/material";
2+
import {ListItemText, MenuItem, Select} from "@mui/material";
33
import KeyboardDoubleArrowDownRoundedIcon from "@mui/icons-material/KeyboardDoubleArrowDownRounded";
44
import {ImageDropdownProps} from "../utilities/interfaces/ImageDropdownProps";
55

@@ -24,25 +24,22 @@ const ImageDropDown: React.FunctionComponent<ImageDropdownProps> = (props: Image
2424
currentValue = e.target.value;
2525
props.localStorageItemKey ? localStorage.setItem(props.localStorageItemKey, currentValue) : gotImageURLs = gotImageURLs /* Do nothing */;
2626
currentIndex = props.values.indexOf(currentValue);
27-
setText(props.texts[currentIndex]);
27+
const currText = props.texts[currentIndex]
28+
setText(currText);
2829
props.imageURLs ? setImageURL(props.imageURLs[currentIndex]) : setImageURL("");
2930
props.colors ? setBackgroundColor(props.colors[currentIndex]) : setBackgroundColor(currentBackgroundColor);
31+
props.onSelectionChange?.(currText, currentValue)
3032
}
3133

3234
return (
3335
<Select
3436
sx={imageDropDownStyle(currentBackgroundColor)}
3537
IconComponent={KeyboardDoubleArrowDownRoundedIcon}
3638
onChange={handleChange}
37-
value={props.texts}
38-
renderValue={() => (
39-
<MenuItem sx={menuItemStyle} value={currentValue}>
40-
<ListItemText sx={visibleElement(!showImagesOnly)} style={{textAlign:"left"}} primary={currentText}/>
41-
</MenuItem>
42-
)}
39+
value={currentValue}
4340
>
44-
{props.texts.map((value) => (
45-
<MenuItem sx={menuItemStyle} value={props.values[props.texts.indexOf(value)]}>
41+
{props.texts.map((value, index) => (
42+
<MenuItem key={value} sx={menuItemStyle} value={props.values[index]}>
4643
<ListItemText sx={visibleElement(!showImagesOnly)} style={{textAlign:"left"}} primary={value}/>
4744
</MenuItem>
4845
))}

frontend/src/components/LoginBox.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const LoginBox: React.FunctionComponent = () => {
4141
username: username,
4242
password: password,
4343
keepMeLoggedIn: stayLoggedIn,
44-
}).then(navigateAfterLogin).catch(() => {
44+
}).then(reloadPage).catch(() => {
4545
notification.error(localization.notificationMessage.incorrectLogin)
4646
})
4747
} else {
@@ -50,7 +50,7 @@ const LoginBox: React.FunctionComponent = () => {
5050
}
5151
}
5252

53-
const navigateAfterLogin = () => {
53+
const reloadPage = () => {
5454
window.location.reload();
5555
}
5656

@@ -64,6 +64,7 @@ const LoginBox: React.FunctionComponent = () => {
6464
imagesOnly={false}
6565
localStorageItemKey={localStorageItemKeys.selectedLanguage}
6666
defaultIndex={defaultLanguageIndex != -1 ? defaultLanguageIndex : 0}
67+
onSelectionChange={reloadPage}
6768
/>
6869
</Stack>
6970
<Stack sx={headlineContainer}>

frontend/src/utilities/interfaces/ImageDropdownProps.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,8 @@ export interface ImageDropdownProps {
3939
* Show images only (no text)
4040
*/
4141
imagesOnly?: boolean
42+
/**
43+
* Triggered whenever the selection changes
44+
*/
45+
onSelectionChange?: (text: string, value: string) => void
4246
}

0 commit comments

Comments
 (0)