Commit fd062f0
committed
fix: show comment for host notification results in log views
PainterLogComment.render() used a hardcoded threshold of 6
";"-separated fields to decide whether a notification log line
carries a trailing comment. That threshold only matches the layout
of SERVICE notification log lines, which have an extra ";<service>"
segment (7 fields with a comment). HOST notification log lines lack
that segment, so even with a comment present they only ever reach 6
fields and never cross the "> 6" bar -- the comment column silently
stays empty for every host notification, regardless of what the
notification plugin wrote to stdout.
Extract the threshold into _log_comment_min_fields(log_type), which
returns 6 for service log types and 5 for host log types, and have
PainterLogComment request the log_type column (already used by the
neighboring PainterLogPluginOutput) to pick the right one.1 parent cd9a44a commit fd062f0
2 files changed
Lines changed: 60 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5835 | 5835 | | |
5836 | 5836 | | |
5837 | 5837 | | |
| 5838 | + | |
| 5839 | + | |
| 5840 | + | |
| 5841 | + | |
| 5842 | + | |
| 5843 | + | |
| 5844 | + | |
| 5845 | + | |
| 5846 | + | |
| 5847 | + | |
| 5848 | + | |
| 5849 | + | |
| 5850 | + | |
5838 | 5851 | | |
5839 | 5852 | | |
5840 | 5853 | | |
| |||
5852 | 5865 | | |
5853 | 5866 | | |
5854 | 5867 | | |
5855 | | - | |
| 5868 | + | |
5856 | 5869 | | |
5857 | 5870 | | |
5858 | 5871 | | |
5859 | 5872 | | |
5860 | 5873 | | |
5861 | 5874 | | |
5862 | | - | |
| 5875 | + | |
5863 | 5876 | | |
5864 | 5877 | | |
5865 | 5878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
1655 | 1655 | | |
1656 | 1656 | | |
1657 | 1657 | | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
0 commit comments