merged upstream/develop into develop

resolved conflicts in list.tpl.html by merging both changes.
This commit is contained in:
Nayef Alebrahim 2020-01-16 13:26:27 +03:00
commit 1bd8e821f0
No known key found for this signature in database
GPG Key ID: 7F1502304671A40F
2 changed files with 19 additions and 17 deletions

View File

@ -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

View File

@ -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">&#32</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%;">&#32</th>
{% endif %}
</tr>
<tr class="warning no-result">
<td colspan="9"><i class="fas fa-exclamation-triangle"></i> No result</td>