|
46 | 46 | from cmk.gui.exceptions import FinalizeRequest, MKUserError
|
47 | 47 | from cmk.gui.htmllib.generator import HTMLWriter
|
48 | 48 | from cmk.gui.htmllib.html import html
|
| 49 | +from cmk.gui.htmllib.tag_rendering import render_end_tag |
49 | 50 | from cmk.gui.http import request
|
50 | 51 | from cmk.gui.i18n import _
|
51 | 52 | from cmk.gui.log import logger
|
@@ -1224,12 +1225,21 @@ def _show_message_broker_connection(
|
1224 | 1225 | ) -> None:
|
1225 | 1226 | table.cell("Message broker connection")
|
1226 | 1227 | if is_replication_enabled(site):
|
1227 |
| - login_url = make_action_link([("mode", "sites"), ("_trigger_certs_creation", site_id)]) |
| 1228 | + trigger_url = make_action_link( |
| 1229 | + [("mode", "sites"), ("_trigger_certs_creation", site_id)] |
| 1230 | + ) |
| 1231 | + html.open_ts_container( |
| 1232 | + container="div", |
| 1233 | + function_name="lock_and_redirect", |
| 1234 | + arguments={"redirect_url": trigger_url}, |
| 1235 | + ) |
1228 | 1236 | html.icon_button(
|
1229 |
| - login_url, |
1230 |
| - _("Create remote broker certificates"), |
1231 |
| - "recreate_broker_certificate", |
| 1237 | + url="javascript:void(0)", |
| 1238 | + title=_("Create remote broker certificates"), |
| 1239 | + icon="recreate_broker_certificate", |
| 1240 | + class_=["lockable"], |
1232 | 1241 | )
|
| 1242 | + html.write_html(render_end_tag("div")) |
1233 | 1243 |
|
1234 | 1244 | html.open_div(id_=f"message_broker_status_{site_id}", class_="connection_status")
|
1235 | 1245 | if is_replication_enabled(site):
|
|
0 commit comments