mirror of
https://github.com/unraid/webgui.git
synced 2026-03-06 00:18:57 -06:00
Line consolidations
This commit is contained in:
@@ -172,7 +172,7 @@ function reload_page() {
|
||||
}
|
||||
reload_page();
|
||||
<?endif;?>
|
||||
$('.tooltip_diskio').tooltipster({delay:100, trigger:'custom', triggerOpen:{mouseenter: true}, triggerClose:{click:false,scroll:true,mouseleave:true}});
|
||||
$('.tooltip_diskio').tooltipster({delay:100,trigger:'custom',triggerOpen:{mouseenter:true},triggerClose:{click:false,scroll:true,mouseleave:true}});
|
||||
toggle_diskio(true);
|
||||
</script>
|
||||
<form name="arrayOps" method="POST" action="/update.htm" target="progressFrame">
|
||||
@@ -201,50 +201,25 @@ toggle_diskio(true);
|
||||
<? endif;
|
||||
if (!$parity):
|
||||
if (strstr($var['mdResyncAction'],"recon")):?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" name="cmdCheck" value="Sync"></td>
|
||||
<td><strong>Sync</strong> will start <strong>Parity-Sync</strong> and/or <strong>Data-Rebuild</strong>.</td>
|
||||
</tr>
|
||||
<tr><td></td><td><input type="submit" name="cmdCheck" value="Sync"></td><td><strong>Sync</strong> will start <strong>Parity-Sync</strong> and/or <strong>Data-Rebuild</strong>.</td></tr>
|
||||
<? elseif (strstr($var['mdResyncAction'],"clear")):?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" name="cmdCheck" value="Clear"></td>
|
||||
<td><strong>Clear</strong> will start <strong>Clearing</strong> new data disk(s).</td>
|
||||
</tr>
|
||||
<tr><td></td><td><input type="submit" name="cmdCheck" value="Clear"></td><td><strong>Clear</strong> will start <strong>Clearing</strong> new data disk(s).</td></tr>
|
||||
<? else:
|
||||
if ($var['mdResyncAction']=="check"):?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" name="cmdCheck" value="Check"></td>
|
||||
<td><strong>Check</strong> will start <strong>Read-Check</strong> of all data disks.</td>
|
||||
</tr>
|
||||
<tr><td></td><td><input type="submit" name="cmdCheck" value="Check"></td><td><strong>Check</strong> will start <strong>Read-Check</strong> of all data disks.</td></tr>
|
||||
<? elseif (strstr($var['mdResyncAction'],"check")):?>
|
||||
<tr>
|
||||
<td>Parity is valid.</td>
|
||||
<td><input type="submit" name="cmdCheck" value="Check"></td>
|
||||
<td><strong>Check</strong> will start <strong>Parity-Check</strong>.
|
||||
<br><input type="checkbox" name="optionCorrect" value="correct" checked><small>Write corrections to parity</small></td>
|
||||
</tr>
|
||||
<tr><td>Parity is valid.</td><td><input type="submit" name="cmdCheck" value="Check"></td><td><strong>Check</strong> will start <strong>Parity-Check</strong>.
|
||||
<br><input type="checkbox" name="optionCorrect" value="correct" checked><small>Write corrections to parity</small></td></tr>
|
||||
<? endif;
|
||||
if ($var['sbSyncExit']!=0):?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="button" value="History" onclick="openBox('/webGui/include/ParityHistory.php','Parity/Read-Check History',600,540,false)"></td>
|
||||
<tr><td></td><td><input type="button" value="History" onclick="openBox('/webGui/include/ParityHistory.php','Parity/Read-Check History',600,540,false)"></td>
|
||||
<td>Last check incomplete on <strong><?=my_time($var['sbSynced2']).day_count($var['sbSynced2'])?></strong><?if ($var['sbSynced2']):?>, finding <strong><?=$var['sbSyncErrs']?></strong> error<?=$var['sbSyncErrs']==1?'':'s'?>.<?endif;?>
|
||||
<br><i class="fa fa-dot-circle-o icon"></i><small>Error code: <?=my_error($var['sbSyncExit'])?></small></td>
|
||||
</tr>
|
||||
<br><i class="fa fa-dot-circle-o icon"></i><small>Error code: <?=my_error($var['sbSyncExit'])?></small></td></tr>
|
||||
<? elseif ($var['sbSynced']==0):?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="button" value="History" onclick="openBox('/webGui/include/ParityHistory.php','Parity/Read-Check History',600,540,false)"></td>
|
||||
<td>Last checked on <strong><?=my_time(0).day_count(0)?></strong>
|
||||
<br><i class="fa fa-clock-o icon"></i><small>Duration: <?=my_check(0,0)?></small></td>
|
||||
</tr>
|
||||
<tr><td></td><td><input type="button" value="History" onclick="openBox('/webGui/include/ParityHistory.php','Parity/Read-Check History',600,540,false)"></td><td>Last checked on <strong><?=my_time(0).day_count(0)?></strong>
|
||||
<br><i class="fa fa-clock-o icon"></i><small>Duration: <?=my_check(0,0)?></small></td></tr>
|
||||
<? elseif ($var['sbSynced2']==0):?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="button" value="History" onclick="openBox('/webGui/include/ParityHistory.php','Parity/Read-Check History',600,540,false)"></td>
|
||||
<tr><td></td><td><input type="button" value="History" onclick="openBox('/webGui/include/ParityHistory.php','Parity/Read-Check History',600,540,false)"></td>
|
||||
<? list($entry,$duration,$speed,$status,$error) = explode('|', read_parity_log($var['sbSynced']));
|
||||
if ($status==0):?>
|
||||
<td>Last checked on <strong><?=my_time($var['sbSynced']).day_count($var['sbSynced'])?></strong>, finding <strong><?=$error?></strong> error<?=$error==1?'':'s'?>.
|
||||
@@ -257,169 +232,83 @@ toggle_diskio(true);
|
||||
<? else:
|
||||
$duration = $var['sbSynced2']-$var['sbSynced'];
|
||||
$speed = $duration?my_scale($var['mdResyncSize']*1024/$duration,$unit,1)." $unit/sec":'';?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="button" value="History" onclick="openBox('/webGui/include/ParityHistory.php','Parity/Read-Check History',600,540,false)"></td>
|
||||
<tr><td></td><td><input type="button" value="History" onclick="openBox('/webGui/include/ParityHistory.php','Parity/Read-Check History',600,540,false)"></td>
|
||||
<td>Last check completed on <strong><?=my_time($var['sbSynced2']).day_count($var['sbSynced2'])?></strong>, finding <strong><?=$var['sbSyncErrs']?></strong> error<?=$var['sbSyncErrs']==1?'':'s'?>.
|
||||
<br><i class="fa fa-clock-o icon"></i><small>Duration: <?=my_check($duration,$speed)?></small></td>
|
||||
</tr>
|
||||
<br><i class="fa fa-clock-o icon"></i><small>Duration: <?=my_check($duration,$speed)?></small></td></tr>
|
||||
<? endif;
|
||||
endif;
|
||||
else:
|
||||
if ($var['mdResyncAction']=="check"):?>
|
||||
<tr>
|
||||
<td>Read-Check in progress.</td>
|
||||
<td><input type="button" id="cancelButton" value="Cancel" onclick="stop_parity(this.form,'Read-Check')"></td>
|
||||
<td id="cancelText"><strong>Cancel</strong> will stop the Read-Check.</td>
|
||||
</tr>
|
||||
<tr><td>Read-Check in progress.</td><td><input type="button" id="cancelButton" value="Cancel" onclick="stop_parity(this.form,'Read-Check')"></td>
|
||||
<td id="cancelText"><strong>Cancel</strong> will stop the Read-Check.</td></tr>
|
||||
<? elseif (strstr($var['mdResyncAction'],"check")):?>
|
||||
<tr>
|
||||
<td>Parity-Check in progress.</td>
|
||||
<td><input type="button" id="cancelButton" value="Cancel" onclick="stop_parity(this.form,'Parity-Check')"></td>
|
||||
<td id="cancelText"><strong>Cancel</strong> will stop the Parity-Check.</td>
|
||||
</tr>
|
||||
<tr><td>Parity-Check in progress.</td><td><input type="button" id="cancelButton" value="Cancel" onclick="stop_parity(this.form,'Parity-Check')"></td>
|
||||
<td id="cancelText"><strong>Cancel</strong> will stop the Parity-Check.</td></tr>
|
||||
<? elseif (strstr($var['mdResyncAction'],"recon")):?>
|
||||
<tr>
|
||||
<td>Parity-Sync/Data-Rebuild in progress.</td>
|
||||
<td><input type="button" id="cancelButton" value="Cancel" onclick="stop_parity(this.form,'Parity-Sync/Data-Rebuild')"></td>
|
||||
<tr><td>Parity-Sync/Data-Rebuild in progress.</td><td><input type="button" id="cancelButton" value="Cancel" onclick="stop_parity(this.form,'Parity-Sync/Data-Rebuild')"></td>
|
||||
<td id="cancelText"><strong>Cancel</strong> will stop Parity-Sync/Data-Rebuild.
|
||||
<br>WARNING: canceling may leave the array unprotected!</td>
|
||||
</tr>
|
||||
<br>WARNING: canceling may leave the array unprotected!</td></tr>
|
||||
<? elseif (strstr($var['mdResyncAction'],"clear")):?>
|
||||
<tr>
|
||||
<td>Clearing in progress.</td>
|
||||
<td><input type="button" id="cancelButton" value="Cancel" onclick="stop_parity(this.form,'Clearing')"></td>
|
||||
<td id="cancelText"><strong>Cancel</strong> will stop Clearing.</td>
|
||||
</tr>
|
||||
<tr><td>Clearing in progress.</td><td><input type="button" id="cancelButton" value="Cancel" onclick="stop_parity(this.form,'Clearing')"></td>
|
||||
<td id="cancelText"><strong>Cancel</strong> will stop Clearing.</td></tr>
|
||||
<? endif;?>
|
||||
<tr>
|
||||
<td>Total size:</td>
|
||||
<td id="line0"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Elapsed time:</td>
|
||||
<td id="line1"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Current position:</td>
|
||||
<td id="line2"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Estimated speed:</td>
|
||||
<td id="line3"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Estimated finish:</td>
|
||||
<td id="line4"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr><td>Total size:</td><td id="line0"></td><td></td></tr>
|
||||
<tr><td>Elapsed time:</td><td id="line1"></td><td></td></tr>
|
||||
<tr><td>Current position:</td><td id="line2"></td><td></td></tr>
|
||||
<tr><td>Estimated speed:</td><td id="line3"></td><td></td></tr>
|
||||
<tr><td>Estimated finish:</td><td id="line4"></td><td></td></tr>
|
||||
<? if (strstr($var['mdResyncAction'],"check ")):?>
|
||||
<tr>
|
||||
<td>Sync errors <?if ($var['mdResyncCorr']==0):?>detected:<?else:?>corrected:<?endif;?></td>
|
||||
<td id="line5"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr><td>Sync errors <?if ($var['mdResyncCorr']==0):?>detected:<?else:?>corrected:<?endif;?></td><td id="line5"></td><td></td></tr>
|
||||
<? endif;
|
||||
endif;
|
||||
break;
|
||||
case "Starting":?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Starting...</span></td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Starting...</span></td><td><input type="submit" name="cmdStart" value="Start" disabled></td><td></td></tr>
|
||||
<? break;
|
||||
case "Formatting":?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Started, formatting...</span></td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Started, formatting...</span></td><td><input type="submit" name="cmdStart" value="Start" disabled></td><td></td></tr>
|
||||
<? break;
|
||||
case "Copying":?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span id="fsState" class="strong big">Copying, <?=$var['fsCopyPrcnt']?>% complete...</span></td>
|
||||
<td><input type="submit" name="cmdNoCopy" value="Cancel"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span id="fsState" class="strong big">Copying, <?=$var['fsCopyPrcnt']?>% complete...</span></td><td><input type="submit" name="cmdNoCopy" value="Cancel"></td><td></td></tr>
|
||||
<? break;
|
||||
case "Clearing":?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span id="fsState" class="strong big">Clearing, <?=$var['fsClearPrcnt']?>% complete...</span></td>
|
||||
<td><input type="submit" name="cmdNoClear" value="Cancel"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span id="fsState" class="strong big">Clearing, <?=$var['fsClearPrcnt']?>% complete...</span></td><td><input type="submit" name="cmdNoClear" value="Cancel"></td><td></td></tr>
|
||||
<? break;
|
||||
case "Stopping":?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopping...</span></td>
|
||||
<td><input type="submit" name="cmdStop" value="Stop" disabled></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopping...</span></td><td><input type="submit" name="cmdStop" value="Stop" disabled></td><td></td></tr>
|
||||
<? break;
|
||||
case "Stopped":
|
||||
if ($var['configValid']=="error"):?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped.</span></td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>Invalid, missing or expired <a href="/Tools/Registration">registration key</a>.</td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped.</span></td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>Invalid, missing or expired <a href="/Tools/Registration">registration key</a>.</td></tr>
|
||||
<? elseif ($var['configValid']=="invalid"):?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped.</span></td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>Too many attached devices. Please consider upgrading your <a href="/Tools/Registration">registration key</a>.</td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped.</span></td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>Too many attached devices. Please consider upgrading your <a href="/Tools/Registration">registration key</a>.</td></tr>
|
||||
<? elseif ($var['configValid']=="nokeyserver"):?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped.</span></td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>Cannot contact key-server. Please check your <a href="/Settings/NetworkSettings">network settings</a>.</td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped.</span></td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>Cannot contact key-server. Please check your <a href="/Settings/NetworkSettings">network settings</a>.</td></tr>
|
||||
<? elseif ($var['configValid']=="withdrawn"):?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped.</span></td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>This unRAID Server OS release has been withdrawn and may no longer be used. Please <a href="/Plugins">update</a> your server.</td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped.</span></td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>This unRAID Server OS release has been withdrawn and may no longer be used. Please <a href="/Plugins">update</a> your server.</td></tr>
|
||||
<? else:
|
||||
switch ($var['mdState']):
|
||||
case "STOPPED":
|
||||
if (strstr($var['mdResyncAction'],"recon")):?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Configuration valid.</td>
|
||||
<td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"<?=$stop?>></td>
|
||||
<td><strong>Start</strong> will bring the array on-line and start <strong>Parity-Sync</strong> and/or <strong>Data-Rebuild</strong>.</td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Configuration valid.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"<?=$stop?>></td>
|
||||
<td><strong>Start</strong> will bring the array on-line and start <strong>Parity-Sync</strong> and/or <strong>Data-Rebuild</strong>.</td></tr>
|
||||
<? elseif ($var['mdResyncAction']=="clear"):?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. New data disk(s) detected.</td>
|
||||
<td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"<?=$stop?>></td>
|
||||
<td><strong>Start</strong> will bring the array on-line and start <strong>Clearing</strong> new data disk(s).</td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. New data disk(s) detected.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"<?=$stop?>></td>
|
||||
<td><strong>Start</strong> will bring the array on-line and start <strong>Clearing</strong> new data disk(s).</td></tr>
|
||||
<? elseif ($var['sbClean']!="yes" && $var['mdResyncAction']=="check"):?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Unclean shutdown detected.</td>
|
||||
<td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"<?=$stop?>></td>
|
||||
<td><strong>Start</strong> will bring the array on-line.</td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Unclean shutdown detected.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"<?=$stop?>></td>
|
||||
<td><strong>Start</strong> will bring the array on-line.</td></tr>
|
||||
<? elseif ($var['sbClean']!="yes" && strstr($var['mdResyncAction'],"check")):?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Unclean shutdown detected.</td>
|
||||
<td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"<?=$stop?>></td>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Unclean shutdown detected.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"<?=$stop?>></td>
|
||||
<td><strong>Start</strong> will bring the array on-line and start <strong>Parity-Check</strong>.
|
||||
<br><input type="checkbox" name="optionCorrect" value="correct" checked><small>Write corrections to parity</small></td>
|
||||
</tr>
|
||||
<br><input type="checkbox" name="optionCorrect" value="correct" checked><small>Write corrections to parity</small></td></tr>
|
||||
<? else:?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Configuration valid.</td>
|
||||
<td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"<?=$stop?>></td>
|
||||
<td><strong>Start</strong> will bring the array on-line.</td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Configuration valid.</td><td><input type="button" id="cmdStart" value="Start" onclick="prepareInput(this.form)"<?=$stop?>></td>
|
||||
<td><strong>Start</strong> will bring the array on-line.</td></tr>
|
||||
<? endif;
|
||||
maintenance_mode();
|
||||
if ($var['fsEncryption']=='wrong' || $var['fsEncryption']=='missing'):
|
||||
@@ -431,139 +320,94 @@ toggle_diskio(true);
|
||||
break;
|
||||
case "NEW_ARRAY":
|
||||
if (strpos($disks['parity']['status'],"DISK_NP")===0 && (empty($disks['parity2']) || strpos($disks['parity2']['status'],"DISK_NP")===0)):?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Configuration valid.</td>
|
||||
<td><input type="submit" name="cmdStart" value="Start"></td>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Configuration valid.</td><td><input type="submit" name="cmdStart" value="Start"></td>
|
||||
<td><strong>Start</strong> will record all disk information and bring the array on-line.
|
||||
<br>The array will be immediately available, but <strong>unprotected</strong> since <em>parity</em> has not been assigned.</td>
|
||||
</tr>
|
||||
<br>The array will be immediately available, but <strong>unprotected</strong> since <em>parity</em> has not been assigned.</td></tr>
|
||||
<? else:?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Configuration valid.</td>
|
||||
<td><input type="button" value="Start" onclick="parity_warning(this.form)"></td>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Configuration valid.</td><td><input type="button" value="Start" onclick="parity_warning(this.form)"></td>
|
||||
<td><strong>Start</strong> will record all disk information, bring the array on-line, and start Parity-Sync.
|
||||
<br>The array will be immediately available, but <strong>unprotected</strong> until Parity-Sync completes.
|
||||
<br><input type="checkbox" name="md_invalidslot" value="99">Parity is already valid.</td>
|
||||
</tr>
|
||||
<br><input type="checkbox" name="md_invalidslot" value="99">Parity is already valid.</td></tr>
|
||||
<? endif;
|
||||
maintenance_mode();
|
||||
break;
|
||||
case "UNPROTECTED_EXPANSION":?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Found <?=my_word($var['mdNumNew'])?> new disk<?=$var['mdNumNew']==1?'':'s'?>.<br>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Found <?=my_word($var['mdNumNew'])?> new disk<?=$var['mdNumNew']==1?'':'s'?>.<br>
|
||||
<? foreach ($disks as $disk) if ($disk['status']=='DISK_NEW') echo "<br><span class='blue-text'>".my_disk($disk['name'])."</span> • ".my_id($disk['id'])." (".$disk['device'].")";?></td>
|
||||
<td><input type="submit" name="cmdStart" value="Start"></td>
|
||||
<td><strong>Start</strong> will record the new disk<?=$var['mdNumNew']==1?'':'s'?> information and bring the expanded array on-line.</td>
|
||||
</tr>
|
||||
<td><input type="submit" name="cmdStart" value="Start"></td><td><strong>Start</strong> will record the new disk<?=$var['mdNumNew']==1?'':'s'?> information and bring the expanded array on-line.</td></tr>
|
||||
<? maintenance_mode();
|
||||
break;
|
||||
case "PROTECTED_EXPANSION":
|
||||
if ($var['mdNumErased']==$var['mdNumNew']):?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Found <?=my_word($var['mdNumNew'])?> new erased disk<?=$var['mdNumNew']==1?'':'s'?>.<br>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Found <?=my_word($var['mdNumNew'])?> new erased disk<?=$var['mdNumNew']==1?'':'s'?>.<br>
|
||||
<? foreach ($disks as $disk) if ($disk['status']=='DISK_NEW') echo "<br><span class='blue-text'>".my_disk($disk['name'])."</span> • ".my_id($disk['id'])." (".$disk['device'].")";?></td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td><strong>Start</strong> will record the new disk<?=$var['mdNumNew']==1?'':'s'?> 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>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td><td><strong>Start</strong> will record the new disk<?=$var['mdNumNew']==1?'':'s'?> 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>
|
||||
<? maintenance_mode();
|
||||
else:?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Found <?=my_word($var['mdNumNew'])?> new disk<?=$var['mdNumNew']==1?'':'s'?>.<br>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Found <?=my_word($var['mdNumNew'])?> new disk<?=$var['mdNumNew']==1?'':'s'?>.<br>
|
||||
<? foreach ($disks as $disk) if ($disk['status']=='DISK_NEW') echo "<br><span class='blue-text'>".my_disk($disk['name'])."</span> • ".my_id($disk['id'])." (".$disk['device'].")";?></td>
|
||||
<td><input type="submit" name="cmdClear" value="Clear" disabled></td>
|
||||
<td><strong>Clear</strong> will completely clear (set to zero) the new disk<?=$var['mdNumNew']==1?'':'s'?>.
|
||||
<td><input type="submit" name="cmdClear" value="Clear" disabled></td><td><strong>Clear</strong> will completely clear (set to zero) the new disk<?=$var['mdNumNew']==1?'':'s'?>.
|
||||
<br>Once clear completes, the array may be Started, expanding the array to include the new disk<?=$var['mdNumNew']==1?'':'s'?>.
|
||||
<br><strong>Caution: any data on the new disk<?=$var['mdNumNew']==1?'':'s'?> will be erased!</strong>
|
||||
<br>If you want to preserve the data on the new disk<?=$var['mdNumNew']==1?'':'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>
|
||||
<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":?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Missing disk.</td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Missing disk.</td><td><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.
|
||||
<br>Install a replacement 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>
|
||||
<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>
|
||||
<? maintenance_mode();
|
||||
break;
|
||||
case "RECON_DISK":?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Replacement disk installed.</td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Replacement disk installed.</td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td><strong>Start</strong> will start <strong>Parity-Sync</strong> and/or <strong>Data-Rebuild</strong>.
|
||||
<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>
|
||||
<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>
|
||||
<? maintenance_mode();
|
||||
break;
|
||||
case "SWAP_DSBL":
|
||||
if ($var['fsCopyPrcnt']=="100"):?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Upgrading disk/swapping parity.</td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Upgrading disk/swapping parity.</td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td><strong>Start</strong> will expand the file system of the data disk (if possible); 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>
|
||||
<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>
|
||||
<? maintenance_mode();
|
||||
else:?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Upgrading disk/swapping parity.</td>
|
||||
<td><input type="submit" name="cmdCopy" value="Copy" disabled></td>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Upgrading disk/swapping parity.</td><td><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.
|
||||
<br>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>
|
||||
<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><?=status_indicator()?><span class="strong big">Stopped</span>. Two or more disks are wrong.<br>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Two or more disks are wrong.<br>
|
||||
<? foreach ($disks as $disk) if ($disk['status']=='DISK_WRONG') echo "<br><span class='blue-text'>".my_disk($disk['name'])."</span> • ".my_id($disk['id'])." (".$disk['device'].")";?></td>
|
||||
<td><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.
|
||||
<td><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.
|
||||
<br>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>
|
||||
<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>
|
||||
<? maintenance_mode();
|
||||
break;
|
||||
case "ERROR:INVALID_EXPANSION":?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Invalid expansion.</td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>You may not add new disk(s) and also remove existing disk(s).</td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Invalid expansion.</td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>You may not add new disk(s) and also remove existing disk(s).</td></tr>
|
||||
<? break;
|
||||
case "ERROR:NEW_DISK_TOO_SMALL":?>
|
||||
<tr>
|
||||
<td><?=status_indicator()?><span class="strong big">Stopped</span>. Replacement disk is too small.</td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>The replacement disk must be as big or bigger than the original.</td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Replacement disk is too small.</td><td><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><?=status_indicator()?><span class="strong big">Stopped</span>. Disk in parity slot is not biggest.</td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Disk in parity slot is not biggest.</td><td><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.
|
||||
<br>If you are adding a new disk or replacing a disabled disk, try Parity-Swap.</td>
|
||||
</tr>
|
||||
<br>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><?=status_indicator()?><span class="strong big">Stopped</span>. Invalid configuration.</td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>Too many wrong and/or missing disks!</td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. Invalid configuration.</td><td><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><?=status_indicator()?><span class="strong big">Stopped</span>. No data disks.</td>
|
||||
<td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>No array data disks have been assigned!</td>
|
||||
</tr>
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Stopped</span>. No data disks.</td><td><input type="submit" name="cmdStart" value="Start" disabled></td>
|
||||
<td>No array data disks have been assigned!</td></tr>
|
||||
<? break;
|
||||
endswitch;
|
||||
endif;
|
||||
@@ -575,24 +419,15 @@ toggle_diskio(true);
|
||||
<form name="otherOps" method="POST" action="/update.htm" target="progressFrame">
|
||||
<input type="hidden" name="startState" value="<?=$var['mdState']?>">
|
||||
<table class="array_status">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" name="cmdSpindownAll" value="Spin Down"<?=$parity?' disabled':''?>><input type="submit" name="cmdSpinupAll" value="Spin Up"<?=$parity?' disabled':''?>></td>
|
||||
<td><strong>Spin Down</strong> will immediately spin down all disks.<br><strong>Spin Up</strong> will immediately spin up all disks.</td>
|
||||
</tr>
|
||||
<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>
|
||||
<tr><td></td><td><input type="submit" name="cmdSpindownAll" value="Spin Down"<?=$parity?' disabled':''?>><input type="submit" name="cmdSpinupAll" value="Spin Up"<?=$parity?' disabled':''?>></td>
|
||||
<td><strong>Spin Down</strong> will immediately spin down all disks.<br><strong>Spin Up</strong> will immediately spin up all disks.</td></tr>
|
||||
<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>
|
||||
</table>
|
||||
</form>
|
||||
<?if ($var['shareCacheEnabled']=="yes" && is_dir("/mnt/cache")):?>
|
||||
<form name="mover_schedule" method="POST" action="/update.htm" target="progressFrame">
|
||||
<table class="array_status">
|
||||
<tr><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<tr><td colspan="3"></td></tr><tr><td></td>
|
||||
<?if ($mover):?>
|
||||
<td><input type="submit" name="cmdStartMover" value="Move now" disabled></td><td>Mover is running.</td>
|
||||
<?else:?>
|
||||
@@ -605,11 +440,8 @@ toggle_diskio(true);
|
||||
<?endif;?>
|
||||
<form name="shutdownOps" method="POST" action="/webGui/include/Boot.php">
|
||||
<table class="array_status">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="button" name="reboot" value="Reboot" onclick="shut_down(this.form,'reboot')"><input type="button" name="shutdown" value="Power down" onclick="shut_down(this.form,'shutdown')"></td>
|
||||
<td><strong>Reboot</strong> will activate a <em>clean</em> system reset.<br><strong>Power down</strong> will activate a <em>clean</em> power down.</td>
|
||||
</tr>
|
||||
<tr><td></td><td><input type="button" name="reboot" value="Reboot" onclick="shut_down(this.form,'reboot')"><input type="button" name="shutdown" value="Power down" onclick="shut_down(this.form,'shutdown')"></td>
|
||||
<td><strong>Reboot</strong> will activate a <em>clean</em> system reset.<br><strong>Power down</strong> will activate a <em>clean</em> power down.</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?
|
||||
|
||||
Reference in New Issue
Block a user