mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 02:58:57 -05:00
Remove unused code
This commit is contained in:
@@ -15,7 +15,6 @@ Tag="snowflake-o"
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$hide = '/var/tmp/hide_format_button.tmp';
|
||||
$stop = ($var['fsEncryption']=='wrong' || ($var['fsEncryption']=='missing' && $var['luksRestricted']=='yes')) ? 'disabled':'';
|
||||
|
||||
function maintenance_mode() {
|
||||
@@ -78,9 +77,9 @@ function parity_warning(form) {
|
||||
function stop_array(form) {
|
||||
$(form).append('<input type="hidden" name="cmdStop" value="Stop">');
|
||||
<?if ($confirm['stop']):?>
|
||||
swal({title:'Proceed?',text:'This will stop the array',type:'warning',showCancelButton:true},function(p){if (p) $.post('/webGui/include/HideFormatButton.php',{hide:'no'},function(){form.submit();}); else $('input[name="cmdStop"]').remove();});
|
||||
swal({title:'Proceed?',text:'This will stop the array',type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmdStop"]').remove();});
|
||||
<?else:?>
|
||||
$.post('/webGui/include/HideFormatButton.php',{hide:'no'},function(){form.submit();});
|
||||
form.submit();
|
||||
<?endif;?>
|
||||
}
|
||||
function stop_parity(form,text) {
|
||||
@@ -184,7 +183,7 @@ toggle_diskio(true);
|
||||
<tr><td><?=status_indicator()?><span class="strong big">Started<?=(($var['startMode']=='Maintenance')?' - Maintenance Mode':'')?></span></td>
|
||||
<td><input type="button" value="Stop" onclick="stop_array(this.form)"<?if ($parity||$mover):?> disabled<?endif;?>></td>
|
||||
<td><strong>Stop</strong> will take the array off-line.<?=$parity?"<br>$parity":($mover?"<br>$mover":"")?></td></tr>
|
||||
<? if ($var['fsNumUnmountable']>0 && !file_exists($hide)):?>
|
||||
<? if ($var['fsNumUnmountable']>0):?>
|
||||
<tr><td><strong>Unmountable disk<?=$var['fsNumUnmountable']==1?'':'s'?> present:</strong><br>
|
||||
<? foreach ($disks as $disk) if (strpos($disk['fsStatus'],'Unmountable')!==false)
|
||||
echo "<span class='blue-text'>".my_disk($disk['name'])."</span> • ".my_id($disk['id'])." (".$disk['device'].")<br>";?>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<?PHP
|
||||
/* Copyright 2005-2017, Lime Technology
|
||||
* Copyright 2012-2017, Bergware International.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$hide = '/var/tmp/hide_format_button.tmp';
|
||||
$flag = file_exists($hide);
|
||||
|
||||
switch ($_POST['hide']) {
|
||||
case 'yes': if (!$flag) touch($hide); break;
|
||||
case 'no' : if ($flag) unlink($hide); break;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user