Skip to content

Commit ccab000

Browse files
authored
bug fixing (#354)
1 parent 009bed3 commit ccab000

2 files changed

Lines changed: 9 additions & 16 deletions

File tree

panellib/analyze.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,25 +1035,18 @@ function analyse_tree_host_graph($panel, $user_id) {
10351035
}
10361036
}
10371037

1038-
$panel['data'] .= '<tr><td class="block"><span class="inpa_sq color_' . $color . '"></span>' . __('Server CPU cores / processes / threads: %s / %s / %s', $cpu_cores, $sett['processes'], $sett['threads'], 'intropage');
1038+
$panel['data'] .= '<tr><td class="block"><span class="inpa_sq color_' . $color . '"></span>' . __('Server CPU (cores / processes / threads): %s / %s / %s', $cpu_cores, $sett['processes'], $sett['threads'], 'intropage');
10391039
$panel['data'] .= display_tooltip($text) . '</td></tr>';
10401040

10411041
$notify = db_fetch_cell ("SELECT COUNT(*) FROM settings WHERE name = 'notify_admin' AND value='on'");
10421042
$admin_email = db_fetch_cell("SELECT email_address FROM user_auth WHERE username = 'admin' LIMIT 1");
10431043
$text = 'Administrator can be notified by email about problems. It is therefore necessary to set the admin account email address and at the same time enable notifications in Settings - Mail/Reporting/DNS';
10441044

1045-
if (!$notify && $admin_email == '') {
1045+
if (!$notify || $admin_email == '') {
10461046
$panel['data'] .= '<tr><td class="block"><span class="inpa_sq color_red"></span>' . __('Notify admin is disabled and admin email is not set', 'intropage');
10471047
$panel['data'] .= display_tooltip($text) . '</td></tr>';
10481048
$total_errors++;
10491049
$panel['alarm'] = 'red';
1050-
} elseif ($notify || $admin_email == '') {
1051-
$panel['data'] .= '<tr><td class="block"><span class="inpa_sq color_yellow"></span>' . __('Notify admin is disabled or admin email is not set', 'intropage');
1052-
$panel['data'] .= display_tooltip($text) . '</td></tr>';
1053-
$total_errors++;
1054-
if ($panel['alarm'] == 'green') {
1055-
$panel['alarm'] = 'yellow';
1056-
}
10571050
}
10581051

10591052
if ($total_errors > 0) {

panellib/system.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -825,13 +825,13 @@ function extrem_detail() {
825825

826826
$i = 0;
827827
foreach ($data as $row) {
828-
if (($row['xvalue']/$poller_interval) > 0.9) {
829-
$color = 'red';
830-
} elseif (($row['xvalue']/$poller_interval) > 0.7) {
831-
$color = 'yellow';
832-
} else {
833-
$color = 'green';
834-
}
828+
if (($row['xvalue']/$poller_interval) > 0.9) {
829+
$color = 'red';
830+
} elseif (($row['xvalue']/$poller_interval) > 0.7) {
831+
$color = 'yellow';
832+
} else {
833+
$color = 'green';
834+
}
835835

836836
$trows[$i][$j] = $row['date'] . ' ' . $row['xvalue'] . 's <span class="inpa_sq color_' . $color . '"></span>';
837837
$i++;

0 commit comments

Comments
 (0)