mirror of
https://github.com/unraid/webgui.git
synced 2026-01-05 00:59:48 -06:00
Fixes for ZFS subpools
This commit is contained in:
@@ -15,12 +15,14 @@ Tag="database"
|
||||
*/
|
||||
?>
|
||||
<script>
|
||||
String.prototype.no_tilde = function(){return this.replace('~','_-_');}
|
||||
|
||||
function toggle_state(device,name,action) {
|
||||
var button = null;
|
||||
if (name) {
|
||||
var group = name.replace(/(\d+|\*)$/,'');
|
||||
if (name.slice(-1)!='*') {
|
||||
$('#dev-'+name.replace('~','_-_')).removeClass('fa-circle fa-square fa-warning fa-times').addClass('fa-refresh fa-spin');
|
||||
$('#dev-'+name.no_tilde()).removeClass('fa-circle fa-square fa-warning fa-times').addClass('fa-refresh fa-spin');
|
||||
} else {
|
||||
if (group=='array') {
|
||||
$('[id^="dev-parity"]').removeClass('fa-circle fa-square fa-warning fa-times').addClass('fa-refresh fa-spin');
|
||||
|
||||
@@ -322,7 +322,7 @@ if ($saved) {
|
||||
$text = '';
|
||||
foreach ($saved as $item => $block) {
|
||||
if ($block) $text .= "[$item]\n";
|
||||
foreach ($block as $key => $value) $text .= str_replace('~','_-_',$key)."=\"$value\"\n";
|
||||
foreach ($block as $key => $value) $text .= no_tilde($key)."=\"$value\"\n";
|
||||
}
|
||||
if ($text) {
|
||||
if ($text != @file_get_contents($ram)) file_put_contents($ram, $text);
|
||||
|
||||
Reference in New Issue
Block a user