Skip to content

refactor step 2 of scenario creation#337

Merged
stefansc1 merged 8 commits intomainfrom
refactor/scenario_step2
Jul 2, 2025
Merged

refactor step 2 of scenario creation#337
stefansc1 merged 8 commits intomainfrom
refactor/scenario_step2

Conversation

@stefansc1
Copy link
Copy Markdown

  • change ajax calls to fetch
  • fix POST body in GET request
  • fix HTML replacement for invalid forms
  • alert on errors that do not update HTML (e.g. server not reachable)
  • fix doubleclick error on empty space in editor (closestNode not set)
  • delete static_src files
  • better indentation for scenario_step2.html
  • changed some sweet alert promises to standard confirm/alert boxes
  • add check for empty model and missing nodesToDB entries
  • make grid_model_topology file conform to jshint

- fix doubleclick error on empty space (closestNode not set)
- change ajax calls to fetch
- fix POST body in GET request
- fix HTML replacement for invalid forms
- alert on errors that do not update HTML (e.g. server not reachable)
- delete static_src files
- better indentation for scenario_step2.html
- changed some sweet alert promises to standard confirm/alert boxes
- add check for empty model and missing nodesToDB entries
- make grid_model_topology file conform to jshint
@stefansc1 stefansc1 requested a review from Bachibouzouk June 19, 2025 12:42
stefan.schirmeister and others added 4 commits June 19, 2025 14:59
- fix doubleclick error on empty space (closestNode not set)
- change ajax calls to fetch
- fix POST body in GET request
- fix HTML replacement for invalid forms
- alert on errors that do not update HTML (e.g. server not reachable)
- delete static_src files
- better indentation for scenario_step2.html
- changed some sweet alert promises to standard confirm/alert boxes
- add check for empty model and missing nodesToDB entries
- make grid_model_topology file conform to jshint
@Bachibouzouk Bachibouzouk force-pushed the refactor/scenario_step2 branch from c707c90 to a16e83c Compare June 23, 2025 20:32
}
// Check for nodes to in nodesToDB
// A missing entry usually stems from missing values and blocks creation of drawflowData
const nodesNotInDB = node_list.filter(node => !nodesToDB.has('node-'+node.id));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the nodes' form save without error, then the component should simply be saved and only the one with missing parameters should appear on this list (ie a DSO should be able to be dragged and saved via the next or the save button). With the current implementation the user must click through all components and save them individually

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nodes are now saved when added to editor (after drag-and-drop). It populates the modal (same as with double-click) and submits form. On success, node information is saved, allowing for model save or hitting "Next" without having to go into every single node. On error, modal opens with failed fields highlighted.

@stefansc1 stefansc1 merged commit b043bfb into main Jul 2, 2025
4 checks passed
@Bachibouzouk Bachibouzouk deleted the refactor/scenario_step2 branch July 2, 2025 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants