mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 06:14:25 +02:00
Ido\CommentQuery: add host/service shortcut column
This commit is contained in:
parent
317094aed3
commit
ecf84077e5
@ -44,7 +44,9 @@ class CommentQuery extends IdoQuery
|
|||||||
'comment_is_persistent' => 'cm.is_persistent',
|
'comment_is_persistent' => 'cm.is_persistent',
|
||||||
'comment_expiration' => 'CASE cm.expires WHEN 1 THEN UNIX_TIMESTAMP(cm.expiration_time) ELSE NULL END',
|
'comment_expiration' => 'CASE cm.expires WHEN 1 THEN UNIX_TIMESTAMP(cm.expiration_time) ELSE NULL END',
|
||||||
'comment_host' => 'CASE WHEN ho.name1 IS NULL THEN so.name1 ELSE ho.name1 END COLLATE latin1_general_ci',
|
'comment_host' => 'CASE WHEN ho.name1 IS NULL THEN so.name1 ELSE ho.name1 END COLLATE latin1_general_ci',
|
||||||
|
'host' => 'CASE WHEN ho.name1 IS NULL THEN so.name1 ELSE ho.name1 END COLLATE latin1_general_ci',
|
||||||
'comment_service' => 'so.name2 COLLATE latin1_general_ci',
|
'comment_service' => 'so.name2 COLLATE latin1_general_ci',
|
||||||
|
'service' => 'so.name2 COLLATE latin1_general_ci',
|
||||||
'comment_objecttype' => "CASE WHEN ho.object_id IS NOT NULL THEN 'host' ELSE CASE WHEN so.object_id IS NOT NULL THEN 'service' ELSE NULL END END",
|
'comment_objecttype' => "CASE WHEN ho.object_id IS NOT NULL THEN 'host' ELSE CASE WHEN so.object_id IS NOT NULL THEN 'service' ELSE NULL END END",
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -52,6 +52,8 @@ class Comment extends DataView
|
|||||||
'comment_expiration',
|
'comment_expiration',
|
||||||
'comment_host',
|
'comment_host',
|
||||||
'comment_service',
|
'comment_service',
|
||||||
|
'host',
|
||||||
|
'service',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user