Skip to content

Commit

Permalink
Simplify names and auto-select process mining output files
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonBein committed Jun 21, 2023
1 parent 0603c94 commit 4767d50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/components/Processminer/ProcessMinerPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const ProcessMinerPage = ({projectName, getData, toasting }) => {
.filter(file => file.name.endsWith('.json') || file.name.endsWith('.bpmn'));
relevant_files
.forEach(file => {
//TODO simplify name
file.name = file.name.replace(/\/.*\/(.*trial).*\//, '/$1/')
file.data = file.readAsString();
});

Expand All @@ -123,6 +123,9 @@ const ProcessMinerPage = ({projectName, getData, toasting }) => {
message : 'Miner output currently not captured',
files : relevant_files
});
console.log('simod_results/' + relevant_files.find(file => /.*best_result.*simulation_parameters\.json/.test(file.name))?.name)
setConfigFile('simod_results/' + relevant_files.find(file => /.*best_result.*simulation_parameters\.json/.test(file.name))?.name)
setBpmnFile('simod_results/' + relevant_files.find(file => /.*structure_trial.*\.bpmn/.test(file.name))?.name)
setFinished(true);
setStarted(false);
// Toasting a success message
Expand Down

0 comments on commit 4767d50

Please sign in to comment.