Commit 13e242d1 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_panel: Get monitor-setup-url from '_' parameter

   Whenever the serialization is JSON-in-xml the parameters are uploaded into {'_' : '{}') format.
parent ffa9af4d
......@@ -24,6 +24,12 @@ if instance is None or instance.getSlapState() == 'destroy_requested':
parameter_dict = instance.getConnectionXmlAsDict()
if parameter_dict.keys() == ["_"]:
import json
json_connection_dict = json.loads(parameter_dict["_"])
if isinstance(json_connection_dict, dict):
parameter_dict = json_connection_dict
url_string = parameter_dict.get('monitor-setup-url', '')
if url_string:
if 'monitor-user' in parameter_dict and \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment