| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- import validateForm from '@/utils/validate'
- import i18n from '@/locales'
- export const BILL_TYPES_MAP = {
- postpaid: {
- label: i18n.t('network.text_256'),
- key: 'postpaid',
- },
- prepaid: {
- label: i18n.t('network.text_257'),
- key: 'prepaid',
- },
- }
- export const DECORATORS = {
- eip: {
- type: [
- 'type',
- {
- initialValue: 'none',
- },
- ],
- charge_type: [
- 'charge_type',
- {
- initialValue: 'traffic',
- },
- ],
- bgp_type: [
- 'bgp_type',
- {
- initialValue: '',
- },
- ],
- bandwidth: [
- 'bandwidth',
- {
- initialValue: 30,
- validateFirst: true,
- },
- ],
- eip: [
- 'eip',
- {
- rules: [
- { required: true, message: i18n.t('compute.text_145'), trigger: 'change' },
- ],
- },
- ],
- },
- billing_type: [
- 'billing_type',
- {
- initialValue: 'postpaid',
- },
- ],
- duration: {
- durationStandard: [
- 'durationStandard',
- {
- initialValue: 'none',
- },
- ],
- duration: [
- 'duration',
- {
- initialValue: '1h',
- },
- ],
- },
- project_domain: [
- 'project_domain',
- {
- initialValue: undefined,
- },
- ],
- name: [
- 'name',
- {
- validateFirst: true,
- rules: [
- { required: true, message: i18n.t('network.text_218') },
- { validator: validateForm('serverName') },
- ],
- },
- ],
- description: ['description'],
- __meta__: [
- '__meta__',
- {
- rules: [
- { validator: validateForm('tagName') },
- ],
- },
- ],
- }
- // capbilit接口所需要的参数
- export const CAPABILIT_PARAMS = ['city', 'provider', 'cloudregion']
- export const SKU_PARAMS = [...CAPABILIT_PARAMS]
|