39 $this->name =
'Hardware Information';
40 parent::__construct($this->name);
44 "?node=storage&sub=edit&id={$id}" => _(
'Edit Node')
51 ) => $this->obj->get(
'name'),
52 _(
'Hostname / IP') => $this->obj->get(
'ip'),
71 echo
'<div class="col-xs-9">';
72 echo
'<div class="panel panel-info">';
73 echo
'<div class="panel-heading text-center">';
74 echo
'<h4 class="title">';
75 echo _(
'Server information');
78 echo
'<div class="panel-body">';
79 if (!$this->obj->isValid()) {
80 echo _(
'Invalid Server Information!');
87 '%s://%s/fog/status/hw.php',
91 $ret = self::$FOGURLRequests->process(
$url);
94 echo _(
'Unable to get server infromation!');
100 $this->attributes = array(
101 array(
'class' =>
'col-xs-4'),
102 array(
'class' =>
'col-xs-8'),
104 $this->templates = array(
109 $arGeneral = array();
113 foreach ((array)
$lines as &$line) {
131 $arGeneral[] = $line;
144 if (count($arGeneral) < 1) {
145 echo _(
'Unable to find basic information!');
151 foreach ((array)$arNIC as &$nic) {
152 $nicparts = explode(
"$$", $nic);
153 if (count($nicparts) == 5) {
156 $NICErrInfo[] = $nicparts[3];
157 $NICDropInfo[] = $nicparts[4];
158 $NICTrans[] = sprintf(
'%s %s', $nicparts[0], _(
'TX'));
159 $NICRec[] = sprintf(
'%s %s', $nicparts[0], _(
'RX'));
160 $NICErr[] = sprintf(
'%s %s', $nicparts[0], _(
'Errors'));
161 $NICDro[] = sprintf(
'%s %s', $nicparts[0], _(
'Dropped'));
165 $this->title = _(
'General Information');
167 _(
'Storage Node') => $this->obj->get(
'name'),
168 _(
'IP') => self::resolveHostname(
169 $this->obj->get(
'ip')
171 _(
'Kernel') => $arGeneral[0],
172 _(
'Hostname') => $arGeneral[1],
173 _(
'Uptime') => $arGeneral[2],
174 _(
'CPU Type') => $arGeneral[3],
175 _(
'CPU Count') => $arGeneral[4],
176 _(
'CPU Model') => $arGeneral[5],
177 _(
'CPU Speed') => $arGeneral[6],
178 _(
'CPU Cache') => $arGeneral[7],
179 _(
'Total Memory') => $arGeneral[8],
180 _(
'Used Memory') => $arGeneral[9],
181 _(
'Free Memory') => $arGeneral[10]
183 array_walk($fields, $this->fieldsToData);
184 echo
'<div class="panel panel-info">';
185 echo
'<div class="panel-heading text-center">';
186 echo
'<h4 class="title">';
190 echo
'<div class="panel-body">';
199 $this->title = _(
'File System Information');
201 _(
'Total Disk Space') => $arFS[0],
202 _(
'Used Disk Space') => $arFS[1],
203 _(
'Free Disk Space') => $arFS[2]
205 array_walk($fields, $this->fieldsToData);
206 echo
'<div class="panel panel-info">';
207 echo
'<div class="panel-heading text-center">';
208 echo
'<h4 class="title">';
212 echo
'<div class="panel-body">';
220 $this->title = _(
'Network Information');
221 echo
'<div class="panel panel-info">';
222 echo
'<div class="panel-heading text-center">';
223 echo
'<h4 class="title">';
227 echo
'<div class="panel-body">';
228 foreach ((array)$NICTrans as $index => &$txtran) {
233 $ethName = explode(
' ', $txtran);
235 $NICTrans[$index] => $NICTransSized[$index],
236 $NICRec[$index] => $NICRecSized[$index],
237 $NICErr[$index] => $NICErrInfo[$index],
238 $NICDro[$index] => $NICDropInfo[$index]
240 array_walk($fields, $this->fieldsToData);
241 echo
'<div class="panel panel-info">';
242 echo
'<div class="panel-heading text-center">';
243 echo
'<h4 class="title">';
246 echo _(
'Information');
249 echo
'<div class="panel-body">';