Merge pull request #45 from bergware/master

Added 'preset current configuration' with New Config utility
This commit is contained in:
Eric Schultz
2016-06-26 18:19:49 -05:00
committed by GitHub
117 changed files with 247 additions and 161 deletions

View File

@@ -4,7 +4,7 @@ Markdown="false"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
* Copyright 2014-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,

View File

@@ -5,7 +5,7 @@ Markdown="false"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
* Copyright 2014-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,

View File

@@ -4,7 +4,7 @@ Cond="(pgrep('docker')!==false)"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
* Copyright 2014-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,

View File

@@ -5,7 +5,7 @@ Markdown="false"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
* Copyright 2014-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,

View File

@@ -4,7 +4,7 @@ Markdown="false"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
* Copyright 2014-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,

View File

@@ -1,5 +1,5 @@
<?PHP
/* Copyright 2015-2016, Lime Technology
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* Adaptations by Bergware International (May 2016)

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
* Copyright 2014-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
* Copyright 2014-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
* Copyright 2014-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
* Copyright 2014-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,

View File

@@ -1,7 +1,7 @@
#!/usr/bin/php
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
* Copyright 2014-2016, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,

View File

@@ -3,7 +3,7 @@ Title="Install Plugin"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -5,7 +5,7 @@ Tabs="true"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="glob('/boot/config/plugins-error/*.plg')"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="glob('/boot/config/plugins-stale/*.plg')"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,7 +1,7 @@
#!/usr/bin/php -q
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Icon="apple-logo.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Array Devices"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Array Operation"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Boot Device"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Png="dirindex.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="($var['fsState']=='Stopped' || $var['cacheSbNumDisks'])"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="((isset($disks['cache']))&&($disks['cache']['status']!='DISK_NP'))"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Icon="confirmations.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,25 +1,25 @@
Menu="About"
Title="Credits"
---
**unRAID webGUI** Copyright 2005-2016 [Lime Technology, Inc.](http://lime-technology.com).
**unRAID webGUI** Copyright &copy; 2005-2016, [Lime Technology, Inc.](http://lime-technology.com).
**Simple Features** Copyright 2012, Andrew Hamer-Adams.
**Simple Features** Copyright &copy; 2012, Andrew Hamer-Adams.
**Dynamix** Copyright 2012-2016, Bergware International.
**Dynamix** Copyright &copy; 2012-2016, Bergware International.
**Extended Docker Configuration Page** Copyright (C) 2014 Guilherme Jardim.
**Extended Docker Configuration Page** Copyright &copy; 2014-2016, Guilherme Jardim.
**APC UPS Configuration Page** Copyright 2015, by Dan Landon
**APC UPS Configuration Page** Copyright &copy; 2015, Dan Landon.
**VM Manager** Copyright 2015-2016, Eric Schultz, Derek Macias
**VM Manager** Copyright &copy; 2015-2016, Eric Schultz, Derek Macias.
The Software comprising the unRAID webGui, which is all files within this repository except for
files listed below, is licensed under GPL version 2.
* The Lime Technology logo file(s) `webGui/images/limtech-*.*` are property of Lime Technology, Inc.
* The Lime Technology logo file(s) `webGui/images/limetech-*.*` are property of Lime Technology, Inc.
and may not be used in any other project without written permission from Lime Technology, Inc.
***unRAID*** is a registered trademark of [Lime Technology, Inc.](http://lime-technology.com).
***unRAID***&trade; is a registered trademark of [Lime Technology, Inc.](http://lime-technology.com).
This file shall be included in all copies or substantial portions of the Software.

View File

@@ -2,8 +2,8 @@ Menu="Dashboard"
Title="Statistics"
---
<?PHP
/* Copyright 2015-2016, Bergware International.
* Copyright 2005-2016, Lime Technology
/* Copyright 2005-2016, Lime Technology
* Copyright 2012-2016, 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,
@@ -203,7 +203,7 @@ endif;
$dck = exec("df /var/lib/docker|grep -om1 '^/'");
?>
<tr class='wide'><td>Memory usage</td><td colspan='3'><div class='usage-disk sys'><span id='sys0' style='width:0'></span></div></td></tr>
<tr class='wide'><td>flash : log : docker</td><td><div class='usage-disk sys'><span id='sys1' style='width:0'></span></div></td><td><div class='usage-disk sys'><span id='sys2' style='width:0'></span></div></td>
<tr class='wide'><td>flash log docker</td><td><div class='usage-disk sys'><span id='sys1' style='width:0'></span></div></td><td><div class='usage-disk sys'><span id='sys2' style='width:0'></span></div></td>
<td><?if ($dck):?><div class='usage-disk sys'><span id='sys3' style='width:0'></span></div><?else:?>Not available<?endif;?></td></tr>
<tr><td rowspan='2'>Memory size</td><td>allocated</td><td colspan='2' class='blue'><?=my_scale($total,$unit,3)." $unit"?></td></tr>
<tr><td>installed</td><td colspan='2' class='blue'><?="$memory_installed GB (max. capacity $memory_maximum GB)"?></td></tr>

View File

@@ -4,7 +4,7 @@ Icon="date-time.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="strpos($disks[$name]['status'],'_NP')===false"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="strpos($disks[$name]['status'],'_NP')===false"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="strpos($disks[$name]['status'],'_NP')===false"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Png="devicesettings.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Diagnostics"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -2,7 +2,7 @@ Type="xmenu"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="$var['fsState']=='Started' && $var['shareDisk']!='no'"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,
@@ -33,12 +33,21 @@ $(function() {
</table>
<p><input id="compute-disks" type="button" value="Compute All" onclick="$(this).prop('disabled',true);displayDisks('yes')"></p>
> **Colored Status Indicator** the significance of the color indicator at the beginning of each line in *Disk Shares* is as follows:
> **Colored Status Indicator** -- the significance of the color indicator at the beginning of each line in *Disk Shares* is as follows:
>
> <img src='/webGui/images/green-on.png' class='icon'>Mounted, underlying device has redundancy/protection.
>
> <img src='/webGui/images/yellow-on.png' class='icon'>Mounted, underlying device does not have redundancy/protection.
>
> SMB security mode displayed in *italics* indicates exported hidden shares.
> **Security modes:**
> + '-' -- disk share is not exported and unavailable on the network
> + *Public* -- all users including guests have full read/write access (open access)
> + *Secure* -- all users including guests have read access, write access is set per user (limited access)
> + *Private* -- no guest access at all, read/write or read-only access is set per user (closed access)
>
> AFP security mode displayed in *italics* indicates exported time-machine shares.
> **Special modes:**
> + SMB security mode displayed in *italics* indicates exported hidden disk shares.
> + AFP security mode displayed in *italics* indicates exported time-machine disk shares.
> + NFS does not have special modes for disk shares.

View File

@@ -4,7 +4,7 @@ Icon="disk-settings.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Icon="display-settings.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Png="ethernet.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Png="ethernet.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Icon="ftp-server.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Icon="feedback.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Flash Device Settings"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Hardware Profile"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Icon="help.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Icon="ident.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Icon="info.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Icon="log.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="(($var['shareUser']!='-')&&(isset($disks['cache']))&&($disks['cache']['sta
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Icon="linux-logo.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="New Config"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,
@@ -13,24 +13,63 @@ Title="New Config"
* all copies or substantial portions of the Software.
*/
?>
<?
$superdat = file_exists('/boot/config/super.dat');
$disabled = $var['fsState']=="Started" || !$superdat ? 'disabled' : '';
?>
<style>
span.indent{display:inline-block;width:200px;margin-top:11px;}
select.preset{min-width:auto;padding:0 6px;}
</style>
<?if (file_exists('/var/tmp/disks.ini')):?>
<script>
function deleteSmartCfg() {
$.get('/webGui/include/DeleteSmartCfg.php');
function assign(id,disk) {
var pair = {changeDevice:'Apply'};
pair['slotId.'+id] = disk;
$.post('/update.htm',pair);
}
<?
$disks = parse_ini_file('/var/tmp/disks.ini',true);
foreach ($disks as $disk) echo "assign('{$disk['idx']}','{$disk['id']}');";
unlink('/var/tmp/disks.ini');
?>
</script>
<?endif;?>
This is a utility to reset the array disk configuration so that all disks appear as "New" disks, as
if it were a fresh new server.
This is useful when you have added or removed multiple drives and wish to rebuild parity based on
the new configuration.
Use the *'Preset current configuration'* selection to populate the desired disk slots ***after*** the array has been reset. By default all disk slots currently present are populated.
**DO NOT USE THIS UTILITY THINKING IT WILL REBUILD A FAILED DRIVE** - it will have the opposite
effect of making it ***impossible*** to rebuild an existing failed drive - you have been warned!
<hr>
<form name="newConfig" method="POST" action="/update.htm" target="progressFrame">
<?if ($var['fsState']=="Started"):?>
<input type="submit" name="cmdInit" value="Apply" disabled><input type="button" value="Done" onclick="done()">Array must be <strong><big>stopped</big></strong>
<span class="indent">Preset current configuration:</span>
<select name="preset" class="preset" <?=$disabled?>>
<?=mk_option(1,'Parity|Data|Cache','All')?>
<?=mk_option(1,'Parity','Parity only')?>
<?=mk_option(1,'Parity|Data','Parity + Data')?>
<?=mk_option(1,'Parity|Cache','Parity + Cache')?>
<?=mk_option(1,'','None')?>
</select>
<br>
<span class="indent"><input type="submit" name="cmdInit" value="Apply" onclick="$.post('/webGui/include/PrepareDisks.php',{preset:preset.value})" disabled><input type="button" value="Done" onclick="done()"></span>
<?if ($disabled):?>
<?=$superdat ? 'Array must be <b>STOPPED</b>' : 'Array has been <b>RESET</b> (please configure)'?>
<?else:?>
<input type="submit" name="cmdInit" value="Apply" onclick="deleteSmartCfg()" disabled><input type="button" value="Done" onclick="done()"><input type="checkbox" onClick="cmdInit.disabled=!this.checked"><small>Yes I want to do this</small>
<input type="checkbox" onClick="cmdInit.disabled=!this.checked"><small>Yes I want to do this</small>
<?endif;?>
</form>
> *Preset current configuration*
> + **All** - parity, data and cache disks are populated with the current disk assignment **after** an array reset
> + **Parity only** - only parity disk(s) are populated, data and cache disks will be unassigned
> + **Parity + Data** - parity and data disks are populated, cache disks will be unassigned
> + **Parity + Cache** - parity and cache disks are populated, data disks will be unassigned
> + **None** - parity, data and cache disks will all be unassigned

View File

@@ -3,7 +3,7 @@ Title="New Permissions"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,
@@ -13,6 +13,9 @@ Title="New Permissions"
* all copies or substantial portions of the Software.
*/
?>
<style>
select.list{min-width:auto;padding:2px 6px;}
</style>
This is a one-time action to be taken after upgrading from a pre-5.0 unRAID server
release to version 5.0. It is also useful for restoring default ownership/permissions on files and
directories when transitioning back from Active Directory to non-Active Directory integration.
@@ -34,7 +37,7 @@ Clicking Start will open another window and start the background process. Closin
completion will terminate the background process - so don't do that. This process can take a long time if you have many files.
<form method="POST" action="/update.htm" target="progressFrame">
<select id="includeDisk" size="1">
<select id="includeDisk" size="1" class="list">
<option value=''>(All)</option>
<?if (isset($disks['cache'])):?>
<option value='/mnt/cache'>Cache</option>
@@ -47,10 +50,9 @@ completion will terminate the background process - so don't do that. This proces
</select>
<?if ($var['fsState']!="Started"):?>
<input type="button" value="Start" disabled><input type="button" value="Done" onclick="done()"> Array must be <strong><big>started</big></strong> to change permissions.
<input type="button" value="Start" disabled><input type="button" value="Done" onclick="done()"> Array must be <strong>STARTED</strong> to change permissions.
<?else:?>
<input type="button" name="submit_button" value="Start" onclick="openBox('/webGui/scripts/newperms&arg1='+document.getElementById('includeDisk').value,'New Permissions',490,430)" disabled><input type="button" value="Done" onclick="done()">
<input type="checkbox" onClick="submit_button.disabled=!this.checked"><small>Yes I want to do this</small>
<?endif;?>
</form>

View File

@@ -5,7 +5,7 @@ Icon="notifications.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, Bergware International.
* Copyright 2012, Andrew Hamer-Adams, http://www.pixeleyes.co.nz.
*
* This program is free software; you can redistribute it and/or

View File

@@ -4,7 +4,7 @@ Title="Archived Notifications"
<?PHP
/* Copyright 2012, Andrew Hamer-Adams, http://www.pixeleyes.co.nz.
* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Unassigned Devices"
Cond="((count($devs)>0)&&($var['fsState']=='Started'))"
---
<?PHP
/* Copyright 2015-2016, Bergware International.
/* Copyright 2012-2016, Bergware International.
* Copyright 2005-2016, Lime Technology
*
* This program is free software; you can redistribute it and/or

View File

@@ -3,7 +3,7 @@ Title="Page Map"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Parity Check"
Cond="($disks['parity']['status']!='DISK_NP_DSBL')"
---
<?PHP
/* Copyright 2015-2016, Bergware International.
/* Copyright 2012-2016, Bergware International.
* Copyright 2005-2016, Lime Technology
*
* This program is free software; you can redistribute it and/or

View File

@@ -3,7 +3,7 @@ Title="Processes"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="($var['shareSMBEnabled']=='ads')"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="($var['shareSMBEnabled']=='yes')"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="SMB Settings"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="(($var['shareAFPEnabled']!='no') && (isset($name)?array_key_exists($name,$
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="(($var['shareNFSEnabled']!='no') && (isset($name)?array_key_exists($name,$
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="(($var['shareSMBEnabled']!='no') && (isset($name)?array_key_exists($name,$
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="strpos($disks[$name]['status'],'_NP')===false"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -2,7 +2,7 @@ Type="xmenu"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Share Settings"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -4,7 +4,7 @@ Cond="$var['fsState']=="Started" && $var['shareUser']=='e'"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,
@@ -41,12 +41,21 @@ $(function() {
<?endif;?>
</form></p>
> **Colored Status Indicator** the significance of the color indicator at the beginning of each line in *User Shares* is as follows:
> **Colored Status Indicator** -- the significance of the color indicator at the beginning of each line in *User Shares* is as follows:
>
> <img src="/webGui/images/green-on.png" class="icon">All files are on protected storage.
>
> <img src="/webGui/images/yellow-on.png" class="icon">Some or all files are on unprotected storage.
>
> SMB security mode displayed in *italics* indicates exported hidden shares.
> **Security modes:**
> + '-' -- user share is not exported and unavailable on the network
> + *Public* -- all users including guests have full read/write access (open access)
> + *Secure* -- all users including guests have read access, write access is set per user (limited access)
> + *Private* -- no guest access at all, read/write or read-only access is set per user (closed access)
>
> AFP security mode displayed in *italics* indicates exported time-machine shares.
> **Special modes:**
> + SMB security mode displayed in *italics* indicates exported hidden user shares.
> + AFP security mode displayed in *italics* indicates exported time-machine user shares.
> + NFS does not have special modes for user shares.

View File

@@ -5,7 +5,7 @@ Icon="share-settings.png"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="SMTP Settings"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="System Devices"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Syslinux Configuration"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="System Log"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Add User"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Edit User"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Users"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -3,7 +3,7 @@ Title="Vars"
---
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,16 +0,0 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, 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.
*/
?>
<?
@unlink('/boot/config/smart-one.cfg');
@unlink('/boot/config/smart-all.cfg');
?>

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,
@@ -108,7 +108,8 @@ function fs_info(&$disk) {
echo "<td colspan='2'></td><td>{$disk['fsStatus']}</td><td></td>";
echo "<td>".device_browse($disk)."</td>";
}
function array_offline(&$disk) {
function array_offline(&$disk,$w) {
$warning = $w ? '<span class="red-text"><em>ALL DATA ON THIS DISK WILL BE ERASED WHEN ARRAY IS STARTED</em></span>' : '';
echo "<tr>";
switch ($disk['status']) {
case 'DISK_NP':
@@ -119,6 +120,7 @@ function array_offline(&$disk) {
echo "<td colspan='9'></td>";
break;
case 'DISK_OK':
$warning = '';
case 'DISK_INVALID':
case 'DISK_DSBL':
case 'DISK_DSBL_NEW':
@@ -126,7 +128,7 @@ function array_offline(&$disk) {
echo "<td>".device_info($disk)."</td>";
echo "<td>".assignment($disk)."</td>";
echo "<td>".my_temp($disk['temp'])."</td>";
echo "<td colspan='8'></td>";
echo "<td colspan='8'>$warning</td>";
break;
case 'DISK_NP_MISSING':
echo "<td>".device_info($disk)."<span class='diskinfo'><em>Missing</em></span></td>";
@@ -137,7 +139,7 @@ function array_offline(&$disk) {
echo "<td>".device_info($disk)."<span class='diskinfo'><em>Wrong</em></span></td>";
echo "<td>".assignment($disk)."<em>{$disk['idSb']} - ".my_scale($disk['sizeSb']*1024,$unit)." $unit</em></td>";
echo "<td>".my_temp($disk['temp'])."</td>";
echo "<td colspan='8'></td>";
echo "<td colspan='8'>$warning</td>";
break;
}
echo "</tr>";
@@ -265,8 +267,9 @@ function cache_slots() {
switch ($_POST['device']) {
case 'array':
if ($var['fsState']=='Stopped') {
foreach ($disks as $disk) {if ($disk['type']=='Parity') array_offline($disk);}
foreach ($disks as $disk) {if ($disk['type']=='Data') array_offline($disk);}
foreach ($disks as $disk) {if ($disk['type']=='Parity') array_offline($disk,true);}
echo "<tr class='tr_last'><td style='height:12px' colspan='11'></td></tr>";
foreach ($disks as $disk) {if ($disk['type']=='Data') array_offline($disk,false);}
echo "<tr class='tr_last'><td><img src='/webGui/images/sum.png' class='icon'>Slots:</td><td colspan='9'>".array_slots()."</td><td></td></tr>";
} else {
foreach ($disks as $disk) {if ($disk['type']=='Parity' && $disk['status']!='DISK_NP_DSBL') array_online($disk);}
@@ -289,7 +292,7 @@ case 'flash':
break;
case 'cache':
if ($var['fsState']=='Stopped') {
foreach ($disks as $disk) {if ($disk['type']=='Cache') array_offline($disk);}
foreach ($disks as $disk) {if ($disk['type']=='Cache') array_offline($disk,false);}
echo "<tr class='tr_last'><td><img src='/webGui/images/sum.png' class='icon'>Slots:</td><td colspan='9'>".cache_slots()."</td><td></td></tr>";
} else {
foreach ($disks as $disk) {if ($disk['type']=='Cache') array_online($disk);}

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, Bergware International.
* Copyright 2012, Andrew Hamer-Adams, http://www.pixeleyes.co.nz.
*
* This program is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -0,0 +1,30 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2012-2016, 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.
*/
?>
<?
function preset($disk) {
return strpos($_POST['preset'],$disk['type'])!==false;
}
@unlink('/boot/config/smart-one.cfg');
@unlink('/boot/config/smart-all.cfg');
if ($_POST['preset']) {
$disks = parse_ini_file('/var/local/emhttp/disks.ini',true);
$disks = array_filter($disks,'preset');
$text = '';
foreach ($disks as $disk => $block) {
$text .= "[$disk]\n";
foreach ($block as $key => $value) $text .= "$key=\"$value\"\n";
}
file_put_contents('/var/tmp/disks.ini',$text);
}
?>

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
* Copyright 2012-2016, 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,

Some files were not shown because too many files have changed in this diff Show More