Browse Source

Merge "Fixed issue with names."

Timur Nurlygayanov 6 years ago
parent
commit
b5e81e6e77

+ 8
- 8
dashboard/glazierdashboard/tabula/tables.py View File

@@ -103,7 +103,7 @@ class DeployEnvironment(tables.BatchAction):
103 103
         return api.environment_deploy(request, environment_id)
104 104
 
105 105
 
106
-class ShowDataCenterServices(tables.LinkAction):
106
+class ShowEnvironmentServices(tables.LinkAction):
107 107
     name = 'edit'
108 108
     verbose_name = _('Services')
109 109
     url = 'horizon:project:tabula:services'
@@ -112,7 +112,7 @@ class ShowDataCenterServices(tables.LinkAction):
112 112
         return True
113 113
 
114 114
 
115
-class UpdateDCRow(tables.Row):
115
+class UpdateEnvironmentRow(tables.Row):
116 116
     ajax = True
117 117
 
118 118
     def get_data(self, request, environment_id):
@@ -140,7 +140,7 @@ STATUS_DISPLAY_CHOICES = (
140 140
 )
141 141
 
142 142
 
143
-class DCTable(tables.DataTable):
143
+class EnvironmentsTable(tables.DataTable):
144 144
     STATUS_CHOICES = (
145 145
         (None, True),
146 146
         ('Ready to deploy', True),
@@ -158,12 +158,12 @@ class DCTable(tables.DataTable):
158 158
 
159 159
     class Meta:
160 160
         name = 'tabula'
161
-        verbose_name = _('Environment')
162
-        row_class = UpdateDCRow
161
+        verbose_name = _('Environments')
162
+        row_class = UpdateEnvironmentRow
163 163
         status_columns = ['status']
164
-        table_actions = (CreateDataCenter,)
165
-        row_actions = (ShowDataCenterServices, DeleteDataCenter,
166
-                       DeployDataCenter)
164
+        table_actions = (CreateEnvironment,)
165
+        row_actions = (ShowEnvironmentServices, DeleteEnvironment,
166
+                       DeployEnvironment)
167 167
 
168 168
 
169 169
 class ServicesTable(tables.DataTable):

+ 2
- 2
dashboard/glazierdashboard/tabula/views.py View File

@@ -29,7 +29,7 @@ from horizon.forms.views import ModalFormMixin
29 29
 
30 30
 from glazierdashboard.tabula import api
31 31
 
32
-from .tables import DCTable, ServicesTable
32
+from .tables import EnvironmentsTable, ServicesTable
33 33
 from .workflows import CreateDC
34 34
 from .tabs import ServicesTabs
35 35
 from .forms import (WizardFormADConfiguration, WizardFormIISConfiguration)
@@ -127,7 +127,7 @@ class Wizard(ModalFormMixin, SessionWizardView, generic.FormView):
127 127
 
128 128
 
129 129
 class IndexView(tables.DataTableView):
130
-    table_class = DCTable
130
+    table_class = EnvironmentsTable
131 131
     template_name = 'index.html'
132 132
 
133 133
     def get_data(self):

+ 5
- 5
dashboard/glazierdashboard/tabula/workflows.py View File

@@ -56,7 +56,7 @@ class SelectProjectUser(workflows.Step):
56 56
     action_class = SelectProjectUserAction
57 57
 
58 58
 
59
-class ConfigureDCAction(workflows.Action):
59
+class ConfigureEnvironmentAction(workflows.Action):
60 60
     name = forms.CharField(label=_("Environment Name"), required=True)
61 61
 
62 62
     class Meta:
@@ -64,8 +64,8 @@ class ConfigureDCAction(workflows.Action):
64 64
         help_text_template = "_data_center_help.html"
65 65
 
66 66
 
67
-class ConfigureDC(workflows.Step):
68
-    action_class = ConfigureDCAction
67
+class ConfigureEnvironment(workflows.Step):
68
+    action_class = ConfigureEnvironmentAction
69 69
     contibutes = ('name',)
70 70
 
71 71
     def contribute(self, data, context):
@@ -74,14 +74,14 @@ class ConfigureDC(workflows.Step):
74 74
         return context
75 75
 
76 76
 
77
-class CreateDC(workflows.Workflow):
77
+class CreateEnvironment(workflows.Workflow):
78 78
     slug = "create"
79 79
     name = _("Create Environment")
80 80
     finalize_button_name = _("Create")
81 81
     success_message = _('Created environment "%s".')
82 82
     failure_message = _('Unable to create environment "%s".')
83 83
     success_url = "horizon:project:tabula:index"
84
-    default_steps = (SelectProjectUser, ConfigureDC)
84
+    default_steps = (SelectProjectUser, ConfigureEnvironment)
85 85
 
86 86
     def format_status_message(self, message):
87 87
         name = self.context.get('name', 'noname')

Loading…
Cancel
Save