@@ -183,9 +183,21 @@ class Meta:
183
183
]
184
184
185
185
186
- class ClusterFilterForm (BootstrapMixin , CustomFieldFilterForm ):
186
+ class ClusterFilterForm (BootstrapMixin , TenancyFilterForm , CustomFieldFilterForm ):
187
187
model = Cluster
188
+ field_order = [
189
+ 'q' , 'type' , 'region' , 'site' , 'group' , 'tenant_group' , 'tenant'
190
+ ]
188
191
q = forms .CharField (required = False , label = 'Search' )
192
+ type = FilterChoiceField (
193
+ queryset = ClusterType .objects .all (),
194
+ to_field_name = 'slug' ,
195
+ required = False ,
196
+ widget = APISelectMultiple (
197
+ api_url = "/api/virtualization/cluster-types/" ,
198
+ value_field = 'slug' ,
199
+ )
200
+ )
189
201
region = FilterChoiceField (
190
202
queryset = Region .objects .all (),
191
203
to_field_name = 'slug' ,
@@ -209,15 +221,6 @@ class ClusterFilterForm(BootstrapMixin, CustomFieldFilterForm):
209
221
null_option = True ,
210
222
)
211
223
)
212
- type = FilterChoiceField (
213
- queryset = ClusterType .objects .all (),
214
- to_field_name = 'slug' ,
215
- required = False ,
216
- widget = APISelectMultiple (
217
- api_url = "/api/virtualization/cluster-types/" ,
218
- value_field = 'slug' ,
219
- )
220
- )
221
224
group = FilterChoiceField (
222
225
queryset = ClusterGroup .objects .all (),
223
226
to_field_name = 'slug' ,
@@ -229,15 +232,6 @@ class ClusterFilterForm(BootstrapMixin, CustomFieldFilterForm):
229
232
null_option = True ,
230
233
)
231
234
)
232
- tenant = FilterChoiceField (
233
- queryset = Tenant .objects .all (),
234
- null_label = '-- None --' ,
235
- required = False ,
236
- widget = APISelectMultiple (
237
- api_url = "/api/tenancy/tenants/" ,
238
- null_option = True ,
239
- )
240
- )
241
235
242
236
243
237
class ClusterAddDevicesForm (BootstrapMixin , ChainedFieldsMixin , forms .Form ):
0 commit comments