- Timestamp:
- 05/27/11 17:15:01 (13 years ago)
- Location:
- trunk/sara_cmt/sara_cmt/cluster
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sara_cmt/sara_cmt/cluster/admin.py
r13027 r13028 74 74 class HardwareUnitAdmin(admin.ModelAdmin): 75 75 fieldsets = ( 76 ('Host info', {'fields': (('cluster', 'label' , 'state', 'role'),)}),77 (' Involved parties', {'fields': ('seller', 'owner')}),76 ('Host info', {'fields': (('cluster', 'label'),)}), 77 ('Configuration', {'fields': (('state', 'role'),)}), 78 78 ('Machine specifications', {'fields': ('specifications', 'warranty', 79 79 'warranty_tag', 'serial_number')} 80 80 ), 81 81 ('Physical location', {'fields': (('rack', 'first_slot'),)}), 82 ('Involved parties', {'fields': ('seller', 'owner')}), 82 83 GlobalAdmin.extra_fieldset) 83 84 … … 89 90 search_fields = ('label', 'warranty_tag') 90 91 91 #filter_horizontal = ('role',)92 93 92 94 93 class CountryAdmin(admin.ModelAdmin): … … 101 100 102 101 class AddressAdmin(admin.ModelAdmin): 103 #date_hierarchy = 'created_on'104 102 fieldsets = ( 105 103 ('Location', {'fields': ('address', 'postalcode', 'city', 'country'), … … 138 136 (None, {'fields': (('room', 'label', 'capacity'),)}), 139 137 GlobalAdmin.extra_fieldset) 140 list_display = (' address', 'room', 'label')138 list_display = ('label', 'address', 'room') 141 139 list_filter = ('room',) + GlobalAdmin.list_filter 142 140 … … 144 142 class InterfaceAdmin(admin.ModelAdmin): 145 143 fieldsets = ( 146 ('Physical', {'fields': (('iftype', 'host'), 'hwaddress', 'ip')}),144 ('Physical', {'fields': (('iftype', 'host'), ('hwaddress', 'ip'))}), 147 145 ('Network', {'fields': ('network', ('label', 'aliases'))}), 148 146 GlobalAdmin.extra_fieldset) 149 list_display = ('__unicode__', ' hwaddress', 'ip', 'network', 'iftype')147 list_display = ('__unicode__', 'network', 'hwaddress', 'ip', 'iftype') 150 148 list_filter = ('network', 'iftype') + GlobalAdmin.list_filter 151 149 search_fields = ('label', 'aliases', 'hwaddress', 'ip', 'host__label') … … 154 152 class InterfaceTypeAdmin(admin.ModelAdmin): 155 153 fieldsets = ( 156 ('Properties', {'fields': ( 'label', 'vendor')}),154 ('Properties', {'fields': (('label', 'vendor'),)}), 157 155 GlobalAdmin.extra_fieldset) 158 156 list_display = ('label', 'vendor') … … 170 168 fieldsets = ( 171 169 ('Vendor-specific', {'fields': ('vendor', 'name', 'vendorcode')}), 172 ('Dimensions', {'fields': ( 'expansions', 'rackspace')}),170 ('Dimensions', {'fields': (('rackspace', 'expansions'),)}), 173 171 GlobalAdmin.extra_fieldset) 174 172 … … 183 181 GlobalAdmin.extra_fieldset) 184 182 list_display = ('name', 'vlan', 'cidr', 'gateway', 'domain', 'hostnames', 185 ' _max_hosts', 'count_ips_assigned', 'count_ips_free')183 'count_ips_assigned', 'count_ips_free') 186 184 list_filter = GlobalAdmin.list_filter 187 185 … … 208 206 class WarrantyContractAdmin(admin.ModelAdmin): 209 207 fieldsets = ( 210 (None, {'fields': ( 'label', ('warranty_type','contract_number', 'annual_cost'))}),208 (None, {'fields': (('label', 'warranty_type'), ('contract_number', 'annual_cost'))}), 211 209 ('Period', {'fields': (('date_from', 'date_to'),)}), 212 210 GlobalAdmin.extra_fieldset) … … 218 216 class WarrantyTypeAdmin(admin.ModelAdmin): 219 217 fieldsets = ( 220 (None, {'fields': ( 'label', 'contact')}),218 (None, {'fields': (('label', 'contact'),)}), 221 219 GlobalAdmin.extra_fieldset) 222 220 -
trunk/sara_cmt/sara_cmt/cluster/models.py
r13019 r13028 165 165 166 166 class Meta: 167 unique_together = ( ('network', 'ip'), ('network', 'hwaddress'))167 unique_together = ('network', 'hwaddress') 168 168 ordering = ('host__cluster__name', 'host__rack__label', 'host__first_slot') 169 169
Note: See TracChangeset
for help on using the changeset viewer.