Fix
This commit is contained in:
parent
2f4f917032
commit
f3a3dcb566
@ -19,9 +19,11 @@ public function sync()
|
|||||||
$zabbix->connect("spaninger", "*");
|
$zabbix->connect("spaninger", "*");
|
||||||
|
|
||||||
foreach ( $zabbix->maintenances([ "selectTimeperiods" => "extend" ]) as $maintennace ) {
|
foreach ( $zabbix->maintenances([ "selectTimeperiods" => "extend" ]) as $maintennace ) {
|
||||||
if(!Carbon::createFromTimestamp($maintennace['active_till'])->isPast()){
|
if(Carbon::createFromTimestamp($maintennace['active_till'])->isPast()){
|
||||||
dd(Carbon::createFromTimestamp($maintennace['active_till']));
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dd(Carbon::createFromTimestamp($maintennace['active_till']));
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($zabbix->hosts() as $host) {
|
foreach ($zabbix->hosts() as $host) {
|
||||||
@ -31,6 +33,7 @@ public function sync()
|
|||||||
"display_name" => $host['name'],
|
"display_name" => $host['name'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user