forked from opencor/libopencor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
183 lines (162 loc) · 6.15 KB
/
index.html
File metadata and controls
183 lines (162 loc) · 6.15 KB
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
<!DOCTYPE html>
<html>
<head>
<title>libOpenCOR - JavaScript bindings</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" rel="stylesheet" />
<link href="res/font-awesome/css/all.min.css" rel="stylesheet" />
<link href="res/libopencor.css" rel="stylesheet" />
</head>
<body data-bs-theme="dark">
<nav class="navbar bg-dark border-bottom border-bottom-dark navbar-expand-lg bg-body-tertiary" data-bs-theme="dark">
<div class="container-fluid">
<div class="navbar-brand">libOpenCOR</div>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="#" id="navHome">Home</a></li>
<li class="nav-item"><a class="nav-link" href="#" id="navSimulation">Simulation</a></li>
<li class="nav-item"><a class="nav-link" href="#" id="navVersions">Versions</a></li>
</ul>
</div>
</div>
</nav>
<div class="p-2">
<div class="page" id="pageHome">
<p>Welcome to this test page for <a href="https://opencor.ws/libopencor">libOpenCOR</a>!</p>
</div>
<div class="page" id="pageSimulation">
<div class="drop-area" id="dropArea">
<input class="drop-area-input" id="dropAreaInput" type="file" />
<div class="drop-area-div">
<i class="far fa-images"></i>
<span>Choose a CellML / SED-ML file or a COMBINE archive,</span>
<span>or drag and drop such a file here.</span>
<p class="note">
<small>
<span class="bold">Note:</span>
only CellML files with no imports can (currently) be processed.
</small>
</p>
</div>
</div>
<button type="button" class="btn btn-secondary reset-button" id="reset"><i class="fa fa-recycle"></i></button>
<div class="file info" id="fileInfo">
<p class="info"><span class="bold" id="fileName"></span> is <span class="bold" id="fileType"></span>.</p>
</div>
<div class="file error last" id="fileIssues">
<p>
<ul id="issues" />
</p>
</div>
<div class="file info last row simulation" id="simulation">
<div id="plottingArea"></div>
<div class="mb-3">
<label>Ending point:</label>
<div class="input-group">
<input type="text" class="form-control" id="endingPoint" />
<span class="input-group-text" id="endingPointUnit"></span>
</div>
<label>Point interval:</label>
<div class="input-group">
<input type="text" class="form-control" id="pointInterval" />
<span class="input-group-text" id="pointIntervalUnit"></span>
</div>
<label>X:</label>
<div class="input-group">
<select class="form-select" id="xAxis"></select>
<span class="input-group-text" id="xAxisUnit"></span>
</div>
<label>Y:</label>
<div class="input-group">
<select class="form-select" id="yAxis"></select>
<span class="input-group-text" id="yAxisUnit"></span>
</div>
</div>
<div><button type="button" class="btn btn-secondary mb-3 run-button w-100" id="run">Run</button></div>
</div>
</div>
<div class="page" id="pageVersions">
<div class="row justify-content-center" style="width: 100%">
<div class="col-md-auto">
<table class="table table-bordered table-sm table-secondary table-striped">
<thead class="table-dark">
<tr>
<th>API</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Clang</td>
<td id="Clang"></td>
</tr>
<tr>
<td>libCellML</td>
<td id="libCellML"></td>
</tr>
<tr>
<td>libCOMBINE</td>
<td id="libCOMBINE"></td>
</tr>
<tr>
<td>libOpenCOR</td>
<td id="libOpenCOR"></td>
</tr>
<tr>
<td>libSEDML</td>
<td id="libSEDML"></td>
</tr>
<tr>
<td>LLVM</td>
<td id="LLVM"></td>
</tr>
<tr>
<td>SUNDIALS</td>
<td id="SUNDIALS"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@lightningchart/lcjs@4.2.2/dist/lcjs.iife.min.js"></script>
<script type="module">
import { reset, run, showPage, updatePlottingAreaAndAxesInfo } from './res/libopencor.js';
$('#navHome').on('click', function () {
showPage('Home');
});
$('#navSimulation').on('click', function () {
showPage('Simulation');
});
$('#navVersions').on('click', function () {
showPage('Versions');
});
$('#reset').on('click', function () {
reset();
});
$('#xAxis').on('change', function () {
updatePlottingAreaAndAxesInfo();
});
$('#yAxis').on('change', function () {
updatePlottingAreaAndAxesInfo();
});
$('#run').on('click', function () {
run();
});
</script>
</body>
</html>