Merge "Add breadcrumbs on Volume Encryption Details"

This commit is contained in:
Jenkins 2016-01-20 00:31:59 +00:00 committed by Gerrit Code Review
commit d1089f8fe8
4 changed files with 18 additions and 8 deletions

View File

@ -1,7 +1,13 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% load i18n %} {% load i18n breadcrumb_nav %}
{% block title %}{% trans "Volume Type Encryption Details" %}{% endblock %} {% block title %}{% trans "Volume Type Encryption Details" %}{% endblock %}
{% block page_header %}
<div class='page-header'>
{% breadcrumb_nav %}
</div>
{% endblock %}
{% block main %} {% block main %}
<div class="row-fluid"> <div class="row-fluid">
<div class="col-sm-12"> <div class="col-sm-12">

View File

@ -17,11 +17,11 @@ Admin views for managing volumes.
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.views import generic
from horizon import exceptions from horizon import exceptions
from horizon import forms from horizon import forms
from horizon.utils import memoized from horizon.utils import memoized
from horizon import views
from openstack_dashboard import api from openstack_dashboard import api
from openstack_dashboard.dashboards.admin.volumes.volume_types \ from openstack_dashboard.dashboards.admin.volumes.volume_types \
@ -39,7 +39,7 @@ class CreateVolumeTypeView(forms.ModalFormView):
page_title = _("Create a Volume Type") page_title = _("Create a Volume Type")
class VolumeTypeEncryptionDetailView(generic.TemplateView): class VolumeTypeEncryptionDetailView(views.HorizonTemplateView):
template_name = ("admin/volumes/volume_types" template_name = ("admin/volumes/volume_types"
"/volume_encryption_type_detail.html") "/volume_encryption_type_detail.html")
page_title = _("Volume Type Encryption Details") page_title = _("Volume Type Encryption Details")

View File

@ -1,7 +1,13 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% load i18n %} {% load i18n breadcrumb_nav %}
{% block title %}{% trans "Volume Encryption Details" %}{% endblock %} {% block title %}{% trans "Volume Encryption Details" %}{% endblock %}
{% block page_header %}
<div class='page-header'>
{% breadcrumb_nav %}
</div>
{% endblock %}
{% block main %} {% block main %}
<div class="row-fluid"> <div class="row-fluid">
<div class="col-sm-12"> <div class="col-sm-12">

View File

@ -1200,8 +1200,7 @@ class VolumeViewTests(test.TestCase):
res = self.client.get(url) res = self.client.get(url)
self.assertContains(res, self.assertContains(res,
"<h1>Volume Encryption Details: " "Volume Encryption Details: %s" % volume.name,
"%s</h1>" % volume.name,
1, 200) 1, 200)
self.assertContains(res, "<dd>%s</dd>" % volume.volume_type, 1, 200) self.assertContains(res, "<dd>%s</dd>" % volume.volume_type, 1, 200)
self.assertContains(res, "<dd>%s</dd>" % enc_meta.provider, 1, 200) self.assertContains(res, "<dd>%s</dd>" % enc_meta.provider, 1, 200)
@ -1229,8 +1228,7 @@ class VolumeViewTests(test.TestCase):
res = self.client.get(url) res = self.client.get(url)
self.assertContains(res, self.assertContains(res,
"<h1>Volume Encryption Details: " "Volume Encryption Details: %s" % volume.name,
"%s</h1>" % volume.name,
1, 200) 1, 200)
self.assertContains(res, "<h3>Volume is Unencrypted</h3>", 1, 200) self.assertContains(res, "<h3>Volume is Unencrypted</h3>", 1, 200)