mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 19:21:06 -03:30
Use awx-plugins-shared code from awx_plugins.interfaces (#15566)
* Add `awx_plugins.interfaces` runtime dependency * Use `awx_plugins.interfaces` for runtime detection The original function name was `server_product_name()` but it didn't really represent what it did. So it was renamed into `detect_server_product_name()` in an attempt of disambiguation. * Use `awx_plugins.interfaces` to map container path The original function `to_container_path` has been renamed into `get_incontainer_path()` to represent what it does better and make the imports more obvious. * Add license file for awx_plugins.interfaces --------- Co-authored-by: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
97ececa8b4
commit
ece21b15d0
@@ -2,7 +2,8 @@ from django.urls import re_path
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.generic.base import TemplateView
|
||||
|
||||
from awx.main.utils.licensing import server_product_name
|
||||
# Shared code for the AWX platform
|
||||
from awx_plugins.interfaces._temporary_private_licensing_api import detect_server_product_name
|
||||
|
||||
|
||||
class IndexView(TemplateView):
|
||||
@@ -14,7 +15,7 @@ class MigrationsNotran(TemplateView):
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
product_name = server_product_name()
|
||||
product_name = detect_server_product_name()
|
||||
context['title'] = _('%s Upgrading' % product_name)
|
||||
context['image_alt'] = _('Logo')
|
||||
context['aria_spinner'] = _('Loading')
|
||||
|
||||
Reference in New Issue
Block a user