Project

General

Profile

Revision 0e0753c8

ID0e0753c8cfad3350b7b0215005ebb1bcf41cf7d6
Parent a5c9df40
Child b204adb9

Added by Romain Chollet over 7 years ago

Correction d'un bug d'affichage, ajout des faux tests logiciels

Dans glpi, une interruption avait lieu lors du déploiement de la
configuration vigilo. La cause de l'erreur était un reload de httpd
fait par vigilo. Cela a été résolu en faisant un script httpd dans
le dossier de configuration de vigilo.
L'ajout des faux logiciels nécessite encore des modifications qui
vont apparaître dans un prochain commit.

Change-Id: I434d4287526137b46387bf6377ceff7ddfd03de2

View differences:

Vigilo/VigiloHost.php
25 25

  
26 26
        $this->selectTemplates();
27 27
        $this->selectGroups();
28
        $this->monitorProcessor();
29 28
        $this->monitorMemory();
30 29
        $this->monitorNetworkInterfaces();
31 30
        $this->monitorSoftwares();
......
39 38

  
40 39
    protected function selectTemplates()
41 40
    {
42
        if ($this->computer->getField("template_name")) {
41
	$template_name = $this->computer->getField("template_name");
42

  
43
        if ($template_name && $template_name !== "N/A") {
43 44
            $this->children[] = new VigiloHostTemplate($this->computer->getField("template_name"));
44 45
        }
45 46
        $refs = array(
......
53 54
            $id = $this->computer->fields[$field];
54 55
            $value = Dropdown::getDropdownName($table, $id);
55 56
            if ($value !== "" && $value !== null && $value !== " "
56
                && $value !== false && $value !== "-----"
57
                && $value !== false && $value !== "-----" && $value !== 'N/A'
57 58
            ) {
58 59
                $model[] = $value;
59 60
            }
......
74 75
        $location->getFromDB($this->computer->fields["locations_id"]);
75 76
        if (!($location->getName()=='N/A')) {
76 77
            $locationCompleteName=explode(" > ", $location->getField("completename"));
77
            $locationRealName="/" . implode("/", $locationCompleteName);
78
            $locationRealName=implode("/", $locationCompleteName);
78 79
            $this->children[] = new VigiloGroup($locationRealName);
79 80
        }
80 81

  
......
82 83
        $entity->getFromDB($this->computer->fields["entities_id"]);
83 84
        if (!($entity->getName()=='N/A')) {
84 85
            $entityCompleteName=explode(" > ", $entity->getField("completename"));
85
            $entityRealName="/" . implode("/", $entityCompleteName);
86
            $entityRealName=implode("/", $entityCompleteName);
86 87
            $this->children[] = new VigiloGroup($entityRealName);
87 88
        }
88 89

  
......
122 123
        return $address;
123 124
    }
124 125

  
125
    protected function monitorProcessor()
126
    {
127
        $this->children[] = new VigiloTest('CPU');
128
    }
129

  
130 126
    protected function monitorMemory()
131 127
    {
132 128
        global $DB;
......
176 172
            }
177 173
            $args[] = new VigiloArg('label', $label);
178 174
            $args[] = new VigiloArg('ifname', $port->getName());
179
            ;
180 175
            $this->children[] = new VigiloTest('Interface', $args);
181 176

  
182 177
            // Retrieve all IP addresses associated with this interface.

Also available in: Unified diff