-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
304 lines (282 loc) · 19.9 KB
/
index.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- favicon: -->
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicons/favicon-16x16.png">
<link rel="manifest" href="favicons/manifest.json">
<link rel="mask-icon" href="favicons/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="favicons/favicon.ico">
<meta name="msapplication-config" content="favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link type="text/css" rel="stylesheet" href="styles/webACS.css">
<title>AsTeRICS Configuration Suite</title>
<!-- external libraries: -->
<script type="text/javascript" language="javascript" src="lib/jquery-1.11.1.min.js"></script>
<script type="text/javascript" language="javascript" src="lib/jquery-ui-1.11.4.custom/jquery-ui.min.js"></script>
<link type="text/css" rel="stylesheet" href="lib/jquery-ui-1.11.4.custom/jquery-ui.min.css">
<script type="text/javascript" language="javascript" src="lib/loglevel.min.js"></script>
<script type="text/javascript" language="javascript" src="lib/kinetic-v5.1.0.min.js"></script>
<script type="text/javascript" language="javascript" src="lib/FileSaver/FileSaver.min.js"></script>
<script type="text/javascript" language="javascript" src="lib/Blob/Blob.js"></script>
<script type="text/javascript" language="javascript" src="lib/rest_library/JSmap.js"></script>
<script type="text/javascript" language="javascript" src="lib/rest_library/areCommunicator.js"></script>
<!-- namespace, constants: -->
<script type="text/javascript" language="javascript" src="acsNamespace.js"></script>
<script type="text/javascript" language="javascript" src="view/vConst.js"></script>
<!-- misc: -->
<script type="text/javascript" language="javascript" src="eventManager.js"></script>
<!-- model: -->
<script type="text/javascript" language="javascript" src="model/utils.js"></script>
<script type="text/javascript" language="javascript" src="model/mConst.js"></script>
<script type="text/javascript" language="javascript" src="model/clipBoard.js"></script>
<script type="text/javascript" language="javascript" src="model/action.js"></script>
<script type="text/javascript" language="javascript" src="model/addEventChannelAction.js"></script>
<script type="text/javascript" language="javascript" src="model/addDataChannelAction.js"></script>
<script type="text/javascript" language="javascript" src="model/addComponentAction.js"></script>
<script type="text/javascript" language="javascript" src="model/addItemsAction.js"></script>
<script type="text/javascript" language="javascript" src="model/removeItemListAction.js"></script>
<script type="text/javascript" language="javascript" src="model/dragDropAction.js"></script>
<script type="text/javascript" language="javascript" src="model/guiDragDropAction.js"></script>
<script type="text/javascript" language="javascript" src="model/guiResizeAction.js"></script>
<script type="text/javascript" language="javascript" src="model/property.js"></script>
<script type="text/javascript" language="javascript" src="model/channel.js"></script>
<script type="text/javascript" language="javascript" src="model/dataChannel.js"></script>
<script type="text/javascript" language="javascript" src="model/eventChannel.js"></script>
<script type="text/javascript" language="javascript" src="model/port.js"></script>
<script type="text/javascript" language="javascript" src="model/event.js"></script>
<script type="text/javascript" language="javascript" src="model/gui.js"></script>
<script type="text/javascript" language="javascript" src="model/modelGui.js"></script>
<script type="text/javascript" language="javascript" src="model/metaData.js"></script>
<script type="text/javascript" language="javascript" src="model/visualAreaMarker.js"></script>
<script type="text/javascript" language="javascript" src="model/component.js"></script>
<script type="text/javascript" language="javascript" src="model/groupComponent.js"></script>
<script type="text/javascript" language="javascript" src="model/model.js"></script>
<script type="text/javascript" language="javascript" src="model/modelList.js"></script>
<script type="text/javascript" language="javascript" src="model/areStatus.js"></script>
<!-- view: -->
<script type="text/javascript" language="javascript" src="view/view.js"></script>
<script type="text/javascript" language="javascript" src="view/tabPanel.js"></script>
<script type="text/javascript" language="javascript" src="view/visualAreaMarkerView.js"></script>
<script type="text/javascript" language="javascript" src="view/componentView.js"></script>
<script type="text/javascript" language="javascript" src="view/groupComponentView.js"></script>
<script type="text/javascript" language="javascript" src="view/guiViewElement.js"></script>
<script type="text/javascript" language="javascript" src="view/guiView.js"></script>
<script type="text/javascript" language="javascript" src="view/channelView.js"></script>
<script type="text/javascript" language="javascript" src="view/eventChannelView.js"></script>
<script type="text/javascript" language="javascript" src="view/dataChannelView.js"></script>
<script type="text/javascript" language="javascript" src="view/modelView.js"></script>
<script type="text/javascript" language="javascript" src="view/menuView.js"></script>
<script type="text/javascript" language="javascript" src="view/canvasView.js"></script>
<script type="text/javascript" language="javascript" src="view/propertyEditor.js"></script>
<script type="text/javascript" language="javascript" src="view/editorProperties.js"></script>
<script type="text/javascript" language="javascript" src="view/listComponentView.js"></script>
<script type="text/javascript" language="javascript" src="view/listView.js"></script>
<!-- main script: -->
<script type="text/javascript" language="javascript" src="webACS.js"></script>
</head>
<body>
<nav>
<!-- ****************************************************** keyboard shortcuts *********************************************************** -->
<div id="pageAreas">
<div id="pageAreasHeader">Shortcuts:</div>
<ul>
<li id="AKmenu" tabindex="0">menu: CTRL-0</li>
<li id="AKactModelPanel" tabindex="0">model panel: CTRL-1</li>
<li id="AKmodelDesigner" tabindex="0">model designer: CTRL-2</li>
<li id="AKguiDesigner" tabindex="0">gui designer: CTRL-3</li>
<li id="AKlistView" tabindex="0">list view: CTRL-4</li>
<li id="AKPropertyEditor" tabindex="0">property editor: CTRL-5</li>
</ul>
</div>
<!-- ****************************************************** menu panel *********************************************************** -->
<div id="menuPanel">
<h1 class="menu_header">AsTeRICS Configuration Suite</h1>
<div id="mainMenuPanel" class="tabpanel" role="menu">
<ul id="mainMenuTablist" class="tablist" role="tablist">
<li id="tab1" class="tab menuTab" aria-controls="panel1" aria-selected="true" role="tab" tabindex="0">System</li>
<li id="tab2" class="tab menuTab" aria-controls="panel2" role="tab" aria-selected="false" tabindex="-1">Components</li>
<li id="tab3" class="tab menuTab" aria-controls="panel3" role="tab" aria-selected="false" tabindex="-1">Edit</li>
<li id="tab4" class="tab menuTab" aria-controls="panel4" role="tab" aria-selected="false" tabindex="-1">Misc.</li>
</ul>
<div id="panel1" class="panel menuPanel" aria-labelledby="tab1" role="tabpanel">
<section class="buttonGroup">
<h2>ARE</h2>
<ul class="buttonList">
<li><button type="button" class="menuButton" id="connectAREBtn"><div class="buttonContents"><img src="view/images/connect.png" alt="Connect to ARE" />Connect<br />to ARE</div></button></li>
<li><button type="button" class="menuButton" id="disconnectAREBtn" disabled><div class="buttonContents"><img src="view/images/disconnect.png" alt="Disconnect from ARE" />Disconnect<br />from ARE</div></button></li>
<li id="uploadModelBtnContainer"><button type="button" class="menuButton" id="uploadModelBtn" disabled><div class="buttonContents"><img src="view/images/Upload.png" alt="Upload model" />Upload<br />Model</div></button></li>
<li id="testModelBtnContainer" style="display: none"><button type="button" class="menuButton" id="testModelBtn" disabled><div class="buttonContents"><img src="view/images/Upload.png" alt="Test model" />Test<br />Model</div></button></li>
<li><button type="button" class="menuButton" id="downloadModelBtn" disabled><div class="buttonContents"><img src="view/images/Download.png" alt="Download model" />Download<br />Model</div></button></li>
<li><button type="button" class="menuButton" id="downloadCompCollBtn" disabled><div class="buttonContents"><img src="view/images/DownloadBundle.png" alt="Download component collection" />Download<br />Component Collection</div></button></li>
</ul>
</section>
<section class="buttonGroup">
<h2>ARE Storage</h2>
<ul class="buttonList">
<li><button type="button" class="menuButton" id="storeModelAREBtn" disabled><div class="buttonContents"><img src="view/images/storeup.png" alt="Store model on ARE" />Store<br />Model on ARE</div></button></li>
<li><button type="button" class="menuButton" id="loadModelAREBtn" disabled><div class="buttonContents"><img src="view/images/storedown.png" alt="Load model from storage" />Load Model<br />from Storage</div></button></li>
<li><button type="button" class="menuButton" id="activateStoredModelBtn" disabled><div class="buttonContents"><img src="view/images/storerun.png" alt="Activate a stored model" />Activate a<br />Stored Model</div></button></li>
<li><button type="button" class="menuButton" id="deleteStoredModelBtn" disabled><div class="buttonContents"><img src="view/images/storedelete.png" alt="Delete a stored model" />Delete a<br />Stored Model</div></button></li>
<li><button type="button" class="menuButton" id="setAsAutorunBtn" disabled><div class="buttonContents"><img src="view/images/autorun.png" alt="Set as autorun" />Set as<br />Autorun</div></button></li>
</ul>
</section>
<section class="buttonGroup">
<h2>Model</h2>
<ul class="buttonList">
<li><button type="button" class="menuButton" id="startModelBtn" disabled><div class="buttonContents"><img src="view/images/StartModel.png" alt="Start model" />Start<br />Model</div></button></li>
<li id="pauseModelBtnContainer"><button type="button" class="menuButton" id="pauseModelBtn" disabled><div class="buttonContents"><img src="view/images/PauseModel.png" alt="Pause model" />Pause<br />Model</div></button></li>
<li id="stopModelBtnContainer"><button type="button" class="menuButton" id="stopModelBtn" disabled><div class="buttonContents"><img src="view/images/StopModel.png" alt="Stop model" />Stop<br />Model</div></button></li>
</ul>
</section>
<section class="buttonGroup bg_right">
<h2>Local</h2>
<ul class="buttonList">
<li><button type="button" class="menuButton" id="newModelBtn"><div class="buttonContents"><img src="view/images/new.png" alt="New model" />New<br />Model</div></button></li>
<li><button type="button" class="menuButton" id="openModelBtn"><div class="buttonContents"><img src="view/images/open.png" alt="Open model" />Open<br />Model</div></button></li>
<li><button type="button" class="menuButton" id="closeModelBtn"><div class="buttonContents"><img src="view/images/close.png" alt="Close model" />Close<br />Model</div></button></li>
<li><button type="button" class="menuButton" id="saveModelBtn"><div class="buttonContents"><img src="view/images/save.png" alt="Save model" />Save<br />Model</div></button></li>
</ul>
</section>
</div>
<div id="panel2" class="panel menuPanel" aria-labelledby="tab2" role="tabpanel">
<section class="buttonGroup">
<h2>Components</h2>
<ul class="buttonList componentsMenu">
<li class="componentsMenu-item"><img src="view/images/sensor.png" alt="Sensors" />Sensors<ul id="sensorsBtnList" class="compMenuL1 compMenu hiddenMenu"></ul></li>
<li class="componentsMenu-item"><img src="view/images/processor.png" alt="Open model" />Processors<ul id="processorsBtnList" class="compMenuL1 compMenu hiddenMenu"></ul></li>
<li class="componentsMenu-item"><img src="view/images/actuator.png" alt="Save model" />Actuators<ul id="actuatorsBtnList" class="compMenuL1 compMenu hiddenMenu"></ul></li>
</ul>
</section>
<section class="buttonGroup bg_right">
<label for="quickselect">Quickselect</label>
<input id="quickselect" list="componentsDataList">
<datalist id="componentsDataList">
</datalist>
<input id="insertButton" type="button" value="Insert"></input>
</section>
</div>
<div id="panel3" class="panel menuPanel" aria-labelledby="tab3" role="tabpanel">
<section class="buttonGroup">
<h2>Model Properties</h2>
<ul class="buttonList">
<li><button type="button" class="menuButton" id="editModelIDBtn" disabled><div class="buttonContents"><img src="view/images/editModelName.png" alt="Edit Model ID" />Edit<br />Model ID</div></button></li>
<li><button type="button" class="menuButton" id="showModelDescBtn" disabled><div class="buttonContents"><img src="view/images/editModelDescription.png" alt="Edit Model Description" />Show Model<br />Description</div></button></li>
</ul>
</section>
<section class="buttonGroup bg_right">
<h2>Edit</h2>
<ul class="buttonList">
<li><button type="button" class="menuButton" id="cutBtn"><div class="buttonContents"><img src="view/images/cut.png" alt="Cut" />Cut</div></button></li>
<li><button type="button" class="menuButton" id="copyBtn"><div class="buttonContents"><img src="view/images/copy.png" alt="Copy" />Copy</div></button></li>
<li><button type="button" class="menuButton" id="pasteBtn"><div class="buttonContents"><img src="view/images/paste.png" alt="Paste" />Paste</div></button></li>
<li><button type="button" class="menuButton" id="deleteSelectionBtn"><div class="buttonContents"><img src="view/images/delete.png" alt="Delete Selection" />Delete<br />Selection</div></button></li>
<li><button type="button" class="menuButton" id="undoBtn"><div class="buttonContents"><img src="view/images/undo.png" alt="Undo" />Undo</div></button></li>
<li><button type="button" class="menuButton" id="redoBtn"><div class="buttonContents"><img src="view/images/redo.png" alt="Redo" />Redo</div></button></li>
</ul>
</section>
</div>
<div id="panel4" class="panel menuPanel" aria-labelledby="tab4" role="tabpanel">
<section class="buttonGroup bg_right">
<h2>Miscellaneous</h2>
<ul class="buttonList">
<li><button type="button" class="menuButton" id="componentCollMgrBtn" disabled><div class="buttonContents"><img src="view/images/ConfigureBundle.png" alt="Component Collection Manager" />Component<br />Collection Manager</div></button></li>
<li><button type="button" class="menuButton" id="optionsBtn" disabled><div class="buttonContents"><img src="view/images/Options.png" alt="Options" />Options</div></button></li>
<li><button type="button" class="menuButton" id="printBtn" disabled><div class="buttonContents"><img src="view/images/Printer.png" alt="Print" />Print</div></button></li>
<li><button type="button" class="menuButton" id="helpBtn" title="Help (F1)"><div class="buttonContents"><img src="view/images/Question.png" alt="Help (F1)" />Help</div></button></li>
<li><button type="button" class="menuButton" id="aboutBtn"><div class="buttonContents"><img src="view/images/about.png" alt="About" />About</div></button></li>
<li style="margin-left: 1em">
<div>
<input type="checkbox" id="checkboxEnableTestMode" style="top: 0"/>
<label for="checkboxEnableTestMode" style="display: inline; color: black">Enable test-auto-revert mode</label>
</div>
<div>
<label for="inputTestModeTime" style="display: inline; color: black">Test mode timeout (s)</label>
<input type="number" id="inputTestModeTime" style="top: 0" min="1" value="30"/>
</div>
<div>
<label for="inputTestModeFontsize" style="display: inline; color: black">Test mode button fontsize (px)</label>
<input type="number" id="inputTestModeFontsize" style="top: 0" min="1" value="13"/>
</div>
</li>
</ul>
</section>
</div>
</div>
</div>
</nav>
<!-- ****************************************************** canvas panel *************************************************************** -->
<section id="canvasMotherPanel" class="tabpanel" role="tabpanel">
<ul id="canvasPanelTabList" class="tablist" role="tablist">
</ul>
</section>
<!-- ****************************************************** property editor panel ****************************************************** -->
<section id="propertyEditorMotherPanel">
<ul id="propertyEditorTabList" class="tablist" role="tablist">
</ul>
</section>
<!-- ****************************************************** status and zoom bar ******************************************************** -->
<footer id="statusAndZoomBar">
<div id="statusBar">
<span class="bold">ARE status: </span>
<span id="AREstatus">Disconnected</span>
<span id="synchronisationStatus"></span>
<span id="testStatus">
<span id="testStatusText"></span>
<button id="btnTestStatusAdd" style="display: none">+30s</button>
<button id="btnTestStatusCancel" style="display: none">revert model</button>
<button id="btnTestStatusApprove" style="display: none">approve model</button>
</span>
</div>
<div id="zoomBar">
<span id="zoomPercent">100%</span>
<input type="range" name="zoomSlider" id="zoomSlider" min="20" max="200" />
</div>
</footer>
<!-- ****************************************************** dialog boxes *************************************************************** -->
<div id="loadModelFromStorageDialog" class="displayNone" title="Load Model from ARE Storage">
<select name="files" id="loadModelFromStorageSelector">
<option value="none">--- please choose file ---</option>
</select>
</div>
<div id="storeModelOnAREDialog" class="displayNone" title="Store Model on ARE">
<input type="text" id="storeModelFilename"></input>
</div>
<div id="activateStoredModelDialog" class="displayNone" title="Activate Stored Model">
<select name="files" id="activateStoredModelSelector">
<option value="none">--- please choose file ---</option>
</select>
</div>
<div id="deleteStoredModelDialog" class="displayNone" title="Delete Stored Model">
<select name="files" id="deleteStoredModelSelector">
<option value="none">--- please choose file ---</option>
</select>
</div>
<!-- ****************************************************** main script **************************************************************** -->
<script>
//in case of https, redirect to http as a workaround for this firefox bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1376310).
console.log("protocol: "+window.location.protocol);
/*
if(window.location.protocol == "https:") {
var newURL="http://"+window.location.host+window.location.pathname+window.location.search;
if(window.location.hostname=="localhost" || window.location.hostname=="127.0.0.1"||window.location.hostname=="::1") {
var newURL="http://"+window.location.hostname+":8081"+window.location.pathname+window.location.search;
}
console.log("Redirecting from "+window.location.href+"to "+newURL);
window.location.replace(newURL);
} else {
console.log("no redirection necessary")
}
*/
var theWebACS = ACS.webACS();
</script>
<noscript>
<div>
Your web browser must have JavaScript enabled
in order for this application to display correctly.
</div>
</noscript>
</body>
</html>