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