From 35a2592ddd2cc0833cefc83793589cb9afdc3647 Mon Sep 17 00:00:00 2001 From: Timur Nurlygayanov Date: Mon, 8 Apr 2013 12:55:38 +0400 Subject: [PATCH] Fixed issue with names. --- dashboard/glazierdashboard/tabula/tables.py | 16 ++++++++-------- dashboard/glazierdashboard/tabula/views.py | 4 ++-- dashboard/glazierdashboard/tabula/workflows.py | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dashboard/glazierdashboard/tabula/tables.py b/dashboard/glazierdashboard/tabula/tables.py index 59028a4c..a983781d 100644 --- a/dashboard/glazierdashboard/tabula/tables.py +++ b/dashboard/glazierdashboard/tabula/tables.py @@ -103,7 +103,7 @@ class DeployEnvironment(tables.BatchAction): return api.environment_deploy(request, environment_id) -class ShowDataCenterServices(tables.LinkAction): +class ShowEnvironmentServices(tables.LinkAction): name = 'edit' verbose_name = _('Services') url = 'horizon:project:tabula:services' @@ -112,7 +112,7 @@ class ShowDataCenterServices(tables.LinkAction): return True -class UpdateDCRow(tables.Row): +class UpdateEnvironmentRow(tables.Row): ajax = True def get_data(self, request, environment_id): @@ -140,7 +140,7 @@ STATUS_DISPLAY_CHOICES = ( ) -class DCTable(tables.DataTable): +class EnvironmentsTable(tables.DataTable): STATUS_CHOICES = ( (None, True), ('Ready to deploy', True), @@ -158,12 +158,12 @@ class DCTable(tables.DataTable): class Meta: name = 'tabula' - verbose_name = _('Environment') - row_class = UpdateDCRow + verbose_name = _('Environments') + row_class = UpdateEnvironmentRow status_columns = ['status'] - table_actions = (CreateDataCenter,) - row_actions = (ShowDataCenterServices, DeleteDataCenter, - DeployDataCenter) + table_actions = (CreateEnvironment,) + row_actions = (ShowEnvironmentServices, DeleteEnvironment, + DeployEnvironment) class ServicesTable(tables.DataTable): diff --git a/dashboard/glazierdashboard/tabula/views.py b/dashboard/glazierdashboard/tabula/views.py index 762bdf81..9c9beecf 100644 --- a/dashboard/glazierdashboard/tabula/views.py +++ b/dashboard/glazierdashboard/tabula/views.py @@ -29,7 +29,7 @@ from horizon.forms.views import ModalFormMixin from glazierdashboard.tabula import api -from .tables import DCTable, ServicesTable +from .tables import EnvironmentsTable, ServicesTable from .workflows import CreateDC from .tabs import ServicesTabs from .forms import (WizardFormADConfiguration, WizardFormIISConfiguration) @@ -127,7 +127,7 @@ class Wizard(ModalFormMixin, SessionWizardView, generic.FormView): class IndexView(tables.DataTableView): - table_class = DCTable + table_class = EnvironmentsTable template_name = 'index.html' def get_data(self): diff --git a/dashboard/glazierdashboard/tabula/workflows.py b/dashboard/glazierdashboard/tabula/workflows.py index f3a3ad83..44701dd6 100644 --- a/dashboard/glazierdashboard/tabula/workflows.py +++ b/dashboard/glazierdashboard/tabula/workflows.py @@ -56,7 +56,7 @@ class SelectProjectUser(workflows.Step): action_class = SelectProjectUserAction -class ConfigureDCAction(workflows.Action): +class ConfigureEnvironmentAction(workflows.Action): name = forms.CharField(label=_("Environment Name"), required=True) class Meta: @@ -64,8 +64,8 @@ class ConfigureDCAction(workflows.Action): help_text_template = "_data_center_help.html" -class ConfigureDC(workflows.Step): - action_class = ConfigureDCAction +class ConfigureEnvironment(workflows.Step): + action_class = ConfigureEnvironmentAction contibutes = ('name',) def contribute(self, data, context): @@ -74,14 +74,14 @@ class ConfigureDC(workflows.Step): return context -class CreateDC(workflows.Workflow): +class CreateEnvironment(workflows.Workflow): slug = "create" name = _("Create Environment") finalize_button_name = _("Create") success_message = _('Created environment "%s".') failure_message = _('Unable to create environment "%s".') success_url = "horizon:project:tabula:index" - default_steps = (SelectProjectUser, ConfigureDC) + default_steps = (SelectProjectUser, ConfigureEnvironment) def format_status_message(self, message): name = self.context.get('name', 'noname')