mirror of
https://github.com/ansible/awx.git
synced 2026-03-27 13:55:04 -02:30
Consistently give WJ extra_vars as text
This commit is contained in:
@@ -896,22 +896,6 @@ class LaunchTimeConfigBase(BaseModel):
|
|||||||
data[prompt_name] = prompt_val
|
data[prompt_name] = prompt_val
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def display_extra_vars(self):
|
|
||||||
'''
|
|
||||||
Hides fields marked as passwords in survey.
|
|
||||||
'''
|
|
||||||
if hasattr(self, 'survey_passwords') and self.survey_passwords:
|
|
||||||
extra_vars = parse_yaml_or_json(self.extra_vars).copy()
|
|
||||||
for key, value in self.survey_passwords.items():
|
|
||||||
if key in extra_vars:
|
|
||||||
extra_vars[key] = value
|
|
||||||
return extra_vars
|
|
||||||
else:
|
|
||||||
return self.extra_vars
|
|
||||||
|
|
||||||
def display_extra_data(self):
|
|
||||||
return self.display_extra_vars()
|
|
||||||
|
|
||||||
|
|
||||||
for field_name in JobTemplate.get_ask_mapping().keys():
|
for field_name in JobTemplate.get_ask_mapping().keys():
|
||||||
if field_name == 'extra_vars':
|
if field_name == 'extra_vars':
|
||||||
@@ -954,6 +938,22 @@ class LaunchTimeConfig(LaunchTimeConfigBase):
|
|||||||
def extra_vars(self, extra_vars):
|
def extra_vars(self, extra_vars):
|
||||||
self.extra_data = extra_vars
|
self.extra_data = extra_vars
|
||||||
|
|
||||||
|
def display_extra_vars(self):
|
||||||
|
'''
|
||||||
|
Hides fields marked as passwords in survey.
|
||||||
|
'''
|
||||||
|
if hasattr(self, 'survey_passwords') and self.survey_passwords:
|
||||||
|
extra_vars = parse_yaml_or_json(self.extra_vars).copy()
|
||||||
|
for key, value in self.survey_passwords.items():
|
||||||
|
if key in extra_vars:
|
||||||
|
extra_vars[key] = value
|
||||||
|
return extra_vars
|
||||||
|
else:
|
||||||
|
return self.extra_vars
|
||||||
|
|
||||||
|
def display_extra_data(self):
|
||||||
|
return self.display_extra_vars()
|
||||||
|
|
||||||
|
|
||||||
class JobLaunchConfig(LaunchTimeConfig):
|
class JobLaunchConfig(LaunchTimeConfig):
|
||||||
'''
|
'''
|
||||||
|
|||||||
Reference in New Issue
Block a user