mirror of
https://github.com/ansible/awx.git
synced 2026-08-02 19:10:00 -02:30
# Add a postfix to the UI URL patterns for UI URL generated by the API # example if set to '' UI URL generated by the API for jobs would be $TOWER_URL/jobs # example if set to 'execution' UI URL generated by the API for jobs would be $TOWER_URL/execution/jobs Co-authored-by: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com>
This commit is contained in:
@@ -628,7 +628,7 @@ class Job(UnifiedJob, JobOptions, SurveyJobMixin, JobNotificationMixin, TaskMana
|
||||
return reverse('api:job_detail', kwargs={'pk': self.pk}, request=request)
|
||||
|
||||
def get_ui_url(self):
|
||||
return urljoin(settings.TOWER_URL_BASE, "/#/jobs/playbook/{}".format(self.pk))
|
||||
return urljoin(settings.TOWER_URL_BASE, "{}/jobs/playbook/{}".format(settings.OPTIONAL_UI_URL_PREFIX, self.pk))
|
||||
|
||||
def _set_default_dependencies_processed(self):
|
||||
"""
|
||||
@@ -1275,7 +1275,7 @@ class SystemJob(UnifiedJob, SystemJobOptions, JobNotificationMixin):
|
||||
return reverse('api:system_job_detail', kwargs={'pk': self.pk}, request=request)
|
||||
|
||||
def get_ui_url(self):
|
||||
return urljoin(settings.TOWER_URL_BASE, "/#/jobs/system/{}".format(self.pk))
|
||||
return urljoin(settings.TOWER_URL_BASE, "{}/jobs/system/{}".format(settings.OPTIONAL_UI_URL_PREFIX, self.pk))
|
||||
|
||||
@property
|
||||
def event_class(self):
|
||||
|
||||
Reference in New Issue
Block a user