Commit b311e3e5 authored by root's avatar root

fix: link to custom domain app in menu

parent 26762439
......@@ -2,7 +2,7 @@
import datetime, time, random, os, urllib3, json, shutil, sys, hashlib, socket, re, psutil, binascii, certifi
from distutils.dir_util import copy_tree
# django
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext_lazy as _, get_language
from django.utils.encoding import force_bytes
from django.core.management import utils as django_management_utils
from django.core.mail import send_mail, EmailMessage, EmailMultiAlternatives
......@@ -1087,7 +1087,8 @@ def get_domain_deps_apps(request):
""" Cutsom method to get dependenvies from API, that have a domain dependency"""
release_info = {}
apps_with_domain = []
lang = '_' + get_language()
all_services = []
if settings.NO_API:
release_info = debug.RELEASE
puppet_status = debug.STATUS
......@@ -1095,8 +1096,15 @@ def get_domain_deps_apps(request):
release_info = get_release_info(request)
try:
if 'groups' in release_info:
# Groups have language termination in API
# Need to remove it in oreder to retun neutral groups, valid for all languages
# Get all available services, installed or not
all_services = release_info.get('groups')
#all_services = release_info.get('groups')
alllang_available_services = release_info.get('groups')
for serv in alllang_available_services:
if serv['id'].endswith(lang):
serv.update({'id': serv['id'][:-3]})
all_services.append(serv)
apps_with_domain = [service['id'] for service in all_services if "dependencies" in service and any("domain" in s for s in service['dependencies'])]
except Exception as e:
p("ServicesAvailable view", "✕ There was a problem retrieving enabled services", e)
......
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