ddurieux / glpi_app_grafana

GNU Affero General Public License v3.0
23 stars 13 forks source link

Problem in query GLPI #44

Open andrecampelo opened 5 years ago

andrecampelo commented 5 years ago

Hello dear ddurieux

I am doing the GLPI and Grafana integration, I came across the following problem.

image

or datasourcing is connected

Query responds with error on line 125

Object xhrStatus:"complete" request:Object method:"GET" url:"api/datasources/proxy/4/search/ticket?is_deleted=0&as_map=0&criteria[0][field]=12&criteria[0][searchtype]=equals&criteria[0][value]=notold&search=Search&itemtype=Ticket&start=0&forcedisplay[0]=0&giveItems=true&forcedisplay[1]=1&forcedisplay[4]=4&forcedisplay[3]=3&forcedisplay[80]=80&forcedisplay[15]=15&forcedisplay[7]=7" response:"
Parse error: syntax error, unexpected 'if' (T_IF) in C:\xampp\htdocs\glpi\inc\api.class.php on line 125
"

follows the line that shows copied error of the patch that was published

  // retrieve ip of client
  $this->iptxt = Toolbox::getRemoteIpAddress();

line 125 = + if (count($spl) > l) {

help me!!

thanks

ddurieux commented 5 years ago

Hello,

seems you have problem with GLPI. DO you have official version or custom patched version?

andrecampelo commented 5 years ago

Original version.

GLPI 9.2.3 Copyright (C) 2015-2018 Teclib' and contributors - Copyright (C) 2003-2015 INDEPNET Development Team FusionInventory 9.2+2.0 - Copyleft © 2010-2017 by FusionInventory Team

andrecampelo commented 5 years ago

Hello

As you mentioned, I decided to upgrade the version of glpi using default settings. I did not succeed. error persists!

some help?