You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-11-24 10:24:01 +00:00 (in Redmine)
Currently services that are directly added to a host will get deleted by the database, and not the director itself.
Therefor they are not shown in audit log.
We should properly delete the services, and log the event. Maybe find a general way for related objects that should be deleted without question. (Or ask a question?)
Deleting them is the way to go. In case we do so on beforeDelete with IcingaService::load($id)->delete() they should logged correctly.
BUT: restoring them would mean clicking each of them, makes no fun. And is regardless of this currently broken as of no "id" and/or combined key handling in the history.
Another nice approach might be to store them to the activity log with the deleted host. I'd probably prefer doing so, as it is more efficient. Only disadvantage: requires more love and care for the "Restore" form. When a Service-template required for restore got removed in the meantime I still want to be able to restore the host and the other services. Related checks and helpers should be introduced.
Please note that we could implement this in a generic way, but it's IMO not worth the effort. Sure, we could do so - but we cannot base this logic on existing relatedObjects and would be required to introduce a similar (but simpler) construct. Or teach them about the kind of join and constraint they are in. This monster is going to become an ORM ;-)
This issue has been migrated from Redmine: https://dev.icinga.com/issues/13307
Created by mfrosch on 2016-11-24 10:12:05 +00:00
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-11-24 10:24:01 +00:00 (in Redmine)
Currently services that are directly added to a host will get deleted by the database, and not the director itself.
Therefor they are not shown in audit log.
We should properly delete the services, and log the event. Maybe find a general way for related objects that should be deleted without question. (Or ask a question?)
Relations:
The text was updated successfully, but these errors were encountered: