Make breadcrumb appear on sec groups and keypair details

when editing security groups rules there is no button to
go back to the original page.
Same when looking at a keypair details.
This adds the breadcrumb to both pages so you can go
back to the original page.
Also modifies the test KeyPairViewTests.test_keypair_detail_get
to take into account the breadcrumbs

Change-Id: I2e804c46c744f2f6a30dc02026aa4801c69b06ac
Closes-Bug: #1519591
This commit is contained in:
Itxaka 2015-11-30 15:49:28 +01:00
parent 2432283fbc
commit f51eab1a7a
3 changed files with 18 additions and 3 deletions

View File

@ -117,7 +117,9 @@ class KeyPairViewTests(test.TestCase):
kwargs={'keypair_name': keypair.name})
res = self.client.get(url, context)
self.assertContains(res, "<h1>Key Pair Details</h1>", 1, 200)
# Note(Itxaka): With breadcrumbs, the title is in a list as active
self.assertContains(res, '<li class="active">Key Pair Details</li>',
1, 200)
self.assertContains(res, "<dd>%s</dd>" % keypair.name, 2, 200)
@test.create_stubs({api.nova: ("keypair_create", "keypair_delete")})

View File

@ -1,8 +1,14 @@
{% extends 'base.html' %}
{% load i18n sizeformat %}
{% load i18n sizeformat breadcrumb_nav %}
{% block title %}{% trans "Key Pair Details" %}{% endblock %}
{% block page_header %}
<div class='page-header'>
{% breadcrumb_nav %}
</div>
{% endblock %}
{% block main %}
<div class="row-fluid">
<div class="info detail col-sm-12">

View File

@ -1,7 +1,14 @@
{% extends 'base.html' %}
{% load i18n %}
{% load i18n breadcrumb_nav %}
{% block title %}{% trans "Manage Security Group Rules" %}{% endblock %}
{% block page_header %}
<div class='page-header'>
{% breadcrumb_nav %}
</div>
{% endblock %}
{% block main %}
<div class="row">
<div class="col-sm-12">