Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(graph): fix labels repeated
Browse files Browse the repository at this point in the history
remove version in groupby

Signed-off-by: Luis F. Gonzalez <lgonzalez@teclib.com>
  • Loading branch information
ingluife authored and DIOHz0r committed Jun 22, 2018
1 parent 274b2ed commit ba17091
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions inc/graph.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,14 @@ public function showDevicesPerOSVersion() {
$entityRestrict = $DbUtil->getEntitiesRestrictRequest(" AND ", $computerTable);
$query = "SELECT
`os`.`name` AS `operatingsystem`,
`osv`.`name` AS `version`,
COUNT(*) AS `cpt`
FROM `$computerTable`
LEFT JOIN `$itemOperatingSystemTable` AS `i_os`
ON (`i_os`.itemtype = 'Computer' AND `i_os`.`items_id` = `$computerTable`.`id`)
LEFT JOIN `$operatingSystemTable` AS `os`
ON (`os`.`id` = `i_os`.`operatingsystems_id`)
LEFT JOIN `$operatingSystemVersionTable` AS `osv`
ON (`osv`.`id` = `i_os`.`operatingsystemversions_id`)
WHERE `$computerTable`.`computertypes_id` = '$computerTypeId' $entityRestrict
GROUP BY `operatingsystem`, `version`";
GROUP BY `operatingsystem`";
$result = $DB->query($query);
if ($result && $DB->numrows($result) > 0) {
$osNames = [];
Expand Down

0 comments on commit ba17091

Please sign in to comment.