-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
257 lines (219 loc) · 12.4 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
<!doctype html>
<html lang="en">
<head>
<title>DFT Visualization</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico">
<script src="libs/jquery.min.js"></script>
<link rel="stylesheet" href="libs/jquery-ui.min.css">
<script src="libs/external/jquery/jquery.js"></script>
<script src="libs/jquery-ui.js"></script>
<script src="libs/cytoscape.min.js"></script>
<script src="libs/cytoscape-context-menus.js"></script>
<link href="libs/cytoscape-context-menus.css" rel="stylesheet" type="text/css" />
<script src="libs/cytoscape-edgehandles.js"></script>
<script src="libs/cytoscape-expand-collapse.js"></script>
<script src="libs/dagre.min.js"></script>
<script src="libs/cytoscape-dagre.js"></script>
<link rel="stylesheet" href="libs/jquery-ui.theme.css">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="infobox.css">
<body>
<div id="locate"></div>
<div id="title-bar">
<div id="option-icon"></div>
</div>
<div id="title-fill"></div>
<div id="option-bar">
<div id="tabs">
<ul>
<li><a href="#options">Options</a></li>
<li><a href="#add-Elements">Add Elements</a></li>
<li><a href="#add-Compounds">Add Compounds</a></li>
<li><a href="#search-option">Search</a></li>
</ul>
<div id="options">
<div id="load">
<fieldset id="load-field" class="option_tab">
<legend>Load from a file</legend>
<input type="file" id="input-file" />
<div id="load-graph"></div>
</fieldset>
</div>
<div id="save">
<fieldset id="save-field" class="option_tab">
<legend>Save to a file</legend>
<div id="export-image"></div>
<div id="save-graph"></div>
</fieldset>
</div>
<div id="lockElements">
<fieldset id="lock-field">
<legend>Lock/Unlock</legend>
<div id="lock">
</div>
</fieldset>
</div>
</div>
<div id="add-Elements">
<div id="static-elements">
<fieldset id="static-field">
<legend>Static Elements</legend>
<div id="static-container">
<div id="static-buttons">
<div id="be-button"></div>
<div id="and-button"></div>
<br>
<div id="or-button"></div>
<div id="vot-button"></div>
</div>
<div id="static-drags" title="Drag & Drop">
<div id="be-elem" class="drag-element, ui-widget-content" title="BE"></div>
<div id="and-elem" class="drag-element, ui-widget-content" title="AND"></div>
<div id="or-elem" class="drag-element, ui-widget-content" title="OR"></div>
<div id="vot-elem" class="drag-element, ui-widget-content" title="VOT"></div>
</div>
</div>
</fieldset>
</div>
<div id="dynamic-elements">
<fieldset id="dynamic-field">
<legend>Dynamic Elements</legend>
<div id="dynamic-buttons">
<div id="pand-button"></div>
<div id="por-button"></div>
<div id="fdep-button"></div>
<div id="pdep-button"></div>
<div id="spare-button"></div>
<div id="seq-button"></div>
</div>
<div id="dynamic-drags" title="Drag & Drop">
<div id="pand-elem" class="drag-element, ui-widget-content"></div>
<div id="por-elem" class="drag-element, ui-widget-content"></div>
<div id="fdep-elem" class="drag-element, ui-widget-content"></div>
<div id="pdep-elem" class="drag-element, ui-widget-content"></div>
<div id="spare-elem" class="drag-element, ui-widget-content"></div>
<div id="seq-elem" class="drag-element, ui-widget-content"></div>
</div>
</fieldset>
</div>
<div id="add-edges">
<fieldset id="edge-field">
<legend>Add Edges</legend>
<div id="edge-radio-div">
<label for="edge-radio">Add Edges</label>
<input type="checkbox" name="edge-radiobox" id="edge-radio">
</div>
<div id="edge-info">
Add edges by clicking on source and target node.
</div>
</fieldset>
</div>
</div>
<div id="add-Compounds">
<label id="mutex-button" for="mutex" class="infoLabel">mutex</label>
</div>
<div id="search-option">
<div id="search">
<input type="text" name="search" id="search-input" placeholder="Search for Name ">
<button type="button" id="searchForElement">Search</button>
<br>
<div id="searchError"></div>
</div>
</div>
</div>
</div>
<!-- Dialog for BE -->
<div class="nonVis switchHelp" id="dialog-be" title="Create new BE">
<fieldset>
<label class="no-float" for="name" id="be-label">Name</label>
<input title="Only latin letters and '_'." class="no-float" type="text" name="name" id="name-be" placeholder="name ..." pattern="^[a-zA-Z]\w*$|^$">
<label class="no-float" for="failure">Failure Rate</label>
<input title="Any number greater or equal 0. Use '.' for decimal numbers and use quotation marks to enter a parameter (e.g. 'p')." class="no-float" type="text" name="failure" id="failure" placeholder="rate ..." pattern="^'[a-zA-Z]+\w*'$|^\d*\.?\d*$|^$">
<label class="no-float" for="repair">Repair Rate</label>
<input title="Any number greater or equal 0. Use '.' for decimal numbers and use quotation marks to enter a parameter (e.g. 'p')." class="no-float" type="text" name="repair" id="repair" placeholder="rate ..." pattern="^'[a-zA-Z]+\w*'$|^\d*\.?\d*$|^$">
<label class="no-float" for="dormancy">Dormancy Factor</label>
<input title="Any number in [0,1]. Use '.' for decimal numbers and use quotation marks to enter a parameter (e.g. 'p')." class="no-float" type="text" name="dormancy" id="dormancy" placeholder="rate ..." pattern="^'[a-zA-Z]+\w*'$|^0?\.\d*$|^[01]$|^$|1\.0*">
<label class="error errorLabel"></label>
</fieldset>
</div>
<!-- Dialog for VOT Gate -->
<div class="nonVis switchHelp" id="dialog-vot" title="Create new VOT Gate">
<fieldset>
<label class="no-float" for="name" id="vot-label">Name</label>
<input title="Only latin letters and '_'." class="no-float" type="text" name="name" id="name-vot" placeholder="name ..." pattern="^[a-zA-Z]\w*$|^$">
<label class="no-float" for="threshold">Threshold</label>
<input title="Any natural number greater than 0." class="no-float" type="text" name="threshold" id="threshold" placeholder="value ..." pattern="^[1-9]+[0-9]*$|^[1-9]+\d*\.[0]*$|^$">
<label class="error errorLabel"></label>
<div title="switch" id="gateSwitch-vot" class="nonVis"></div>
</fieldset>
</div>
<!-- Dialog for PDEP Gate -->
<div class="nonVis switchHelp" id="dialog-pdep" title="Create new PDEP Gate">
<fieldset>
<label class="no-float" for="name" id="pdep-label">Name</label>
<input title="Only latin letters and '_'." class="no-float" type="text" name="name" id="name-pdep" placeholder="name ..." pattern="^[a-zA-Z]\w*$|^$">
<label class="no-float" for="probability-pdep">Probability</label>
<input title="Any natural number greater than 0." class="no-float" type="text" name="probability" id="probability-pdep" placeholder="value ..." pattern="^'[a-zA-Z]+\w*'$|^\d*\.?\d*$|^$">
<label class="error errorLabel"></label>
<div title="switch" id="gateSwitch-pdep" class="nonVis"></div>
</fieldset>
</div>
<!-- Dialog for other Gates -->
<div class="nonVis switchHelp" id="dialog-gate" title="Create new Gate">
<fieldset>
<label class="no-float" for="name" id="gate-label">Name</label>
<input title="Only latin letters and '_'." class="no-float" type="text" name="name" id="name-gate" placeholder="name ..." pattern="^[a-zA-Z]\w*$|^$">
<label class="error errorLabel"></label>
<div title="switch" id="gateSwitch-gate" class="nonVis"></div>
</fieldset>
</div>
<!-- Dialog for switching gate types -->
<div class="nonVis" id="dialog-switch" title="Switch gate type">
<fieldset id="switch-field">
<label class="no-float" for="type">Select type</label>
<select id="switch-type">
<option value="and" selected>AND</option>
<option value="or">OR</option>
<option value="vot">VOT</option>
<option value="pand">PAND</option>
<option value="por">POR</option>
<option value="pdep">PDEP</option>
</select>
</fieldset>
</div>
<div id="cy" class="not-Clicked"></div>
<div id="hover-div" class="nonVis">
<ul id="hover_names" class="name-links">
</ul>
</div>
<div id="box" title="Information" class="buttonpane">
<div id="pic"></div>
<div id="name-div"></div>
<div id="type-container" class="container">Type: <div id="type-info" class="information-Box"></div></div>
<div id="id-container" class="container">ID: <div id="element-id" class="information-Box"></div></div>
<div id="fail-container" class="container">Failure Rate: <div id="failure-rate" class="information-Box"></div></div>
<div id="repair-container" class="container">Repair Rate: <div id="repair-rate" class="information-Box"></div></div>
<div id="dorm-container" class="container">Dormancy: <div id="dorm-rate" class="information-Box"></div></div>
<div id="threshold-container" class="container">Threshold: <div id="threshold-value" class="information-Box"></div></div>
<div id="probability-container" class="container">Probability: <div id="probability-value" class="information-Box"></div></div>
<div id="repairable-container" class="container">Repairable: <div id="repairable-bool" class="information-Box"></div></div>
<div id="children-container" class="container">Children: <div id="childrens-count" class="information-Box"></div></div>
<div id="parent-container" class="container">Parents: <div id="parents-count" class="information-Box"></div></div>
</div>
<div id="scroll-menu" title="Change element">
<div id="scroll-type">Children</div>
<div id="select-menu" class="custom-select">
</div>
<button id="switch-button">Switch</button>
</div>
<script src="dft-logic.js"></script>
<script src="dft-visualization.js"></script>
<script src="ui.js"></script>
<script src="compounds.js"></script>
<script src="gateSwitch.js"></script>
<script src="copy.js"></script>
<script src="infobox.js"></script>
</body>
</html>