merged upstream/develop into develop
resolved conflicts in list.tpl.html by merging both changes.pull/834/head
commit
1bd8e821f0
|
@ -175,7 +175,9 @@ class StatusUpdater
|
||||||
if ($max_runs == null || $max_runs > 1) {
|
if ($max_runs == null || $max_runs > 1) {
|
||||||
$max_runs = 1;
|
$max_runs = 1;
|
||||||
}
|
}
|
||||||
$txt = exec("ping -c " . $max_runs . " " . $this->server['ip']);
|
$result = null;
|
||||||
|
// Execute ping
|
||||||
|
$txt = exec("ping -c " . $max_runs . " " . $this->server['ip'] . " 2>&1", $output);
|
||||||
// Non-greedy match on filler
|
// Non-greedy match on filler
|
||||||
$re1 = '.*?';
|
$re1 = '.*?';
|
||||||
// Uninteresting: float
|
// Uninteresting: float
|
||||||
|
@ -184,16 +186,16 @@ class StatusUpdater
|
||||||
$re3 = '.*?';
|
$re3 = '.*?';
|
||||||
// Float 1
|
// Float 1
|
||||||
$re4 = '([+-]?\\d*\\.\\d+)(?![-+0-9\\.])';
|
$re4 = '([+-]?\\d*\\.\\d+)(?![-+0-9\\.])';
|
||||||
|
if (preg_match_all("/" . $re1 . $re2 . $re3 . $re4 . "/is", $txt, $matches)) {
|
||||||
if ($c = preg_match_all("/" . $re1 . $re2 . $re3 . $re4 . "/is", $txt, $matches)) {
|
|
||||||
$result = $matches[1][0];
|
$result = $matches[1][0];
|
||||||
} else {
|
|
||||||
$result = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_null($result)) {
|
if (!is_null($result)) {
|
||||||
|
$this->header = $output[0];
|
||||||
$status = true;
|
$status = true;
|
||||||
} else {
|
} else {
|
||||||
|
$this->header = "-";
|
||||||
|
$this->error = $output[0];
|
||||||
$status = false;
|
$status = false;
|
||||||
}
|
}
|
||||||
//Divide by a thousand to convert to milliseconds
|
//Divide by a thousand to convert to milliseconds
|
||||||
|
|
|
@ -5,18 +5,18 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<!--class="d-none d-lg-table-cell"-->
|
<!--class="d-none d-lg-table-cell"-->
|
||||||
<th scope="col">{{ label_label }}</th>
|
<th scope="col">{{ label_label }}</th>
|
||||||
<th scope="col">{{ label_domain }}</th>
|
<th scope="col">{{ label_domain }}</th>
|
||||||
<th scope="col">{{ label_port }}</th>
|
<th scope="col" style="width: 5%;">{{ label_port }}</th>
|
||||||
<th scope="col">{{ label_protocol }}</th>
|
<th scope="col" style="width: 5%;">{{ label_protocol }}</th>
|
||||||
<th scope="col">{{ label_type }}</th>
|
<th scope="col" style="width: 8%;">{{ label_type }}</th>
|
||||||
<th scope="col">{{ label_rtime }}</th>
|
<th scope="col" style="width: 8%;">{{ label_rtime }}</th>
|
||||||
<th scope="col">{{ label_last_online }}</th>
|
<th scope="col" style="width: 10%;">{{ label_last_online }}</th>
|
||||||
<th scope="col">{{ label_last_offline }}</th>
|
<th scope="col" style="width: 10%;">{{ label_last_offline }}</th>
|
||||||
<th scope="col">{{ label_monitoring }}</th>
|
<th scope="col" style="width: 10%;">{{ label_monitoring }}</th>
|
||||||
{% if user_level == 10 %}
|
{% if user_level == 10 %}
|
||||||
<th scope="col"> </th>
|
<th scope="col" style="width: 5%;"> </th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="warning no-result">
|
<tr class="warning no-result">
|
||||||
<td colspan="9"><i class="fas fa-exclamation-triangle"></i> No result</td>
|
<td colspan="9"><i class="fas fa-exclamation-triangle"></i> No result</td>
|
||||||
|
|
Loading…
Reference in New Issue