Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
centreon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
centreon
Commits
8674dfb8
Commit
8674dfb8
authored
Oct 2, 2017
by
loiclau
Committed by
Matthieu Kermagoret
Oct 3, 2017
Browse files
Options
Downloads
Patches
Plain Diff
fix(api rest) show rtDowntime without param
parent
1b0d2921
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
www/class/centreon-clapi/centreonRtDowntime.class.php
+39
-3
39 additions, 3 deletions
www/class/centreon-clapi/centreonRtDowntime.class.php
with
39 additions
and
3 deletions
www/class/centreon-clapi/centreonRtDowntime.class.php
+
39
−
3
View file @
8674dfb8
...
@@ -66,6 +66,16 @@ class CentreonRtDowntime extends CentreonObject
...
@@ -66,6 +66,16 @@ class CentreonRtDowntime extends CentreonObject
'INSTANCE'
,
'INSTANCE'
,
);
);
/**
* @var
*/
protected
$dHosts
;
/**
* @var
*/
protected
$dServices
;
/**
/**
* CentreonRtDowntime constructor.
* CentreonRtDowntime constructor.
*/
*/
...
@@ -161,11 +171,37 @@ class CentreonRtDowntime extends CentreonObject
...
@@ -161,11 +171,37 @@ class CentreonRtDowntime extends CentreonObject
*/
*/
public
function
show
(
$parameters
=
null
)
public
function
show
(
$parameters
=
null
)
{
{
if
(
$parameters
!==
''
)
{
$parsedParameters
=
$this
->
parseShowparameters
(
$parameters
);
$parsedParameters
=
$this
->
parseShowparameters
(
$parameters
);
$method
=
'show'
.
ucfirst
(
$parsedParameters
[
'type'
]);
$method
=
'show'
.
ucfirst
(
$parsedParameters
[
'type'
]);
$this
->
$method
(
$parsedParameters
[
'resource'
]);
$this
->
$method
(
$parsedParameters
[
'resource'
]);
}
else
{
$this
->
dHosts
=
$this
->
object
->
getHostDowntimes
();
$this
->
dServices
=
$this
->
object
->
getSvcDowntimes
();
$list
=
''
;
//all host
if
(
count
(
$this
->
dHosts
)
!==
0
)
{
foreach
(
$this
->
dHosts
as
$host
)
{
$list
.
=
$host
[
'name'
]
.
'|'
;
}
$list
=
rtrim
(
$list
,
'|'
);
}
$list
.
=
';'
;
//all service
if
(
count
(
$this
->
dServices
)
!==
0
)
{
foreach
(
$this
->
dServices
as
$service
)
{
$list
.
=
$service
[
'name'
]
.
','
.
$service
[
'description'
]
.
'|'
;
}
$list
=
rtrim
(
$list
,
'|'
);
}
$list
.
=
';'
;
echo
"hosts;services
\n
"
;
echo
$list
;
}
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment