From f32b95e7dce5a76dbbc02fe81ad4403bbd9c5a65 Mon Sep 17 00:00:00 2001 From: Timur Nurlygayanov Date: Thu, 14 Feb 2013 16:48:52 +0400 Subject: [PATCH] Fixed small problems with links and titles on pages. --- dashboard/windc/tables.py | 19 +++---------------- dashboard/windc/templates/windc/create.html | 4 ++-- dashboard/windc/templates/windc/index.html | 4 ++-- dashboard/windc/urls.py | 2 +- dashboard/windc/views.py | 2 -- dashboard/windc/workflows.py | 2 +- 6 files changed, 9 insertions(+), 24 deletions(-) diff --git a/dashboard/windc/tables.py b/dashboard/windc/tables.py index d2aad13..753026a 100644 --- a/dashboard/windc/tables.py +++ b/dashboard/windc/tables.py @@ -43,14 +43,9 @@ ACTIVE_STATES = ("ACTIVE",) POWER_STATES = { 0: "NO STATE", 1: "RUNNING", - 2: "BLOCKED", - 3: "PAUSED", - 4: "SHUTDOWN", - 5: "SHUTOFF", - 6: "CRASHED", - 7: "SUSPENDED", - 8: "FAILED", - 9: "BUILDING", + 2: "SHUTDOWN", + 3: "FAILED", + 4: "BUILDING", } PAUSE = 0 @@ -205,13 +200,6 @@ def get_size(instance): return _("Not available") -def get_keyname(instance): - if hasattr(instance, "key_name"): - keyname = instance.key_name - return keyname - return _("Not available") - - def get_power_state(instance): return POWER_STATES.get(getattr(instance, "OS-EXT-STS:power_state", 0), '') @@ -252,7 +240,6 @@ class WinDCTable(tables.DataTable): size = tables.Column(get_size, verbose_name=_("Type"), attrs={'data-type': 'type'}) - keypair = tables.Column(get_keyname, verbose_name=_("Keypair")) status = tables.Column("status", filters=(title, replace_underscores), verbose_name=_("Status"), diff --git a/dashboard/windc/templates/windc/create.html b/dashboard/windc/templates/windc/create.html index cc5e244..09c996a 100644 --- a/dashboard/windc/templates/windc/create.html +++ b/dashboard/windc/templates/windc/create.html @@ -1,9 +1,9 @@ {% extends 'base.html' %} {% load i18n %} -{% block title %}{% trans "Create WinDC" %}{% endblock %} +{% block title %}{% trans "Create Windows Instance" %}{% endblock %} {% block page_header %} - {% include "horizon/common/_page_header.html" with title=_("CreateWinDC") %} + {% include "horizon/common/_page_header.html" with title=_("Create Windows Instance") %} {% endblock page_header %} {% block main %} diff --git a/dashboard/windc/templates/windc/index.html b/dashboard/windc/templates/windc/index.html index 13d24d8..1ab2736 100644 --- a/dashboard/windc/templates/windc/index.html +++ b/dashboard/windc/templates/windc/index.html @@ -1,9 +1,9 @@ {% extends 'base.html' %} {% load i18n %} -{% block title %}{% trans "WinDC" %}{% endblock %} +{% block title %}{% trans "Windows Services" %}{% endblock %} {% block page_header %} - {% include "horizon/common/_page_header.html" with title=_("WinDC") %} + {% include "horizon/common/_page_header.html" with title=_("Windows Services") %} {% endblock page_header %} {% block main %} diff --git a/dashboard/windc/urls.py b/dashboard/windc/urls.py index ec6314c..0399b4b 100644 --- a/dashboard/windc/urls.py +++ b/dashboard/windc/urls.py @@ -27,5 +27,5 @@ VIEW_MOD = 'openstack_dashboard.dashboards.project.windc.views' urlpatterns = patterns(VIEW_MOD, url(r'^$', IndexView.as_view(), name='index'), - url(r'^create/$', CreateWinDCView.as_view(), name='CreateWinDC') + url(r'create/$', CreateWinDCView.as_view(), name='CreateWinDC') ) diff --git a/dashboard/windc/views.py b/dashboard/windc/views.py index a5fd2f6..a61fb2b 100644 --- a/dashboard/windc/views.py +++ b/dashboard/windc/views.py @@ -36,8 +36,6 @@ from horizon import tables from horizon import workflows from openstack_dashboard import api -from .forms import UpdateInstance -from .tabs import InstanceDetailTabs from .tables import WinDCTable from .workflows import CreateWinDC diff --git a/dashboard/windc/workflows.py b/dashboard/windc/workflows.py index a282eec..3328b1d 100644 --- a/dashboard/windc/workflows.py +++ b/dashboard/windc/workflows.py @@ -454,7 +454,7 @@ class SetNetwork(workflows.Step): class CreateWinDC(workflows.Workflow): slug = "create_windc" - name = _("Create WinDC Instance") + name = _("Create Windows Data Center Instance") finalize_button_name = _("Deploy") success_message = _('Deployed %(count)s named "%(name)s".') failure_message = _('Unable to deploy %(count)s named "%(name)s".')