Commit b24a6c9f authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_web: Allow to pass shared and restricted_softwaretype via url to the parameter editor.

parent 2d6fe621
...@@ -10,10 +10,25 @@ option_dict = { ...@@ -10,10 +10,25 @@ option_dict = {
'restricted_softwaretype': False 'restricted_softwaretype': False
}, },
} }
if request.get("software_type", None) is not None: if request.get("software_type", None) is not None:
option_dict['parameter']['softwaretype'] = request.get("software_type", None) option_dict['parameter']['softwaretype'] = request.get("software_type", None)
if request.get("shared", None) is not None:
if str(request.get("shared", "")).lower() in ['0', 'false']:
option_dict['parameter']['shared'] = False
if str(request.get("shared", "")).lower() in ['1', 'true']:
option_dict['parameter']['shared'] = True
if request.get("restricted_softwaretype", None) is not None:
if str(request.get("restricted_softwaretype", "")).lower() in ['0', 'false']:
option_dict['parameter']['restricted_softwaretype'] = False
if str(request.get("restricted_softwaretype", "")).lower() in ['1', 'true']:
option_dict['parameter']['restricted_softwaretype'] = True
if request.get("parameter_hash", None) is not None: if request.get("parameter_hash", None) is not None:
option_dict['parameter']['parameter_hash'] = request.get("parameter_hash", None) option_dict['parameter']['parameter_hash'] = request.get("parameter_hash", None)
......
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