stage 2, not completed
This commit is contained in:
parent
88b2255f8b
commit
34fb2a478b
@ -86,6 +86,7 @@ func GetDomains(domain string) ([]models.Domain, error) {
|
|||||||
|
|
||||||
func UpdateDomain(d *models.Domain) error {
|
func UpdateDomain(d *models.Domain) error {
|
||||||
tx := database.Client.Begin()
|
tx := database.Client.Begin()
|
||||||
|
logrus.Debug(d)
|
||||||
if _, err := (domainsDAO{}).Update(tx, d); err != nil {
|
if _, err := (domainsDAO{}).Update(tx, d); err != nil {
|
||||||
tx.Rollback()
|
tx.Rollback()
|
||||||
return err
|
return err
|
||||||
|
@ -79,6 +79,7 @@ export default function DomainEditModal({ open, domain, editDomain, createDomain
|
|||||||
scrollToFirstError
|
scrollToFirstError
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
>
|
>
|
||||||
|
<Form.Item<Domain> hidden name='id' />
|
||||||
<Form.Item<Domain>
|
<Form.Item<Domain>
|
||||||
label={t('domains._')}
|
label={t('domains._')}
|
||||||
name='domain_name'
|
name='domain_name'
|
||||||
|
@ -15,7 +15,7 @@ export default function DomainInfo({ domain }: Props) {
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<GlobalOutlined className="icon-info" />
|
<GlobalOutlined className="icon-info" />
|
||||||
<span className="info">{domain.domain_name}</span>
|
<span className="info">{domain.main_dns}</span>
|
||||||
</p>
|
</p>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
@ -226,6 +226,7 @@ export default function RecordEditModal({ open, record, onOk, onCancel, editReco
|
|||||||
wrapperCol={{ span: 20 }}
|
wrapperCol={{ span: 20 }}
|
||||||
validateTrigger='onBlur'
|
validateTrigger='onBlur'
|
||||||
>
|
>
|
||||||
|
<Form.Item<Record> hidden name='id' />
|
||||||
<Form.Item<Record> label={t('records.recordType')} required name='record_type'>
|
<Form.Item<Record> label={t('records.recordType')} required name='record_type'>
|
||||||
<Select allowClear={false} options={recordTypeOptions} />
|
<Select allowClear={false} options={recordTypeOptions} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
@ -56,6 +56,7 @@ export const useDomainStore = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function updateDomain(domain: Domain) {
|
async function updateDomain(domain: Domain) {
|
||||||
|
console.log(domain)
|
||||||
if (!import.meta.env.DEV) {
|
if (!import.meta.env.DEV) {
|
||||||
await api.put("/domains", domain)
|
await api.put("/domains", domain)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user