Skip to content

Commit

Permalink
Merge pull request #1430 from OpenEnergyPlatform/Hotfix-v0.15.3
Browse files Browse the repository at this point in the history
Hotfix v0.15.3
  • Loading branch information
jh-RLI authored Oct 23, 2023
2 parents 1170120 + 331c92c commit efda497
Show file tree
Hide file tree
Showing 21 changed files with 248 additions and 157 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.15.1
current_version = 0.15.2

[bumpversion:file:VERSION]

Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ authors:
title: "Open Energy Family - Open Energy Platform (OEP)"
type: software
license: AGPL-3.0-or-later
version: 0.15.1
version: 0.15.2
doi:
date-released: 2023-10-11
url: "https://github.com/OpenEnergyPlatform/oeplatform/"
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.15.1
0.15.2
24 changes: 24 additions & 0 deletions factsheet/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions factsheet/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@testing-library/user-event": "^13.5.0",
"apollo-boost": "^0.4.9",
"axios": "^1.1.3",
"date-fns": "^2.30.0",
"dayjs": "^1.11.7",
"font-awesome": "^4.7.0",
"graphql": "^15.8.0",
Expand Down
214 changes: 118 additions & 96 deletions factsheet/frontend/src/components/comparisonBoardItems.js

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions factsheet/frontend/src/components/comparisonBoardMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ import ArrowRightIcon from '@mui/icons-material/ArrowRight';
const ComparisonBoardMain = (props) => {
const { params } = props;
const [scenarios, setScenarios] = useState([]);
console.log(params);
const scenario_acronyms = params.split('-');
const scenario_acronyms_json = JSON.stringify(scenario_acronyms);
const scenarios_uid = params.split('#');
const scenarios_uid_json = JSON.stringify(scenarios_uid);
const [selectedCriteria, setselectedCriteria] = useState(['Descriptors']);

const getScenarios = async () => {
const { data } = await axios.get(conf.toep + `sirop/get_scenarios/`, { params: { scenarios_acronym: scenario_acronyms_json } });
const { data } = await axios.get(conf.toep + `sirop/get_scenarios/`, { params: { scenarios_uid: scenarios_uid_json } });
return data;
};

Expand All @@ -35,9 +34,10 @@ const ComparisonBoardMain = (props) => {
});
}, []);

console.log(scenarios);

const Criteria = [
'Study name',
'Study abstract',
'Descriptors',
'Regions',
'Interacting regions',
Expand Down Expand Up @@ -65,20 +65,20 @@ const ComparisonBoardMain = (props) => {
alignItems="center"
>
<Grid item xs={12} >
<div style={{ backgroundColor: '#e3eaef', height: '150px', marginBottom: '10px' }}>
<div style={{ backgroundColor: '#e3eaef', height: '100px', marginBottom: '10px' }}>
<div id='headerStyle'>
<span>
<ListAltOutlinedIcon />
</span>
<p>Scenario Bundle</p>
<span>Scenario Bundle</span>
</div>
<div id='headerSubStyle'> <span> Comparison </span> </div>
</div>
</Grid>
<Container maxWidth="xl">
<Container maxWidth="false">
<Box sx={{
padding: '10px',
margin: '10px',
padding: '5px',
margin: '5px',
display: 'block'}}
>
<Stack direction="row" justifyContent="space-between" alignItems="center">
Expand All @@ -100,9 +100,11 @@ const ComparisonBoardMain = (props) => {
</Box>
{/* <ComparisonControl /> */}
<Box sx={{
padding: '20px',
margin: '20px',
padding: '5px',
paddingLeft: '15px',
margin: '5px',
backgroundColor: '#F6F9FB',
overflow: 'auto',
display: 'block'}}
>
<b>Criteria</b>
Expand Down
10 changes: 5 additions & 5 deletions factsheet/frontend/src/components/customTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function EnhancedTableToolbar(props) {
<Button size="small" key="resetFilterButton" sx={{ marginLeft: '8px'}} startIcon={<ReplayIcon />} onClick={handleShowAll}>Reset</Button>
<Tooltip title="Compare">

{numSelected > 1 ? <Link to={`sirop/compare/${[...selected].join('-')}`} onClick={() => this.forceUpdate} style={{ color: 'white' }}>
{numSelected > 1 ? <Link to={`sirop/compare/${[...selected].join('#')}`} onClick={() => this.forceUpdate} style={{ color: 'white' }}>
<Button size="small"
style={{ 'marginLeft': '5px', 'color': 'white', 'textTransform': 'none' }}
variant="contained"
Expand Down Expand Up @@ -325,7 +325,7 @@ export default function CustomTable(props) {
event: React.MouseEvent<HTMLElement>,
newAlignment: string,
) => {
setAlignment(newAlignment);
newAlignment !== null && setAlignment(newAlignment);
};

const handleScenarioYearChange = (event, newValue) => {
Expand Down Expand Up @@ -356,7 +356,6 @@ export default function CustomTable(props) {
};

const handleClick = (event, name) => {

const newSelected = new Set(selected);
if (newSelected.has(name)) newSelected.delete(name);
else newSelected.add(name);
Expand All @@ -378,6 +377,7 @@ export default function CustomTable(props) {
// }

setSelected(newSelected);

};

const handleChangePage = (event, newPage) => {
Expand Down Expand Up @@ -616,7 +616,7 @@ export default function CustomTable(props) {
</React.Fragment>
}
>
<Chip size="small" color="primary" label={v.label} variant={selected.has(v.label) ? "filled" : "outlined"} sx={{ 'marginLeft': '5px', 'marginTop': '4px' }} onClick={(event) => handleClick(event, v.label)}/>
<Chip size="small" color="primary" label={v.label} variant={selected.has(v.uid) ? "filled" : "outlined"} sx={{ 'marginLeft': '5px', 'marginTop': '4px' }} onClick={(event) => handleClick(event, v.uid)}/>
</HtmlTooltip>
))}
</TableCell>
Expand Down Expand Up @@ -738,7 +738,7 @@ export default function CustomTable(props) {
</React.Fragment>
}
>
<Chip size="small" color="primary" label={v.label} variant={selected.has(v.label) ? "filled" : "outlined"} sx={{ 'marginLeft': '5px', 'marginTop': '4px' }} onClick={(event) => handleClick(event, v.label)}/>
<Chip size="small" color="primary" label={v.label} variant={selected.has(v.uid) ? "filled" : "outlined"} sx={{ 'marginLeft': '5px', 'marginTop': '4px' }} onClick={(event) => handleClick(event, v.uid)}/>
</HtmlTooltip>
))}
</p>
Expand Down
24 changes: 14 additions & 10 deletions factsheet/frontend/src/components/factsheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ import SaveIcon from '@mui/icons-material/Save';
import uuid from "react-uuid";
import Alert from '@mui/material/Alert';
import AlertTitle from '@mui/material/AlertTitle';
import Stepper from '@mui/material/Stepper';
import Step from '@mui/material/Step';
import StepLabel from '@mui/material/StepLabel';
import StepContent from '@mui/material/StepContent';
import CircularProgress from '@mui/material/CircularProgress';
import Badge from '@mui/material/Badge';
import { Route, Routes, useNavigate } from 'react-router-dom';
Expand Down Expand Up @@ -497,8 +493,10 @@ function Factsheet(props) {
obj[name] = selectedList
console.log(newScenarios);
setScenarios(newScenarios);

};


const scenariosInputDatasetsHandler = (scenariosInputDatasetsList, id) => {
const newScenarios = [...scenarios];
const obj = newScenarios.find(el => el.id === id);
Expand Down Expand Up @@ -1539,10 +1537,16 @@ const renderBasicInformation = () => (
<Stack spacing={3} style={{ marginTop:'10px', width: '70%', marginBottom:'40px' }}>
<DesktopDatePicker
label=''
inputFormat="YYYY-MM-DD"
inputFormat="YYYY/MM/DD"
value={date_of_publication}
onChange={(newValue) => {
setDateOfPublication(newValue);
const dateObj = new Date(newValue);
const dateString = dateObj.getFullYear() + '/' + (dateObj.getMonth() + 1) + '/' + String(dateObj.getDate() )
const d = new Date(dateString);
console.log(d);
console.log(dateString);

setDateOfPublication(dateString);
}}
renderInput={(params) => <TextField {...params} size="small" variant="outlined" />}
/>
Expand Down Expand Up @@ -2058,7 +2062,7 @@ const renderPublicationOverview = () => (
<Grid item xs={12} style={{ padding: '0px' }}>
<Divider />
</Grid>
<Grid item xs={2} style={{ padding: '5px' }}>
{/* <Grid item xs={2} style={{ padding: '5px' }}>
<span style={{ color: '#294456', marginLeft:'20px' }}> <b>Citation: </b> </span>
<span >
<HtmlTooltip
Expand All @@ -2078,7 +2082,7 @@ const renderPublicationOverview = () => (
</Grid>
<Grid item xs={10} style={{ paddingTop: '0px', borderLeft: '1px solid #80808038' }}>
{}
</Grid>
</Grid> */}

</Grid>
)
Expand Down Expand Up @@ -2494,12 +2498,12 @@ function getStepContent(step: number) {
alignItems="center"
>
<Grid item xs={12} >
<div style={{ backgroundColor: '#e3eaef', height: '150px', marginBottom: '10px' }}>
<div style={{ backgroundColor: '#e3eaef', height: '100px', marginBottom: '10px' }}>
<div id='headerStyle'>
<span>
<ListAltOutlinedIcon />
</span>
<p>Scenario Bundle</p>
<span>Scenario Bundle</span>
</div>
<div id='headerSubStyle'> <span> {id === "new" ? "new/" : mode + "/" } </span> {acronym} </div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions factsheet/frontend/src/conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"localhost": "http://localhost:8000/",
"toep1": "https://oep.iks.cs.ovgu.de/",
"toep": "https://oep.iks.cs.ovgu.de/",
"toep1": "http://toep.iks.cs.ovgu.de/",
"toep1": "http://localhost:8000/",
"toep": "https://openenergy-platform.org/"
"toep3": "http://localhost:8000/",
"toep2": "https://openenergy-platform.org/"
}
Binary file added factsheet/frontend/src/conf.json.gpg
Binary file not shown.
3 changes: 3 additions & 0 deletions factsheet/static/factsheet/js/main.279f8558.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions factsheet/static/factsheet/js/main.279f8558.js.map

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions factsheet/static/factsheet/js/main.afadd0cc.js

This file was deleted.

1 change: 0 additions & 1 deletion factsheet/static/factsheet/js/main.afadd0cc.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion factsheet/templates/factsheet/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
{% endblock main-content-body %}

{% block after-body-bottom-js %}
<script src="{% static 'factsheet/js/main.afadd0cc.js' %}"></script>
<script src="{% static 'factsheet/js/main.279f8558.js' %}"></script>
{% endblock after-body-bottom-js %}
1 change: 1 addition & 0 deletions factsheet/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
path(r"update_an_entity/", views.update_an_entity),
path(r"query/", views.query_oekg),
path(r"get_scenarios/", views.get_scenarios),
path(r"test_query/", views.test_query),



Expand Down
Loading

0 comments on commit efda497

Please sign in to comment.