Skip to content

Commit

Permalink
Update to Observium CE 21.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielleHuisman committed Oct 14, 2021
1 parent 040a216 commit 03b3d3e
Show file tree
Hide file tree
Showing 483 changed files with 5,393 additions and 6,122 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Observium CE 21.10
Observium CE 21.10.1
4 changes: 3 additions & 1 deletion html/includes/contacts-navbar.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@
'offset' => TRUE,
'html' => '<a id="contact_' . $transport . '_doc" href="' . $docs_link . '" target="_blank">See documentation for this Transport (new page)</a>');
}
asort($form_params['method']);
if (is_array($form_params['method'])) {
asort($form_params['method']);
}
$form['row'][$row_tmp]['contact_method']['values'] = $form_params['method'];

$form['row'][++$row]['contact_descr'] = array(
Expand Down
15 changes: 7 additions & 8 deletions html/includes/entities/counter.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -540,15 +540,14 @@ function print_counter_form($vars, $single_device = FALSE)
}

$counter_permitted = generate_query_permitted(array('device', 'counter'));
foreach (['counter_class' => 'Counter Class', 'counter_event' => 'Counter Event'] as $param => $param_name)
{
foreach ([ 'counter_class' => 'Counter Class', 'counter_event' => 'Counter Event' ] as $param => $param_name) {
$sql = 'SELECT DISTINCT `'.$param.'` FROM `counters` WHERE `counter_deleted` = ?' . $counter_permitted;
$entries = dbFetchColumn($sql, [0]);
asort($entries);
foreach ($entries as $entry)
{
if ($entry == '') { $entry = OBS_VAR_UNSET; }
if ($param == 'counter_class')
if ($entries = dbFetchColumn($sql, [ 0 ])) {
asort($entries);
}
foreach ($entries as $entry) {
if (safe_empty($entry)) { $entry = OBS_VAR_UNSET; }
if ($param === 'counter_class')
{
$name = nicecase($entry);
if (isset($config['counter_types'][$entry]['icon']))
Expand Down
15 changes: 7 additions & 8 deletions html/includes/entities/printersupply.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,13 @@ function print_printersupplies_form($vars, $single_device = FALSE)
'grid' => 3,
'value' => $vars['status_descr']);

foreach (['supply_colour' => 'Colour', 'supply_type' => 'Type'] as $param => $param_name)
{
foreach ([ 'supply_colour' => 'Colour', 'supply_type' => 'Type' ] as $param => $param_name) {
$sql = 'SELECT DISTINCT `'.$param.'` FROM `printersupplies` WHERE 1' . $GLOBALS['cache']['where']['devices_permitted'];
$entries = dbFetchColumn($sql);
asort($entries);
foreach ($entries as $entry)
{
if ($entry == '') { $entry = OBS_VAR_UNSET; }
if ($entries = dbFetchColumn($sql)) {
asort($entries);
}
foreach ($entries as $entry) {
if (safe_empty($entry)) { $entry = OBS_VAR_UNSET; }
$name = nicecase($entry);
$form_items[$param][$entry] = $name;
}
Expand All @@ -260,7 +259,7 @@ function print_printersupplies_form($vars, $single_device = FALSE)
'type' => 'multiselect',
'name' => $param_name,
'width' => '100%', //'180px',
'grid' => $param == 'supply_colour' ? 1: 2,
'grid' => $param === 'supply_colour' ? 1: 2,
'value' => $vars[$param],
'values' => $form_items[$param]);
}
Expand Down
12 changes: 6 additions & 6 deletions html/includes/entities/sensor.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,16 +462,16 @@ function print_sensor_form($vars, $single_device = FALSE)
}

$sensor_permitted = generate_query_permitted(array('device', 'sensor'));
foreach (['sensor_class' => 'Sensor Class', 'sensor_event' => 'Sensor Event'] as $param => $param_name)
foreach ([ 'sensor_class' => 'Sensor Class', 'sensor_event' => 'Sensor Event' ] as $param => $param_name)
{
$sql = 'SELECT DISTINCT `'.$param.'` FROM `sensors` WHERE `sensor_deleted` = ?' . $sensor_permitted;
$entries = dbFetchColumn($sql, [0]);
asort($entries);
if ($entries = dbFetchColumn($sql, [ 0 ])) {
asort($entries);
}
foreach ($entries as $entry)
{
if ($entry == '') { $entry = OBS_VAR_UNSET; }
if ($param == 'sensor_class')
{
if (safe_empty($entry)) { $entry = OBS_VAR_UNSET; }
if ($param === 'sensor_class') {
$name = nicecase($entry);
if (isset($config['sensor_types'][$entry]['icon']))
{
Expand Down
15 changes: 7 additions & 8 deletions html/includes/entities/status.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,15 +387,14 @@ function print_status_form($vars, $single_device = FALSE)
}

$status_permitted = generate_query_permitted(array('device', 'status'));
foreach (['entPhysicalClass' => 'Physical Class', 'status_event' => 'Status Event', 'status_name' => 'Status'] as $param => $param_name)
{
foreach ([ 'entPhysicalClass' => 'Physical Class', 'status_event' => 'Status Event', 'status_name' => 'Status' ] as $param => $param_name) {
$sql = 'SELECT DISTINCT `'.$param.'` FROM `status` WHERE `status_deleted` = ?' . $status_permitted;
$entries = dbFetchColumn($sql, [0]);
asort($entries);
foreach ($entries as $entry)
{
if ($entry == '') { $entry = OBS_VAR_UNSET; }
if ($param == 'entPhysicalClass')
if ($entries = dbFetchColumn($sql, [ 0 ])) {
asort($entries);
}
foreach ($entries as $entry) {
if (safe_empty($entry)) { $entry = OBS_VAR_UNSET; }
if ($param === 'entPhysicalClass')
{
$name = nicecase($entry);
if (isset($config['icon'][strtolower($entry)]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
);

$i = 0;
if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/asterisk_peers.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
);

$i = 0;
if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/bind_answers.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
);
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/bind_cache.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/bind_query_in.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/bind_query_out.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
);
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/bind_req_in.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
);
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/bind_req_proto.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
);
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
);
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
);
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/bind_resolv_rtt.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
);
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/bind_updates.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
);
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/bind_zone_maint.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
);
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/ceph_iops.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/ceph_osd.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
);
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/ceph_speed.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

$mysql_rrd = get_rrd_path($device, "app-ceph-".$app['app_id'].".rrd");

if (is_file($mysql_rrd))
if (rrd_is_file($mysql_rrd))
{
$rrd_filename = $mysql_rrd;
}
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/dhcpkit_msgtypes.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
);
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/dhcpkit_packets.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
);
$i = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
foreach ($array as $ds => $data)
{
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/dovecot_auth.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
$i = 0;
$x = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
$max_colours = safe_count($config['graph_colours'][$colours]);
foreach ($array as $ds => $data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
$i = 0;
$x = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
$max_colours = safe_count($config['graph_colours'][$colours]);
foreach ($array as $ds => $data)
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/dovecot_cache.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
$i = 0;
$x = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
$max_colours = safe_count($config['graph_colours'][$colours]);
foreach ($array as $ds => $data)
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/dovecot_commands.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
$i = 0;
$x = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
$max_colours = safe_count($config['graph_colours'][$colours]);
foreach ($array as $ds => $data)
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/dovecot_connected.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
$i = 0;
$x = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
$max_colours = safe_count($config['graph_colours'][$colours]);
foreach ($array as $ds => $data)
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/dovecot_cpu.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$i = 0;
$x = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
$max_colours = safe_count($config['graph_colours'][$colours]);
foreach ($array as $ds => $data)
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/dovecot_io.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$i = 0;
$x = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
$max_colours = safe_count($config['graph_colours'][$colours]);
foreach ($array as $ds => $data)
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/dovecot_pages.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$i = 0;
$x = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
$max_colours = safe_count($config['graph_colours'][$colours]);
foreach ($array as $ds => $data)
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/dovecot_storage.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
$i = 0;
$x = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
$max_colours = safe_count($config['graph_colours'][$colours]);
foreach ($array as $ds => $data)
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/dovecot_usage.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$i = 0;
$x = 0;

if (is_file($rrd_filename))
if (rrd_is_file($rrd_filename))
{
$max_colours = safe_count($config['graph_colours'][$colours]);
foreach ($array as $ds => $data)
Expand Down
2 changes: 1 addition & 1 deletion html/includes/graphs/application/drbd_disk_bits.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

$drbd_rrd = get_rrd_path($device, "app-drbd-".$app['app_instance'].".rrd");

if (is_file($drbd_rrd))
if (rrd_is_file($drbd_rrd))
{
$rrd_filename = $drbd_rrd;
}
Expand Down
Loading

0 comments on commit 03b3d3e

Please sign in to comment.