forked from RamonGiovane/guiptables
-
Notifications
You must be signed in to change notification settings - Fork 0
/
modals.html
282 lines (214 loc) · 9.82 KB
/
modals.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
<!-- Config Modal -->
<div id="configModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="configModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">× </button>
<h4>Settings</h4>
</div>
<div class="modal-body">
<span class="custom-switch">
<label for="config-autosave-check">Autosave when add rule: </label>
<input class="form-check-input" type="checkbox" value="" id="config-autosave-check">
</span>
<div>
<label for="config-save-path">Save path: </label>
<input id="config-save-path" class="form-input" type="text">
<button id="config-save-button" type="button" data-dismiss="modal"
class="btn btn-primary">Save current state</button>
<button id="config-load-button" type="button" data-dismiss="modal"
class="btn btn-primary">Load from this</button>
</div>
<div>
<label for="config-log-path">Log path: </label>
<input id="config-log-path" class="form-input" type="text">
</div>
</div>
<div class="modal-footer">
<div id="info">More info at: <a href="https://github.com/RamonGiovane/guiptables">https://github.com/RamonGiovane/guiptables</a></div>
<button id="config-confirm-button" type="button" data-dismiss="modal"
class="btn btn-primary">Save</button>
</div>
</div>
</div>
</div>
<!-- Danger Modal -->
<div id="dangerModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dangerModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">× </button>
<h4 id="danger-modal-title">Delete rule</h4>
</div>
<div class="modal-body">
<strong>Are you sure?</strong> This action cannot be undone.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button id="danger-confirm-button" type="button" data-dismiss="modal"
class="btn btn-danger">Confirm</button>
</div>
</div>
</div>
</div>
<!-- Log Modal -->
<div id="logModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="logModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">× </button>
<h4 id="log-modal-title">Logs</h4>
</div>
<div class="modal-body overflow-auto">
<ul class="list-group" id="log-list">
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Error Modal -->
<div id="errorModal" class="modal fade" data-backdrop="static" tabindex="-1" role="dialog"
aria-labelledby="errorModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4>
<i class="fa fa-times-circle"></i>
<span id="error-modal-title">
Error
</span>
</h4>
</div>
<div id="error-modal-message" class="modal-body">
<strong>Something went wrong</strong>
</div>
</div>
</div>
</div>
<!-- Load Modal -->
<div id="loadModal" class="modal fade" data-backdrop="static" tabindex="-1" role="dialog"
aria-labelledby="loadModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4>
<i class="fa fa-check"></i>
<span id="load-modal-title">
Load successful
</span>
</h4>
</div>
<div id="load-modal-message" class="modal-body">
<strong>Something went well</strong>
</div>
</div>
</div>
</div>
<!-- Installation Modal -->
<div id="installModal" class="modal fade" data-backdrop="static" tabindex="-1" role="dialog"
aria-labelledby="installModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4>
<i class="fa fa-exclamation-circle"></i>
<span id="install-modal-title">
Iptables is not installed
</span>
</h4>
</div>
<div id="error-modal-message" class="modal-body">
Hi! We need Iptables service installed and running in order to proceed.
Would you like to <strong>install</strong> the Iptables service now?
Please, click on the button below and we will get this done for you!
</div>
<div class="modal-footer">
<button id="install-modal-button" class="btn">
<i class="fa fa-exclamation-triangle"></i>
Yes, install Iptables now
</button>
<i id="install-status-icon"></i>
<label id="install-status"></label>
<label id="install-error"></label>
</div>
</div>
</div>
</div>
<!-- Rules Modal -->
<div id="ruleModal" class="modal fade" tabindex="0" role="dialog" aria-labelledby="ruleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">× </button>
<h3 id="rule-modal-title">Insert new rule</h3>
</div>
<div>
<span id="badge-table" class="badge bg-primary">Table: Filter</span>
<span id="badge-chain" class="badge bg-warning">Chain: FORWARD</span>
</div>
<hr>
<div>
<div>
<input class="form-check-input" type="checkbox" value="" id="input-interface-rule-check">
<label for="input-interface-rule-menu">Input</label>
<select id="input-interface-rule-menu" class="ct-select">
<option value="lo">lo</option>
</select>
<input class="form-check-input" type="checkbox" value="" id="output-interface-rule-check">
<label for="output-interface-rule-menu">Output</label>
<select id="output-interface-rule-menu" class="ct-select">
<option value="lo">lo</option>
</select>
</div>
</div>
<hr>
<div>
<input class="form-check-input" type="checkbox" value="" id="protocol-rule-check">
<label for="protocol-rule-menu">Protocol:</label>
<select id="protocol-rule-menu" class="ct-select">
<option value="">all (default)</option>
<option value="tcp">tcp</option>
<option value="udp">udp</option>
<option value="icmp">icmp</option>
</select>
<label for="protocol-rule-opts-text">Options:</label>
<input class="form-check-input" type="text" placeholder="--dport 80" id="protocol-rule-opts-text">
</div>
<hr>
<div>
<input class="form-check-input" type="checkbox" value="" id="source-rule-check">
<label for="source-rule-text">Source:</label>
<input class="form-check-input" type="text" placeholder="127.0.0.1" id="source-rule-text">
<br>
<input class="form-check-input" type="checkbox" value="" id="destination-rule-check">
<label for="destination-rule-text">Destination:</label>
<input class="form-check-input" type="text" placeholder="192.168.0.1" id="destination-rule-text">
</div>
<hr>
<div>
<input class="form-check-input" type="checkbox" value="" id="job-rule-check">
<label for="job-rule-menu">Action:</label>
<select id="job-rule-menu" class="ct-select">
<option value="ACCEPT">ACCEPT</option>
<option value="DROP">DROP</option>
<option value="REJECT">REJECT</option>
<option value="LOG">LOG</option>
<option value="MASQUERADE">MASQUERADE</option>
</select>
</div>
<hr>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button id="rule-confirm-button" type="button" data-dismiss="modal"
class="pf-c-button pf-m-primary">Apply
</button>
</div>
</div>
</div>
</div>