From 4a71dcfd279734e9d24190f5316c99af41a047e4 Mon Sep 17 00:00:00 2001 From: Rob Cresswell Date: Mon, 30 Mar 2015 13:51:22 +0000 Subject: [PATCH] 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 --- .../dashboards/admin/hypervisors/compute/views.py | 1 + .../templates/hypervisors/compute/migrate_host.html | 8 +------- .../networks/templates/networks/subnets/index.html | 11 ----------- .../volumes/volume_types/qos_specs/create.html | 4 ---- .../volumes/volume_types/qos_specs/index.html | 6 +----- .../templates/volumes/volumes/manage_volume.html | 4 ---- .../templates/volumes/volumes/unmanage_volume.html | 4 ---- .../admin/volumes/volume_types/qos_specs/views.py | 3 +++ .../dashboards/admin/volumes/volumes/views.py | 2 ++ .../data_processing.job_executions/details.html | 4 ---- .../job_executions.html | 4 ---- .../jobs/templates/data_processing.jobs/create.html | 4 ---- .../jobs/templates/data_processing.jobs/details.html | 4 ---- .../jobs/templates/data_processing.jobs/jobs.html | 4 ---- .../dashboards/project/data_processing/jobs/views.py | 6 +++--- .../data_processing.wizard/cluster_guide.html | 6 +----- .../data_processing.wizard/job_type_select.html | 6 +----- .../templates/data_processing.wizard/jobex_guide.html | 6 +----- .../data_processing.wizard/plugin_select.html | 6 +----- .../templates/data_processing.wizard/wizard.html | 4 ---- .../project/data_processing/wizard/views.py | 5 +++++ .../project/databases/templates/databases/update.html | 11 ----------- .../networks/templates/networks/subnets/index.html | 11 ----------- .../dashboards/project/volumes/backups/views.py | 2 ++ .../dashboards/project/volumes/snapshots/views.py | 1 + .../templates/volumes/backups/create_backup.html | 4 ---- .../templates/volumes/backups/restore_backup.html | 6 +----- .../project/volumes/templates/volumes/index.html | 4 ---- .../volumes/templates/volumes/snapshots/update.html | 4 ---- .../templates/volumes/volumes/accept_transfer.html | 4 ---- .../volumes/templates/volumes/volumes/attach.html | 4 ---- .../volumes/templates/volumes/volumes/create.html | 4 ---- .../templates/volumes/volumes/create_snapshot.html | 4 ---- .../templates/volumes/volumes/create_transfer.html | 4 ---- .../templates/volumes/volumes/encryption_detail.html | 4 ---- .../volumes/templates/volumes/volumes/extend.html | 4 ---- .../volumes/templates/volumes/volumes/retype.html | 4 ---- .../templates/volumes/volumes/show_transfer.html | 4 ---- .../volumes/templates/volumes/volumes/update.html | 4 ---- .../templates/volumes/volumes/upload_to_image.html | 4 ---- .../dashboards/project/volumes/views.py | 3 +++ .../dashboards/project/volumes/volumes/views.py | 11 +++++++++++ 42 files changed, 38 insertions(+), 165 deletions(-) delete mode 100644 openstack_dashboard/dashboards/admin/networks/templates/networks/subnets/index.html delete mode 100644 openstack_dashboard/dashboards/project/databases/templates/databases/update.html delete mode 100644 openstack_dashboard/dashboards/project/networks/templates/networks/subnets/index.html diff --git a/openstack_dashboard/dashboards/admin/hypervisors/compute/views.py b/openstack_dashboard/dashboards/admin/hypervisors/compute/views.py index a944f8cecf..efe4dde2af 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/compute/views.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/compute/views.py @@ -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) diff --git a/openstack_dashboard/dashboards/admin/hypervisors/templates/hypervisors/compute/migrate_host.html b/openstack_dashboard/dashboards/admin/hypervisors/templates/hypervisors/compute/migrate_host.html index 570d8629cd..db84525155 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/templates/hypervisors/compute/migrate_host.html +++ b/openstack_dashboard/dashboards/admin/hypervisors/templates/hypervisors/compute/migrate_host.html @@ -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 %} diff --git a/openstack_dashboard/dashboards/admin/networks/templates/networks/subnets/index.html b/openstack_dashboard/dashboards/admin/networks/templates/networks/subnets/index.html deleted file mode 100644 index d70b5fded0..0000000000 --- a/openstack_dashboard/dashboards/admin/networks/templates/networks/subnets/index.html +++ /dev/null @@ -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 %} diff --git a/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volume_types/qos_specs/create.html b/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volume_types/qos_specs/create.html index 82cdd65c4d..a49ec5436a 100644 --- a/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volume_types/qos_specs/create.html +++ b/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volume_types/qos_specs/create.html @@ -3,10 +3,6 @@ {% block title %}{% trans "Create Spec" %}{% endblock %} -{% block page_header %} -

{% blocktrans %}Spec: {{ qos_spec_name }}{% endblocktrans %}

-{% endblock page_header %} - {% block main %} {% include "admin/volumes/volume_types/qos_specs/_create.html" %} {% endblock %} diff --git a/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volume_types/qos_specs/index.html b/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volume_types/qos_specs/index.html index b4cda47fdf..b19dcf7534 100644 --- a/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volume_types/qos_specs/index.html +++ b/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volume_types/qos_specs/index.html @@ -1,10 +1,6 @@ {% extends 'base.html' %} {% load i18n %} -{% block page_header %} -

{% blocktrans %}QoS Spec: {{ qos_spec_name }}{% endblocktrans %}

-{% endblock page_header %} - {% block main %} {% include "admin/volumes/volume_types/qos_specs/_index.html" %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volumes/manage_volume.html b/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volumes/manage_volume.html index f163cddefa..190d3c8aa9 100644 --- a/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volumes/manage_volume.html +++ b/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volumes/manage_volume.html @@ -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 %} diff --git a/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volumes/unmanage_volume.html b/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volumes/unmanage_volume.html index 6190c0b47b..39ce9971e8 100644 --- a/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volumes/unmanage_volume.html +++ b/openstack_dashboard/dashboards/admin/volumes/templates/volumes/volumes/unmanage_volume.html @@ -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 %} diff --git a/openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/views.py b/openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/views.py index b028b50e9e..30ca07ed5d 100644 --- a/openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/views.py +++ b/openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/views.py @@ -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, diff --git a/openstack_dashboard/dashboards/admin/volumes/volumes/views.py b/openstack_dashboard/dashboards/admin/volumes/volumes/views.py index 8aca7970d8..32a90d271e 100644 --- a/openstack_dashboard/dashboards/admin/volumes/volumes/views.py +++ b/openstack_dashboard/dashboards/admin/volumes/volumes/views.py @@ -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) diff --git a/openstack_dashboard/dashboards/project/data_processing/job_executions/templates/data_processing.job_executions/details.html b/openstack_dashboard/dashboards/project/data_processing/job_executions/templates/data_processing.job_executions/details.html index d94c35c2a4..87403bf5e3 100644 --- a/openstack_dashboard/dashboards/project/data_processing/job_executions/templates/data_processing.job_executions/details.html +++ b/openstack_dashboard/dashboards/project/data_processing/job_executions/templates/data_processing.job_executions/details.html @@ -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 %}
diff --git a/openstack_dashboard/dashboards/project/data_processing/job_executions/templates/data_processing.job_executions/job_executions.html b/openstack_dashboard/dashboards/project/data_processing/job_executions/templates/data_processing.job_executions/job_executions.html index e09f791b36..436624cfe3 100644 --- a/openstack_dashboard/dashboards/project/data_processing/job_executions/templates/data_processing.job_executions/job_executions.html +++ b/openstack_dashboard/dashboards/project/data_processing/job_executions/templates/data_processing.job_executions/job_executions.html @@ -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 %}
diff --git a/openstack_dashboard/dashboards/project/data_processing/jobs/templates/data_processing.jobs/create.html b/openstack_dashboard/dashboards/project/data_processing/jobs/templates/data_processing.jobs/create.html index de976c351d..bc299053f0 100644 --- a/openstack_dashboard/dashboards/project/data_processing/jobs/templates/data_processing.jobs/create.html +++ b/openstack_dashboard/dashboards/project/data_processing/jobs/templates/data_processing.jobs/create.html @@ -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 %} diff --git a/openstack_dashboard/dashboards/project/data_processing/jobs/templates/data_processing.jobs/details.html b/openstack_dashboard/dashboards/project/data_processing/jobs/templates/data_processing.jobs/details.html index 06fe325ad9..9d61acc9d6 100644 --- a/openstack_dashboard/dashboards/project/data_processing/jobs/templates/data_processing.jobs/details.html +++ b/openstack_dashboard/dashboards/project/data_processing/jobs/templates/data_processing.jobs/details.html @@ -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 %}
diff --git a/openstack_dashboard/dashboards/project/data_processing/jobs/templates/data_processing.jobs/jobs.html b/openstack_dashboard/dashboards/project/data_processing/jobs/templates/data_processing.jobs/jobs.html index c0fe904d19..5e3c16ee55 100644 --- a/openstack_dashboard/dashboards/project/data_processing/jobs/templates/data_processing.jobs/jobs.html +++ b/openstack_dashboard/dashboards/project/data_processing/jobs/templates/data_processing.jobs/jobs.html @@ -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 %}