-
Notifications
You must be signed in to change notification settings - Fork 1
/
workflow_editor.html
139 lines (118 loc) · 6.57 KB
/
workflow_editor.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<html lang="en">
<head>
<title>Workflow Editor</title>
<link rel="stylesheet" href="./StyleBase.css">
<link rel="stylesheet" href="./StyleCommon.css">
<link rel="stylesheet" href="./StyleWE.css">
<link rel="stylesheet" href="./StyleWE_blocks.css">
<link rel="stylesheet" href="./StyleMyQuery.css">
<script type="text/javascript" src="src/Init.js"></script>
<script type="text/javascript">
const urlSearchParams = new URLSearchParams(window.location.search);
const params = Object.fromEntries(urlSearchParams.entries());
if('example_id' in params){
example_id = parseInt(params['example_id']);
}
</script>
<script type="text/javascript" src="src/myQuery.js"></script>
<script type="text/javascript" src="src/mupifData.js"></script>
<script type="text/javascript" src="src/helpers.js"></script>
<script type="text/javascript" src="src/Menu.js"></script>
<script type="text/javascript" src="src/Slot.js"></script>
<script type="text/javascript" src="src/Block.js"></script>
<script type="text/javascript" src="src/BlockWorkflow.js"></script>
<script type="text/javascript" src="src/BlockPhysicalQuantity.js"></script>
<script type="text/javascript" src="src/BlockProperty.js"></script>
<script type="text/javascript" src="src/BlockInputFile.js"></script>
<script type="text/javascript" src="src/BlockTimeloop.js"></script>
<script type="text/javascript" src="src/BlockDoWhile.js"></script>
<script type="text/javascript" src="src/BlockModel.js"></script>
<script type="text/javascript" src="src/BlockValueComparison.js"></script>
<script type="text/javascript" src="src/BlockPropertyToQuantity.js"></script>
<script type="text/javascript" src="src/BlockQuantityToProperty.js"></script>
<script type="text/javascript" src="src/BlockNumberToQuantity.js"></script>
<script type="text/javascript" src="src/BlockNumberToProperty.js"></script>
<script type="text/javascript" src="src/BlockDataListLength.js"></script>
<script type="text/javascript" src="src/BlockAllocateModelAtRuntime.js"></script>
<script type="text/javascript" src="src/BlockRunInBackground.js"></script>
<script type="text/javascript" src="src/BlockWaitForBackgroundProcesses.js"></script>
<script type="text/javascript" src="src/BlockVariable.js"></script>
<script type="text/javascript" src="src/BlockGetItemFromDataList.js"></script>
<script type="text/javascript" src="src/Datalink.js"></script>
<script type="text/javascript" src="src/WorkflowEditor.js"></script>
<script type="text/javascript" src="src/Main.js"></script>
</head>
<body onload="main(true)" oncontextmenu="return false;" onkeydown="keyPress(event);">
<div id="myQuery_container">
<div id="myQuery_curtain" onclick="myQuery_hide();"></div>
<div id="myQuery_input"></div>
</div>
<div id="mainpage_all">
<div class="vbox">
<div class="hbox gap20 justify_content_flex_start align_items_flex_start header">
<a href="./" class="cursor_pointer" target="_blank"><div class="mupif_logo_bgcolor"><img src="mupif-logo.png" class="mupif_logo"></div></a>
<h1>Workflow Editor and Code Generator</h1>
</div>
<div class="vbox">
<div class="hbox">
<div id="menu_new" class="vbox gap10">
<div></div>
<div class="vbox">
<div class="melem_separator">navigation:</div>
<div class="melem" id="nav_editor" onclick="focusOnEditor();">Editor</div>
<div class="melem" id="nav_settings" onclick="editor.selectSettingsAndUpdate();">Settings</div>
<div class="melem" id="nav_models" onclick="focusOnModelList();">Models</div>
</div>
<div></div>
<div class="vbox">
<div class="melem_separator">menu:</div>
<div class="melem">Project >
<div class="msubmenu">
<div class="melem" onclick="editor.menu_download_json();">Save to JSON</div>
<div class="melem" id="">
<form action="" method="post" enctype="multipart/form-data" style="margin:0;padding:0;" id="form_json_data">
<label for="form_json_file_selector" style="display:block;width:100%;height:100%;">
Load from JSON
<input type="file" id="form_json_file_selector" name="json_file" style="display:none;width:100px;" onchange="loadJsonProjectFileContent();">
</label>
<input type="hidden" value="Load from JSON" name="file_upload">
</form>
</div>
<div class="melem" onclick="editor.menu_download_exec_code();">Generate Python Execution code</div>
<div class="melem" onclick="editor.menu_download_class_code();">Generate Python Class code</div>
</div>
</div>
</div>
</div>
<div class="vbox contentView" id="contentView">
<div id="workflowContainer" onmousedown="anyClick(event, '');" onmouseup="editor.one_elem_check_disabling_propagation=false;">
<div id="workflowSubContainer">
</div>
</div>
<div id="projectSettingsContainer">
<div id="block_list_of_settings"></div>
</div>
<div id="modelListContainer">
<div id="block_list_of_models"></div>
</div>
</div>
<div class="side_space"></div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function reRender(){
editor.generateWorkflowHtml();
}
new ResizeObserver(reRender).observe(document.getElementById('workflowContainer'));
function windowResize(){
document.getElementById('contentView').style.height = (window.innerHeight-100).toString() + 'px';
}
addEventListener("resize", (event) => {
windowResize();
});
windowResize();
</script>
</body>
</html>