diff --git a/httpdocs/templates/pages/components/ifaces-dropdown.template b/httpdocs/templates/pages/components/ifaces-dropdown.template index a57515fa73..1027d7fe58 100644 --- a/httpdocs/templates/pages/components/ifaces-dropdown.template +++ b/httpdocs/templates/pages/components/ifaces-dropdown.template @@ -102,7 +102,7 @@ {% for _, v in pairsByKeys(observationPoints, asc) do %} {% local selected = '' %} - {% if((observationPointId ~= nil) and (tostring(k) == tostring(observationPointId))) then selected = 'selected' end %} + {% if((observationPointId ~= nil) and (tostring(v["obs_point"]) == tostring(observationPointId))) then selected = 'selected' end %} {% end %} diff --git a/scripts/lua/modules/page_utils.lua b/scripts/lua/modules/page_utils.lua index ed3cc7cbe8..4e0e1dd7ee 100644 --- a/scripts/lua/modules/page_utils.lua +++ b/scripts/lua/modules/page_utils.lua @@ -878,6 +878,8 @@ function page_utils.switch_interface_form_action_url(active_ifid, switch_ifid, s -- Attach the interface id of the interface that will be switched page_params.ifid = switch_ifid + page_params["observationPointId"] = nil + -- Return the url, preserving all existing page parameters (e.g., host=xx) local res = getPageUrl(action_url, page_params)