Skip to content
Permalink
Browse files

Добавлены поля Mac, IP, Updated

  • Loading branch information...
Krinopotam committed Sep 22, 2019
1 parent 3eb44b4 commit 66b8ad47f596e2b707632f85a1f891e11fcd7d1a
@@ -428,6 +428,7 @@ private function getAllDevicesInfo()
$objectResult = new SimpleXMLElement($data);
$result = array();
foreach ($objectResult->children()->children() as $node) {
if ($node->mac=='' || $node->registered!="yes") {continue;}
@@ -471,6 +472,30 @@ function updateValues($deviceId, $values)
$rec_vals[] = $rec_val;
}
if (isset($values['MAC']))
{
$rec_val['DEVICE_ID'] = $deviceId;
$rec_val['TITLE'] = "mac";
$rec_val['DESCRIPTION'] = " (R/O) MAC";
$rec_val['VALUE'] = $values['MAC'];
$rec_vals[] = $rec_val;
}
if (isset($values['IP']))
{
$rec_val['DEVICE_ID'] = $deviceId;
$rec_val['TITLE'] = "ip";
$rec_val['DESCRIPTION'] = " (R/O) IP";
$rec_val['VALUE'] = $values['IP'];
$rec_vals[] = $rec_val;
}
$rec_val['DEVICE_ID'] = $deviceId;
$rec_val['TITLE'] = "updated";
$rec_val['DESCRIPTION'] = " (R/O) Обновлено";
$rec_val['VALUE'] = date("Y-m-d H:i:s");
$rec_vals[] = $rec_val;
foreach ($rec_vals as $rec_val)
{
$this->processValues($deviceId, $rec_val);
@@ -21,8 +21,8 @@
<table class="table table-stripped">
<tr>
<td><#LANG_TITLE#></td>
<td><#LANG_VALUE#></td>
<td><#LANG_DESCRIPTION#></td>
<td><#LANG_VALUE#></td>
<td><#LANG_LINKED_OBJECT#></td>
<td><#LANG_LINKED_PROPERTY#></td>
<td><#LANG_METHOD#></td>

0 comments on commit 66b8ad4

Please sign in to comment.
You can’t perform that action at this time.