Skip to content

Commit

Permalink
groups setup keep http vars for table sort and search
Browse files Browse the repository at this point in the history
SUP-18972

Change-Id: I7d442a2c42f68cc3c5048de50f198fbb9696dffc
  • Loading branch information
otAAAh committed Jan 13, 2025
1 parent 442d30b commit f9f4c0d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cmk/gui/wato/pages/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
from cmk.gui.utils.csrf_token import check_csrf_token
from cmk.gui.utils.html import HTML
from cmk.gui.utils.transaction_manager import transactions
from cmk.gui.utils.urls import makeactionuri
from cmk.gui.utils.urls import makeactionuri, makeuri
from cmk.gui.valuespec import (
CascadingDropdown,
Dictionary,
Expand Down Expand Up @@ -135,7 +135,8 @@ def page_menu(self, breadcrumb: Breadcrumb) -> PageMenu:

def action(self) -> ActionResult:
if not transactions.check_transaction():
return redirect(mode_url("%s_groups" % self.type_name))
request.del_var("_transid")
return redirect(makeuri(request=request, addvars=list(request.itervars())))

if request.var("_delete"):
delname = request.get_ascii_input_mandatory("_delete")
Expand All @@ -154,7 +155,11 @@ def action(self) -> ActionResult:
groups.delete_group(delname, self.type_name)
self._groups = self._load_groups()

return redirect(mode_url("%s_groups" % self.type_name))
if request.var("mode") == "edit_host_group":
return redirect(mode_url("%s_groups" % self.type_name))

request.del_var("_transid")
return redirect(makeuri(request=request, addvars=list(request.itervars())))

def _page_no_groups(self) -> None:
html.div(_("No groups are defined yet."), class_="info")
Expand Down

0 comments on commit f9f4c0d

Please sign in to comment.