def network(request): tabs = appPool.hook_app_tabs('network', request) tabs = sorted(tabs, key=lambda y: y['order'] if 'order' in y else 0) return render(request, 'network/index.html', { 'focus_form': request.GET.get('tab', 'network'), 'hook_tabs': tabs, })
def home(request): view = appPool.hook_app_index("storage", request) view = filter(None, view) if view: return view[0] tabs = appPool.hook_app_tabs("storage", request) return render(request, "storage/index.html", {"focused_tab": request.GET.get("tab", None), "hook_tabs": tabs})
def home(request): view = appPool.hook_app_index('storage', request) view = filter(None, view) if view: return view[0] tabs = appPool.hook_app_tabs('storage', request) return render(request, 'storage/index.html', { 'focused_tab': request.GET.get("tab", 'storage.Volumes.View'), 'hook_tabs': tabs, })
def home(request): view = appPool.hook_app_index('tasks', request) view = [_f for _f in view if _f] if view: return view[0] tabs = appPool.hook_app_tabs('tasks', request) return render(request, 'tasks/index.html', { 'focused_tab': request.GET.get('tab', 'tasks.CronJob'), 'hook_tabs': tabs, })
def home(request): view = appPool.hook_app_index('tasks', request) view = filter(None, view) if view: return view[0] tabs = appPool.hook_app_tabs('tasks', request) return render(request, 'tasks/index.html', { 'focused_tab': request.GET.get('tab', 'tasks.CronJob'), 'hook_tabs': tabs, })
def network(request): try: globalconf = models.GlobalConfiguration.objects.order_by("-id")[0].id except IndexError: globalconf = models.GlobalConfiguration.objects.create().id tabs = appPool.hook_app_tabs('network', request) return render(request, 'network/index.html', { 'focus_form': request.GET.get('tab', 'network'), 'globalconf': globalconf, 'hook_tabs': tabs, })
def home(request): if not utils.vm_enabled(): return render(request, 'vm/disabled.html') view = appPool.hook_app_index('vm', request) view = list(filter(None, view)) if view: return view[0] tabs = appPool.hook_app_tabs('vm', request) return render(request, 'vm/index.html', { 'focused_tab': request.GET.get('tab', 'vm.VM'), 'hook_tabs': tabs, })
def home(request): view = appPool.hook_app_index('storage', request) view = [_f for _f in view if _f] if view: return view[0] try: resilver = models.Resilver.objects.order_by('-id')[0] except Exception: resilver = models.Resilver.objects.create() tabs = appPool.hook_app_tabs('storage', request) return render(request, 'storage/index.html', { 'focused_tab': request.GET.get("tab", 'storage.Volumes.View'), 'hook_tabs': tabs, 'resilver_edit_url': f'{resilver.get_edit_url()}?inline=true' })
def network(request): tabs = appPool.hook_app_tabs("network", request) tabs = sorted(tabs, key=lambda y: y["order"] if "order" in y else 0) return render(request, "network/index.html", {"focus_form": request.GET.get("tab", "network"), "hook_tabs": tabs})