initial commit of file from CVS for smeserver-phpsysinfo on Sat Sep 7 20:53:46 AEST 2024
This commit is contained in:
236
root/opt/phpsysinfo/plugins/mdstatus/class.mdstatus.inc.php
Normal file
236
root/opt/phpsysinfo/plugins/mdstatus/class.mdstatus.inc.php
Normal file
@@ -0,0 +1,236 @@
|
||||
<?php
|
||||
/**
|
||||
* MDStatus Plugin
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category PHP
|
||||
* @package PSI_Plugin_MDStatus
|
||||
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
|
||||
* @copyright 2009 phpSysInfo
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @version SVN: $Id: class.mdstatus.inc.php 661 2012-08-27 11:26:39Z namiltd $
|
||||
* @link http://phpsysinfo.sourceforge.net
|
||||
*/
|
||||
/**
|
||||
* mdstatus Plugin, which displays a snapshot of the kernel's RAID/md state
|
||||
* a simple view which shows supported types and RAID-Devices which are determined by
|
||||
* parsing the "/proc/mdstat" file, another way is to provide
|
||||
* a file with the output of the /proc/mdstat file, so there is no need to run a execute by the
|
||||
* webserver, the format of the command is written down in the phpsysinfo.ini file, where also
|
||||
* the method of getting the information is configured
|
||||
*
|
||||
* @category PHP
|
||||
* @package PSI_Plugin_MDStatus
|
||||
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
|
||||
* @copyright 2009 phpSysInfo
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @version Release: 3.0
|
||||
* @link http://phpsysinfo.sourceforge.net
|
||||
*/
|
||||
class MDStatus extends PSI_Plugin
|
||||
{
|
||||
/**
|
||||
* variable, which holds the content of the command
|
||||
* @var array
|
||||
*/
|
||||
private $_filecontent = "";
|
||||
|
||||
/**
|
||||
* variable, which holds the result before the xml is generated out of this array
|
||||
* @var array
|
||||
*/
|
||||
private $_result = array();
|
||||
|
||||
/**
|
||||
* read the data into an internal array and also call the parent constructor
|
||||
*
|
||||
* @param String $enc encoding
|
||||
*/
|
||||
public function __construct($enc)
|
||||
{
|
||||
$buffer = "";
|
||||
parent::__construct(__CLASS__, $enc);
|
||||
switch (strtolower(PSI_PLUGIN_MDSTATUS_ACCESS)) {
|
||||
case 'file':
|
||||
CommonFunctions::rfts("/proc/mdstat", $buffer);
|
||||
break;
|
||||
case 'data':
|
||||
CommonFunctions::rfts(APP_ROOT."/data/mdstat.txt", $buffer);
|
||||
break;
|
||||
default:
|
||||
$this->global_error->addConfigError("__construct()", "PSI_PLUGIN_MDSTATUS_ACCESS");
|
||||
break;
|
||||
}
|
||||
if (trim($buffer) != "") {
|
||||
$this->_filecontent = preg_split("/\n/", $buffer, -1, PREG_SPLIT_NO_EMPTY);
|
||||
} else {
|
||||
$this->_filecontent = array();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* doing all tasks to get the required informations that the plugin needs
|
||||
* result is stored in an internal array<br>the array is build like a tree,
|
||||
* so that it is possible to get only a specific process with the childs
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
if (empty($this->_filecontent)) {
|
||||
return;
|
||||
}
|
||||
// get the supported types
|
||||
if (preg_match('/[a-zA-Z]* : (\[([a-z0-9])*\]([ \n]))+/', $this->_filecontent[0], $res)) {
|
||||
$parts = preg_split("/ : /", $res[0]);
|
||||
$parts = preg_split("/ /", $parts[1]);
|
||||
$count = 0;
|
||||
foreach ($parts as $types) {
|
||||
if (trim($types) != "") {
|
||||
$this->_result['supported_types'][$count++] = substr(trim($types), 1, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
// get disks
|
||||
if (preg_match("/^read_ahead/", $this->_filecontent[1])) {
|
||||
$count = 2;
|
||||
} else {
|
||||
$count = 1;
|
||||
}
|
||||
$cnt_filecontent = count($this->_filecontent);
|
||||
do {
|
||||
$parts = preg_split("/ : /", $this->_filecontent[$count]);
|
||||
$dev = trim($parts[0]);
|
||||
if (count($parts) == 2) {
|
||||
$details = preg_split('/ /', $parts[1]);
|
||||
if (!strstr($details[0], 'inactive')) {
|
||||
$this->_result['devices'][$dev]['level'] = $details[1];
|
||||
} else {
|
||||
$this->_result['devices'][$dev]['level'] = "none";
|
||||
}
|
||||
$this->_result['devices'][$dev]['status'] = $details[0];
|
||||
for ($i = 2, $cnt_details = count($details); $i < $cnt_details; $i++) {
|
||||
preg_match('/(([a-z0-9])+)(\[([0-9]+)\])(\([SF ]\))?/', trim($details[$i]), $partition);
|
||||
if (count($partition) == 5 || count($partition) == 6) {
|
||||
$this->_result['devices'][$dev]['partitions'][$partition[1]]['raid_index'] = substr(trim($partition[3]), 1, -1);
|
||||
if (isset($partition[5])) {
|
||||
$search = array("(", ")");
|
||||
$replace = array("", "");
|
||||
$this->_result['devices'][$dev]['partitions'][$partition[1]]['status'] = str_replace($search, $replace, trim($partition[5]));
|
||||
} else {
|
||||
$this->_result['devices'][$dev]['partitions'][$partition[1]]['status'] = " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
$count++;
|
||||
$optionline = $this->_filecontent[$count - 1].$this->_filecontent[$count];
|
||||
if (preg_match('/([^\sk]*)k chunk/', $optionline, $chunksize)) {
|
||||
$this->_result['devices'][$dev]['chunk_size'] = $chunksize[1];
|
||||
} else {
|
||||
$this->_result['devices'][$dev]['chunk_size'] = -1;
|
||||
}
|
||||
if ($pos = strpos($optionline, "super non-persistent")) {
|
||||
$this->_result['devices'][$dev]['pers_superblock'] = 0;
|
||||
} else {
|
||||
$this->_result['devices'][$dev]['pers_superblock'] = 1;
|
||||
}
|
||||
if ($pos = strpos($optionline, "algorithm")) {
|
||||
$this->_result['devices'][$dev]['algorithm'] = trim(substr($optionline, $pos + 9, 2));
|
||||
} else {
|
||||
$this->_result['devices'][$dev]['algorithm'] = -1;
|
||||
}
|
||||
if (preg_match('/(\[[0-9]?\/[0-9]\])/', $optionline, $res)) {
|
||||
$slashpos = strpos($res[0], '/');
|
||||
$this->_result['devices'][$dev]['registered'] = substr($res[0], 1, $slashpos - 1);
|
||||
$this->_result['devices'][$dev]['active'] = substr($res[0], $slashpos + 1, strlen($res[0]) - $slashpos - 2);
|
||||
} else {
|
||||
$this->_result['devices'][$dev]['registered'] = -1;
|
||||
$this->_result['devices'][$dev]['active'] = -1;
|
||||
}
|
||||
if (preg_match(('/([a-z]+)( *)=( *)([0-9\.]+)%/'), $this->_filecontent[$count + 1], $res) || (preg_match(('/([a-z]+)( *)=( *)([0-9\.]+)/'), $optionline, $res))) {
|
||||
list($this->_result['devices'][$dev]['action']['name'], $this->_result['devices'][$dev]['action']['percent']) = preg_split("/=/", str_replace("%", "", $res[0]));
|
||||
if (preg_match(('/([a-z]*=[0-9\.]+[a-z]+)/'), $this->_filecontent[$count + 1], $res)) {
|
||||
$time = preg_split("/=/", $res[0]);
|
||||
list($this->_result['devices'][$dev]['action']['finish_time'], $this->_result['devices'][$dev]['action']['finish_unit']) = sscanf($time[1], '%f%s');
|
||||
} else {
|
||||
$this->_result['devices'][$dev]['action']['finish_time'] = -1;
|
||||
$this->_result['devices'][$dev]['action']['finish_unit'] = -1;
|
||||
}
|
||||
} else {
|
||||
$this->_result['devices'][$dev]['action']['name'] = -1;
|
||||
$this->_result['devices'][$dev]['action']['percent'] = -1;
|
||||
$this->_result['devices'][$dev]['action']['finish_time'] = -1;
|
||||
$this->_result['devices'][$dev]['action']['finish_unit'] = -1;
|
||||
}
|
||||
} else {
|
||||
$count++;
|
||||
}
|
||||
} while ($cnt_filecontent > $count);
|
||||
$lastline = $this->_filecontent[$cnt_filecontent - 2];
|
||||
if (strpos($lastline, "unused devices") !== false) {
|
||||
$parts = preg_split("/:/", $lastline);
|
||||
$search = array("<", ">");
|
||||
$replace = array("", "");
|
||||
$this->_result['unused_devs'] = trim(str_replace($search, $replace, $parts[1]));
|
||||
} else {
|
||||
$this->_result['unused_devs'] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* generates the XML content for the plugin
|
||||
*
|
||||
* @return SimpleXMLObject entire XML content for the plugin
|
||||
*/
|
||||
public function xml()
|
||||
{
|
||||
if (empty($this->_result)) {
|
||||
return $this->xml->getSimpleXmlElement();
|
||||
}
|
||||
$hideRaids = array();
|
||||
if (defined('PSI_PLUGIN_MDSTATUS_HIDE_RAID_DEVICES') && is_string(PSI_PLUGIN_MDSTATUS_HIDE_RAID_DEVICES)) {
|
||||
if (preg_match(ARRAY_EXP, PSI_PLUGIN_MDSTATUS_HIDE_RAID_DEVICES)) {
|
||||
$hideRaids = eval(PSI_PLUGIN_MDSTATUS_HIDE_RAID_DEVICES);
|
||||
} else {
|
||||
$hideRaids = array(PSI_PLUGIN_MDSTATUS_HIDE_RAID_DEVICES);
|
||||
}
|
||||
}
|
||||
$sup = $this->xml->addChild("Supported_Types");
|
||||
foreach ($this->_result['supported_types'] as $type) {
|
||||
$typ = $sup->addChild("Type");
|
||||
$typ->addAttribute("Name", $type);
|
||||
}
|
||||
if (isset($this->_result['devices'])) foreach ($this->_result['devices'] as $key=>$device) {
|
||||
if (!in_array($key, $hideRaids, true)) {
|
||||
$dev = $this->xml->addChild("Raid");
|
||||
$dev->addAttribute("Device_Name", $key);
|
||||
$dev->addAttribute("Level", $device["level"]);
|
||||
$dev->addAttribute("Disk_Status", $device["status"]);
|
||||
$dev->addAttribute("Chunk_Size", $device["chunk_size"]);
|
||||
$dev->addAttribute("Persistend_Superblock", $device["pers_superblock"]);
|
||||
$dev->addAttribute("Algorithm", $device["algorithm"]);
|
||||
$dev->addAttribute("Disks_Registered", $device["registered"]);
|
||||
$dev->addAttribute("Disks_Active", $device["active"]);
|
||||
$action = $dev->addChild("Action");
|
||||
$action->addAttribute("Percent", $device['action']['percent']);
|
||||
$action->addAttribute("Name", $device['action']['name']);
|
||||
$action->addAttribute("Time_To_Finish", $device['action']['finish_time']);
|
||||
$action->addAttribute("Time_Unit", $device['action']['finish_unit']);
|
||||
$disks = $dev->addChild("Disks");
|
||||
foreach ($device['partitions'] as $diskkey=>$disk) {
|
||||
$disktemp = $disks->addChild("Disk");
|
||||
$disktemp->addAttribute("Name", $diskkey);
|
||||
$disktemp->addAttribute("Status", $disk['status']);
|
||||
$disktemp->addAttribute("Index", $disk['raid_index']);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($this->_result['unused_devs'] !== - 1) {
|
||||
$unDev = $this->xml->addChild("Unused_Devices");
|
||||
$unDev->addAttribute("Devices", $this->_result['unused_devs']);
|
||||
}
|
||||
|
||||
return $this->xml->getSimpleXmlElement();
|
||||
}
|
||||
}
|
14
root/opt/phpsysinfo/plugins/mdstatus/css/mdstatus.css
Normal file
14
root/opt/phpsysinfo/plugins/mdstatus/css/mdstatus.css
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
$Id: mdstatus.css 661 2012-08-27 11:26:39Z namiltd $
|
||||
*/
|
||||
.plugin_mdstatus_biun {
|
||||
text-align: center;
|
||||
margin-bottom: 5px;
|
||||
margin-right: 20px;
|
||||
float: left;
|
||||
width: 64px;
|
||||
}
|
||||
|
||||
img.plugin_mdstatus_biun {
|
||||
margin: auto;
|
||||
}
|
BIN
root/opt/phpsysinfo/plugins/mdstatus/gfx/error.png
Normal file
BIN
root/opt/phpsysinfo/plugins/mdstatus/gfx/error.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
BIN
root/opt/phpsysinfo/plugins/mdstatus/gfx/harddrivefail.png
Normal file
BIN
root/opt/phpsysinfo/plugins/mdstatus/gfx/harddrivefail.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
BIN
root/opt/phpsysinfo/plugins/mdstatus/gfx/harddriveok.png
Normal file
BIN
root/opt/phpsysinfo/plugins/mdstatus/gfx/harddriveok.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
BIN
root/opt/phpsysinfo/plugins/mdstatus/gfx/harddrivespare.png
Normal file
BIN
root/opt/phpsysinfo/plugins/mdstatus/gfx/harddrivespare.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
225
root/opt/phpsysinfo/plugins/mdstatus/js/mdstatus.js
Normal file
225
root/opt/phpsysinfo/plugins/mdstatus/js/mdstatus.js
Normal file
@@ -0,0 +1,225 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by phpSysInfo - A PHP System Information Script *
|
||||
* http://phpsysinfo.sourceforge.net/ *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
//
|
||||
// $Id: mdstatus.js 679 2012-09-04 10:10:11Z namiltd $
|
||||
//
|
||||
|
||||
/*global $, jQuery, buildBlock, genlang, createBar, plugin_translate, datetime */
|
||||
|
||||
"use strict";
|
||||
|
||||
//appendcss("./plugins/MDStatus/css/MDStatus.css");
|
||||
|
||||
var mdstatus_show = false;
|
||||
|
||||
/**
|
||||
* get the details of the raid
|
||||
* @param {jQuery} xml part of the plugin-XML
|
||||
* @param {number} id id of the device
|
||||
*/
|
||||
function mdstatus_buildinfos(xml, id) {
|
||||
var html = "", devstatus = "", devlevel = "", devchunk = 0, devsuper = 0, devalgo = 0, devactive = 0, devregis = 0, button = "";
|
||||
|
||||
devstatus = $(xml).attr("Disk_Status");
|
||||
devlevel = $(xml).attr("Level");
|
||||
devchunk = parseInt($(xml).attr("Chunk_Size"), 10);
|
||||
devsuper = parseInt($(xml).attr("Persistent_Superblock"), 10);
|
||||
devalgo = parseInt($(xml).attr("Algorithm"), 10);
|
||||
devactive = parseInt($(xml).attr("Disks_Active"), 10);
|
||||
devregis = parseInt($(xml).attr("Disks_Registered"), 10);
|
||||
html += "<tr><td>" + genlang(5, false, "MDStatus") + "</td><td>" + devstatus + "</td></tr>";
|
||||
html += "<tr><td>" + genlang(6, false, "MDStatus") + "</td><td>" + devlevel + "</td></tr>";
|
||||
if (devchunk !== -1) {
|
||||
html += "<tr><td>" + genlang(7, false, "MDStatus") + "</td><td>" + devchunk + "K</td></tr>";
|
||||
}
|
||||
if (devalgo !== -1) {
|
||||
html += "<tr><td>" + genlang(8, false, "MDStatus") + "</td><td>" + devalgo + "</td></tr>";
|
||||
}
|
||||
if (devsuper !== -1) {
|
||||
html += "<tr><td>" + genlang(9, false, "MDStatus") + "</td><td>" + genlang(10, false, "MDStatus") + "</td></tr>";
|
||||
}
|
||||
else {
|
||||
html += "<tr><td>" + genlang(9, false, "MDStatus") + "</td><td>" + genlang(11, false, "MDStatus") + "</td></tr>";
|
||||
}
|
||||
if (devactive !== -1 && devregis !== -1) {
|
||||
html += "<tr><td>" + genlang(12, false, "MDStatus") + "</td><td>" + devregis + "/" + devactive + "</td></tr>";
|
||||
}
|
||||
button += "<h3 style=\"cursor: pointer\" id=\"sPlugin_MDStatus_Info" + id + "\"><img src=\"./gfx/bullet_toggle_plus.png\" alt=\"plus\" style=\"vertical-align:middle;\" />" + genlang(4, false, "MDStatus") + "</h3>";
|
||||
button += "<h3 style=\"cursor: pointer; display: none;\" id=\"hPlugin_MDStatus_Info" + id + "\"><img src=\"./gfx/bullet_toggle_minus.png\" alt=\"minus\" style=\"vertical-align:middle;\" />" + genlang(4, false, "MDStatus") + "</h3>";
|
||||
button += "<table id=\"Plugin_MDStatus_InfoTable" + id + "\" style=\"border-spacing:0; display:none;\">" + html + "</table>";
|
||||
return button;
|
||||
}
|
||||
|
||||
/**
|
||||
* generate a html string with the current action on the disks
|
||||
* @param {jQuery} xml part of the plugin-XML
|
||||
*/
|
||||
function mdstatus_buildaction(xml) {
|
||||
var html = "", name = "", time = "", tunit = "", percent = 0;
|
||||
$("Action", xml).each(function mdstatus_getaction(id) {
|
||||
name = $(this).attr("Name");
|
||||
if (parseInt(name, 10) !== -1) {
|
||||
time = $(this).attr("Time_To_Finish");
|
||||
tunit = $(this).attr("Time_Unit");
|
||||
percent = parseFloat($(this).attr("Percent"));
|
||||
html += "<div style=\"padding-left:10px;\">";
|
||||
html += genlang(13, false, "MDStatus") + ": " + name + "<br/>";
|
||||
html += createBar(percent);
|
||||
html += "<br/>";
|
||||
html += genlang(14, false, "MDStatus") + " " + time + " " + tunit;
|
||||
html += "</div>";
|
||||
}
|
||||
});
|
||||
return html;
|
||||
}
|
||||
|
||||
/**
|
||||
* choose the right diskdrive icon
|
||||
* @param {jQuery} xml part of the plugin-XML
|
||||
*/
|
||||
function mdstatus_diskicon(xml) {
|
||||
var html = "";
|
||||
$("Disks Disk", xml).each(function mdstatus_getdisk(id) {
|
||||
var diskstatus = "", diskname = "", img = "", alt = "";
|
||||
html += "<div class=\"plugin_mdstatus_biun\">";
|
||||
diskstatus = $(this).attr("Status");
|
||||
diskname = $(this).attr("Name");
|
||||
switch (diskstatus) {
|
||||
case " ":
|
||||
case "":
|
||||
img = "harddriveok.png";
|
||||
alt = "ok";
|
||||
break;
|
||||
case "F":
|
||||
img = "harddrivefail.png";
|
||||
alt = "fail";
|
||||
break;
|
||||
case "S":
|
||||
img = "harddrivespare.png";
|
||||
alt = "spare";
|
||||
break;
|
||||
default:
|
||||
alert("--" + diskstatus + "--");
|
||||
img = "error.png";
|
||||
alt = "error";
|
||||
break;
|
||||
}
|
||||
html += "<img class=\"plugin_mdstatus_biun\" src=\"./plugins/mdstatus/gfx/" + img + "\" alt=\"" + alt + "\" />";
|
||||
html += "<small>" + diskname + "</small>";
|
||||
html += "</div>";
|
||||
});
|
||||
return html;
|
||||
}
|
||||
|
||||
/**
|
||||
* fill the plugin block
|
||||
* @param {jQuery} xml plugin-XML
|
||||
*/
|
||||
function mdstatus_populate(xml) {
|
||||
var htmltypes = "";
|
||||
|
||||
$("#Plugin_MDStatusTable").empty();
|
||||
|
||||
$("Plugins Plugin_MDStatus Supported_Types Type", xml).each(function mdstatus_getsupportedtypes(id) {
|
||||
// htmltypes += "<li>" + $(this).attr("Name") + "</li>";
|
||||
htmltypes += "<b>" + $(this).attr("Name") + " </b>";
|
||||
});
|
||||
if (htmltypes.length > 0) {
|
||||
htmltypes = "<ul>" + htmltypes + "</ul>";
|
||||
$("#Plugin_MDStatusTable").append("<tr><td style=\"width:160px;\">" + genlang(2, false, "MDStatus") + "</td><td>" + htmltypes + "</td></tr>");
|
||||
mdstatus_show = true;
|
||||
}
|
||||
|
||||
$("Plugins Plugin_MDStatus Raid", xml).each(function mdstatus_getdevice(id) {
|
||||
var htmldisks = "", htmldisklist = "", topic = "", name = "", buildedaction = "";
|
||||
name = $(this).attr("Device_Name");
|
||||
htmldisklist += mdstatus_diskicon(this);
|
||||
htmldisks += "<table style=\"width:100%;\">";
|
||||
htmldisks += "<tr><td>" + htmldisklist + "</td></tr>";
|
||||
buildedaction = mdstatus_buildaction($(this));
|
||||
if (buildedaction) {
|
||||
htmldisks += "<tr><td>" + buildedaction + "</td></tr>";
|
||||
}
|
||||
htmldisks += "<tr><td>" + mdstatus_buildinfos($(this), id) + "<td></tr>";
|
||||
htmldisks += "</table>";
|
||||
if (id) {
|
||||
topic = "";
|
||||
}
|
||||
else {
|
||||
topic = genlang(3, false, "MDStatus");
|
||||
}
|
||||
$("#Plugin_MDStatusTable").append("<tr><td>" + topic + "</td><td><div class=\"plugin_mdstatus_biun\" style=\"text-align:left;\"><b>" + name + "</b></div>" + htmldisks + "</td></tr>");
|
||||
$("#sPlugin_MDStatus_Info" + id).click(function mdstatus_showinfo() {
|
||||
$("#Plugin_MDStatus_InfoTable" + id).slideDown("slow");
|
||||
$("#sPlugin_MDStatus_Info" + id).hide();
|
||||
$("#hPlugin_MDStatus_Info" + id).show();
|
||||
});
|
||||
$("#hPlugin_MDStatus_Info" + id).click(function mdstatus_hideinfo() {
|
||||
$("#Plugin_MDStatus_InfoTable" + id).slideUp("slow");
|
||||
$("#hPlugin_MDStatus_Info" + id).hide();
|
||||
$("#sPlugin_MDStatus_Info" + id).show();
|
||||
});
|
||||
mdstatus_show = true;
|
||||
});
|
||||
|
||||
if ($("Plugins Plugin_MDStatus Unused_Devices", xml).length > 0) {
|
||||
$("#Plugin_MDStatusTable").append("<tr><td>" + genlang(15, false, "MDStatus") + "</td><td>" + $(this).attr("Devices") + "</td></tr>");
|
||||
mdstatus_show = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* load the xml via ajax
|
||||
*/
|
||||
function mdstatus_request() {
|
||||
$.ajax({
|
||||
url: "xml.php?plugin=MDStatus",
|
||||
dataType: "xml",
|
||||
error: function mdstatus_error() {
|
||||
$.jGrowl("Error loading XML document for Plugin MDStatus");
|
||||
},
|
||||
success: function mdstatus_buildblock(xml) {
|
||||
populateErrors(xml);
|
||||
mdstatus_populate(xml);
|
||||
if (mdstatus_show) {
|
||||
plugin_translate("MDStatus");
|
||||
$("#Plugin_MDStatus").show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function mdstatus_buildpage() {
|
||||
var html = "";
|
||||
|
||||
$("#footer").before(buildBlock("MDStatus", 1, true));
|
||||
html += " <table id=\"Plugin_MDStatusTable\" style=\"border-spacing:0;\">\n";
|
||||
html += " </table>\n";
|
||||
$("#Plugin_MDStatus").append(html);
|
||||
|
||||
$("#Plugin_MDStatus").css("width", "915px");
|
||||
|
||||
mdstatus_request();
|
||||
|
||||
$("#Reload_MDStatusTable").click(function mdstatus_reload(id) {
|
||||
mdstatus_request();
|
||||
$("#Reload_MDStatusTable").attr("title",datetime());
|
||||
});
|
||||
});
|
146
root/opt/phpsysinfo/plugins/mdstatus/js/mdstatus_bootstrap.js
Normal file
146
root/opt/phpsysinfo/plugins/mdstatus/js/mdstatus_bootstrap.js
Normal file
@@ -0,0 +1,146 @@
|
||||
function renderPlugin_mdstatus(data) {
|
||||
|
||||
function raid_buildaction(data) {
|
||||
var html = "", name = "", percent = 0;
|
||||
if (data !== undefined) {
|
||||
name = data['Name'];
|
||||
if ((name !== undefined) && (parseInt(name) !== -1)) {
|
||||
percent = Math.round(parseFloat(data['Percent']));
|
||||
html += "<div>Current Action:" + String.fromCharCode(160) + name + "<br/>";
|
||||
html += '<table width=100%><tr><td width=50%><div class="progress">' +
|
||||
'<div class="progress-bar progress-bar-info" style="width: ' + percent + '%;"></div>' +
|
||||
'</div><div class="percent">' + percent + '%</div></td><td></td></tr></table>';
|
||||
html += "Finishing in:" + String.fromCharCode(160) + data['Time_To_Finish'] + String.fromCharCode(160) + data['Time_Unit'];
|
||||
html += "</div>";
|
||||
}
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
||||
function raid_diskicon(data) {
|
||||
var html = "";
|
||||
var img = "", alt = "";
|
||||
|
||||
html += "<div style=\"text-align: center; float: left; margin-bottom: 5px; margin-right: 20px; width: 64px;\">";
|
||||
switch (data["Status"]) {
|
||||
case " ":
|
||||
case "":
|
||||
img = "harddriveok.png";
|
||||
alt = "ok";
|
||||
break;
|
||||
case "F":
|
||||
img = "harddrivefail.png";
|
||||
alt = "fail";
|
||||
break;
|
||||
case "S":
|
||||
img = "harddrivespare.png";
|
||||
alt = "spare";
|
||||
break;
|
||||
case "W":
|
||||
img = "harddrivewarn.png";
|
||||
alt = "warning";
|
||||
break;
|
||||
default:
|
||||
alert("--" + data["Status"] + "--");
|
||||
img = "error.png";
|
||||
alt = "error";
|
||||
break;
|
||||
}
|
||||
html += "<img src=\"./plugins/dmraid/gfx/" + img + "\" alt=\"" + alt + "\" />";
|
||||
html += "<small>" + data["Name"] + "</small>";
|
||||
html += "</div>";
|
||||
return html;
|
||||
}
|
||||
|
||||
if (data['Plugins']['Plugin_MDStatus'] !== undefined) {
|
||||
$('#mdstatus').empty();
|
||||
if (data['Plugins']['Plugin_MDStatus']['Supported_Types'] !== undefined) {
|
||||
var stitems = items(data['Plugins']['Plugin_MDStatus']['Supported_Types']['Type']);
|
||||
if (stitems.length > 0) {
|
||||
var htmltypes = "<tr><th>Supported RAID-Types</th><th>";
|
||||
for (i = 0; i < stitems.length ; i++) {
|
||||
htmltypes += stitems[i]["@attributes"]["Name"] + " ";
|
||||
}
|
||||
htmltypes += "</th><tr>";
|
||||
$('#mdstatus').append(htmltypes);
|
||||
$('#block_mdstatus').show();
|
||||
} else {
|
||||
$('#block_mdstatus').hide();
|
||||
}
|
||||
} else {
|
||||
$('#block_mdstatus').hide();
|
||||
}
|
||||
var mditems = items(data['Plugins']['Plugin_MDStatus']['Raid']);
|
||||
if (mditems.length > 0) {
|
||||
var html = '';
|
||||
for (i = 0; i < mditems.length ; i++) {
|
||||
if (i) {
|
||||
html += "<tr><td></td><td>";
|
||||
} else {
|
||||
html += "<tr><th>RAID-Devices</th><td>";
|
||||
}
|
||||
|
||||
if (mditems[i]['Disks'] !== undefined) {
|
||||
var devchunk = parseInt(mditems[i]["@attributes"]["Chunk_Size"]);
|
||||
var devsuper = parseInt(mditems[i]["@attributes"]["Persistent_Superblock"]);
|
||||
var devalgo = parseInt(mditems[i]["@attributes"]["Algorithm"]);
|
||||
var devactive = parseInt(mditems[i]["@attributes"]["Disks_Active"]);
|
||||
var devregis = parseInt(mditems[i]["@attributes"]["Disks_Registered"]);
|
||||
|
||||
html += "<table style=\"width:100%;\">";
|
||||
html += "<tr><td>";
|
||||
|
||||
var diskitems = items(mditems[i]['Disks']['Disk']);
|
||||
for (j = 0; j < diskitems.length ; j++) {
|
||||
html += raid_diskicon(diskitems[j]["@attributes"]);
|
||||
}
|
||||
|
||||
html += "</td></tr><tr><td>";
|
||||
if (mditems[i]['Action'] !== undefined) {
|
||||
var buildedaction = raid_buildaction(mditems[i]['Action']['@attributes']);
|
||||
if (buildedaction) {
|
||||
html += "<tr><td>" + buildedaction + "</td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
html += "<table id=\"mdstatus-" + i + "\"class=\"table table-hover table-condensed\">";
|
||||
html += "<tr class=\"treegrid-mdstatus-" + i + "\"><td><b>" + mditems[i]["@attributes"]["Device_Name"] + "</b></td><td></td></tr>";
|
||||
html += "<tr class=\"treegrid-parent-mdstatus-" + i + "\"><th>Status</th><td>" + mditems[i]["@attributes"]["Disk_Status"] + "</td></tr>";
|
||||
html += "<tr class=\"treegrid-parent-mdstatus-" + i + "\"><th>RAID-Level</th><td>" + mditems[i]["@attributes"]["Level"] + "</td></tr>";
|
||||
if (devchunk !== -1) {
|
||||
html += "<tr class=\"treegrid-parent-mdstatus-" + i + "\"><th>Chunk Size</th><td>" + devchunk + "K</td></tr>";
|
||||
}
|
||||
if (devalgo !== -1) {
|
||||
html += "<tr class=\"treegrid-parent-mdstatus-" + i + "\"><th>Algorithm</th><td>" + devalgo + "</td></tr>";
|
||||
}
|
||||
if (devsuper !== -1) {
|
||||
html += "<tr class=\"treegrid-parent-mdstatus-" + i + "\"><th>Persistent Superblock</th><td>available</td></tr>";
|
||||
} else {
|
||||
html += "<tr class=\"treegrid-parent-mdstatus-" + i + "\"><th>Persistent Superblock</th><td>not available</td></tr>";
|
||||
}
|
||||
if (devactive !== -1 && devregis !== -1) {
|
||||
html += "<tr class=\"treegrid-parent-mdstatus-" + i + "\"><th>Registered/" + String.fromCharCode(8203) + "Active Disks</th><td>" + devregis + "/" + String.fromCharCode(8203) + devactive + "</td></tr>";
|
||||
}
|
||||
html += "</table>";
|
||||
html += "</td></tr>";
|
||||
html += "</table>";
|
||||
}
|
||||
|
||||
html +="</td></tr>";
|
||||
}
|
||||
$('#mdstatus').append(html);
|
||||
|
||||
for (i = 0; i < mditems.length ; i++) {
|
||||
if (mditems[i]['Disks'] !== undefined) {
|
||||
$('#mdstatus-'+i).treegrid({
|
||||
initialState: 'collapsed',
|
||||
expanderExpandedClass: 'normalicon normalicon-down',
|
||||
expanderCollapsedClass: 'normalicon normalicon-right'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$('#block_mdstatus').hide();
|
||||
}
|
||||
}
|
57
root/opt/phpsysinfo/plugins/mdstatus/lang/cz.xml
Normal file
57
root/opt/phpsysinfo/plugins/mdstatus/lang/cz.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: cz.xml 661 2012-08-27 11:26:39Z namiltd $ -->
|
||||
<!--
|
||||
phpSysInfo language file Language: Czech Created by: Tomáš Růžička
|
||||
-->
|
||||
<tns:translationPlugin language="czech" charset="utf-8"
|
||||
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
|
||||
<expression id="plugin_mdstatus_001" name="mdstatus_title">
|
||||
<exp>Stav RAIDu</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_002" name="mdstatus_support">
|
||||
<exp>Poodporované typy RAID</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_003" name="mdstatus_devices">
|
||||
<exp>RAID-zařízení</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_004" name="mdstatus_infos">
|
||||
<exp>Dodatečné informace</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_005" name="mdstatus_status">
|
||||
<exp>Stav</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_006" name="mdstatus_level">
|
||||
<exp>Úroveň RAIDu</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_007" name="mdstatus_chunk">
|
||||
<exp>Velikost proužku</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_008" name="mdstatus_algo">
|
||||
<exp>Algoritmus</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_009" name="mdstatus_superb">
|
||||
<exp>Persistentní Superblock</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_010" name="mdstatus_avail">
|
||||
<exp>dostupný</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_011" name="mdstatus_navail">
|
||||
<exp>nedostupný</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_012" name="mdstatus_regact">
|
||||
<exp>Registrovné/aktivní disky</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_013" name="mdstatus_curact">
|
||||
<exp>Aktuální činnost</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_014" name="mdstatus_finishin">
|
||||
<exp>Čas dokončení</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_015" name="mdstatus_unused">
|
||||
<exp>Nevyužité disky</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_016" name="mdstatus_refresh">
|
||||
<exp>Aktualizováno</exp>
|
||||
</expression>
|
||||
</tns:translationPlugin>
|
57
root/opt/phpsysinfo/plugins/mdstatus/lang/de.xml
Normal file
57
root/opt/phpsysinfo/plugins/mdstatus/lang/de.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: de.xml 661 2012-08-27 11:26:39Z namiltd $ -->
|
||||
<!--
|
||||
phpSysInfo language file Language: German Created by: Michael Cramer
|
||||
-->
|
||||
<tns:translationPlugin language="german" charset="utf-8"
|
||||
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
|
||||
<expression id="plugin_mdstatus_001" name="mdstatus_title">
|
||||
<exp>RAID Status</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_002" name="mdstatus_support">
|
||||
<exp>Unterstützte RAID-Typen</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_003" name="mdstatus_devices">
|
||||
<exp>RAID-Geräte</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_004" name="mdstatus_infos">
|
||||
<exp>Zusätzliche Informationen</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_005" name="mdstatus_status">
|
||||
<exp>Status</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_006" name="mdstatus_level">
|
||||
<exp>RAID-Level</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_007" name="mdstatus_chunk">
|
||||
<exp>Blockgröße</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_008" name="mdstatus_algo">
|
||||
<exp>Algorithmus</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_009" name="mdstatus_superb">
|
||||
<exp>Persistenter Superblock</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_010" name="mdstatus_avail">
|
||||
<exp>verfügbar</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_011" name="mdstatus_navail">
|
||||
<exp>nicht verfügbar</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_012" name="mdstatus_regact">
|
||||
<exp>Registrierte/Aktive Platten</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_013" name="mdstatus_curact">
|
||||
<exp>Aktuelle Aktion</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_014" name="mdstatus_finishin">
|
||||
<exp>Fertig in</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_015" name="mdstatus_unused">
|
||||
<exp>Unbenutzte Platten</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_016" name="mdstatus_refresh">
|
||||
<exp>Zuletzt aktualisiert</exp>
|
||||
</expression>
|
||||
</tns:translationPlugin>
|
57
root/opt/phpsysinfo/plugins/mdstatus/lang/en.xml
Normal file
57
root/opt/phpsysinfo/plugins/mdstatus/lang/en.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: en.xml 661 2012-08-27 11:26:39Z namiltd $ -->
|
||||
<!--
|
||||
phpSysInfo language file Language: English Created by: Michael Cramer
|
||||
-->
|
||||
<tns:translationPlugin language="english" charset="utf-8"
|
||||
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
|
||||
<expression id="plugin_mdstatus_001" name="mdstatus_title">
|
||||
<exp>RAID Status</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_002" name="mdstatus_support">
|
||||
<exp>Supported RAID-Types</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_003" name="mdstatus_devices">
|
||||
<exp>RAID-Devices</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_004" name="mdstatus_infos">
|
||||
<exp>Additional Information</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_005" name="mdstatus_status">
|
||||
<exp>Status</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_006" name="mdstatus_level">
|
||||
<exp>RAID-Level</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_007" name="mdstatus_chunk">
|
||||
<exp>Chunk Size</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_008" name="mdstatus_algo">
|
||||
<exp>Algorithm</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_009" name="mdstatus_superb">
|
||||
<exp>Persistent Superblock</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_010" name="mdstatus_avail">
|
||||
<exp>available</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_011" name="mdstatus_navail">
|
||||
<exp>not available</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_012" name="mdstatus_regact">
|
||||
<exp>Registered/Active Disks</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_013" name="mdstatus_curact">
|
||||
<exp>Current Action</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_014" name="mdstatus_finishin">
|
||||
<exp>Finishing in</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_015" name="mdstatus_unused">
|
||||
<exp>Unused Disks</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_016" name="mdstatus_refresh">
|
||||
<exp>Last refresh</exp>
|
||||
</expression>
|
||||
</tns:translationPlugin>
|
57
root/opt/phpsysinfo/plugins/mdstatus/lang/fr.xml
Normal file
57
root/opt/phpsysinfo/plugins/mdstatus/lang/fr.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: fr.xml 661 2012-08-27 11:26:39Z namiltd $ -->
|
||||
<!--
|
||||
phpSysInfo language file Language: French Created by: Erkan VALENTIN
|
||||
-->
|
||||
<tns:translationPlugin language="french" charset="utf-8"
|
||||
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
|
||||
<expression id="plugin_mdstatus_001" name="mdstatus_title">
|
||||
<exp>Statut RAID</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_002" name="mdstatus_support">
|
||||
<exp>Type de RAID supporté</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_003" name="mdstatus_devices">
|
||||
<exp>Périphériques RAID</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_004" name="mdstatus_infos">
|
||||
<exp>Informations additionnelles</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_005" name="mdstatus_status">
|
||||
<exp>Statut</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_006" name="mdstatus_level">
|
||||
<exp>Type de RAID</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_007" name="mdstatus_chunk">
|
||||
<exp>Granularité</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_008" name="mdstatus_algo">
|
||||
<exp>Algorithme</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_009" name="mdstatus_superb">
|
||||
<exp>Superblocs persistants</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_010" name="mdstatus_avail">
|
||||
<exp>disponible</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_011" name="mdstatus_navail">
|
||||
<exp>non disponible</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_012" name="mdstatus_regact">
|
||||
<exp>Disques Enregistrés/Actives</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_013" name="mdstatus_curact">
|
||||
<exp>Action courante</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_014" name="mdstatus_finishin">
|
||||
<exp>Temps restant</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_015" name="mdstatus_unused">
|
||||
<exp>Disques inutilisés</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_016" name="mdstatus_refresh">
|
||||
<exp>Dernière actualisation</exp>
|
||||
</expression>
|
||||
</tns:translationPlugin>
|
57
root/opt/phpsysinfo/plugins/mdstatus/lang/gr.xml
Normal file
57
root/opt/phpsysinfo/plugins/mdstatus/lang/gr.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: gr.xml 661 2012-08-27 11:26:39Z namiltd $ -->
|
||||
<!--
|
||||
phpSysInfo language file Language: Greek Created by: mojiro
|
||||
-->
|
||||
<tns:translationPlugin language="english" charset="utf-8"
|
||||
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
|
||||
<expression id="plugin_mdstatus_001" name="mdstatus_title">
|
||||
<exp>Κατάσταση RAID</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_002" name="mdstatus_support">
|
||||
<exp>Υποστηριζόμενοι τύποι RAID</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_003" name="mdstatus_devices">
|
||||
<exp>Αλυσίδες RAID</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_004" name="mdstatus_infos">
|
||||
<exp>Πρόσθετες πληροφορίες</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_005" name="mdstatus_status">
|
||||
<exp>Κατάσταση</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_006" name="mdstatus_level">
|
||||
<exp>Τύπος RAID</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_007" name="mdstatus_chunk">
|
||||
<exp>Μέγεθος Chunk</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_008" name="mdstatus_algo">
|
||||
<exp>Αλγόριθμος</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_009" name="mdstatus_superb">
|
||||
<exp>Μόνιμο Superblock</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_010" name="mdstatus_avail">
|
||||
<exp>διαθέσιμο</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_011" name="mdstatus_navail">
|
||||
<exp>μη διαθέσιμο</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_012" name="mdstatus_regact">
|
||||
<exp>Δηλωμένοι/Ενεργοί Δίσκοι</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_013" name="mdstatus_curact">
|
||||
<exp>Τρέχουσα ενέργεια</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_014" name="mdstatus_finishin">
|
||||
<exp>Ολοκληρώνεται σε</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_015" name="mdstatus_unused">
|
||||
<exp>Αχρησιμοποίητοι Δίσκοι</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_016" name="mdstatus_refresh">
|
||||
<exp>Ενημέρωση</exp>
|
||||
</expression>
|
||||
</tns:translationPlugin>
|
57
root/opt/phpsysinfo/plugins/mdstatus/lang/ro.xml
Normal file
57
root/opt/phpsysinfo/plugins/mdstatus/lang/ro.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: ro.xml 661 2014-05-02 11:26:39Z namiltd $ -->
|
||||
<!--
|
||||
phpSysInfo language file Language: Romană Created by: Iulian Alexe
|
||||
-->
|
||||
<tns:translationPlugin language="romana" charset="utf-8"
|
||||
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
|
||||
<expression id="plugin_mdstatus_001" name="mdstatus_title">
|
||||
<exp>Stare RAID</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_002" name="mdstatus_support">
|
||||
<exp>Tipuri de RAID suportate</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_003" name="mdstatus_devices">
|
||||
<exp>Dispozitive RAID</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_004" name="mdstatus_infos">
|
||||
<exp>Informații Aditionale</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_005" name="mdstatus_status">
|
||||
<exp>Stare</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_006" name="mdstatus_level">
|
||||
<exp>Nivele RAID</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_007" name="mdstatus_chunk">
|
||||
<exp>Chunk Size</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_008" name="mdstatus_algo">
|
||||
<exp>Algoritm</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_009" name="mdstatus_superb">
|
||||
<exp>Superblock persistente</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_010" name="mdstatus_avail">
|
||||
<exp>disponibil</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_011" name="mdstatus_navail">
|
||||
<exp>indisponibil</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_012" name="mdstatus_regact">
|
||||
<exp>Înregistrate/Discuri Active</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_013" name="mdstatus_curact">
|
||||
<exp>Acțiune curentă</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_014" name="mdstatus_finishin">
|
||||
<exp>finisare în</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_015" name="mdstatus_unused">
|
||||
<exp>Discuri defolosite</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_016" name="mdstatus_refresh">
|
||||
<exp>Ultimul refresh</exp>
|
||||
</expression>
|
||||
</tns:translationPlugin>
|
57
root/opt/phpsysinfo/plugins/mdstatus/lang/ru.xml
Normal file
57
root/opt/phpsysinfo/plugins/mdstatus/lang/ru.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Id: en.xml 661 2012-08-27 11:26:39Z namiltd $ -->
|
||||
<!--
|
||||
phpSysInfo language file Language: Russian Created by: Denis Sevostyanov (den007)
|
||||
-->
|
||||
<tns:translationPlugin language="russian" charset="utf-8"
|
||||
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
|
||||
<expression id="plugin_mdstatus_001" name="mdstatus_title">
|
||||
<exp>RAID Статус</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_002" name="mdstatus_support">
|
||||
<exp>Поддерживаются типы RAID</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_003" name="mdstatus_devices">
|
||||
<exp>RAID-Устройства</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_004" name="mdstatus_infos">
|
||||
<exp>Дополнительные сведения</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_005" name="mdstatus_status">
|
||||
<exp>Статус</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_006" name="mdstatus_level">
|
||||
<exp>RAID-Уровень</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_007" name="mdstatus_chunk">
|
||||
<exp>Размер блока</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_008" name="mdstatus_algo">
|
||||
<exp>Алгоритм</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_009" name="mdstatus_superb">
|
||||
<exp>Постоянный суперблок</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_010" name="mdstatus_avail">
|
||||
<exp>доступен</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_011" name="mdstatus_navail">
|
||||
<exp>не доступен</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_012" name="mdstatus_regact">
|
||||
<exp>Зарегистрировано/Активных Дисков</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_013" name="mdstatus_curact">
|
||||
<exp>Текущее действие</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_014" name="mdstatus_finishin">
|
||||
<exp>Окончание в</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_015" name="mdstatus_unused">
|
||||
<exp>Неиспользуемые диски</exp>
|
||||
</expression>
|
||||
<expression id="plugin_mdstatus_016" name="mdstatus_refresh">
|
||||
<exp>Последнее обновление</exp>
|
||||
</expression>
|
||||
</tns:translationPlugin>
|
@@ -0,0 +1,9 @@
|
||||
<div class="col-lg-12" id="block_mdstatus" style="display:none">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">RAID Status</div>
|
||||
<div class="panel-body">
|
||||
<table id="mdstatus" class="table borderless table-condensed">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user