summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimur Nurlygayanov <tnurlygayanov@mirantis.com>2013-04-08 12:55:56 +0400
committerGerrit Code Review <gitolite@gitolite.vm.mirantis.net>2013-04-08 12:55:56 +0400
commitb5e81e6e77b0dc634c8d14507090c8e9b44e5f4e (patch)
tree8ced4209f9c8a4b3e9f66e6e31eb117e36498c11
parentafb0c40c94ddb47c2a9783174f64b48844df800a (diff)
parent35a2592ddd2cc0833cefc83793589cb9afdc3647 (diff)
Merge "Fixed issue with names."
-rw-r--r--dashboard/glazierdashboard/tabula/tables.py16
-rw-r--r--dashboard/glazierdashboard/tabula/views.py4
-rw-r--r--dashboard/glazierdashboard/tabula/workflows.py10
3 files changed, 15 insertions, 15 deletions
diff --git a/dashboard/glazierdashboard/tabula/tables.py b/dashboard/glazierdashboard/tabula/tables.py
index 59028a4..a983781 100644
--- a/dashboard/glazierdashboard/tabula/tables.py
+++ b/dashboard/glazierdashboard/tabula/tables.py
@@ -103,7 +103,7 @@ class DeployEnvironment(tables.BatchAction):
103 return api.environment_deploy(request, environment_id) 103 return api.environment_deploy(request, environment_id)
104 104
105 105
106class ShowDataCenterServices(tables.LinkAction): 106class ShowEnvironmentServices(tables.LinkAction):
107 name = 'edit' 107 name = 'edit'
108 verbose_name = _('Services') 108 verbose_name = _('Services')
109 url = 'horizon:project:tabula:services' 109 url = 'horizon:project:tabula:services'
@@ -112,7 +112,7 @@ class ShowDataCenterServices(tables.LinkAction):
112 return True 112 return True
113 113
114 114
115class UpdateDCRow(tables.Row): 115class UpdateEnvironmentRow(tables.Row):
116 ajax = True 116 ajax = True
117 117
118 def get_data(self, request, environment_id): 118 def get_data(self, request, environment_id):
@@ -140,7 +140,7 @@ STATUS_DISPLAY_CHOICES = (
140) 140)
141 141
142 142
143class DCTable(tables.DataTable): 143class EnvironmentsTable(tables.DataTable):
144 STATUS_CHOICES = ( 144 STATUS_CHOICES = (
145 (None, True), 145 (None, True),
146 ('Ready to deploy', True), 146 ('Ready to deploy', True),
@@ -158,12 +158,12 @@ class DCTable(tables.DataTable):
158 158
159 class Meta: 159 class Meta:
160 name = 'tabula' 160 name = 'tabula'
161 verbose_name = _('Environment') 161 verbose_name = _('Environments')
162 row_class = UpdateDCRow 162 row_class = UpdateEnvironmentRow
163 status_columns = ['status'] 163 status_columns = ['status']
164 table_actions = (CreateDataCenter,) 164 table_actions = (CreateEnvironment,)
165 row_actions = (ShowDataCenterServices, DeleteDataCenter, 165 row_actions = (ShowEnvironmentServices, DeleteEnvironment,
166 DeployDataCenter) 166 DeployEnvironment)
167 167
168 168
169class ServicesTable(tables.DataTable): 169class ServicesTable(tables.DataTable):
diff --git a/dashboard/glazierdashboard/tabula/views.py b/dashboard/glazierdashboard/tabula/views.py
index 762bdf8..9c9beec 100644
--- a/dashboard/glazierdashboard/tabula/views.py
+++ b/dashboard/glazierdashboard/tabula/views.py
@@ -29,7 +29,7 @@ from horizon.forms.views import ModalFormMixin
29 29
30from glazierdashboard.tabula import api 30from glazierdashboard.tabula import api
31 31
32from .tables import DCTable, ServicesTable 32from .tables import EnvironmentsTable, ServicesTable
33from .workflows import CreateDC 33from .workflows import CreateDC
34from .tabs import ServicesTabs 34from .tabs import ServicesTabs
35from .forms import (WizardFormADConfiguration, WizardFormIISConfiguration) 35from .forms import (WizardFormADConfiguration, WizardFormIISConfiguration)
@@ -127,7 +127,7 @@ class Wizard(ModalFormMixin, SessionWizardView, generic.FormView):
127 127
128 128
129class IndexView(tables.DataTableView): 129class IndexView(tables.DataTableView):
130 table_class = DCTable 130 table_class = EnvironmentsTable
131 template_name = 'index.html' 131 template_name = 'index.html'
132 132
133 def get_data(self): 133 def get_data(self):
diff --git a/dashboard/glazierdashboard/tabula/workflows.py b/dashboard/glazierdashboard/tabula/workflows.py
index f3a3ad8..44701dd 100644
--- a/dashboard/glazierdashboard/tabula/workflows.py
+++ b/dashboard/glazierdashboard/tabula/workflows.py
@@ -56,7 +56,7 @@ class SelectProjectUser(workflows.Step):
56 action_class = SelectProjectUserAction 56 action_class = SelectProjectUserAction
57 57
58 58
59class ConfigureDCAction(workflows.Action): 59class ConfigureEnvironmentAction(workflows.Action):
60 name = forms.CharField(label=_("Environment Name"), required=True) 60 name = forms.CharField(label=_("Environment Name"), required=True)
61 61
62 class Meta: 62 class Meta:
@@ -64,8 +64,8 @@ class ConfigureDCAction(workflows.Action):
64 help_text_template = "_data_center_help.html" 64 help_text_template = "_data_center_help.html"
65 65
66 66
67class ConfigureDC(workflows.Step): 67class ConfigureEnvironment(workflows.Step):
68 action_class = ConfigureDCAction 68 action_class = ConfigureEnvironmentAction
69 contibutes = ('name',) 69 contibutes = ('name',)
70 70
71 def contribute(self, data, context): 71 def contribute(self, data, context):
@@ -74,14 +74,14 @@ class ConfigureDC(workflows.Step):
74 return context 74 return context
75 75
76 76
77class CreateDC(workflows.Workflow): 77class CreateEnvironment(workflows.Workflow):
78 slug = "create" 78 slug = "create"
79 name = _("Create Environment") 79 name = _("Create Environment")
80 finalize_button_name = _("Create") 80 finalize_button_name = _("Create")
81 success_message = _('Created environment "%s".') 81 success_message = _('Created environment "%s".')
82 failure_message = _('Unable to create environment "%s".') 82 failure_message = _('Unable to create environment "%s".')
83 success_url = "horizon:project:tabula:index" 83 success_url = "horizon:project:tabula:index"
84 default_steps = (SelectProjectUser, ConfigureDC) 84 default_steps = (SelectProjectUser, ConfigureEnvironment)
85 85
86 def format_status_message(self, message): 86 def format_status_message(self, message):
87 name = self.context.get('name', 'noname') 87 name = self.context.get('name', 'noname')