mirror of https://github.com/Icinga/icinga2.git
commit
5e95dd71be
|
@ -16,8 +16,8 @@ object TimePeriod "24x7" inherits "legacy-timeperiod" {
|
|||
}
|
||||
}
|
||||
|
||||
object TimePeriod "8x5" inherits "legacy-timeperiod" {
|
||||
display_name = "Icinga 2 8x5 TimePeriod",
|
||||
object TimePeriod "9to5" inherits "legacy-timeperiod" {
|
||||
display_name = "Icinga 2 9to5 TimePeriod",
|
||||
ranges = {
|
||||
"monday" = "09:00-17:00",
|
||||
"tuesday" = "09:00-17:00",
|
||||
|
|
|
@ -70,12 +70,12 @@ void TimePeriod::AddSegment(double begin, double end)
|
|||
if (segment->Get("begin") <= begin && segment->Get("end") >= end)
|
||||
return; /* New segment is fully contained in this segment. */
|
||||
|
||||
if (segment->Get("begin") < begin && segment->Get("end") > begin) {
|
||||
if (segment->Get("begin") <= begin && segment->Get("end") >= begin) {
|
||||
segment->Set("end", end); /* Extend an existing segment. */
|
||||
return;
|
||||
}
|
||||
|
||||
if (segment->Get("begin") > begin && segment->Get("begin") < end) {
|
||||
if (segment->Get("begin") >= begin && segment->Get("begin") <= end) {
|
||||
segment->Set("begin", begin); /* Extend an existing segment. */
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue