Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Utilities
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UNICADO
Utilities
Commits
c516f74b
Commit
c516f74b
authored
1 year ago
by
Duc Bui Tien
Browse files
Options
Downloads
Patches
Plain Diff
implement save modul
parent
7f0b1a82
No related branches found
No related tags found
2 merge requests
!2
UnicadoGuiBackend
,
!1
New UnicadoGUI Branch
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/routes/model/+page.svelte
+15
-1
15 additions, 1 deletion
src/routes/model/+page.svelte
with
15 additions
and
1 deletion
src/routes/model/+page.svelte
+
15
−
1
View file @
c516f74b
...
...
@@ -38,6 +38,20 @@
const
res
=
fetch
(
"
http://127.0.0.1:8000/start/convergenceLoop
"
)
}
async
function
uploadModel
(){
const
response
=
await
fetch
(
'
http://127.0.0.1:8000/modules/update
'
,
{
method
:
'
PUT
'
,
body
:
JSON
.
stringify
({
SetupSteps
:
SetupSteps
,
StudyMission
:
StudySteps
,
SizingLoop
:
SizingSteps
,
PostprocessingSteps
:
PostprocessSteps
}),
headers
:
{
'
content-type
'
:
'
application/json
'
}
})
.
then
(
response
=>
response
.
json
())
}
function
dragStart
(
event
,
itemIndex
)
{
const
data
=
{
itemIndex
};
event
.
dataTransfer
.
setData
(
'
text/plain
'
,
JSON
.
stringify
(
data
));
...
...
@@ -75,7 +89,7 @@
<h2>
Simulationsmodel
</h2>
<ButtonGroup>
<Button
color=
"dark"
outline
on:click=
{
startModel
}
><Icon
name=
"play-fill"
/>
Start
</Button>
<Button
color=
"dark"
outline
><Icon
name=
"cloud-upload"
/>
Save
</Button>
<Button
color=
"dark"
outline
on:click=
{
uploadModel
}
><Icon
name=
"cloud-upload"
/>
Save
</Button>
<Button
color=
"dark"
outline
on:click=
{
loadModel
}
><Icon
name=
"cloud-download"
/>
Load
</Button>
</ButtonGroup>
<Row
class=
"py-3"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment