-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArrayStatus.page
More file actions
460 lines (459 loc) · 23.9 KB
/
ArrayStatus.page
File metadata and controls
460 lines (459 loc) · 23.9 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
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
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
Icon="icons/array_status.png"
Menu="Main:20"
Title="Array Status"
---
<?
// Helper functions
function offer_maintenance_mode() {
echo "<tr>";
echo "<td></td>";
echo "<td><input type='checkbox' name='startMode' value='Maintenance'></td>";
echo "<td><strong>Maintenance mode</strong> - if checked, Start array but do not mount disks.</td>";
echo "</tr>";
}
?>
<form name="arrayOps" method="POST" action="/update.htm" target="progressFrame">
<input type="hidden" name="startState" value="<?=$var['mdState']?>">
<table class="array_status">
<?switch ($var['fsState']):
case "Started":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Started<?=(($var['startMode']=='Maintenance')?' - Maintenance Mode':'')?></strong></td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStop" value="Stop"<?=$confirm['stop']?' disabled':''?>></td>
<td><strong>Stop</strong> will take the array off-line.
<? if ($confirm['stop']):?>
<br><input type="checkbox" name="confirmStop" value="OFF" onClick="arrayOps.cmdStop.disabled=!arrayOps.confirmStop.checked"> <small>Yes I want to do this</small>
<? endif;?>
</td>
</tr>
<? if ($var['fsNumUnformatted']>0):?>
<tr>
<td>Unformatted disk(s) present</td>
<td><input type="submit" name="cmdFormat" value="Format" disabled><input type="hidden" name="unformatted_mask" value="<?=$var['fsUnformattedMask']?>"></td>
<td><strong>Format</strong> will create a file system in all <strong>Unformatted</strong> disks, discarding all data currently on those disks.<br>
<input type="checkbox" name="confirmFormat" value="OFF" onClick="arrayOps.cmdFormat.disabled=!arrayOps.confirmFormat.checked"> <small>Yes I want to do this</small>
</td>
</tr>
<? endif;
if ($var['mdResync']==0):
if ($var['mdNumDisabled']==0):
if ($var['mdNumInvalid']==0):
?> <tr>
<td>Parity is valid.</td>
<td><input type="submit" name="cmdCheck" value="Check"></td>
<td><strong>Check</strong> will start a Parity-Check.<br>
<input type="checkbox" name="optionCorrect" value="correct" checked> <small>Write corrections to parity disk</small>
</td>
</tr>
<? if ($var['sbSynced']==0):?>
<tr>
<td></td>
<td></td>
<td><em>Parity has not been checked yet.<em></td>
</tr>
<? else:?>
<tr>
<td></td>
<td></td>
<? $time = array();
exec("grep -B 1 'sync completion' /var/log/syslog | tail -2 | cut -d= -f2 | cut -d: -f6 | cut -ds -f1", $time);
if (!count($time)) { $time[0]=0; $time[1]=0; }
if ($time[1]==0):
?> <td>Last checked on <strong><?=my_time($var['sbSynced']).day_count($var['sbSynced'])?></strong>, finding <strong><?=$var['sbSyncErrs']?></strong> errors.
<br><small>> Duration: <?=my_check($time[0])?></small>
<? else:?>
<td>Last check incomplete on <strong><?=my_time($var['sbSynced']).day_count($var['sbSynced'])?></strong>, finding <strong><?=$var['sbSyncErrs']?></strong> errors.
<br><small>> Error code: <?=my_error($time[1])?></small>
<? endif;?>
</td></tr>
<? endif;
else:
if ($var['mdInvalidDisk']==0):
?> <tr>
<td>Parity is invalid.</td>
<td><input type="submit" name="cmdCheck" value="Sync"></td>
<td><strong>Sync</strong> will start Parity-Sync.</td>
</tr>
<? else:?>
<tr>
<td>Data is invalid.</td>
<td><input type="submit" name="cmdCheck" value="Rebuild"></td>
<td><strong>Rebuild</strong> will start Data-Rebuild.</td>
</tr>
<? endif;
endif;
endif;
else:
if ($var['mdNumInvalid']==0):
$checked = $var['mdResyncCorr']==0 ? "" : "checked";
?> <tr>
<td>Parity-Check in progress.</td>
<td><input type="submit" name="cmdNoCheck" value="Cancel"></td>
<td><strong>Cancel</strong> will stop the Parity-Check.<br>
<input type="checkbox" name="optionCorrect" value="correct" <?=$checked?> disabled> <small>Write corrections to parity disk</small>
</td>
</tr>
<? else:
if ($var['mdInvalidDisk']==0):
?> <tr>
<td>Parity-Sync in progress.</td>
<td><input type="submit" name="cmdNoCheck" value="Cancel"></td>
<td><strong>Cancel</strong> will stop Parity-Sync.<br>
WARNING: canceling Parity-Sync will leave the array unprotected!
</td>
</tr>
<? else:?>
<tr>
<td>Data-Rebuild in progress.</td>
<td><input type="submit" name="cmdNoCheck" value="Cancel"></td>
<td><strong>Cancel</strong> will stop Data-Rebuild.<br>
WARNING: canceling Data-Rebuild will leave the array unprotected!
</td>
</tr>
<? endif;
endif;
?> <tr>
<td>Total size:</td>
<td><strong><?=my_scale($var['mdResync']*1024, $units).' '.$units?></strong></td>
<td></td>
</tr>
<tr>
<td>Current position:</td>
<td><strong><?=my_scale($var['mdResyncPos']*1024, $units).' '.$units?> (<?=round(($var['mdResyncPos']/($var['mdResync']/100+1)), 1)?> %)</strong></td>
<td></td>
</tr>
<tr>
<td>Estimated speed:</td>
<td><strong><?=my_scale(($var['mdResyncDb']/$var['mdResyncDt'])*1024, $units, 1).' '.$units?>/sec</strong></td>
<td></td>
</tr>
<tr>
<td>Estimated finish:</td>
<td><strong><?=end_time(max(1,round(((($var['mdResyncDt']*(($var['mdResync']-$var['mdResyncPos'])/($var['mdResyncDb']/100+1)))/100)/60),0)))?></strong></td>
<td></td>
</tr>
<? if ($var['mdNumInvalid']==0):
if ($var['mdResyncCorr']==0):
?> <tr>
<td>Sync errors detected:</td>
<td><strong><?=$var['sbSyncErrs']?></strong></td>
</tr>
<? else:?>
<tr>
<td>Sync errors corrected:</td>
<td><strong><?=$var['sbSyncErrs']?></strong></td>
</tr>
<? endif;
endif;
endif;
break;
case "Mounting":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Starting...</strong></td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td></td>
</tr>
<? break;
case "Formatting":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Started, formatting...</strong></td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td></td>
</tr>
<? break;
case "Copying":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Copying, <?=$var['fsCopyPrcnt']?>% complete...</strong></td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdNoCopy" value="Cancel"></td>
<td></td>
</tr>
<? break;
case "Clearing":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Clearing, <?=$var['fsClearPrcnt']?>% complete... </strong></td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdNoClear" value="Cancel"></td>
<td></td>
</tr>
<? break;
case "Stopping":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopping...</strong></td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStop" value="Stop" disabled></td>
<td></td>
</tr>
<? break;
case "Stopped":
switch ($var['mdState']):
case "STOPPED":
if ($var['mdNumInvalid']==0):
if ($var['sbClean']=="yes"):
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Configuration valid.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start"></td>
<td><strong>Start</strong> will bring the array on-line.</td>
</tr>
<? else:?>
<tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Unclean shutdown detected.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start"></td>
<td><strong>Start</strong> will bring the array on-line and start a Parity-Check.</td>
</tr>
<? endif;
else:
if ($var['mdNumDisabled']!=0):
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Configuration valid.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start"></td>
<td><strong>Start</strong> will bring the array on-line (array will be unprotected).</td>
</tr>
<? else:
if ($var['mdInvalidDisk']==0):
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Configuration valid.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start"></td>
<td><strong>Start</strong> will bring the array on-line and start Parity-Sync.</td>
</tr>
<? else:?>
<tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Configuration valid.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start"></td>
<td><strong>Start</strong> will bring the array on-line and start Data-Rebuild.</td>
</tr>
<? endif;
endif;
endif;
offer_maintenance_mode();
break;
case "NEW_ARRAY":
if ($disks['parity']['status']=="DISK_NP"):
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Initial configuration</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start"></td>
<td><strong>Start</strong> will record all disk information and bring the array on-line.
The array will be immediately available, but <strong>unprotected</strong> since <em>parity</em> has
not been assigned.</td>
</tr>
<? else:
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Initial configuration</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start"></td>
<td><strong>Start</strong> will record all disk information, bring the array on-line, and start Parity-Sync.
The array will be immediately available, but <strong>unprotected</strong> until Parity-Sync completes.</td>
</tr>
<tr>
<td></td>
<td><input type="checkbox" name="md_invalidslot" value="99"> Parity is valid</td>
<td></td>
</tr>
<? endif;
offer_maintenance_mode();
break;
case "UNPROTECTED_EXPANSION":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Found <?=$var['mdNumNew']?> new disk(s).</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start"></td>
<td><strong>Start</strong> will record the new disk information and bring the expanded array on-line.</td>
</tr>
<? offer_maintenance_mode();
break;
case "PROTECTED_EXPANSION":
if ($var['mdNumErased']==$var['mdNumNew']):
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Found <?=$var['mdNumNew']?> new erased disk(s).</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td><strong>Start</strong> will record the new disk information and bring the expanded array on-line.<br>
<input type="checkbox" name="confirmStart" value="OFF" onClick="arrayOps.cmdStart.disabled=!arrayOps.confirmStart.checked"><small>Yes I want to do this</small></td>
</tr>
<? offer_maintenance_mode();
else:
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Found <?=$var['mdNumNew']?> new disk(s).</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdClear" value="Clear" disabled></td>
<td><strong>Clear</strong> will completely clear (set to zero) the new disk(s). Once clear completes, the array may be Started,
expanding the array to include the new disk(s).<br>
<strong>Caution: any data on the new disk(s) will be erased!</strong>
If you want to preserve the data on the new disk(s), reset the array configuration and rebuild parity instead.<br>
<input type="checkbox" name="confirmClear" value="OFF" onClick="arrayOps.cmdClear.disabled=!arrayOps.confirmClear.checked"><small>Yes I want to do this</small></td>
</tr>
<? endif;
break;
case "DISABLE_DISK":
if ($var['mdMissingDisk']==0):
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Missing <em>parity</em>.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td><strong>Start</strong> will disable the <em>parity</em> disk and then bring the array on-line. The array
will be unprotected; install a new <em>parity</em> disk as soon as possible.<br>
<input type="checkbox" name="confirmStart" value="OFF" onClick="arrayOps.cmdStart.disabled=!arrayOps.confirmStart.checked"><small>Yes I want to do this</small></td>
</tr>
<? else:?>
<tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Missing disk.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td><strong>Start</strong> will disable the missing disk and then bring the array on-line. The disks data will be available, but the array
will be unprotected; install a new disk as soon as possible.<br>
<input type="checkbox" name="confirmStart" value="OFF" onClick="arrayOps.cmdStart.disabled=!arrayOps.confirmStart.checked"><small>Yes I want to do this</small></td>
</tr>
<? endif;
offer_maintenance_mode();
break;
case "RECON_DISK":
if ($var['mdDisabledDisk']==0):
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. New <em>parity</em> disk installed.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td><strong>Start</strong> will bring the array on-line and start Parity-Sync.<br>
<input type="checkbox" name="confirmStart" value="OFF" onClick="arrayOps.cmdStart.disabled=!arrayOps.confirmStart.checked"><small>Yes I want to do this</small></td>
</tr>
<? else:?>
<tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Disabled disk replaced.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td><strong>Start</strong> will bring the array on-line, start Data-Rebuild, and then expand the file system (if possible).<br>
<input type="checkbox" name="confirmStart" value="OFF" onClick="arrayOps.cmdStart.disabled=!arrayOps.confirmStart.checked"><small>Yes I want to do this</small></td>
</tr>
<? endif;
offer_maintenance_mode();
break;
case "UPGRADE_DISK":
if ($var['mdMissingDisk']==0):
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Upgrading <em>parity</em>.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td><strong>Start</strong> will bring the array on-line and start Parity-Sync.<br>
<input type="checkbox" name="confirmStart" value="OFF" onClick="arrayOps.cmdStart.disabled=!arrayOps.confirmStart.checked"><small>Yes I want to do this</small></td>
</tr>
<? else:?>
<tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Upgrading disk.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td><strong>Start</strong> will bring the array on-line, start Data-Rebuild, and then expand the file system.<br>
<input type="checkbox" name="confirmStart" value="OFF" onClick="arrayOps.cmdStart.disabled=!arrayOps.confirmStart.checked"><small>Yes I want to do this</small></td>
</tr>
<? endif;
offer_maintenance_mode();
break;
case "SWAP_DSBL":
if ($var['fsCopyPrcnt']=="100"):
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Ugrading disk/swapping parity.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td><strong>Start</strong> will expand the file system of the data disk (if possible); and then bring the array on-line and start Data-Rebuild.<br>
<input type="checkbox" name="confirmStart" value="OFF" onClick="arrayOps.cmdStart.disabled=!arrayOps.confirmStart.checked"><small>Yes I want to do this</small></td>
</tr>
<? offer_maintenance_mode();
else:
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Ugrading disk/swapping parity.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdCopy" value="Copy" disabled></td>
<td><strong>Copy</strong> will copy the parity information to the new <em>parity</em> disk. Once copy completes, the array may be Started,
to initiate Data-Rebuild of the disabled disk.<br>
<input type="checkbox" name="confirmStart" value="OFF" onClick="arrayOps.cmdCopy.disabled=!arrayOps.confirmStart.checked"><small>Yes I want to do this</small></td>
</tr>
<? endif;
break;
case "RECORD_DISKS":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Two or more disks are wrong.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td><strong>Start</strong> will just record the new disk positions and bring the array on-line. We recommend you start a
Parity-Check afterwards just to be safe.<br>
<input type="checkbox" name="confirmStart" value="OFF" onClick="arrayOps.cmdStart.disabled=!arrayOps.confirmStart.checked"><small>Yes I want to do this</small></td>
</tr>
<? offer_maintenance_mode();
break;
case "ERROR:INVALID_EXPANSION":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Invalid expansion.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td>You may not add new disks when there exists missing, wrong, or disabled disk(s).</td>
</tr>
<? break;
case "ERROR:NEW_DISK_TOO_SMALL":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Replacement disk is too small.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td>The replacement disk must be as big or bigger than the original.</td>
</tr>
<? break;
case "ERROR:PARITY_NOT_BIGGEST":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Disk in parity slot is not biggest.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td>If this is a new array, move the largest disk into the <em>parity</em> slot. If you are adding a new disk or replacing a disabled disk, try Parity-Swap.</td>
</tr>
<? break;
case "ERROR:TOO_MANY_MISSING_DISKS":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. Invalid configuration.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td>Too many wrong and/or missing disks!</td>
</tr>
<? break;
case "ERROR:NO_DATA_DISKS":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. No data disks.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td>No array data disks have been assigned!</td>
</tr>
<? break;
case "ERROR:NO_RAID_DISKS":
?> <tr>
<td><img src="plugins/webGui/images/<?=$var['mdColor']?>.gif" class="icon"><strong>Stopped</strong>. No devices.</td>
<td><input type="button" value="Refresh" onclick="refresh()"><input type="submit" name="cmdStart" value="Start" disabled></td>
<td>No array disk devices have been assigned!</td>
</tr>
<? break;
endswitch;
endswitch;
?></table>
</form>
<p class=ContentTitle></p>
<hr>
<form name="otherOps" method="POST" action="/update.htm" target="progressFrame">
<input type="hidden" name="startState" value="<?=$var['mdState']?>">
<table class="array_status">
<?if ($var['fsState']=="Started"):?>
<tr>
<td></td>
<td><input type="submit" name="cmdSpinUpAll" value="Spin Up"></td>
<td><strong>Spin Up</strong> will immediately spin up all disks.</td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="cmdSpinDownAll" value="Spin Down"></td>
<td><strong>Spin Down</strong> will immediately spin down all disks.</td>
</tr>
<?endif;?>
<?if ($var['fsState']=="Stopped"):?>
<tr>
<td></td>
<td><input type="submit" name="cmdIdentify" value="Identify"></td>
<td><strong>Identify</strong> will briefly read from each disk in order.</td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="reboot" value="Reboot" disabled></td>
<td><strong>Reboot</strong> will activate a system reset.
<?if ($confirm['down']):?>
<br><input type="checkbox" name="confirmReboot" value="OFF" onClick="otherOps.reboot.disabled=!otherOps.confirmReboot.checked"> <small>Yes I want to do this</small>
<?endif;?>
</tr>
<tr>
<td></td>
<td><input type="submit" name="shutdown" value="Power down" disabled></td>
<td><strong>Power down</strong> will activate a <em>clean</em> power down.
<?if ($confirm['down']):?>
<br><input type="checkbox" name="confirmShutdown" value="OFF" onClick="otherOps.shutdown.disabled=!otherOps.confirmShutdown.checked"> <small>Yes I want to do this</small>
<?endif;?>
</tr>
<?else:?>
<tr>
<td></td>
<td><input type="submit" name="clearStatistics" value="Clear Statistics"></td>
<td><strong>Clear Statistics</strong> will immediately clear all disk statistics.</td>
</tr>
<?endif;?>
</table>
</form>
<?$confirm['warn'] = false?>