X-Git-Url: http://git.auf.org/?p=auf-serveur.git;a=blobdiff_plain;f=glpi-plugin-auf%2Fplugin%2Freport.operatingsystems.php;h=d2f4927fb4f38422b773e3afae35b7c6681dc8c0;hp=5c4520179875aa9a3da2718a4eb556b598436e53;hb=HEAD;hpb=1135f035aaa0740b35308a07f2919523b15ea4a6 diff --git a/glpi-plugin-auf/plugin/report.operatingsystems.php b/glpi-plugin-auf/plugin/report.operatingsystems.php index 5c45201..d2f4927 100644 --- a/glpi-plugin-auf/plugin/report.operatingsystems.php +++ b/glpi-plugin-auf/plugin/report.operatingsystems.php @@ -57,7 +57,7 @@ while ($region_data = $DB->fetch_assoc($region_result)) { $query = "SELECT COUNT(c.id) AS count, e.name AS ename, (CASE WHEN o.name REGEXP '^Debian ' THEN SUBSTRING_INDEX(REPLACE(o.name,' GNU/Linux',''),'.',1) WHEN o.name REGEXP '^Ubuntu ' THEN SUBSTRING_INDEX(REPLACE(o.name,' LTS',''),'.',2) - WHEN o.name REGEXP '^Microsoft' THEN REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(o.name,'â¢',''),'®',''),'fessional',''),'fessionnel',''),'Microsoft ','') + WHEN o.name REGEXP '^Microsoft' THEN REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(o.name,'(R)',''),'â¢',''),'®',''),'fessional',''),'fessionnel',''),'Microsoft ','') WHEN o.name REGEXP '^Mac ' THEN REPLACE(o.name,'Mac ','') ELSE o.name END) AS oname FROM `$table_item` c @@ -80,16 +80,16 @@ while ($data=$DB->fetch_assoc($result)) { $data['oname'] = "(indéterminé)"; } if (($data['oname'] == 'Debian 8') || ($data['oname'] == 'Ubuntu 12.04')) { - $oname_plus = ''; + $oname_plus = svg_bar(Array(1,0,0,0), 5, 5); $green_total += $data['count']; } elseif (($data['oname'] == 'Debian 7') || ($data['oname'] == 'Ubuntu 14.04')) { - $oname_plus = ''; + $oname_plus = svg_bar(Array(0,1,0,0), 5, 5); $yellow_total += $data['count']; } elseif ((substr($data['oname'],0,7) == 'Windows') || (substr($data['oname'],strlen($data['oname'])-4,4) == 'OS X')) { - $oname_plus = ''; + $oname_plus = svg_bar(Array(0,0,0,1), 5, 5); $blue_total += $data['count']; } else { - $oname_plus = ''; + $oname_plus = svg_bar(Array(0,0,1,0), 5, 5); $red_total += $data['count']; } echo "