Subversion-Projekte lars-tiefland.nagios-php

Revision

Revision 86 | Revision 128 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 86 Revision 127
Zeile 2... Zeile 2...
2
 
2
 
3
    /**
3
    /**
4
     * @package nagios-php
4
     * @package nagios-php
5
     * @author Lars Tiefland <ltiefland@gmail.com>
5
     * @author Lars Tiefland <ltiefland@gmail.com>
6
     * @copyright 2013
6
     * @copyright 2013
7
     * @version $Rev: 86 $
7
     * @version $Rev: 127 $
Zeile 8... Zeile 8...
8
     */
8
     */
Zeile 9... Zeile 9...
9
 
9
 
10
    // $Id: service.php 86 2013-01-02 13:28:36Z lars $
10
    // $Id: service.php 127 2013-01-12 17:37:23Z lars $
11
 
11
 
12
    /**
12
    /**
13
     * service
13
     * service
14
     * 
14
     * 
15
     * @package nagios-php
15
     * @package nagios-php
16
     * @author Lars Tiefland
16
     * @author Lars Tiefland
17
     * @copyright 2012
17
     * @copyright 2012
18
     * @version $Rev: 86 $
18
     * @version $Rev: 127 $
19
     * @access public
19
     * @access public
20
     */
20
     */
21
    class service
21
    class service
22
    {
22
    {
-
 
23
        public $display_name;
-
 
24
        public $service_id;
-
 
25
        public $service_object_id;
-
 
26
        public $notes;
-
 
27
        public $notes_url;
-
 
28
        public $action_url;
-
 
29
        public $icon_image;
-
 
30
        public $icon_image_alt;
-
 
31
        public $current_state;
Zeile 23... Zeile 32...
23
        public $display_name;
32
        public $status_update_time;
24
        public $service_id;
33
        public $current_check_attempt;
25
        public $service_object_id;
34
        public $max_check_attempts;
26
 
35
 
Zeile 33... Zeile 42...
33
        public function __construct( $id )
42
        public function __construct( $id )
34
        {
43
        {
35
            $sql = "SELECT
44
            $sql = "SELECT
36
                    service_id,
45
                    service_id,
37
                    display_name,
46
                    display_name,
38
                    service_object_id
47
                    service_object_id,
-
 
48
                    notes,
-
 
49
                    notes_url,
-
 
50
                    action_url,
-
 
51
                    icon_image,
-
 
52
                    icon_image_alt,
-
 
53
                    current_state,
-
 
54
                    status_update_time,
-
 
55
                    current_check_attempt,
-
 
56
                    max_check_attempts
39
                FROM
57
                FROM
40
                    services
58
                    services s
-
 
59
                JOIN
-
 
60
                    service_status ss
-
 
61
                ON
-
 
62
                    ss.service_object_id = s.service_object_id
41
                WHERE
63
                WHERE
42
                    service_id = $id
64
                    service_id = $id
43
                AND
65
                AND
44
                    instance_id = " . $GLOBALS["cfg"]["instance"] . "
66
                    instance_id = " . $GLOBALS["cfg"]["instance"] . "
45
            ";
67
            ";