PDA

View Full Version : Problème d'affichage pour l'onglet Reporting


pitpoule
2nd March 2009, 15:09
Bonjour,

Suite à l'install de Centreon 2.1 sur Solaris 10, je rencontre un problème sur l'onglet "Reporting" : Je n'ai rien qui s'affiche pour le reporting des hôtes, juste une page blanche.

J'ai noté cette erreur au niveau de la page web :" initTimeline is not defined"

Pour la partie hostgroup et servicegroup, je n'ai pas ce soucis.

Je coince là, un peu d'aide serait la bienvenue :)

Merci

AkHeNaToN
2nd March 2009, 15:47
Centreon 2.1 est une version de développement et non une version stable => 2.0.1

merci d'installer une version stable

pitpoule
2nd March 2009, 15:54
oups désolé pour le plantage dans le numéro de version... c'est bien la 2.0.1 que j'ai installée

AkHeNaToN
2nd March 2009, 16:10
as tu le fichier " viewHostLog.php" dans "../centreon/www/include/reporting/dashboard/" ?

pitpoule
2nd March 2009, 16:22
Oui, j'ai bien ce fichier

toto:root# pwd
/opt/centreon/www/include/reporting/dashboard

toto:root# ls -l
total 170
-rw-r--r-- 1 webservd root 34203 Feb 25 17:34 DB-Func.php
-rw-r--r-- 1 webservd root 3419 Feb 25 17:34 ajaxReporting_js.php
-rw-r--r-- 1 webservd root 10632 Feb 25 17:34 common-Func.php
drwxr-xr-x 2 webservd root 512 Feb 25 17:29 csvExport
drwxr-xr-x 2 webservd root 512 Feb 25 17:29 imagesGenerations
-rw-r--r-- 1 webservd root 8138 Feb 25 17:34 initReport.php
drwxr-xr-x 2 webservd root 512 Feb 25 17:29 template
-rw-r--r-- 1 webservd root 5666 Feb 25 17:34 viewHostGroupLog.php
-rw-r--r-- 1 webservd root 5549 Feb 25 17:34 viewHostLog.php
-rw-r--r-- 1 webservd root 5806 Feb 25 17:34 viewServicesGroupLog.php
-rw-r--r-- 1 webservd root 5934 Feb 25 17:34 viewServicesLog.php
drwxr-xr-x 2 webservd root 512 Feb 25 17:29 xmlInformations

Ce que je ne comprends pas, c'est que ca fonctionne pour la partie hostgroup et servicegroup, alors que le code html a l'air identique pour la partie "include"


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr_FR.UTF-8">
<head>
<title>Centreon - IT & Network Monitoring</title>
<link rel="shortcut icon" href="./img/favicon.ico"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="Generator" content="Centreon - Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved." />
<meta name="robots" content="index, nofollow" />
<link href="./Themes/Centreon-2/style.css" rel="stylesheet" type="text/css"/>
<link href="./Themes/Centreon-2/Color/yellow_css.php" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="./include/common/javascript/scriptaculous/prototype.js"></script>
<script type="text/javascript" src="./include/common/javascript/scriptaculous/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="./include/common/javascript/topCounterStatus/ajaxStatusCounter.js"></script>

<script type='text/javascript' src='./include/common/javascript/codebase/dhtmlxtree.php?sid=1cb0f3f8dc9bb22ba44a296036b21ba 3'></script>
<script type='text/javascript' src='./include/common/javascript/datePicker.js'></script>
<script type='text/javascript' src='./include/common/javascript/Timeline/src/main/webapp/api/timeline-api.js'></script>
<script type='text/javascript'>
window.onload = function () {
setTimeout('reloadStatusCounter(15000, "1cb0f3f8dc9bb22ba44a296036b21ba3")', 10);
initTimeline();
};

Il n'y a que pour les hôtes qu'il ne trouve pas la fonction initTimeline()

Sylvester
2nd March 2009, 16:41
Salut,

Essaie d'exécuter ces requêtes SQL dans ta base centreon :

INSERT INTO topology_JS (id_page, PathName_js, Init) VALUES ('307', './include/common/javascript/Timeline/src/main/webapp/api/timeline-api.js', 'initTimeline');
INSERT INTO topology_JS (id_page, PathName_js, Init) VALUES ('30701', './include/common/javascript/Timeline/src/main/webapp/api/timeline-api.js', 'initTimeline');

Tiens nous au courant,
a+

pitpoule
2nd March 2009, 17:09
J'ai essayé ces requêtes, sans succès... a priori la base contenait déjà ces infos

id_t_js id_page o PathName_js Init
56 307 NULL ./include/common/javascript/datePicker.js
65 307 NULL ./include/common/javascript/Timeline/src/main/webapp/api/timeline-api.js initTimeline
189 307 NULL ./include/common/javascript/Timeline/src/main/webapp/api/timeline-api.js initTimeline

id_t_js id_page o PathName_js Init
57 30701 NULL ./include/common/javascript/datePicker.js
66 30701 NULL ./include/common/javascript/Timeline/src/main/webapp/api/timeline-api.js initTimeline
190 30701 NULL ./include/common/javascript/Timeline/src/main/webapp/api/timeline-api.js initTimeline

pitpoule
2nd March 2009, 17:26
Petite précision, je ne sais pas si ca peut jouer mais je suis en configuration distribuée, avec deux instances dans la base NDO

Sylvester
2nd March 2009, 17:36
Non, aucun rapport normalement.

Là, l'erreur c'est que le page appelle une fonction javascript qu'elle ne connait pas... ce qui ne devrait pas arriver vu qu'elles sont initialisées dans ta base.

Quand tu vas sur la page de Reporting, t'as bien au niveau de l'url :
"main.php?p=307" ou "main.php?p=30701" ?

pitpoule
2nd March 2009, 19:18
Ca y est ca fonctionne. j'ai modifié le code du fichier viewHostLog.php en me basant sur viewHostGroupLog.php

J'ai modifié la ligne suivante
119: if (isset($id) && $id != ""){
en if (isset($id) && $id != "NULL"){

J'ai fais une correction de bug ou une grosse verrue dans le code ? :p

J'ai bien mon affichage... par contre j'ai un autre soucis... je n'arrive pas à générer les "pie chart" dans la partie reporting...

Un idée ?