|
2 | 2 | import {useGettext} from 'vue3-gettext'
|
3 | 3 | import {input} from '@/components/StdDataEntry'
|
4 | 4 | import {customRender, datetime} from '@/components/StdDataDisplay/StdTableTransformer'
|
5 |
| -import {h} from 'vue' |
6 | 5 | import {Badge} from 'ant-design-vue'
|
7 | 6 | import cert from '@/api/cert'
|
8 | 7 | import StdCurd from '@/components/StdDataDisplay/StdCurd.vue'
|
9 | 8 | import Template from '@/views/template/Template.vue'
|
10 | 9 | import CodeEditor from '@/components/CodeEditor/CodeEditor.vue'
|
11 | 10 | import CertInfo from '@/views/domain/cert/CertInfo.vue'
|
| 11 | +import {h} from 'vue' |
12 | 12 |
|
13 |
| -const {$gettext} = useGettext() |
| 13 | +const {$gettext, interpolate} = useGettext() |
14 | 14 |
|
15 | 15 | const columns = [{
|
16 | 16 | title: () => $gettext('Name'),
|
@@ -81,11 +81,33 @@ const columns = [{
|
81 | 81 | row-key="name"
|
82 | 82 | >
|
83 | 83 | <template #beforeEdit="{data}">
|
84 |
| - <div v-if="data.auto_cert===1" style="margin-bottom: 15px"> |
85 |
| - <a-alert |
86 |
| - :message="$gettext('Auto cert is enabled, please do not modify this certification.')" type="info" |
87 |
| - show-icon/> |
88 |
| - </div> |
| 84 | + <template v-if="data.auto_cert===1"> |
| 85 | + <div style="margin-bottom: 15px"> |
| 86 | + <a-alert |
| 87 | + :message="$gettext('Auto cert is enabled, please do not modify this certification.')" |
| 88 | + type="info" |
| 89 | + show-icon/> |
| 90 | + </div> |
| 91 | + <div v-if="!data.filename" style="margin-bottom: 15px"> |
| 92 | + <a-alert |
| 93 | + :message="$gettext('This auto-cert item is invalid, please remove it.')" |
| 94 | + type="error" |
| 95 | + show-icon/> |
| 96 | + </div> |
| 97 | + <div v-else-if="!data.domains" style="margin-bottom: 15px"> |
| 98 | + <a-alert |
| 99 | + :message="interpolate($gettext('Domains list is empty, try to reopen auto-cert for %{config}'), {config: data.filename})" |
| 100 | + type="error" |
| 101 | + show-icon/> |
| 102 | + </div> |
| 103 | + <div v-if="data.log" style="margin-bottom: 15px"> |
| 104 | + <a-form layout="vertical"> |
| 105 | + <a-form-item :label="$gettext('Auto-Cert Log')"> |
| 106 | + <p>{{ data.log }}</p> |
| 107 | + </a-form-item> |
| 108 | + </a-form> |
| 109 | + </div> |
| 110 | + </template> |
89 | 111 | <a-form layout="vertical" v-if="data.certificate_info">
|
90 | 112 | <a-form-item :label="$gettext('Certificate Status')">
|
91 | 113 | <cert-info :cert="data.certificate_info"/>
|
|
0 commit comments