class BrandForm(newModelForm): name = forms.CharField( max_length=255, label=_('Name'), widget=forms.TextInput(attrs={'class': 'form-control'})) company = newChoiceField( choices=(), label=_('Company'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) comment = forms.CharField( max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) status = newChoiceField( choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) is_dynamic = newChoiceField( choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) is_deleted = newChoiceField( choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class': 'form-control'}))
class CdnForm(newModelForm): company = newChoiceField( choices=(), label=_('Supplier'), widget=forms.Select(attrs={'class': 'form-control'})) contract = newChoiceField( choices=(), label=string_concat(_('Contract'), ' ', _('ID')), widget=forms.Select(attrs={'class': 'form-control'})) domain_record = forms.ModelMultipleChoiceField( queryset=DomainRecord.objects.order_by('id'), label=_('Domain Record'), widget=forms.SelectMultiple(attrs={'class': 'form-control'})) comment = forms.CharField( max_length=255, label=string_concat(_('Supplier'), ' ', _('Comment')), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) status = newChoiceField( choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) is_dynamic = newChoiceField( choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) is_deleted = newChoiceField( choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class': 'form-control'}))
class CabinetSeatForm(newModelForm): cabinet = newChoiceField( choices=(), label=_('Cabinet'), widget=forms.Select(attrs={'class': 'form-control'})) cabinet_seat_location = forms.CharField( max_length=255, label=_('Cabinet Seat location'), widget=forms.TextInput(attrs={'class': 'form-control'})) status = newChoiceField( choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) comment = forms.CharField( max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) is_dynamic = newChoiceField( choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) is_deleted = newChoiceField( choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class': 'form-control'}))
class IpResourceForm(newModelForm): idc_contract = newChoiceField( choices=(), label=_('Idc Contract'), widget=forms.Select(attrs={'class': 'form-control'})) alias = forms.CharField( max_length=45, label=_('Alias'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) purpose = newChoiceField( choices=(), label=_('Purpose'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) operator = newChoiceField( choices=(), label=_('Operator'), widget=forms.Select(attrs={'class': 'form-control'})) begin_ip = forms.CharField( max_length=255, label=_('Begin IP'), widget=forms.TextInput(attrs={'class': 'form-control'})) end_ip = forms.CharField( max_length=255, label=_('End IP'), widget=forms.TextInput(attrs={'class': 'form-control'})) mask = forms.CharField( max_length=255, label=_('Mask'), widget=forms.TextInput(attrs={'class': 'form-control'})) gateway = forms.CharField( max_length=255, label=_('Gateway'), widget=forms.TextInput(attrs={'class': 'form-control'})) dns = forms.CharField( max_length=255, label=_('Dns'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) comment = forms.CharField( max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) status = newChoiceField( choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class': 'form-control'}))
class PhysicalServerForm(newModelForm): uuid = forms.CharField(max_length=255, label=_('UUID'), widget=AutoGetVal(g_url='cmdb:get_uuid', d_type='cmdb.uuid',attrs={'class':'form-control'})) #ip_record = forms.ModelMultipleChoiceField( queryset=IpRecord.objects.filter(status=1).order_by('id'),label=_('IP'), required=False, widget=forms.SelectMultiple(attrs={'class':'form-control'})) manufacturer = newChoiceField(choices=(), label=_('Manufacturer'), required=False, widget=forms.Select(attrs={'class':'form-control'})) brand = newChoiceField(choices=(), label=_('Brand'), required=False, widget=forms.Select(attrs={'class':'form-control'})) idc_device_num = forms.CharField(max_length=255, required=False, label=_('Idc Device num'), widget=forms.TextInput(attrs={'class':'form-control'})) volume = forms.IntegerField( label=_('Volume'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) model_num = forms.CharField(max_length=255, label=_('Model'), widget=forms.TextInput(attrs={'class':'form-control'})) serial = forms.CharField(max_length=255, label=_('Serial'), widget=forms.TextInput(attrs={'class':'form-control'})) asset_num = forms.CharField(max_length=255, label=_('Asset num'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) order_num = forms.CharField(max_length=255, label=_('Order num'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) price = forms.IntegerField(label=_('Price'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) order_date = forms.CharField(max_length=255, label=_('Order date'), required=False, widget=newDateTimeInput(d_type='onlydate', attrs={'class':'form-control'})) warranty_period = forms.CharField(max_length=255, label=_('Warranty period'), required=False, widget=newDateTimeInput(d_type='onlydate', attrs={'class':'form-control'})) processor = forms.CharField(max_length=255, label=_('Processor'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) memory = forms.CharField(max_length=255, label=_('Memory'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) harddisk = forms.CharField(max_length=255, label=_('Harddisk'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) contrl_card = forms.CharField(max_length=255, label=_('Contrl card'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) network_card = forms.CharField(max_length=255, label=_('Network card'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) operating_system = forms.CharField(max_length=255, label=_('Operating System'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) comment = forms.CharField(max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) status = newChoiceField(choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_run = newChoiceField(choices=(), label=_('Is run'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_control_card = newChoiceField(choices=(), label=_('Is control card'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_virtualization = newChoiceField(choices=(), label=_('Is virtualization'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_dynamic = newChoiceField(choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_deleted = newChoiceField(choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class':'form-control'}))
class IpRecordForm(newModelForm): ip_resource = newChoiceField( choices=(), label=_('IP Resource'), widget=forms.Select(attrs={'class': 'form-control'})) alias = forms.CharField( max_length=255, label=_('Alias'), widget=forms.TextInput(attrs={'class': 'form-control'})) purpose = newChoiceField( choices=(), label=_('Purpose'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) ip_address = forms.CharField( max_length=255, label=_('IP address'), widget=forms.TextInput(attrs={'class': 'form-control'})) mask = forms.CharField( max_length=255, label=_('Mask'), widget=forms.TextInput(attrs={'class': 'form-control'})) gateway = forms.CharField( max_length=255, label=_('Gateway'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) status = newChoiceField( choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) comment = forms.CharField( max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) is_dynamic = newChoiceField( choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) is_deleted = newChoiceField( choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class': 'form-control'}))
class DomainRecordForm(newModelForm): domain_name = newChoiceField( choices=(), label=_('Domain name'), widget=forms.Select(attrs={'class': 'form-control'})) ip_record = forms.ModelMultipleChoiceField( queryset=IpRecord.objects.order_by('id'), label=_('IP'), widget=forms.SelectMultiple(attrs={'class': 'form-control'}), required=False) record_type = forms.ChoiceField( choices=(), label=_('Record Type'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) record_value = forms.CharField( max_length=255, label=_('Record Value'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) host_name = forms.CharField( max_length=255, label=_('Host Name'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) status = newChoiceField( choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) comment = forms.CharField( max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) is_dynamic = newChoiceField( choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) is_deleted = newChoiceField( choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class': 'form-control'}))
class IdcContractForm(newModelForm): idc = newChoiceField(choices=(), label=_('IDC'), widget=forms.Select(attrs={'class': 'form-control'})) contract = newChoiceField( choices=(), label=_('Contract'), widget=forms.Select(attrs={'class': 'form-control'})) is_dynamic = newChoiceField( choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) is_deleted = newChoiceField( choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class': 'form-control'}))
class CdnDomainRecordForm(newModelForm): cdn = newChoiceField(choices=(), label=_('CDN'), widget=forms.Select(attrs={'class': 'form-control'})) domain_record = newChoiceField( choices=(), label=_('Domain Record'), widget=forms.Select(attrs={'class': 'form-control'})) is_dynamic = newChoiceField( choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) is_deleted = newChoiceField( choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class': 'form-control'}))
class IdcForm(newModelForm): contract = forms.ModelMultipleChoiceField( queryset=Contract.objects.order_by('id'), label=_('Contract'), widget=forms.SelectMultiple(attrs={'class': 'form-control'})) idc_name = forms.CharField( max_length=255, label=string_concat(_('IDC'), ' ', _('Name')), widget=forms.TextInput(attrs={'class': 'form-control'})) idc_address = forms.CharField( max_length=255, label=string_concat(_('IDC'), ' ', _('Address')), widget=forms.TextInput(attrs={'class': 'form-control'})) company = newChoiceField( choices=(), label=_('Company'), widget=forms.Select(attrs={'class': 'form-control'})) status = newChoiceField( choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) comment = forms.CharField( max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) is_dynamic = newChoiceField( choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) is_deleted = newChoiceField( choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class': 'form-control'}))
class DeviceForm(newModelForm): contract = newChoiceField( choices=(), label=_('Contract'), widget=forms.Select(attrs={'class': 'form-control'})) cabinet_seat = newChoiceField( choices=(), label=_('Cabinet Seat'), widget=forms.Select(attrs={'class': 'form-control'}), filter_status=0) type = forms.CharField(max_length=255, label=_('Type'), widget=forms.HiddenInput()) device_id = forms.CharField(max_length=255, label=_('Device ID'), widget=forms.HiddenInput()) is_dynamic = newChoiceField(choices=(), label=_('Is dynamic'), required=False, widget=forms.HiddenInput()) is_deleted = newChoiceField(choices=(), label=_('Is deleted'), required=False, widget=forms.HiddenInput())
class ContractForm(newModelForm): contract_serial = forms.CharField(max_length=255, label=string_concat(_('Contract')," ", _('serial')), widget=forms.TextInput(attrs={'class':'form-control'})) contract_name = forms.CharField(max_length=255, label=string_concat(_('Contract')," ", _('name')), widget=forms.TextInput(attrs={'class':'form-control'})) contract_type = newChoiceField(choices=(), label=string_concat(_('Contract')," ", _('type')),widget=forms.Select(attrs={'class':'form-control'})) contract_outline = forms.CharField(max_length=1800, label=string_concat(_('Contract')," ", _('outline')),widget=forms.Textarea(attrs={'class':'form-control'})) company = newChoiceField(choices=(), label= _('Supplier'), widget=forms.Select(attrs={'class':'form-control'})) signing_time = forms.CharField(max_length=255, label=_('Signing time'), required=False, widget=newDateTimeInput(d_type='onlydate', attrs={'class':'form-control'})) deadline = forms.CharField(max_length=255, label=_('Deadline'), required=False, widget=newDateTimeInput(d_type='onlydate', attrs={'class':'form-control'})) signers_contacts = newChoiceField(choices=(), label=string_concat(_('Signers'),' ', _('contacts')), widget=forms.Select(attrs={'class':'form-control'})) supplier_contacts = newChoiceField(choices=(), label=string_concat(_('Supplier'),' ', _('contacts')), widget=forms.Select(attrs={'class':'form-control'})) status = newChoiceField(choices=(), label=_('Status'), widget=forms.Select(attrs={'class':'form-control'})) comment = forms.CharField(max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) is_dynamic = newChoiceField(choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_deleted = newChoiceField(choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class':'form-control'}))
class DomainNameForm(newModelForm): contract = newChoiceField( choices=(), label=_('Contract'), widget=forms.Select(attrs={'class': 'form-control'})) name = forms.CharField( max_length=255, label=_('Name'), widget=forms.TextInput(attrs={'class': 'form-control'})) application_date = forms.CharField(max_length=255, label=_('Application Date'), required=False, widget=newDateTimeInput( d_type='onlydate', attrs={'class': 'form-control'})) deadline = forms.CharField(max_length=255, label=_('Deadline'), required=False, widget=newDateTimeInput( d_type='onlydate', attrs={'class': 'form-control'})) resolution_supplier = newChoiceField( choices=(), label=_('Resolution Supplier'), widget=forms.Select(attrs={'class': 'form-control'})) supplier = newChoiceField( choices=(), label=_('Supplier'), widget=forms.Select(attrs={'class': 'form-control'})) dns_server = forms.CharField( max_length=255, label=_('Dns Server'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) status = newChoiceField( choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) comment = forms.CharField( max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) is_dynamic = newChoiceField( choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) is_deleted = newChoiceField( choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class': 'form-control'}))
class ContactsForm(newModelForm): name = forms.CharField( max_length=255, label=string_concat(_('Contact'), " ", _('name')), widget=forms.TextInput(attrs={'class': 'form-control'})) job_titles = forms.CharField( max_length=255, label=_('Job titles'), widget=forms.TextInput(attrs={'class': 'form-control'})) company = newChoiceField( choices=(), label=_('Company'), widget=forms.Select(attrs={'class': 'form-control'})) mail = forms.EmailField( max_length=255, label=_('Email'), required=False, widget=forms.EmailInput(attrs={'class': 'form-control'})) im_num = forms.CharField( max_length=255, label=_('IM'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) phone = forms.CharField( max_length=255, label=_('Phone'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) mobile_phone = forms.CharField( max_length=255, label=_('Mobile phone'), widget=forms.TextInput(attrs={'class': 'form-control'})) address = forms.CharField( max_length=255, label=_('Address'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) comment = forms.CharField( max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'}))
class NetworkEquipmentForm(newModelForm): uuid = forms.CharField(max_length=255, label=_('UUID'), widget=AutoGetVal(g_url='cmdb:get_uuid', d_type='cmdb.uuid',attrs={'class':'form-control'})) ip_record = forms.ModelMultipleChoiceField( queryset=IpRecord.objects.exclude(status=0).order_by('id'),label=_('IP'), required=False, widget=forms.SelectMultiple(attrs={'class':'form-control'})) serial = forms.CharField(max_length=255, label=_('Serial'), widget=forms.TextInput(attrs={'class':'form-control'})) manufacturer = newChoiceField(choices=(), label=_('Manufacturer'), required=False, widget=forms.Select(attrs={'class':'form-control'})) brand = newChoiceField(choices=(), label=_('Brand'), required=False, widget=forms.Select(attrs={'class':'form-control'})) model_num = forms.CharField(max_length=255, label=_('Model'), widget=forms.TextInput(attrs={'class':'form-control'})) equipment_type = newChoiceField(choices=(), label=_('Equipment Type'), widget=forms.Select(attrs={'class':'form-control'})) total_ports = forms.IntegerField(label=_('Total ports'), widget=forms.TextInput(attrs={'class':'form-control'})) idc_device_num = forms.CharField(max_length=255, label=_('Idc Device num'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) volume = forms.IntegerField(label=_('Volume'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) asset_num = forms.CharField(max_length=255, label=_('Asset num'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) order_num = forms.CharField(max_length=255, label=_('Order num'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) price = forms.IntegerField(label=_('Price'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) order_date = forms.CharField(max_length=255, label=_('Order date'), required=False, widget=newDateTimeInput(d_type='onlydate', attrs={'class':'form-control'})) warranty_period = forms.CharField(max_length=255, label=_('Warranty period'), required=False, widget=newDateTimeInput(d_type='onlydate', attrs={'class':'form-control'})) processor = forms.CharField(max_length=255, label=_('Processor'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) comment = forms.CharField(max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) status = newChoiceField(choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_remote_control = newChoiceField(label=_('Is Remote Control'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_run = newChoiceField(label=_('Is Run'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_dynamic = newChoiceField(choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_deleted = newChoiceField(choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class':'form-control'}))
class HostForm(newModelForm): physical_server = newChoiceField(choices=(), label=_('Pyhsical server'), required=False, widget=forms.Select(attrs={'class':'form-control'})) uuid = forms.CharField(max_length=255, label=_('UUID'), widget=AutoGetVal(g_url='cmdb:get_uuid', d_type='cmdb.uuid',attrs={'class':'form-control'})) salt_id = forms.CharField(max_length=255, label=_('SaltID'), required=False, widget=AutoGetVal(g_url='cmdb:get_salt_id', d_type='cmdb.saltid',attrs={'class':'form-control'})) ip_record = forms.ModelMultipleChoiceField( queryset=IpRecord.objects.filter(status=1).order_by('id'),label=_('IP'), required=False, widget=forms.SelectMultiple(attrs={'class':'form-control'})) operating_system =forms.CharField(max_length=255, label=_('Operating system'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) os_version = forms.CharField(max_length=255, label=_('OS version'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) host_name = forms.CharField(max_length=255, label=_('Host name'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) processor = forms.CharField(max_length=255, label=_('Processor'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) memory = forms.CharField(max_length=255, label=_('Memory'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) harddisk = forms.CharField(max_length=255, label=_('Harddisk'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) roles = forms.CharField(max_length=255, label=_('Roles'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) status = newChoiceField(choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class':'form-control'})) comment = forms.CharField(max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) is_run = newChoiceField(choices=(), label=_('Is run'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_virtual_machine = newChoiceField(choices=(), label=_('Is virtual machine'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_dynamic = newChoiceField(choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_deleted = newChoiceField(choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class':'form-control'}))