glpi icon indicating copy to clipboard operation
glpi copied to clipboard

Task/replace chartist

Open orthagh opened this issue 3 years ago • 4 comments

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes

orthagh avatar Sep 06 '22 08:09 orthagh

This seems correct, event if I have very few data on my local instance; therefore I can't show really relevant graphs.

Anyways, I had SQL issues trying to display "Tickets - By hardware characteristics" (not related to your PR). First fix is probabaly:

diff --git a/src/Stat.php b/src/Stat.php
index 7b98ee5b86..4fd688e3c6 100644
--- a/src/Stat.php
+++ b/src/Stat.php
@@ -1118,7 +1118,7 @@ class Stat extends CommonGLPI
                 break;
 
             case "device":
-                $devtable = getTableForItemType('Computer_' . $value2);
+                $devtable = getTableForItemType('Item_' . $value2);
                 $fkname   = getForeignKeyFieldForTable(getTableForItemType($value2));
                //select computers IDs that are using this device;
                 $linkdetable = $table;

But I now have Unknown column 'glpi_tickets.itemtype' in 'on clause'; I have not yet find how to fix.

trasher avatar Oct 03 '22 07:10 trasher

It looks like multiple line graphs aren't working (tested with a network port metrics graph). The first data set is shown OK, but the second seems to have the same label and data as the first

cconard96 avatar Oct 03 '22 10:10 cconard96

It looks like multiple line graphs aren't working

It should be ok now, this issue was caused by a previous foreach also using $serie variable but with a reference

orthagh avatar Oct 04 '22 10:10 orthagh

This seems to be working now for me too

cconard96 avatar Oct 04 '22 10:10 cconard96

@orthagh please rebase to fix conflicts. @cedric-anne ping :)

trasher avatar Oct 27 '22 09:10 trasher