]> Frank Brehm's Git Trees - pixelpark/puppetmaster-webhooks.git/commitdiff
Adding info about deprecation to show-modules-html.py
authorFrank Brehm <frank.brehm@pixelpark.com>
Tue, 19 Mar 2019 15:44:34 +0000 (16:44 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Tue, 19 Mar 2019 15:44:34 +0000 (16:44 +0100)
lib/webhooks/show_modules.py

index b69b6d7e9ba757ed1c71882403d04ab8961900d4..c514ae8f62800299255aabfc203d2726cae8c773 100644 (file)
@@ -344,6 +344,16 @@ class ShowModulesApp(BaseHookApp):
                 LOG.debug("Row template:\n{}".format(tpl))
             self.print_out(tpl.format(**output_data))
 
+            if module_info.forge_superseded_by:
+                txt = _("Module {o!r} is deprecated and should be substituted by {sb}{n!r}{eb}.")
+                txt = txt.format(
+                    o=module_info.full_name, sb='<b>', eb='</b>', n=module_info.forge_superseded_by)
+                tpl = '    <tr>\n'
+                tpl += '      <th class="l h confluenceTh">&nbsp;</th>\n'
+                tpl += '      <td class="{line_class} confluenceTd" colspan="8">{txt}</td>\n'
+                tpl += '    </tr>'
+                self.print_out(tpl.format(line_class=line_class, txt=txt))
+
         self.print_out("  </tbody>")
         self.print_out("</table>")
 
@@ -446,8 +456,9 @@ class ShowModulesApp(BaseHookApp):
 
             self.print_out(tpl.format(**output_data))
             if module_info.forge_superseded_by:
-                txt = _("Module {o!r} is deprecated and should be substituted by {n!r}.").format(
-                    o=module_info.full_name, n=module_info.forge_superseded_by)
+                txt = _("Module {o!r} is deprecated and should be substituted by {sb}{n!r}{eb}.")
+                txt = txt.format(
+                    o=module_info.full_name, sb='', eb='', n=module_info.forge_superseded_by)
                 self.print_out(tpl_superseded.format(empty='', txt=txt))
 
         self.print_out()