mirror of
https://github.com/unraid/webgui.git
synced 2026-03-03 06:40:50 -06:00
repo reorg
This commit is contained in:
81
emhttp/plugins/dynamix/ArrayDevices.page
Normal file
81
emhttp/plugins/dynamix/ArrayDevices.page
Normal file
@@ -0,0 +1,81 @@
|
||||
Menu="Main:1"
|
||||
Title="Array Devices"
|
||||
Tag="database"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2023, Lime Technology
|
||||
* Copyright 2012-2023, 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.
|
||||
*/
|
||||
?>
|
||||
<script>
|
||||
function toggle_state(device,name,action) {
|
||||
var button = null;
|
||||
if (name) {
|
||||
var group = name.replace(/(\d+|\*)$/,'');
|
||||
if (name.slice(-1)!='*') {
|
||||
$('#dev-'+name).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');
|
||||
$('[id^="dev-disk"]').removeClass('fa-circle fa-square fa-warning fa-times').addClass('fa-refresh fa-spin');
|
||||
} else {
|
||||
$('[id^="dev-'+group+'"]').removeClass('fa-circle fa-square fa-warning fa-times').addClass('fa-refresh fa-spin');
|
||||
}
|
||||
}
|
||||
} else if (device!='Clear') {
|
||||
$('[id^="dev-"]').removeClass('fa-circle fa-square fa-warning fa-times').addClass('fa-refresh fa-spin');
|
||||
button = '[id^=button-]';
|
||||
}
|
||||
devices.stop();
|
||||
$.post('/webGui/include/ToggleState.php',{device:device,name:name,action:action,state:'<?=$var['mdState']?>',csrf:'<?=$var['csrf_token']?>'},function(){setTimeout(function(){devices.start();},1000);if (button) $(button).prop('disabled',false);});
|
||||
}
|
||||
function display_diskio() {
|
||||
if ($.cookie('diskio')===undefined) {
|
||||
$('span.number').show(); $('span.diskio').hide();
|
||||
} else {
|
||||
$('span.diskio').show(); $('span.number').hide();
|
||||
}
|
||||
}
|
||||
function toggle_diskio(init) {
|
||||
if (!init) {
|
||||
if ($.cookie('diskio')===undefined) $.cookie('diskio','diskio',{expires:3650}); else $.removeCookie('diskio');
|
||||
}
|
||||
if ($.cookie('diskio')===undefined) {
|
||||
$('i.toggle').removeClass('fa-tachometer').addClass('fa-list');
|
||||
} else {
|
||||
$('i.toggle').removeClass('fa-list').addClass('fa-tachometer');
|
||||
}
|
||||
display_diskio();
|
||||
}
|
||||
|
||||
<?if (_var($var,'fsState')=="Started"):?>
|
||||
$('#tab1').bind({click:function() {$('i.toggle').show('slow');}});
|
||||
<?endif;?>
|
||||
</script>
|
||||
|
||||
<table class="disk_status wide">
|
||||
<thead><tr><td>_(Device)_</td><td>_(Identification)_</td><td>_(Temp)_.</td><td>_(Reads)_</td><td>_(Writes)_</td><td>_(Errors)_</td><td>_(FS)_</td><td>_(Size)_</td><td>_(Used)_</td><td>_(Free)_</td></tr></thead>
|
||||
<tbody id="array_devices">
|
||||
<?
|
||||
foreach ($disks as $disk):
|
||||
if (_var($disk,'type')=='Parity' or _var($disk,'type')=='Data')
|
||||
echo "<tr><td colspan='11'> </td></tr>";
|
||||
endforeach;
|
||||
if (_var($display,'total')) echo "<tr class='tr_last'><td colspan='11'> </td></tr>";
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
:main_array_devices_help:
|
||||
|
||||
<?if (_var($var,'fsState')=="Stopped"):?>
|
||||
<div></div>
|
||||
:main_slots_help:
|
||||
<?endif;?>
|
||||
Reference in New Issue
Block a user