Fixed small problems with links and titles on pages.
This commit is contained in:
parent
3b0f8570de
commit
f32b95e7dc
@ -43,14 +43,9 @@ ACTIVE_STATES = ("ACTIVE",)
|
|||||||
POWER_STATES = {
|
POWER_STATES = {
|
||||||
0: "NO STATE",
|
0: "NO STATE",
|
||||||
1: "RUNNING",
|
1: "RUNNING",
|
||||||
2: "BLOCKED",
|
2: "SHUTDOWN",
|
||||||
3: "PAUSED",
|
3: "FAILED",
|
||||||
4: "SHUTDOWN",
|
4: "BUILDING",
|
||||||
5: "SHUTOFF",
|
|
||||||
6: "CRASHED",
|
|
||||||
7: "SUSPENDED",
|
|
||||||
8: "FAILED",
|
|
||||||
9: "BUILDING",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PAUSE = 0
|
PAUSE = 0
|
||||||
@ -205,13 +200,6 @@ def get_size(instance):
|
|||||||
return _("Not available")
|
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):
|
def get_power_state(instance):
|
||||||
return POWER_STATES.get(getattr(instance, "OS-EXT-STS:power_state", 0), '')
|
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,
|
size = tables.Column(get_size,
|
||||||
verbose_name=_("Type"),
|
verbose_name=_("Type"),
|
||||||
attrs={'data-type': 'type'})
|
attrs={'data-type': 'type'})
|
||||||
keypair = tables.Column(get_keyname, verbose_name=_("Keypair"))
|
|
||||||
status = tables.Column("status",
|
status = tables.Column("status",
|
||||||
filters=(title, replace_underscores),
|
filters=(title, replace_underscores),
|
||||||
verbose_name=_("Status"),
|
verbose_name=_("Status"),
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}{% trans "Create WinDC" %}{% endblock %}
|
{% block title %}{% trans "Create Windows Instance" %}{% endblock %}
|
||||||
|
|
||||||
{% block page_header %}
|
{% 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 %}
|
{% endblock page_header %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}{% trans "WinDC" %}{% endblock %}
|
{% block title %}{% trans "Windows Services" %}{% endblock %}
|
||||||
|
|
||||||
{% block page_header %}
|
{% 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 %}
|
{% endblock page_header %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
|
@ -27,5 +27,5 @@ VIEW_MOD = 'openstack_dashboard.dashboards.project.windc.views'
|
|||||||
|
|
||||||
urlpatterns = patterns(VIEW_MOD,
|
urlpatterns = patterns(VIEW_MOD,
|
||||||
url(r'^$', IndexView.as_view(), name='index'),
|
url(r'^$', IndexView.as_view(), name='index'),
|
||||||
url(r'^create/$', CreateWinDCView.as_view(), name='CreateWinDC')
|
url(r'create/$', CreateWinDCView.as_view(), name='CreateWinDC')
|
||||||
)
|
)
|
||||||
|
@ -36,8 +36,6 @@ from horizon import tables
|
|||||||
from horizon import workflows
|
from horizon import workflows
|
||||||
|
|
||||||
from openstack_dashboard import api
|
from openstack_dashboard import api
|
||||||
from .forms import UpdateInstance
|
|
||||||
from .tabs import InstanceDetailTabs
|
|
||||||
from .tables import WinDCTable
|
from .tables import WinDCTable
|
||||||
from .workflows import CreateWinDC
|
from .workflows import CreateWinDC
|
||||||
|
|
||||||
|
@ -454,7 +454,7 @@ class SetNetwork(workflows.Step):
|
|||||||
|
|
||||||
class CreateWinDC(workflows.Workflow):
|
class CreateWinDC(workflows.Workflow):
|
||||||
slug = "create_windc"
|
slug = "create_windc"
|
||||||
name = _("Create WinDC Instance")
|
name = _("Create Windows Data Center Instance")
|
||||||
finalize_button_name = _("Deploy")
|
finalize_button_name = _("Deploy")
|
||||||
success_message = _('Deployed %(count)s named "%(name)s".')
|
success_message = _('Deployed %(count)s named "%(name)s".')
|
||||||
failure_message = _('Unable to deploy %(count)s named "%(name)s".')
|
failure_message = _('Unable to deploy %(count)s named "%(name)s".')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user