File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed
app/src/views/certificate Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,10 @@ func GetDnsCredential(c *gin.Context) {
36
36
}
37
37
38
38
func GetDnsCredentialList (c * gin.Context ) {
39
- cosy.Core [model.DnsCredential ](c ).SetFussy ("provider" ).PagingList ()
39
+ cosy.Core [model.DnsCredential ](c ).
40
+ SetEqual ("provider" ).
41
+ SetFussy ("name" ).
42
+ PagingList ()
40
43
}
41
44
42
45
type DnsCredentialManageJson struct {
Original file line number Diff line number Diff line change 1
1
<script setup lang="tsx">
2
2
import type { CustomRenderArgs , StdTableColumn } from ' @uozi-admin/curd'
3
+ import type { DNSProvider } from ' @/api/auto_cert'
3
4
import type { DnsCredential } from ' @/api/dns_credential'
4
5
import { datetimeRender , StdCurd } from ' @uozi-admin/curd'
6
+ import auto_cert from ' @/api/auto_cert'
5
7
import dns_credential from ' @/api/dns_credential'
6
8
import DNSChallenge from ' ./components/DNSChallenge.vue'
7
9
10
+ const dnsProviders = ref <DNSProvider []>([])
11
+
12
+ onMounted (async () => {
13
+ dnsProviders .value = await auto_cert .get_dns_providers ()
14
+ })
15
+
8
16
const columns: StdTableColumn [] = [{
9
17
title : () => $gettext (' Name' ),
10
18
dataIndex: ' name' ,
@@ -13,14 +21,33 @@ const columns: StdTableColumn[] = [{
13
21
edit: {
14
22
type: ' input' ,
15
23
},
24
+ search: true ,
16
25
}, {
17
26
title : () => $gettext (' Provider' ),
18
- dataIndex: [ ' config ' , ' name ' ] ,
27
+ dataIndex: ' provider ' ,
19
28
customRender : ({ record }: CustomRenderArgs ) => {
20
29
return record .provider
21
30
},
22
31
sorter: true ,
23
32
pure: true ,
33
+ search: {
34
+ type: ' select' ,
35
+ select: {
36
+ remote: {
37
+ valueKey: ' name' ,
38
+ labelKey: ' name' ,
39
+ api : async () => {
40
+ return {
41
+ data: await auto_cert .get_dns_providers (),
42
+ }
43
+ },
44
+ },
45
+ showSearch: true ,
46
+ filterOption : (input , option ) => {
47
+ return option ?.label ?.toLowerCase ().includes (input .toLowerCase ()) ?? false
48
+ },
49
+ },
50
+ },
24
51
}, {
25
52
title : () => $gettext (' Configuration' ),
26
53
dataIndex: ' code' ,
You can’t perform that action at this time.
0 commit comments