diff --git a/.travis.yml b/.travis.yml index 36f9fbddea..a3ea97cf9e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,19 @@ language: php - -php: - - '5.3' - - '5.4' - - '5.5' - - '5.6' - - '7.0' - - hhvm - matrix: + fast_finish: true + include: + - php: 5.3 + script: find . -path './lib/influxdb-php' -prune -o -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1 + - php: 5.4 + script: find . -path './lib/influxdb-php' -prune -o -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1 + - php: 5.5 + script: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1 + - php: 5.6 + script: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1 + - php: 7.0 + script: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1 + - php: hhvm + script: find . -path './lib/influxdb-php' -prune -o -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1 allow_failures: - - php: 7.0 + - php: 7.0 + - php: hhvm diff --git a/README.md b/README.md index 2d3555809b..926658660a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://scrutinizer-ci.com/g/librenms/librenms/badges/build.png?b=master)](https://scrutinizer-ci.com/g/librenms/librenms/build-status/master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/librenms/librenms/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/librenms/librenms/?branch=master) [![Build Status](https://travis-ci.org/librenms/librenms.svg?branch=master)](https://travis-ci.org/librenms/librenms) + Introduction ------------ diff --git a/html/includes/graphs/application/dhcp-stats.inc.php b/html/includes/graphs/application/dhcp-stats_stats.inc.php similarity index 100% rename from html/includes/graphs/application/dhcp-stats.inc.php rename to html/includes/graphs/application/dhcp-stats_stats.inc.php diff --git a/html/includes/graphs/application/os-updates.inc.php b/html/includes/graphs/application/os-updates_packages.inc.php similarity index 100% rename from html/includes/graphs/application/os-updates.inc.php rename to html/includes/graphs/application/os-updates_packages.inc.php diff --git a/html/includes/graphs/port/pagp_bits.inc.php b/html/includes/graphs/port/pagp_bits.inc.php index 7cce013217..450edde0f9 100644 --- a/html/includes/graphs/port/pagp_bits.inc.php +++ b/html/includes/graphs/port/pagp_bits.inc.php @@ -3,7 +3,7 @@ // Generate a list of ports and then call the multi_bits grapher to generate from the list $i = 0; foreach (dbFetchRows('SELECT * FROM `ports` WHERE `device_id` = ? AND `pagpGroupIfIndex` = ?', array($port['device_id'], $port['ifIndex'])) as $int) { - $rrd_file = get_port_rrdfile_path ($hostname, int['port_id']); + $rrd_file = get_port_rrdfile_path ($hostname, $int['port_id']); if (is_file($rrd_file)) { $rrd_list[$i]['filename'] = $rrd_file; $rrd_list[$i]['descr'] = $int['ifDescr']; diff --git a/html/pages/apps.inc.php b/html/pages/apps.inc.php index 0a48bd432a..04c4cc21ed 100644 --- a/html/pages/apps.inc.php +++ b/html/pages/apps.inc.php @@ -76,8 +76,12 @@ $graphs['nfs-v3-stats'] = array( 'rpc', ); -$graphs['os-updates'] = array(''); -$graphs['dhcp-stats'] = array(''); +$graphs['os-updates'] = array( + 'packages', +); +$graphs['dhcp-stats'] = array( + 'stats', +); print_optionbar_start(); diff --git a/html/pages/device/apps/dhcp-stats.inc.php b/html/pages/device/apps/dhcp-stats.inc.php index debe352ffc..707d55c95a 100644 --- a/html/pages/device/apps/dhcp-stats.inc.php +++ b/html/pages/device/apps/dhcp-stats.inc.php @@ -3,7 +3,7 @@ global $config; $graphs = array( - 'dhcp-stats' => 'DHCP Stats', + 'dhcp-stats_stats' => 'DHCP Stats', ); foreach ($graphs as $key => $text) { diff --git a/html/pages/device/apps/os-updates.inc.php b/html/pages/device/apps/os-updates.inc.php index 31ba45b92a..772dc85d1e 100644 --- a/html/pages/device/apps/os-updates.inc.php +++ b/html/pages/device/apps/os-updates.inc.php @@ -3,7 +3,7 @@ global $config; $graphs = array( - 'os-updates' => 'OS updates', + 'os-updates_packages' => 'OS updates', ); foreach ($graphs as $key => $text) { diff --git a/includes/discovery/os/radlan.inc.php b/includes/discovery/os/radlan.inc.php index da34ae5223..1474289736 100644 --- a/includes/discovery/os/radlan.inc.php +++ b/includes/discovery/os/radlan.inc.php @@ -1,10 +1,6 @@ $device['device_id'], 'app_type' => 'proxmox', 'app_instance' => $pmxcluster), 'applications', '`device_id` = ? AND `app_type` = ?', array($device['device_id'], 'proxmox')); if (count($pmxlines) > 0) { - $pmxcache = []; + $pmxcache = array(); foreach ($pmxlines as $vm) { list($vmid, $vmport, $vmpin, $vmpout, $vmdesc) = explode('/', $vm, 5); diff --git a/includes/polling/applications/rrdcached.inc.php b/includes/polling/applications/rrdcached.inc.php index 21bb5e4684..f37136402b 100644 --- a/includes/polling/applications/rrdcached.inc.php +++ b/includes/polling/applications/rrdcached.inc.php @@ -53,7 +53,8 @@ if ($agent_data['app']['rrdcached']) { while ($max == -1 || $count < $max) { $data .= fgets($sock, 128); if ($max == -1) { - $max = explode(' ', $data)[0] + 1; + $tmp_max = explode(' ', $data); + $max = $tmp_max[0]+1; } $count++; } diff --git a/includes/polling/os/comware.inc.php b/includes/polling/os/comware.inc.php index c7b2195a27..54010085ed 100644 --- a/includes/polling/os/comware.inc.php +++ b/includes/polling/os/comware.inc.php @@ -8,5 +8,7 @@ echo 'Comware OS...'; $hardware = snmp_get($device, 'sysObjectID.0', '-Osqv', 'SNMPv2-MIB:HH3C-PRODUCT-ID-MIB'); -preg_match('/Software Version (.+), Release ([a-zA-Z0-9]+)/', $poll_device['sysDescr'], $match); -list(,$version,$features) = $match; +$data = str_replace(",","",$poll_device['sysDescr']); +$explodeddata = explode(" ", $data); +$version = $explodeddata['6']; +$features = $explodeddata['8']; diff --git a/includes/polling/os/infinity.inc.php b/includes/polling/os/infinity.inc.php index bf4d70981c..61c11edec7 100644 --- a/includes/polling/os/infinity.inc.php +++ b/includes/polling/os/infinity.inc.php @@ -10,6 +10,6 @@ * the source code distribution for details. */ -$version = $poll_device['sysDescr']; -$version = explode(' ', $version)[2]; +$version = explode(' ', $poll_device['sysDescr']); +$version = $version[2]; $hardware = snmp_get($device, 'IEEE802dot11-MIB::dot11manufacturerProductName.5', '-Ovq'); diff --git a/includes/polling/os/radlan.inc.php b/includes/polling/os/radlan.inc.php index aa0da3818a..2935cc92df 100644 --- a/includes/polling/os/radlan.inc.php +++ b/includes/polling/os/radlan.inc.php @@ -1,16 +1,8 @@