Merge pull request #380 from bergware/master

Added "ignore" text to BTRFS profiles warning
This commit is contained in:
Eric Schultz
2018-09-08 17:08:08 -05:00
committed by GitHub
7 changed files with 22 additions and 39 deletions
+5 -4
View File
@@ -115,7 +115,7 @@ Day of the week:
<?endif;?>
</select>
> When a weekly or custom schedule is selected then choose here the preferred day of the week, otherwise this setting is unavailable.
> When a **weekly** or **custom** schedule is selected then choose here the preferred *day of the week*, in the other schedules this setting is not used and unavailable.
<?if ($parity['mode']<5):?>
Day of the month:
@@ -143,7 +143,8 @@ Week of the month:
<?endif;?>
</select>
> When a monthly, yearly or custom schedule is selected then choose here the preferred day of the month, otherwise this setting is unavailable.
> When a **monthly** or **yearly** schedule is selected then choose here the preferred *day of the month*.
> When a **custom** schedule is selected then choose here the preferred *week of the month*, in the other schedules this setting is not used and unavailable.
Time of the day:
: <select name="hour" size="1">
@@ -157,7 +158,7 @@ Time of the day:
<?endif;?>
</select>
> Choose the desired time to start the schedule. Granularity is given in half hour periods.
> Choose the desired *time of the day* to start the schedule. Time granularity is given in half hour periods.
Month of the year:
<?if ($parity['mode']>=4):?>
@@ -178,7 +179,7 @@ Month of the year:
<?endif;?>
</select>
> When a yearly or custom schedule is selected then choose here the preferred month of the year, otherwise this setting is unavailable.
> When a **yearly** or **custom** schedule is selected then choose here the preferred *month of the year*, in the other schedules this setting is not used and unavailable.
Write corrections to parity disk:
: <select name="write" size="1">
+12 -30
View File
@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2017, Lime Technology
* Copyright 2012-2017, Bergware International.
/* Copyright 2005-2018, Lime Technology
* Copyright 2012-2018, 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,
@@ -18,39 +18,21 @@ $memory = '/tmp/memory.tmp';
if (isset($_POST['#apply'])) {
$cron = "";
if ($_POST['mode']>0) {
$time = isset($_POST['hour']) ? $_POST['hour'] : '* *';
$dotm = isset($_POST['dotm']) ? $_POST['dotm'] : '*';
$time = $_POST['hour'] ?? '* *';
$dotm = $_POST['dotm'] ?? '*';
$term = $echo = '';
switch ($dotm) {
case '28-31':
$term = '[[ $(date +%e -d +1day) -eq 1 ]] && ';
break;
case 'W1':
$dotm = '*';
$term = '[[ $(date +%e) -le 7 ]] && ';
break;
case 'W2':
$dotm = '*';
$term = '[[ $(date +%e -d -7days) -le 7 ]] && ';
break;
case 'W3':
$dotm = '*';
$term = '[[ $(date +%e -d -14days) -le 7 ]] && ';
break;
case 'W4':
$dotm = '*';
$term = '[[ $(date +%e -d -21days) -le 7 ]] && ';
break;
case 'WL':
$dotm = '*';
$term = '[[ $(date +%e -d +7days) -le 7 ]] && ';
break;
default:
$term = '';
case '28-31': $term = '[[ $(date +%e -d +1day) -eq 1 ]] && '; $echo = ' || :'; break;
case 'W1' : $dotm = '1-7'; break;
case 'W2' : $dotm = '8-14'; break;
case 'W3' : $dotm = '15-21'; break;
case 'W4' : $dotm = '22-28'; break;
case 'WL' : $dotm = '24-31'; break;
}
$month = isset($_POST['month']) ? $_POST['month'] : '*';
$day = isset($_POST['day']) ? $_POST['day'] : '*';
$write = isset($_POST['write']) ? $_POST['write'] : '';
$cron = "# Generated parity check schedule:\n$time $dotm $month $day $term/usr/local/sbin/mdcmd check $write &> /dev/null || :\n\n";
$cron = "# Generated parity check schedule:\n$time $dotm $month $day $term/usr/local/sbin/mdcmd check $write &> /dev/null{$echo}\n\n";
}
parse_cron_cfg("dynamix", "parity-check", $cron);
@unlink($memory);
+1 -1
View File
@@ -242,7 +242,7 @@ foreach ($disks as $disk) {
$attr = 'profile';
if (exec("/sbin/btrfs filesystem df /mnt/cache 2>/dev/null|grep -c '^Data'")>1) {
if (empty($saved[$item][$attr])) {
exec("$notify -e ".escapeshellarg("Unraid $text message")." -s ".escapeshellarg("Warning [$server] - Cache pool BTRFS too many profiles")." -d ".escapeshellarg("$info")." -i \"warning\"");
exec("$notify -e ".escapeshellarg("Unraid $text message")." -s ".escapeshellarg("Warning [$server] - Cache pool BTRFS too many profiles (You can ignore this warning when a cache pool balance operation is in progress)")." -d ".escapeshellarg("$info")." -i \"warning\"");
$saved[$item][$attr] = 1;
}
} elseif (isset($saved[$item][$attr])) unset($saved[$item][$attr]);
+1 -1
View File
@@ -47,7 +47,7 @@ form+p{display:none}
#header{position:fixed;top:0;left:0;width:100%;height:90px;z-index:100;margin:0;background-color:#edeaef;background-size:100% 90px;background-repeat:no-repeat;border-bottom:#9794a0 1px solid}
#header .logo{float:left;margin-left:75px;color:#e22828;width:160px;text-align:center}
#header .logo svg{width:160px;display:block;margin:25px 50px 8px 0}
#header .block{margin:0;float:right;text-align:right;background-color:rgba(237,234,239,0.7);padding:7px 12px}
#header .block{margin:0;float:right;text-align:right;background-color:rgba(237,234,239,0.7);padding:6px 12px 7px 12px}
#header .text-left{float:left;text-align:right;padding-right:5px;border-right:solid medium #f15a2c}
#header .text-right{float:right;text-align:left;padding-left:5px}
#header .text-right a{color:#606e7f}
+1 -1
View File
@@ -229,7 +229,7 @@ div.Panel img.PanelImg{width:auto;max-width:48px;height:48px}
div.Panel i.PanelIcon{font-size:48px}
div.user-list{float:left;padding:10px;margin-right:10px;margin-bottom:24px;border:1px solid #2f2f2f;border-radius:5px;line-height:20px;height:100px;width:100px;background:#262626}
div.user-list img{width:auto;max-width:48px;height:48px;margin-bottom:16px}
div.up{margin-top:-20px;border:1px solid #2b2b2b;padding:4px 6px;overflow:auto}
div.up{margin-top:-30px;border:1px solid #2b2b2b;padding:4px 6px;overflow:auto}
div.spinner{margin:48px auto;text-align:center}
div.spinner.fixed{display:none;position:fixed;top:50%;left:50%;margin-top:-16px;margin-left:-64px}
div.spinner .unraid_mark{height:64px}
+1 -1
View File
@@ -47,7 +47,7 @@ form+p{display:none}
#header{position:fixed;top:0;left:0;width:100%;height:90px;z-index:100;margin:0;background-color:#121510;background-size:100% 90px;background-repeat:no-repeat;border-bottom:#42453e 1px solid}
#header .logo{float:left;margin-left:75px;color:#e22828;width:160px;text-align:center}
#header .logo svg{width:160px;display:block;margin:25px 50px 8px 0}
#header .block{margin:0;float:right;text-align:right;background-color:rgba(18,21,16,0.7);padding:7px 12px}
#header .block{margin:0;float:right;text-align:right;background-color:rgba(18,21,16,0.7);padding:6px 12px 7px 12px}
#header .text-left{float:left;text-align:right;padding-right:5px;border-right:solid medium #f15a2c}
#header .text-right{float:right;text-align:left;padding-left:5px}
#header .text-right a{color:#606e7f}
+1 -1
View File
@@ -229,7 +229,7 @@ div.Panel img.PanelImg{width:auto;max-width:48px;height:48px}
div.Panel i.PanelIcon{font-size:48px}
div.user-list{float:left;padding:10px;margin-right:10px;margin-bottom:24px;border:1px solid #dedede;border-radius:5px;line-height:20px;height:100px;width:100px;background:#e8e8e8}
div.user-list img{width:auto;max-width:48px;height:48px;margin-bottom:16px}
div.up{margin-top:-20px;border:1px solid #e3e3e3;padding:4px 6px;overflow:auto}
div.up{margin-top:-30px;border:1px solid #e3e3e3;padding:4px 6px;overflow:auto}
div.spinner{margin:48px auto;text-align:center}
div.spinner.fixed{display:none;position:fixed;top:50%;left:50%;margin-top:-16px;margin-left:-64px}
div.spinner .unraid_mark{height:64px}