From 797c497312548e9f00f9b23e47f40729b005bb61 Mon Sep 17 00:00:00 2001 From: Gabriel Hurley Date: Fri, 10 Feb 2012 15:14:32 -0800 Subject: [PATCH] Cleanup on syspanel.images code, and unuset template removal. A lot of templates got left behind after the datatables refactor which are no longer used or necessary. There was also some strange behavior in the syspanel images table where outdated javascript would try to hide other rows in the table causing bad behavior. Change-Id: If7aa226336f0814782522b20c76eadc39613c372 --- .../security_groups/_delete_rule.html | 9 ---- .../instances/_no_instances.html | 8 ---- .../instances/_pause.html | 9 ---- .../instances/_reboot.html | 9 ---- .../instances/_resume.html | 9 ---- .../instances/_snapshot.html | 11 ----- .../instances/_suspend.html | 9 ---- .../instances/_terminate.html | 9 ---- .../instances/_unpause.html | 9 ---- .../volumes/_delete.html | 10 ---- .../volumes/_detach.html | 11 ----- .../instances_and_volumes/volumes/_form.html | 27 ----------- .../templates/syspanel/images/_delete.html | 9 ---- .../templates/syspanel/images/_form.html | 27 ----------- .../templates/syspanel/images/_list.html | 46 ------------------- .../templates/syspanel/images/_toggle.html | 9 ---- .../templates/syspanel/images/_update.html | 26 ++++++++--- .../templates/syspanel/images/update.html | 18 ++------ .../templates/syspanel/instances/_pause.html | 9 ---- .../templates/syspanel/instances/_reboot.html | 9 ---- .../templates/syspanel/instances/_resume.html | 9 ---- .../syspanel/instances/_suspend.html | 9 ---- .../syspanel/instances/_terminate.html | 9 ---- .../syspanel/instances/_unpause.html | 9 ---- .../templates/syspanel/services/_stats.html | 26 ----------- .../templates/syspanel/services/_toggle.html | 22 --------- .../templates/syspanel/users/_delete.html | 9 ---- .../syspanel/users/_enable_disable.html | 9 ---- .../syspanel/users/_toggle_enabled.html | 20 -------- .../static/dashboard/js/navigation.js | 13 ------ .../dashboard/templates/base.html | 1 - 31 files changed, 23 insertions(+), 396 deletions(-) delete mode 100644 horizon/horizon/dashboards/nova/templates/nova/access_and_security/security_groups/_delete_rule.html delete mode 100644 horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_no_instances.html delete mode 100644 horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_pause.html delete mode 100644 horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_reboot.html delete mode 100644 horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_resume.html delete mode 100644 horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_snapshot.html delete mode 100644 horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_suspend.html delete mode 100644 horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_terminate.html delete mode 100644 horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_unpause.html delete mode 100644 horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_delete.html delete mode 100644 horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_detach.html delete mode 100644 horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_form.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/images/_delete.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/images/_form.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/images/_list.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/images/_toggle.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/instances/_pause.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/instances/_reboot.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/instances/_resume.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/instances/_suspend.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/instances/_terminate.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/instances/_unpause.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/services/_stats.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/services/_toggle.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/users/_delete.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/users/_enable_disable.html delete mode 100644 horizon/horizon/dashboards/syspanel/templates/syspanel/users/_toggle_enabled.html delete mode 100644 openstack-dashboard/dashboard/static/dashboard/js/navigation.js diff --git a/horizon/horizon/dashboards/nova/templates/nova/access_and_security/security_groups/_delete_rule.html b/horizon/horizon/dashboards/nova/templates/nova/access_and_security/security_groups/_delete_rule.html deleted file mode 100644 index bb7688cb7..000000000 --- a/horizon/horizon/dashboards/nova/templates/nova/access_and_security/security_groups/_delete_rule.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - - -
diff --git a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_no_instances.html b/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_no_instances.html deleted file mode 100644 index 373a6defa..000000000 --- a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_no_instances.html +++ /dev/null @@ -1,8 +0,0 @@ -{% load i18n %} - -
-

{% trans "Info: " %}{% trans "There are no instances running. Launch an instance from the Images Page." %}

- -
diff --git a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_pause.html b/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_pause.html deleted file mode 100644 index 973e568fb..000000000 --- a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_pause.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - - -
diff --git a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_reboot.html b/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_reboot.html deleted file mode 100644 index 65eefc392..000000000 --- a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_reboot.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - - -
diff --git a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_resume.html b/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_resume.html deleted file mode 100644 index b6f8afe47..000000000 --- a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_resume.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - - -
diff --git a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_snapshot.html b/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_snapshot.html deleted file mode 100644 index ebd20726d..000000000 --- a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_snapshot.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends 'nova/instances_and_volumes/instances/_form.html' %} -{% load i18n %} - -{% block form_action %}{% url horizon:nova:images_and_snapshots:snapshots:create instance.id %}{% endblock %} - -{% block modal-footer %} - -{% endblock %} diff --git a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_suspend.html b/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_suspend.html deleted file mode 100644 index 4508ae204..000000000 --- a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_suspend.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - - -
diff --git a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_terminate.html b/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_terminate.html deleted file mode 100644 index 256133b45..000000000 --- a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_terminate.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - - -
diff --git a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_unpause.html b/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_unpause.html deleted file mode 100644 index a8a4fcb9c..000000000 --- a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_unpause.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - - -
diff --git a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_delete.html b/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_delete.html deleted file mode 100644 index a133b3689..000000000 --- a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_delete.html +++ /dev/null @@ -1,10 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - - - -
diff --git a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_detach.html b/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_detach.html deleted file mode 100644 index 545a2732a..000000000 --- a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_detach.html +++ /dev/null @@ -1,11 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - - - - -
diff --git a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_form.html b/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_form.html deleted file mode 100644 index 987d50475..000000000 --- a/horizon/horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_form.html +++ /dev/null @@ -1,27 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} -
- {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - {% for field in form.visible_fields %} -
- {{ field.label_tag }} - {% if field.errors %} - {% for error in field.errors %} - {{ error }} - {% endfor %} - {% endif %} - {{ field.help_text }} -
- {{ field }} -
-
- {% endfor %} - {% block modal-footer %} - - {% endblock %} -
-
- diff --git a/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_delete.html b/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_delete.html deleted file mode 100644 index e800c9287..000000000 --- a/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_delete.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - - -
diff --git a/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_form.html b/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_form.html deleted file mode 100644 index 0efaf00b6..000000000 --- a/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_form.html +++ /dev/null @@ -1,27 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} -
- {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - {% for field in form.visible_fields %} -
- {{ field.label_tag }} - {% if field.errors %} - {% for error in field.errors %} - {{ error }} - {% endfor %} - {% endif %} - {{ field.help_text }} -
- {{ field }} -
-
- {% endfor %} - {% block modal-footer %} - - {% endblock %} -
-
- diff --git a/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_list.html b/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_list.html deleted file mode 100644 index f8f01fa26..000000000 --- a/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_list.html +++ /dev/null @@ -1,46 +0,0 @@ -{% load parse_date %} -{% load i18n %} - - - - - - - - - - - - {% for image in images %} - - - - - - - - - - - - - - {% endfor %} -
{% trans "ID" %}{% trans "Name" %}{% trans "Size" %}{% trans "Public" %}{% trans "Created" %}{% trans "Updated" %}{% trans "Status" %}
{{ image.id }}{{ image.name }}{{ image.size|filesizeformat }}{{ image.is_public }}{{ image.created_at|parse_date }}{{ image.updated_at|parse_date }}{{ image.status|capfirst }} -
    -
  • {% include "syspanel/images/_delete.html" with form=delete_form %}
  • - {#
  • {% include "syspanel/images/_toggle.html" with form=toggle_form %}
  • #} -
  • {% trans "Edit" %}
  • -
-
-
    -
  • {% trans "Location" %}: {{ image.properties.image_location }}
  • -
  • {% trans "State" %}: {{ image.properties.image_state }}
  • -
  • {% trans "Kernel ID" %}: {{ image.properties.kernel_id }}
  • -
  • {% trans "Ramdisk ID" %}: {{ image.properties.ramdisk_id }}
  • -
  • {% trans "Architecture" %}: {{ image.properties.architecture }}
  • -
  • {% trans "Project ID" %}: {{ image.properties.project_id }}
  • -
  • {% trans "Container Format" %}: {{ image.container_format }}
  • -
  • {% trans "Disk Format" %}: {{ image.disk_format }}
  • -
-
diff --git a/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_toggle.html b/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_toggle.html deleted file mode 100644 index 39959f5b4..000000000 --- a/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_toggle.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load i18n %} -
- {% csrf_token %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - - -
diff --git a/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_update.html b/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_update.html index 8e03e3e51..479454a5f 100644 --- a/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_update.html +++ b/horizon/horizon/dashboards/syspanel/templates/syspanel/images/_update.html @@ -1,11 +1,25 @@ -{% extends 'syspanel/images/_form.html' %} +{% extends "horizon/common/_modal_form.html" %} {% load i18n %} -{% block form_action %}{% url horizon:syspanel:images:update image.id %}{% endblock %} +{% block form_id %}udate_image_form{% endblock %} +{% block form_action %}{% url horizon:syspanel:images:update %}{% endblock %} -{% block modal-footer %} -