mirror of
https://github.com/unraid/webgui.git
synced 2026-01-15 06:00:14 -06:00
Replaced orb png icons by font-awesome
This commit is contained in:
@@ -4,8 +4,8 @@ Tag="bullseye"
|
||||
Cond="($var['fsState']=='Stopped' || $var['cacheSbNumDisks'])"
|
||||
---
|
||||
<?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,
|
||||
@@ -44,13 +44,13 @@ endforeach;
|
||||
|
||||
> **Colored Status Indicator** the significance of the color indicator at the beginning of each line in *Cache Devices* is as follows:
|
||||
>
|
||||
> <img src='/webGui/images/green-on.png' class='icon'>Normal operation, device is active.
|
||||
> <i class='fa fa-circle orb green-orb'></i>Normal operation, device is active.
|
||||
>
|
||||
> <img src='/webGui/images/green-blink.png' class='icon'>Device is in standby mode (spun-down).
|
||||
> <i class='fa fa-circle orb grey-orb'></i>Device is in standby mode (spun-down).
|
||||
>
|
||||
> <img src='/webGui/images/blue-on.png' class='icon'>New device.
|
||||
> <i class='fa fa-square orb blue-orb'></i>New device.
|
||||
>
|
||||
> <img src='/webGui/images/grey-off.png' class='icon'>No device present, position is empty.
|
||||
> <i class='fa fa-square orb grey-orb'></i>No device present, position is empty.
|
||||
>
|
||||
> **Cache** is a device, or device pool, *outside* the Unraid array. It may be exported for network access just
|
||||
> like an Array device. Being outside the Unraid array results in significantly faster write access.
|
||||
|
||||
@@ -33,7 +33,7 @@ $(function() {
|
||||
});
|
||||
</script>
|
||||
|
||||
<table class="share_status share wide">
|
||||
<table class="share_status share">
|
||||
<thead><tr><td style="width:15%">Name</td><td style="width:33%">Comment</td><td>SMB</td><td>NFS</td><td>AFP</td><td>Size</td><td>Free</td><td>View</td></tr></thead>
|
||||
<tbody id="disk_list"></tbody>
|
||||
</table>
|
||||
@@ -41,9 +41,9 @@ $(function() {
|
||||
|
||||
> **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.
|
||||
> <i class='fa fa-circle orb green-orb'></i>Mounted, underlying device has redundancy/protection.
|
||||
>
|
||||
> <img src='/webGui/images/yellow-on.png' class='icon'>Mounted, underlying device does not have redundancy/protection.
|
||||
> <i class='fa fa-warning orb yellow-orb'></i>Mounted, underlying device does not have redundancy/protection.
|
||||
>
|
||||
> **Security modes:**
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ $(function() {
|
||||
});
|
||||
</script>
|
||||
|
||||
<table class="share_status share wide">
|
||||
<table class="share_status share">
|
||||
<thead><tr><td style="width:15%">Name</td><td style="width:33%">Comment</td><td>SMB</td><td>NFS</td><td>AFP</td><td>Size</td><td>Free</td><td>View</td></tr></thead>
|
||||
<tbody id="shareslist"></tbody>
|
||||
</table>
|
||||
@@ -48,9 +48,9 @@ $(function() {
|
||||
|
||||
> **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.
|
||||
> <i class='fa fa-circle orb green-orb'></i>All files are on protected storage.
|
||||
>
|
||||
> <img src="/webGui/images/yellow-on.png" class="icon">Some or all files are on unprotected storage.
|
||||
> <i class='fa fa-warning orb yellow-orb'></i>Some or all files are on unprotected storage.
|
||||
>
|
||||
> **Security modes:**
|
||||
|
||||
|
||||
@@ -52,17 +52,17 @@ function device_info(&$disk,$online) {
|
||||
} else
|
||||
$ctrl = '';
|
||||
switch ($disk['color']) {
|
||||
case 'green-on': $help = 'Normal operation, device is active'; break;
|
||||
case 'green-blink': $help = 'Device is in standby mode (spun-down)'; break;
|
||||
case 'blue-on': $help = 'New device'; break;
|
||||
case 'blue-blink': $help = 'New device, in standby mode (spun-down)'; break;
|
||||
case 'yellow-on': $help = $disk['type']=='Parity' ? 'Parity is invalid' : 'Device contents emulated'; break;
|
||||
case 'yellow-blink': $help = $disk['type']=='Parity' ? 'Parity is invalid, in standby mode (spun-down)' : 'Device contents emulated, in standby mode (spun-down)'; break;
|
||||
case 'red-on': case 'red-blink': $help = $disk['type']=='Parity' ? 'Parity device is disabled' : 'Device is disabled, contents emulated'; break;
|
||||
case 'red-off': $help = $disk['type']=='Parity' ? 'Parity device is missing' : 'Device is missing (disabled), contents emulated'; break;
|
||||
case 'grey-off': $help = 'Device not present'; break;
|
||||
case 'green-on': $orb = 'circle'; $color = 'green'; $help = 'Normal operation, device is active'; break;
|
||||
case 'green-blink': $orb = 'circle'; $color = 'grey'; $help = 'Device is in standby mode (spun-down)'; break;
|
||||
case 'blue-on': $orb = 'square'; $color = 'blue'; $help = 'New device'; break;
|
||||
case 'blue-blink': $orb = 'square'; $color = 'grey'; $help = 'New device, in standby mode (spun-down)'; break;
|
||||
case 'yellow-on': $orb = 'warning'; $color = 'yellow'; $help = $disk['type']=='Parity' ? 'Parity is invalid' : 'Device contents emulated'; break;
|
||||
case 'yellow-blink': $orb = 'warning'; $color = 'grey'; $help = $disk['type']=='Parity' ? 'Parity is invalid, in standby mode (spun-down)' : 'Device contents emulated, in standby mode (spun-down)'; break;
|
||||
case 'red-on': case 'red-blink': $orb = 'times'; $color = 'red'; $help = $disk['type']=='Parity' ? 'Parity device is disabled' : 'Device is disabled, contents emulated'; break;
|
||||
case 'red-off': $orb = 'times'; $color = 'red'; $help = $disk['type']=='Parity' ? 'Parity device is missing' : 'Device is missing (disabled), contents emulated'; break;
|
||||
case 'grey-off': $orb = 'square'; $color = 'grey'; $help = 'Device not present'; break;
|
||||
}
|
||||
$status = "$ctrl<a class='info nohand' onclick='return false'><img src='/webGui/images/{$disk['color']}.png' class='icon'><span>$help</span></a>";
|
||||
$status = "$ctrl<a class='info nohand' onclick='return false'><i class='fa fa-$orb orb $color-orb'></i><span>$help</span></a>";
|
||||
$link = ($disk['type']=='Parity' && strpos($disk['status'],'_NP')===false) ||
|
||||
($disk['type']=='Data' && $disk['status']!='DISK_NP') ||
|
||||
($disk['type']=='Cache' && $disk['status']!='DISK_NP') ||
|
||||
@@ -101,7 +101,13 @@ function device_browse(&$disk) {
|
||||
function device_desc(&$disk) {
|
||||
global $var;
|
||||
$size = my_scale($disk['size'] ? $disk['size']*1024 : $disk['sectors']*$disk['sector_size'],$unit,-1);
|
||||
$log = $var['fsState']=='Started' ? "<a href=\"#\" title=\"Disk Log Information\" onclick=\"openBox('/webGui/scripts/disk_log&arg1={$disk['device']}','Disk Log Information',600,900,false);return false\"><i class=\"fa fa-hdd-o icon\"></i></a>" : "";
|
||||
switch ($disk['type']) {
|
||||
case 'Flash' : $type = 'usb'; break;
|
||||
case 'Parity': $type = $disk['rotational'] ? 'disk' : 'nvme'; break;
|
||||
case 'Data' :
|
||||
case 'Cache' : $type = $disk['rotational'] ? ($disk['luksState'] ? 'disk-encrypted' : 'disk') : 'nvme'; break;
|
||||
}
|
||||
$log = $var['fsState']=='Started' ? "<a href=\"#\" title=\"Disk Log Information\" style=\"text-decoration:none\" onclick=\"openBox('/webGui/scripts/disk_log&arg1={$disk['device']}','Disk Log Information',600,900,false);return false\"><i class=\"icon-$type icon\"></i></a>" : "";
|
||||
return $log.my_id($disk['id'])." - $size $unit ({$disk['device']})";
|
||||
}
|
||||
function assignment(&$disk) {
|
||||
@@ -137,13 +143,13 @@ function fs_info(&$disk) {
|
||||
echo "<td>".my_scale($disk['fsUsed']*1024,$unit)." $unit</td>";
|
||||
} else {
|
||||
$used = isset($disk['fsSize']) && $disk['fsSize']>0 ? 100-round(100*$disk['fsFree']/$disk['fsSize']) : 0;
|
||||
echo "<td><div class='usage-disk'><span style='margin:0;width:$used%' class='".usage_color($disk,$used,false)."'><span>".my_scale($disk['fsUsed']*1024,$unit)." $unit</span></span></div></td>";
|
||||
echo "<td><div class='usage-disk'><span style='width:$used%' class='".usage_color($disk,$used,false)."'></span>".my_scale($disk['fsUsed']*1024,$unit)." $unit</div></td>";
|
||||
}
|
||||
if ($display['text']<10 ? $display['text']%10==0 : $display['text']%10!=0) {
|
||||
echo "<td>".my_scale($disk['fsFree']*1024,$unit)." $unit</td>";
|
||||
} else {
|
||||
$free = isset($disk['fsSize']) && $disk['fsSize']>0 ? round(100*$disk['fsFree']/$disk['fsSize']) : 0;
|
||||
echo "<td><div class='usage-disk'><span style='margin:0;width:$free%' class='".usage_color($disk,$free,true)."'><span>".my_scale($disk['fsFree']*1024,$unit)." $unit</span></span></div></td>";
|
||||
echo "<td><div class='usage-disk'><span style='width:$free%' class='".usage_color($disk,$free,true)."'></span>".my_scale($disk['fsFree']*1024,$unit)." $unit</div></td>";
|
||||
}
|
||||
echo "<td>".device_browse($disk)."</td>";
|
||||
} else
|
||||
@@ -193,9 +199,10 @@ function array_offline(&$disk) {
|
||||
case 'DISK_INVALID':
|
||||
case 'DISK_DSBL_NEW':
|
||||
case 'DISK_NEW':
|
||||
$spin = strpos($disk['color'],'blink')===false;
|
||||
echo "<td>".device_info($disk,false)."</td>";
|
||||
echo "<td>".assignment($disk)."</td>";
|
||||
echo "<td>".my_temp($disk['temp'])."</td>";
|
||||
echo "<td>".($spin ? my_temp($disk['temp']) : '*')."</td>";
|
||||
echo "<td colspan='8'>$warning</td>";
|
||||
break;
|
||||
case 'DISK_WRONG':
|
||||
@@ -246,9 +253,10 @@ function array_online(&$disk) {
|
||||
break;
|
||||
case 'DISK_DSBL':
|
||||
default:
|
||||
$spin = strpos($disk['color'],'blink')===false;
|
||||
echo "<td>".device_info($disk,true)."</td>";
|
||||
echo "<td>".device_desc($disk)."</td>";
|
||||
echo "<td>".my_temp($disk['temp'])."</td>";
|
||||
echo "<td>".($spin ? my_temp($disk['temp']) : '*')."</td>";
|
||||
echo "<td><span class='diskio'>".my_diskio($data[0])."</span><span class='number'>".my_number($disk['numReads'])."</span></td>";
|
||||
echo "<td><span class='diskio'>".my_diskio($data[1])."</span><span class='number'>".my_number($disk['numWrites'])."</span></td>";
|
||||
echo "<td>".my_number($disk['numErrors'])."</td>";
|
||||
@@ -293,13 +301,13 @@ function show_totals($text) {
|
||||
echo "<td>".my_scale($sum['fsUsed']*1024,$unit)." $unit</td>";
|
||||
} else {
|
||||
$used = $sum['fsSize'] ? 100-round(100*$sum['fsFree']/$sum['fsSize']) : 0;
|
||||
echo "<td><div class='usage-disk'><span style='margin:0;width:$used%' class='".usage_color($display,$used,false)."'><span>".my_scale($sum['fsUsed']*1024,$unit)." $unit</span></span></div></td>";
|
||||
echo "<td><div class='usage-disk'><span style='width:$used%' class='".usage_color($display,$used,false)."'></span>".my_scale($sum['fsUsed']*1024,$unit)." $unit</div></td>";
|
||||
}
|
||||
if ($display['text']<10 ? $display['text']%10==0 : $display['text']%10!=0) {
|
||||
echo "<td>".my_scale($sum['fsFree']*1024,$unit)." $unit</td>";
|
||||
} else {
|
||||
$free = $sum['fsSize'] ? round(100*$sum['fsFree']/$sum['fsSize']) : 0;
|
||||
echo "<td><div class='usage-disk'><span style='margin:0;width:$free%' class='".usage_color($display,$free,true)."'><span>".my_scale($sum['fsFree']*1024,$unit)." $unit</span></span></div></td>";
|
||||
echo "<td><div class='usage-disk'><span style='width:$free%' class='".usage_color($display,$free,true)."'></span>".my_scale($sum['fsFree']*1024,$unit)." $unit</div></td>";
|
||||
}
|
||||
echo "<td></td>";
|
||||
} else
|
||||
@@ -348,7 +356,7 @@ case 'array':
|
||||
foreach ($parity as $disk) array_offline($disk);
|
||||
echo "<tr class='tr_last'><td style='height:12px' colspan='11'></td></tr>";
|
||||
foreach ($data as $disk) array_offline($disk);
|
||||
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>";
|
||||
echo "<tr class='tr_last'><td>Slots:</td><td colspan='9'>".array_slots()."</td><td></td></tr>";
|
||||
} else {
|
||||
foreach ($parity as $disk) if ($disk['status']!='DISK_NP_DSBL') array_online($disk);
|
||||
foreach ($data as $disk) array_online($disk);
|
||||
@@ -361,7 +369,7 @@ case 'flash':
|
||||
$disk['fsUsed'] = $disk['fsSize']-$disk['fsFree'];
|
||||
$flash = &$sec['flash']; $share = "";
|
||||
if ($var['shareSMBEnabled']=='yes' && $flash['export']=='e' && $flash['security']=='public')
|
||||
$share = "<a class='info nohand' onclick='return false'><i class='fa fa-warning fa-fw orange-text'></i><span>Flash device is set as public share<br>Please change share SMB security</span></a>";
|
||||
$share = "<a class='info nohand' onclick='return false'><i class='fa fa-warning fa-fw orange-text'></i><span>Flash device is set as public share<br>Please change share SMB security<br>Click on <b>FLASH</b> above this message</span></a>";
|
||||
echo "<tr>";
|
||||
echo "<td>".$share.device_info($disk,true)."</td>";
|
||||
echo "<td>".device_desc($disk)."</td>";
|
||||
@@ -385,7 +393,7 @@ case 'cache':
|
||||
}
|
||||
$data = []; foreach ($log as $key => $value) $data[] = "$key=\"$value\"";
|
||||
file_put_contents($tmp,implode("\n",$data));
|
||||
echo "<tr class='tr_last'><td><img src='/webGui/images/sum.png' class='icon'>Slots:</td><td colspan='9'>".cache_slots($off)."</td><td></td></tr>";
|
||||
echo "<tr class='tr_last'><td>Slots:</td><td colspan='9'>".cache_slots($off)."</td><td></td></tr>";
|
||||
} else {
|
||||
foreach ($cache as $disk) array_online($disk);
|
||||
@unlink($tmp);
|
||||
|
||||
@@ -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,
|
||||
@@ -74,10 +74,9 @@ $row = 0;
|
||||
foreach ($disks as $name => $disk) {
|
||||
$color = $disk['fsColor'];
|
||||
$row++;
|
||||
$ball = "/webGui/images/$color.png";
|
||||
switch ($color) {
|
||||
case 'green-on': $help = 'All files protected'; break;
|
||||
case 'yellow-on': $help = 'All files unprotected'; break;
|
||||
case 'green-on' : $orb = 'circle'; $color = 'green'; $help = 'All files protected'; break;
|
||||
case 'yellow-on': $orb = 'warning'; $color = 'yellow'; $help = 'All files unprotected'; break;
|
||||
}
|
||||
if ($crypto) switch ($disk['luksState']) {
|
||||
case 0: $luks = "<i class='nolock fa fa-lock'></i>"; break;
|
||||
@@ -86,7 +85,7 @@ foreach ($disks as $name => $disk) {
|
||||
default: $luks = "<a class='info' onclick='return false'><i class='padlock fa fa-lock red-text'></i><span>Unknown encryption state'</span></a>"; break;
|
||||
} else $luks = "";
|
||||
echo "<tr>";
|
||||
echo "<td><a class='info nohand' onclick='return false'><img src='$ball' class='icon'><span style='left:18px'>$help</span></a>$luks<a href='$path/Disk?name=$name' onclick=\"$.cookie('one','tab1',{path:'/'})\">$name</a></td>";
|
||||
echo "<td><a class='info nohand' onclick='return false'><i class='fa fa-$orb orb $color-orb'></i><span style='left:18px'>$help</span></a>$luks<a href='$path/Disk?name=$name' onclick=\"$.cookie('one','tab1',{path:'/'})\">$name</a></td>";
|
||||
echo "<td>{$disk['comment']}</td>";
|
||||
echo "<td>".disk_share_settings($var['shareSMBEnabled'], $sec[$name])."</td>";
|
||||
echo "<td>".disk_share_settings($var['shareNFSEnabled'], $sec_nfs[$name])."</td>";
|
||||
|
||||
@@ -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,
|
||||
@@ -75,10 +75,9 @@ $row = 0;
|
||||
foreach ($shares as $name => $share) {
|
||||
$row++;
|
||||
$color = $share['color'];
|
||||
$ball = "/webGui/images/$color.png";
|
||||
switch ($color) {
|
||||
case 'green-on': $help = 'All files protected'; break;
|
||||
case 'yellow-on': $help = 'Some or all files unprotected'; break;
|
||||
case 'green-on' : $orb = 'circle'; $color = 'green'; $help = 'All files protected'; break;
|
||||
case 'yellow-on': $orb = 'warning'; $color = 'yellow'; $help = 'Some or all files unprotected'; break;
|
||||
}
|
||||
if ($crypto) switch ($share['luksStatus']) {
|
||||
case 0: $luks = "<i class='nolock fa fa-lock'></i>"; break;
|
||||
@@ -87,7 +86,7 @@ foreach ($shares as $name => $share) {
|
||||
default: $luks = "<a class='info' onclick='return false'><i class='padlock fa fa-lock red-text'></i><span>Unknown encryption state'</span></a>"; break;
|
||||
} else $luks = "";
|
||||
echo "<tr>";
|
||||
echo "<td><a class='info nohand' onclick='return false'><img src='$ball' class='icon'><span style='left:18px'>$help</span></a>$luks<a href='$path/Share?name=".urlencode($name)."' onclick=\"$.cookie('one','tab1',{path:'/'})\">$name</a></td>";
|
||||
echo "<td><a class='info nohand' onclick='return false'><i class='fa fa-$orb orb $color-orb'></i><span style='left:18px'>$help</span></a>$luks<a href='$path/Share?name=".urlencode($name)."' onclick=\"$.cookie('one','tab1',{path:'/'})\">$name</a></td>";
|
||||
echo "<td>{$share['comment']}</td>";
|
||||
echo "<td>".user_share_settings($var['shareSMBEnabled'], $sec[$name])."</td>";
|
||||
echo "<td>".user_share_settings($var['shareNFSEnabled'], $sec_nfs[$name])."</td>";
|
||||
|
||||
Reference in New Issue
Block a user