-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
440 lines (417 loc) · 25.2 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
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PoE Calculator</title>
<!-- Bootstrap stylesheet -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<!-- Shepherd guide files (Stylesheet + JavaScript) -->
<script src="https://cdn.jsdelivr.net/npm/shepherd.js@10.0.1/dist/js/shepherd.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/shepherd.js@10.0.1/dist/css/shepherd.css" />
<!-- Favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="Favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="Favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="Favicon/favicon-16x16.png">
<link rel="manifest" href="Favicon/site.webmanifest">
<!-- Local site styling -->
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Container for full body - we require this container, for the Shepherd guide to work, and highlight the data -->
<div class="containerall">
<!-- Start calculator explanation -->
<div class="container mt-5">
<div class="row">
<div class="col">
<h1>PoE Calculator</h1>
<div class="accordion accordion-flush" id="accordionFlushExample">
<!-- How to Use the PoE Calculator Section -->
<div class="accordion-item">
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#howToUseCollapse" aria-expanded="false"
aria-controls="howToUseCollapse">
How to Use the PoE Calculator
</button>
</h2>
<div id="howToUseCollapse" class="accordion-collapse collapse"
data-bs-parent="#accordionFlushExample">
<div class="accordion-body">
<ol>
<li>To get started, select a switch from the dropdown, or, select custom, and
fill in the Wattage in the newly available field.</li>
<li>Then, enter the number of devices for each PoE class in the respective input
fields.</li>
<li>The calculator will dynamically compute the leftover budget after
considering the power consumption of the devices.</li>
<li>You can view the PoE power allocation table to understand the power limits
</ol>
</div>
</div>
</div>
<!-- Who Made It Section -->
<div class="accordion-item">
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#whoMadeItCollapse" aria-expanded="false"
aria-controls="whoMadeItCollapse">
Who Made It
</button>
</h2>
<div id="whoMadeItCollapse" class="accordion-collapse collapse"
data-bs-parent="#accordionFlushExample">
<div class="accordion-body">
<p>Hi 👋👋, I'm Michael Dijk 🤓, an AV systems Engineer for <a
href="mailto:mdijk@netgear.com">NETGEAR</a>. Outside of work, I'm a
full-stack
developer
working on various small projects.</p>
</div>
</div>
</div>
<!-- PoE Power Allocation Table Section -->
<div class="accordion-item" id="allocationTable">
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#poeAllocationCollapse" aria-expanded="false"
aria-controls="poeAllocationCollapse">
PoE Power Allocation Table
</button>
</h2>
<div id="poeAllocationCollapse" class="accordion-collapse collapse"
data-bs-parent="#accordionFlushExample">
<div class="accordion-body">
<table class="table">
<thead>
<tr>
<th>Class</th>
<th>IEEE PoE Standard</th>
<th>PSE - Max Power Delivered (W)</th>
<th>PSE Voltage Range</th>
<th>PD - Power Available (W)</th>
<th>PD Voltage Range</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>IEEE 802.3af, PoE (2 pair)</td>
<td>15.4</td>
<td>44 – 57 V</td>
<td>12.95</td>
<td>37 – 57 V</td>
</tr>
<tr>
<td>1</td>
<td>IEEE 802.3af, PoE (2 pair)</td>
<td>4</td>
<td>44 – 57 V</td>
<td>3.84</td>
<td>37 – 57 V</td>
</tr>
<tr>
<td>2</td>
<td>IEEE 802.3af, PoE (2 pair)</td>
<td>7</td>
<td>44 – 57 V</td>
<td>6.49</td>
<td>37 – 57 V</td>
</tr>
<tr>
<td>3</td>
<td>IEEE 802.3af, PoE (2 pair)</td>
<td>15.4</td>
<td>44 – 57 V</td>
<td>12.95</td>
<td>37 – 57 V</td>
</tr>
<tr>
<td>4</td>
<td>IEEE 802.3at, PoE+ (2 pair)</td>
<td>30</td>
<td>50 – 57 V</td>
<td>25.5</td>
<td>42 – 57 V</td>
</tr>
<tr>
<td>5</td>
<td>IEEE 802.3bt, Type 3 (4 pair)</td>
<td>45</td>
<td>50 – 57 V</td>
<td>40</td>
<td>42 – 57 V</td>
</tr>
<tr>
<td>6</td>
<td>IEEE 802.3bt, Type 3 (4 pair)</td>
<td>60</td>
<td>50 – 57 V</td>
<td>51</td>
<td>42 – 57 V</td>
</tr>
<tr>
<td>7</td>
<td>IEEE 802.3bt, Type 4 (4 pair)</td>
<td>75</td>
<td>52 – 57 V</td>
<td>62</td>
<td>51 – 57 V</td>
</tr>
<tr>
<td>8</td>
<td>IEEE 802.3bt, Type 4 (4 pair)</td>
<td>90</td>
<td>52 – 57 V</td>
<td>73</td>
<td>51 – 57 V</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Power Management Modes Section -->
<div class="accordion-item" id="powerManagementMode">
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#powerManagementCollapse" aria-expanded="false"
aria-controls="powerManagementCollapse">
Power Management Modes
</button>
</h2>
<div id="powerManagementCollapse" class="accordion-collapse collapse"
data-bs-parent="#accordionFlushExample">
<div class="accordion-body">
<table class="table">
<thead>
<tr>
<th>Mode</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Static Mode</td>
<td>The power deducted from the total available PoE is the maximum power
for
that
interface, based on the PoE class specified by the device, or, when
specified in
the Power Limit configuration, under PoE Port Configuration. Using
this
mode
ensures that the maximum power specified by you, or, class, for the
interface is
always reserved and cannot be shared by other PDs.</td>
</tr>
<tr>
<td>Dynamic Mode</td>
<td>The power deducted from the total available PoE for each port is the
actual
power consumed by that given port. You can allocate any unused
portion
of power
to the other PDs. By default, this is the mode that the switch is
configured in.
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Feature request Section -->
<div class="accordion-item" id="featureRequest">
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#featureRequestCollapse" aria-expanded="false"
aria-controls="featureRequestCollapse">
How to log a feature request?
</button>
</h2>
<div id="featureRequestCollapse" class="accordion-collapse collapse"
data-bs-parent="#accordionFlushExample">
<div class="accordion-body">
<p>If you have a feature request or an idea to improve our PoE calculator, we
encourage you to log it on our GitHub page. Please navigate to our <a
href="https://github.com/MichaelDNTGR/PoE-calculator/issues" target="_blank"
rel="noopener noreferrer">GitHub Issues</a> section and click on the "New
Issue" button. From there, select the "Feature Request" template and provide as
much detail as possible about your suggestion. I regularly review these requests
and appreciates your valuable input!</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End calculator explanation -->
<!-- Start calculator itself -->
<section class="container mt-5">
<div class="form-group row">
<label for="switchSelection" class="col-sm-6 col-form-label">Select a NETGEAR switch</label>
<div class="col-sm-6">
<select class="form-select" id="switchSelection" onchange="switchChanged()">
<option value="default" selected disabled>Select a NETGEAR switch</option>
<option value="M4250-10G2F-PoE+ (125W)">M4250-10G2F-PoE+ (125W)</option>
<option value="M4250-10G2XF-PoE+ (240W)">M4250-10G2XF-PoE+ (240W)</option>
<option value="M4250-10G2XF-PoE++ (720W)">M4250-10G2XF-PoE++ (720W)</option>
<option value="M4250-26G4F-PoE+ (300W)">M4250-26G4F-PoE+ (300W)</option>
<option value="M4250-26G4F-PoE++ (1440W)">M4250-26G4F-PoE++ (1440W) Two PSU</option>
<option value="M4250-26G4F-PoE++ (720W)">M4250-26G4F-PoE+ (720W) One PSU</option>
<option value="M4250-26G4XF-PoE+ (480W)">M4250-26G4XF-PoE+ (480W)</option>
<option value="M4250-40G8F-PoE+ (480W)">M4250-26G4XF-PoE+ (480W)</option>
<option value="M4250-40G8XF-PoE+ (960W)">M4250-40G8XF-PoE+ (960W)</option>
<option value="M4250-40G8XF-PoE++ (2880W)">M4250-40G8XF-PoE++ (2880W) Three PSU</option>
<option value="M4250-40G8XF-PoE++ (1650W)">M4250-40G8XF-PoE++ (1650W) Two PSU</option>
<option value="M4250-40G8XF-PoE++ (720W)">M4250-40G8XF-PoE++ (720W) One PSU</option>
<option value="custom">Custom</option>
</select>
</div>
</div>
<div id="customBudgetField" style="display: none;">
<div class="form-group row">
<label for="customBudget" class="col-sm-6 col-form-label">Custom PoE Budget (W)</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" placeholder="Enter custom PoE budget" class="form-control"
id="customBudget" oninput="calculateLeftoverBudget()">
<span class="input-group-text">W</span>
</div>
</div>
</div>
</div>
<!-- Class Inputs -->
<div class="classInputs">
<div class="form-group row">
<label for="class0" class="col-sm-6 col-form-label">Class 0 Devices (15.4W) - PoE</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" class="form-control class-input" id="class0" value="0"
oninput="calculateLeftoverBudget()">
<span class="input-group-text">W</span>
</div>
</div>
</div>
<div class="form-group row">
<label for="class1" class="col-sm-6 col-form-label">Class 1 Devices (4W) - PoE</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" class="form-control class-input" id="class1" value="0"
oninput="calculateLeftoverBudget()">
<span class="input-group-text">W</span>
</div>
</div>
</div>
<div class="form-group row">
<label for="class2" class="col-sm-6 col-form-label">Class 2 Devices (7W) - PoE</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" class="form-control class-input" id="class2" value="0"
oninput="calculateLeftoverBudget()">
<span class="input-group-text">W</span>
</div>
</div>
</div>
<div class="form-group row">
<label for="class3" class="col-sm-6 col-form-label">Class 3 Devices (15.4W) - PoE</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" class="form-control class-input" id="class3" value="0"
oninput="calculateLeftoverBudget()">
<span class="input-group-text">W</span>
</div>
</div>
</div>
<div class="form-group row">
<label for="class4" class="col-sm-6 col-form-label">Class 4 Devices (30W) - PoE+</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" class="form-control class-input" id="class4" value="0"
oninput="calculateLeftoverBudget()">
<span class="input-group-text">W</span>
</div>
</div>
</div>
<div class="form-group row">
<label for="class5" class="col-sm-6 col-form-label">Class 5 Devices (45W) - PoE++</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" class="form-control class-input" id="class5" value="0"
oninput="calculateLeftoverBudget()">
<span class="input-group-text">W</span>
</div>
</div>
</div>
<div class="form-group row">
<label for="class6" class="col-sm-6 col-form-label">Class 6 Devices (60W) - PoE++</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" class="form-control class-input" id="class6" value="0"
oninput="calculateLeftoverBudget()">
<span class="input-group-text">W</span>
</div>
</div>
</div>
<div class="form-group row">
<label for="class7" class="col-sm-6 col-form-label">Class 7 Devices (75W) - PoE++</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" class="form-control class-input" id="class7" value="0"
oninput="calculateLeftoverBudget()">
<span class="input-group-text">W</span>
</div>
</div>
</div>
<div class="form-group row">
<label for="class8" class="col-sm-6 col-form-label">Class 8 Devices (90W) - PoE++</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" class="form-control class-input" id="class8" value="0"
oninput="calculateLeftoverBudget()">
<span class="input-group-text">W</span>
</div>
</div>
</div>
</div>
<!-- Leftover Budget Display -->
<div class="form-group row">
<label for="leftoverBudget" class="col-sm-6 col-form-label">Leftover Budget (W)</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" class="form-control" id="leftoverBudget" readonly>
<span class="input-group-text">W</span>
</div>
</div>
</div>
</section>
<!-- End calculator itself -->
</div>
<!-- Container for full body - we require this container, for the Shepherd guide to work, and highlight the data -->
<!-- Start footer -->
<footer class="footer py-3 mt-5">
<div class="container text-center text-mute">
<p>Created by <a href="https://github.com/MichaelDNTGR" target="_blank">Michael Dijk</a>, AV Systems
Engineer at <a href="mailto:mdijk@netgear.com">NETGEAR</a></p>
<p class="mb-0">© <span id="currentYear"></span> All rights reserved.</p>
</div>
</footer>
<!-- End footer -->
<!-- Bootstrap scripts -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
<!-- Shepherd guide script -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.1/js.cookie.min.js"></script>
<script src="shepherd.js"></script>
<!-- Start own scripts -->
<!-- Calculator script -->
<script src="calc.js"></script>
<!-- Other script/data -->
<script src="other.js"></script>
<!-- End own scripts -->
</body>
</html>