Esempio n. 1
0
 def get_context_data(self, **kwargs):
     context = super(DetailView, self).get_context_data(**kwargs)
     subnet = self.get_data()
     table = project_tables.SubnetsTable(self.request,
                                         network_id=subnet.network_id)
     context["subnet"] = subnet
     context["url"] = self.get_redirect_url()
     context["actions"] = table.render_row_actions(subnet)
     return context
Esempio n. 2
0
 def get_context_data(self, **kwargs):
     context = super(DetailView, self).get_context_data(**kwargs)
     subnet = self.get_data()
     network = self.get_network(subnet.network_id)
     subnet.network_name = network.get('name')
     subnet.network_url = self.get_network_detail_url(subnet.network_id)
     network_nav = subnet.network_name or subnet.network_id
     table = project_tables.SubnetsTable(self.request,
                                         network_id=subnet.network_id)
     # TODO(robcresswell) Add URL for "Subnets" crumb after bug/1416838
     breadcrumb = [(network_nav, subnet.network_url), (_("Subnets"), None)]
     context["custom_breadcrumb"] = breadcrumb
     context["subnet"] = subnet
     context["url"] = \
         reverse("horizon:project:networks:subnets_tab", args=[network.id])
     context["actions"] = table.render_row_actions(subnet)
     return context
Esempio n. 3
0
 def get_context_data(self, **kwargs):
     context = super(DetailView, self).get_context_data(**kwargs)
     subnet = self.get_data()
     network = self.get_network(subnet.network_id)
     subnet.network_name = network.get('name')
     network_nav = subnet.network_name or subnet.network_id
     table = project_tables.SubnetsTable(self.request,
                                         network_id=subnet.network_id)
     # TODO(robcresswell) Add URL for "Subnets" crumb after bug/1416838
     breadcrumb = [
         (_("Networks"), self.get_redirect_url()),
         (network_nav,
          reverse('horizon:project:networks:detail',
                  args=(subnet.network_id, ))),
         (_("Subnets"), ),
     ]
     context["custom_breadcrumb"] = breadcrumb
     context["subnet"] = subnet
     context["url"] = self.get_redirect_url()
     context["actions"] = table.render_row_actions(subnet)
     return context