Refactor/remove obsolete page_header blocks
Most of the page_header blocks were removed by previous patches, but then brought back by regressions in Volumes and Data Processing. This patch removes those leftover page_header blocks, and removes a few templates that are not used in Horizon that were found during the process. Change-Id: Icbd03f0809a5c664b9b83f06bc398139c3de1184 Closes-Bug: 1436311
This commit is contained in:
@@ -77,6 +77,7 @@ class MigrateHostView(forms.ModalFormView):
|
||||
template_name = 'admin/hypervisors/compute/migrate_host.html'
|
||||
context_object_name = 'compute_host'
|
||||
success_url = reverse_lazy("horizon:admin:hypervisors:index")
|
||||
page_title = _("Migrate Host")
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(MigrateHostView, self).get_context_data(**kwargs)
|
||||
|
@@ -2,10 +2,4 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Migrate Host" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Migrate Host") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
{% endblock %}
|
||||
{% block main %}{% endblock %}
|
||||
|
@@ -1,11 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Network Details" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Network Details") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{{ table.render }}
|
||||
{% endblock %}
|
@@ -3,10 +3,6 @@
|
||||
|
||||
{% block title %}{% trans "Create Spec" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
<h2>{% blocktrans %}Spec: {{ qos_spec_name }}{% endblocktrans %}</h2>
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include "admin/volumes/volume_types/qos_specs/_create.html" %}
|
||||
{% endblock %}
|
||||
|
@@ -1,10 +1,6 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_header %}
|
||||
<h2>{% blocktrans %}QoS Spec: {{ qos_spec_name }}{% endblocktrans %}</h2>
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include "admin/volumes/volume_types/qos_specs/_index.html" %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Manage Volume" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Manage a Volume") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/volumes/_manage_volume.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Unmanage Volume" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Unmanage a Volume") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/volumes/_unmanage_volume.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -53,6 +53,7 @@ class QosSpecMixin(object):
|
||||
class IndexView(QosSpecMixin, forms.ModalFormMixin, tables.DataTableView):
|
||||
table_class = project_tables.SpecsTable
|
||||
template_name = 'admin/volumes/volume_types/qos_specs/index.html'
|
||||
page_title = _("QoS Spec: {{ qos_spec_name }}")
|
||||
|
||||
def get_data(self):
|
||||
try:
|
||||
@@ -75,6 +76,7 @@ class CreateKeyValuePairView(QosSpecMixin, forms.ModalFormView):
|
||||
submit_label = _("Create")
|
||||
submit_url = "horizon:admin:volumes:volume_types:qos_specs:create"
|
||||
success_url = 'horizon:admin:volumes:volume_types:qos_specs:index'
|
||||
page_title = _("Spec: {{ qos_spec_name }}")
|
||||
|
||||
def get_initial(self):
|
||||
qos_spec_id = self.kwargs['qos_spec_id']
|
||||
@@ -101,6 +103,7 @@ class EditKeyValuePairView(QosSpecMixin, forms.ModalFormView):
|
||||
submit_label = _("Save")
|
||||
submit_url = "horizon:admin:volumes:volume_types:qos_specs_edit"
|
||||
success_url = 'horizon:admin:volumes:volume_types:qos_specs:index'
|
||||
page_title = _("QoS Spec: {{ qos_spec_name }}")
|
||||
|
||||
def get_success_url(self):
|
||||
return reverse(self.success_url,
|
||||
|
@@ -50,6 +50,7 @@ class ManageVolumeView(forms.ModalFormView):
|
||||
success_url = reverse_lazy('horizon:admin:volumes:volumes_tab')
|
||||
submit_url = reverse_lazy('horizon:admin:volumes:volumes:manage')
|
||||
cancel_url = reverse_lazy("horizon:admin:volumes:index")
|
||||
page_title = _("Manage a Volume")
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ManageVolumeView, self).get_context_data(**kwargs)
|
||||
@@ -65,6 +66,7 @@ class UnmanageVolumeView(forms.ModalFormView):
|
||||
success_url = reverse_lazy('horizon:admin:volumes:volumes_tab')
|
||||
submit_url = 'horizon:admin:volumes:volumes:unmanage'
|
||||
cancel_url = reverse_lazy("horizon:admin:volumes:index")
|
||||
page_title = _("Unmanage a Volume")
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(UnmanageVolumeView, self).get_context_data(**kwargs)
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Job Details" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Job Details") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Data Processing" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Jobs") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="job_executions">
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Create Job Template" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Create Job Template") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'horizon/common/_workflow.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Job Template Details" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Job Template Details") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Data Processing" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Job Templates") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
<style type="text/css">
|
||||
.job_origin_main, .job_origin_lib {
|
||||
|
@@ -38,7 +38,7 @@ LOG = logging.getLogger(__name__)
|
||||
class JobsView(tables.DataTableView):
|
||||
table_class = _tables.JobsTable
|
||||
template_name = 'project/data_processing.jobs/jobs.html'
|
||||
page_title = _("Jobs")
|
||||
page_title = _("Job Templates")
|
||||
|
||||
def get_data(self):
|
||||
try:
|
||||
@@ -59,13 +59,13 @@ class CreateJobView(workflows.WorkflowView):
|
||||
success_url = "horizon:project:data_processing.jobs:create-job"
|
||||
classes = ("ajax-modal",)
|
||||
template_name = "project/data_processing.jobs/create.html"
|
||||
page_title = _("Create Job")
|
||||
page_title = _("Create Job Template")
|
||||
|
||||
|
||||
class JobDetailsView(tabs.TabView):
|
||||
tab_group_class = _tabs.JobDetailsTabs
|
||||
template_name = 'project/data_processing.jobs/details.html'
|
||||
page_title = _("Job Details")
|
||||
page_title = _("Job Template Details")
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(JobDetailsView, self).get_context_data(**kwargs)
|
||||
|
@@ -3,10 +3,6 @@
|
||||
{% load url from future %}
|
||||
{% block title %}{% trans "Data Processing" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Guided Cluster Creation") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="guide">
|
||||
@@ -165,4 +161,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Choose job type" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Choose job type") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/data_processing.wizard/_job_type_select.html' %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@@ -3,10 +3,6 @@
|
||||
{% load url from future %}
|
||||
{% block title %}{% trans "Data Processing" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Guided Job Execution") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="guide">
|
||||
@@ -116,4 +112,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Choose plugin and version" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Choose plugin and version") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/data_processing.wizard/_plugin_select.html' %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@@ -3,10 +3,6 @@
|
||||
{% load url from future %}
|
||||
{% block title %}{% trans "Data Processing" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Data Processing Guides") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="guide">
|
||||
|
@@ -32,6 +32,7 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
class WizardView(horizon_views.APIView):
|
||||
template_name = 'project/data_processing.wizard/wizard.html'
|
||||
page_title = _("Data Processing Guides")
|
||||
|
||||
def get_data(self, request, context, *args, **kwargs):
|
||||
try:
|
||||
@@ -44,6 +45,7 @@ class WizardView(horizon_views.APIView):
|
||||
|
||||
class ClusterGuideView(horizon_views.APIView):
|
||||
template_name = 'project/data_processing.wizard/cluster_guide.html'
|
||||
page_title = _("Guided Cluster Creation")
|
||||
|
||||
|
||||
class ResetClusterGuideView(generic.RedirectView):
|
||||
@@ -58,6 +60,7 @@ class ResetClusterGuideView(generic.RedirectView):
|
||||
|
||||
class JobExecutionGuideView(horizon_views.APIView):
|
||||
template_name = 'project/data_processing.wizard/jobex_guide.html'
|
||||
page_title = _("Guided Job Execution")
|
||||
|
||||
def show_data_sources(self):
|
||||
try:
|
||||
@@ -84,6 +87,7 @@ class PluginSelectView(forms.ModalFormView):
|
||||
'horizon:project:data_processing.wizard:cluster_guide')
|
||||
classes = ("ajax-modal")
|
||||
template_name = "project/data_processing.wizard/plugin_select.html"
|
||||
page_title = _("Choose plugin and version")
|
||||
|
||||
|
||||
class JobTypeSelectView(forms.ModalFormView):
|
||||
@@ -92,3 +96,4 @@ class JobTypeSelectView(forms.ModalFormView):
|
||||
'horizon:project:data_processing.wizard:jobex_guide')
|
||||
classes = ("ajax-modal")
|
||||
template_name = "project/data_processing.wizard/job_type_select.html"
|
||||
page_title = _("Choose job type")
|
||||
|
@@ -1,11 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Edit Instance" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Edit Instance") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'horizon/common/_workflow.html' %}
|
||||
{% endblock %}
|
@@ -1,11 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Network" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Network") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{{ table.render }}
|
||||
{% endblock %}
|
@@ -35,6 +35,7 @@ class CreateBackupView(forms.ModalFormView):
|
||||
submit_label = _("Create Volume Backup")
|
||||
submit_url = "horizon:project:volumes:volumes:create_backup"
|
||||
success_url = reverse_lazy("horizon:project:volumes:backups_tab")
|
||||
page_title = _("Create a Volume Backup")
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(CreateBackupView, self).get_context_data(**kwargs)
|
||||
@@ -89,6 +90,7 @@ class RestoreBackupView(forms.ModalFormView):
|
||||
submit_label = _("Restore Backup to Volume")
|
||||
submit_url = "horizon:project:volumes:volumes:create_backup"
|
||||
success_url = reverse_lazy('horizon:project:volumes:index')
|
||||
page_title = _("Restore a Volume Backup")
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(RestoreBackupView, self).get_context_data(**kwargs)
|
||||
|
@@ -37,6 +37,7 @@ class UpdateView(forms.ModalFormView):
|
||||
submit_label = _("Save Changes")
|
||||
submit_url = "horizon:project:volumes:snapshots:update"
|
||||
success_url = reverse_lazy("horizon:project:volumes:index")
|
||||
page_title = _("Edit Snapshot")
|
||||
|
||||
@memoized.memoized_method
|
||||
def get_object(self):
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Create Volume Backup" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Create a Volume Backup") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/backups/_create_backup.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Restore Volume Backup" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Restore a Volume Backup") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/backups/_restore_backup.html' %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Volumes" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Volumes")%}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Edit Snapshot" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Edit Snapshot") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/snapshots/_update.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Accept Volume Transfer" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Accept Volume Transfer") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/volumes/_accept_transfer.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Manage Volume Attachments" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Manage Volume Attachments") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/volumes/_attach.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Create Volume" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Create a Volume") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/volumes/_create.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Create Volume Snapshot" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Create a Volume Snapshot") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/volumes/_create_snapshot.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Create Volume Transfer" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Create a Volume Transfer") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/volumes/_create_transfer.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Volume Encryption Details" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=page_title %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
<div class="row-fluid">
|
||||
<div class="col-sm-12">
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Extend Volume" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Extend Volume") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/volumes/_extend.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Change Volume Type" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Change Volume Type") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/volumes/_retype.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Volume Transfer Details" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Volume Transfer Details") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/volumes/_show_transfer.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Edit Volume" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Edit Volume") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/volumes/_update.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Upload Volume to Image" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Upload Volume to Image") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/volumes/volumes/_upload_to_image.html' %}
|
||||
{% endblock %}
|
||||
|
@@ -12,6 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon import tabs
|
||||
|
||||
from openstack_dashboard.dashboards.project.volumes \
|
||||
@@ -21,3 +23,4 @@ from openstack_dashboard.dashboards.project.volumes \
|
||||
class IndexView(tabs.TabbedTableView):
|
||||
tab_group_class = project_tabs.VolumeAndSnapshotTabs
|
||||
template_name = 'project/volumes/index.html'
|
||||
page_title = _("Volumes")
|
||||
|
@@ -84,6 +84,7 @@ class CreateView(forms.ModalFormView):
|
||||
submit_label = _("Create Volume")
|
||||
submit_url = reverse_lazy("horizon:project:volumes:volumes:create")
|
||||
success_url = reverse_lazy('horizon:project:volumes:volumes_tab')
|
||||
page_title = _("Create a Volume")
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(CreateView, self).get_context_data(**kwargs)
|
||||
@@ -101,6 +102,7 @@ class ExtendView(forms.ModalFormView):
|
||||
submit_label = _("Extend Volume")
|
||||
submit_url = "horizon:project:volumes:volumes:extend"
|
||||
success_url = reverse_lazy("horizon:project:volumes:index")
|
||||
page_title = _("Extend Volume")
|
||||
|
||||
def get_object(self):
|
||||
if not hasattr(self, "_object"):
|
||||
@@ -140,6 +142,7 @@ class CreateSnapshotView(forms.ModalFormView):
|
||||
template_name = 'project/volumes/volumes/create_snapshot.html'
|
||||
submit_url = "horizon:project:volumes:volumes:create_snapshot"
|
||||
success_url = reverse_lazy('horizon:project:volumes:snapshots_tab')
|
||||
page_title = _("Create a Volume Snapshot")
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(CreateSnapshotView, self).get_context_data(**kwargs)
|
||||
@@ -173,6 +176,7 @@ class UploadToImageView(forms.ModalFormView):
|
||||
submit_label = _("Upload")
|
||||
submit_url = "horizon:project:volumes:volumes:upload_to_image"
|
||||
success_url = reverse_lazy("horizon:project:volumes:index")
|
||||
page_title = _("Upload Volume to Image")
|
||||
|
||||
@memoized.memoized_method
|
||||
def get_data(self):
|
||||
@@ -212,6 +216,7 @@ class CreateTransferView(forms.ModalFormView):
|
||||
modal_header = _("Create Volume Transfer")
|
||||
submit_label = _("Create Volume Transfer")
|
||||
submit_url = "horizon:project:volumes:volumes:create_transfer"
|
||||
page_title = _("Create a Volume Transfer")
|
||||
|
||||
def get_context_data(self, *args, **kwargs):
|
||||
context = super(CreateTransferView, self).get_context_data(**kwargs)
|
||||
@@ -233,6 +238,7 @@ class AcceptTransferView(forms.ModalFormView):
|
||||
submit_label = _("Accept Volume Transfer")
|
||||
submit_url = reverse_lazy(
|
||||
"horizon:project:volumes:volumes:accept_transfer")
|
||||
page_title = _("Accept Volume Transfer")
|
||||
|
||||
|
||||
class ShowTransferView(forms.ModalFormView):
|
||||
@@ -243,6 +249,7 @@ class ShowTransferView(forms.ModalFormView):
|
||||
modal_header = _("Volume Transfer")
|
||||
submit_url = "horizon:project:volumes:volumes:show_transfer"
|
||||
cancel_label = _("Close")
|
||||
page_title = _("Volume Transfer Details")
|
||||
|
||||
def get_object(self):
|
||||
try:
|
||||
@@ -278,6 +285,7 @@ class UpdateView(forms.ModalFormView):
|
||||
template_name = 'project/volumes/volumes/update.html'
|
||||
submit_url = "horizon:project:volumes:volumes:update"
|
||||
success_url = reverse_lazy("horizon:project:volumes:index")
|
||||
page_title = _("Edit Volume")
|
||||
|
||||
def get_object(self):
|
||||
if not hasattr(self, "_object"):
|
||||
@@ -314,6 +322,7 @@ class EditAttachmentsView(tables.DataTableView, forms.ModalFormView):
|
||||
template_name = 'project/volumes/volumes/attach.html'
|
||||
submit_url = "horizon:project:volumes:volumes:attach"
|
||||
success_url = reverse_lazy("horizon:project:volumes:index")
|
||||
page_title = _("Manage Volume Attachments")
|
||||
|
||||
@memoized.memoized_method
|
||||
def get_object(self):
|
||||
@@ -387,6 +396,7 @@ class RetypeView(forms.ModalFormView):
|
||||
submit_label = _("Change Volume Type")
|
||||
submit_url = "horizon:project:volumes:volumes:retype"
|
||||
success_url = reverse_lazy("horizon:project:volumes:index")
|
||||
page_title = _("Change Volume Type")
|
||||
|
||||
@memoized.memoized_method
|
||||
def get_data(self):
|
||||
@@ -420,6 +430,7 @@ class RetypeView(forms.ModalFormView):
|
||||
|
||||
class EncryptionDetailView(generic.TemplateView):
|
||||
template_name = 'project/volumes/volumes/encryption_detail.html'
|
||||
page_title = _("Volume Encryption Details: {{ volume.name }}")
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(EncryptionDetailView, self).get_context_data(**kwargs)
|
||||
|
Reference in New Issue
Block a user