Add the missing page_title for detail page
Change-Id: I85408428f2cfe3202305e3818d17fa1d2cebd029 Co-Authored-By: xujun <xu.jun@99cloud.net>
This commit is contained in:
@@ -32,7 +32,7 @@ from solumdashboard.applications import workflows as update_flow
|
||||
class IndexView(tables.DataTableView):
|
||||
table_class = app_tables.ApplicationsTable
|
||||
template_name = 'applications/index.html'
|
||||
page_title = _("Application")
|
||||
page_title = _("Applications")
|
||||
|
||||
def get_data(self):
|
||||
try:
|
||||
@@ -97,6 +97,15 @@ class UpdateView(workflows.WorkflowView):
|
||||
class DetailView(tabs.TabView):
|
||||
template_name = 'applications/detail.html'
|
||||
tab_group_class = _tabs.AppDetailsTabs
|
||||
page_title = "{{ app.name|default:app.id }}"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(DetailView, self).get_context_data(**kwargs)
|
||||
application_id = self.kwargs['application_id']
|
||||
solum = solumclient(self.request)
|
||||
app = solum.apps.find(name_or_id=application_id)
|
||||
context["app"] = app
|
||||
return context
|
||||
|
||||
|
||||
class LaunchView(forms.ModalFormView):
|
||||
|
||||
@@ -42,10 +42,15 @@ class IndexView(tables.DataTableView):
|
||||
class DetailView(tabs.TabView):
|
||||
template_name = 'assemblies/detail.html'
|
||||
tab_group_class = _tabs.AssemDetailsTabs
|
||||
page_title = "{{ assem.name|default:assem.uuid }}"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
# Call the base implementation first to get a context
|
||||
return super(DetailView, self).get_context_data(**kwargs)
|
||||
context = super(DetailView, self).get_context_data(**kwargs)
|
||||
assem_id = kwargs['assembly_id']
|
||||
solum = solumclient(self.request)
|
||||
assem = solum.assemblies.get(assembly_id=assem_id)
|
||||
context["assem"] = assem
|
||||
return context
|
||||
|
||||
def get_data(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user