Project

General

Profile

Revision 7101a8d8

ID7101a8d898febcda36384a37770abadf35ce5731
Parent ea2027b6
Child ae0b58ab

Added by Francois POIROTTE about 7 years ago

Correction génération des HLS

Il manquait le nom du HLS et il y avait un bug dans la prise en compte
des dépendances.

Change-Id: Ib6e6f4a8a966d7febcb364cd9863a9673f5aa71e
Reviewed-on: https://vigilo-dev.si.c-s.fr/review/2402
Tested-by: Build system <>
Reviewed-by: Francois POIROTTE <>

View differences:

src/plugins/vigilo/Vigilo/VigiloHlservice.php
69 69
        if (!is_object($value) || !($value instanceof VigiloDepends)) {
70 70
            throw new \RuntimeException("Invalid dependency");
71 71
        }
72
        $this->dependencies[$offset] = $value;
72
        if (null === $offset) {
73
            $this->dependencies[] = $value;
74
        } else {
75
            $this->dependencies[$offset] = $value;
76
        }
73 77
    }
74 78

  
75 79
    public function offsetUnset($offset)
......
94 98
        }
95 99

  
96 100
        $xml = <<<HLS
97
<hlservice>
101
<hlservice name="%s">
98 102
    <message>%s</message>
99 103
    <warning_threshold>%d</warning_threshold>
100 104
    <critical_threshold>%d</critical_threshold>
......
105 109
HLS;
106 110
        return self::sprintf(
107 111
            $xml,
112
            $this->name,
108 113
            $this->message,
109 114
            $this->warnThreshold,
110 115
            $this->critThreshold,

Also available in: Unified diff