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
645b4629
Commit
645b4629
authored
Mar 7, 2017
by
Laurent Pinsivy
Browse files
Options
Downloads
Patches
Plain Diff
#5057 - For CLAPI do not remove downtimes not linked to objects
parent
06b646ae
Loading
Loading
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cron/downtimeManager.php
+0
-4
0 additions, 4 deletions
cron/downtimeManager.php
www/class/centreonDowntime.Broker.class.php
+0
-10
0 additions, 10 deletions
www/class/centreonDowntime.Broker.class.php
with
0 additions
and
14 deletions
cron/downtimeManager.php
+
0
−
4
View file @
645b4629
...
@@ -63,10 +63,6 @@ $ext_cmd_del['svc'] = array(
...
@@ -63,10 +63,6 @@ $ext_cmd_del['svc'] = array(
$pearDB
=
new
CentreonDB
();
$pearDB
=
new
CentreonDB
();
$downtimeObj
=
new
CentreonDowntimeBroker
(
$pearDB
,
_CENTREON_VARLIB_
);
$downtimeObj
=
new
CentreonDowntimeBroker
(
$pearDB
,
_CENTREON_VARLIB_
);
/* Delete empty Downtimes */
$downtimeObj
->
purgeEmptyDowntimes
();
/* Get approaching downtimes */
/* Get approaching downtimes */
$downtimes
=
$downtimeObj
->
getApproachingDowntimes
(
_DELAY_
);
$downtimes
=
$downtimeObj
->
getApproachingDowntimes
(
_DELAY_
);
...
...
This diff is collapsed.
Click to expand it.
www/class/centreonDowntime.Broker.class.php
+
0
−
10
View file @
645b4629
...
@@ -407,16 +407,6 @@ class CentreonDowntimeBroker extends CentreonDowntime
...
@@ -407,16 +407,6 @@ class CentreonDowntimeBroker extends CentreonDowntime
$this
->
db
->
query
(
$query
);
$this
->
db
->
query
(
$query
);
}
}
public
function
purgeEmptyDowntimes
()
{
$query
=
'DELETE FROM `downtime` '
.
'WHERE `dt_id` NOT IN (SELECT dt_id FROM downtime_host_relation) '
.
'AND `dt_id` NOT IN (SELECT dt_id FROM downtime_hostgroup_relation) '
.
'AND `dt_id` NOT IN (SELECT dt_id FROM downtime_service_relation) '
.
'AND `dt_id` NOT IN (SELECT dt_id FROM downtime_servicegroup_relation) '
;
$this
->
db
->
query
(
$query
);
}
public
function
isScheduled
(
$downtime
)
public
function
isScheduled
(
$downtime
)
{
{
$isScheduled
=
false
;
$isScheduled
=
false
;
...
...
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