]> git.proxmox.com Git - pmg-gui.git/blame - js/Certificates.js
add certificates and acme view
[pmg-gui.git] / js / Certificates.js
CommitLineData
c083fb77
WB
1Ext.define('PMG.CertificateConfiguration', {
2 extend: 'Ext.tab.Panel',
3 alias: 'widget.pmgCertificateConfiguration',
4
5 title: gettext('Certificates'),
6
7 border: false,
8 defaults: { border: false },
9
10 items: [
11 {
12 itemId: 'certificates',
13 xtype: 'pmgCertificatesView',
14 },
15 {
16 itemId: 'acme',
17 xtype: 'pmgACMEConfigView',
18 },
19 ],
20});
21
22Ext.define('PMG.CertificateView', {
23 extend: 'Ext.container.Container',
24 alias: 'widget.pmgCertificatesView',
25
26 title: gettext('Certificates'),
27
28 items: [
29 {
30 xtype: 'pmxCertificates',
31 border: 0,
32 infoUrl: '/nodes/' + Proxmox.NodeName + '/certificates/info',
33 uploadButtons: [
34 {
35 name: 'API',
36 id: 'pmg-api.pem',
37 url: `/nodes/${Proxmox.NodeName}/certificates/custom/api`,
38 deletable: false,
39 reloadUi: true,
40 },
41 {
42 name: 'SMTP',
43 id: 'pmg-tls.pem',
44 url: `/nodes/${Proxmox.NodeName}/certificates/custom/smtp`,
45 deletable: true,
46 },
47 ],
48 },
49 {
50 xtype: 'pmxACMEDomains',
51 border: 0,
52 url: `/nodes/${Proxmox.NodeName}/config`,
53 nodename: Proxmox.NodeName,
54 acmeUrl: '/config/acme',
55 domainUsages: [
56 {
57 usage: 'api',
58 name: 'API',
59 url: `/nodes/${Proxmox.NodeName}/certificates/acme/api`,
60 reloadUi: true,
61 },
62 {
63 usage: 'smtp',
64 name: 'SMTP',
65 url: `/nodes/${Proxmox.NodeName}/certificates/acme/smtp`,
66 },
67 ],
68 },
69 ],
70});
71
72Ext.define('PMG.ACMEConfigView', {
73 extend: 'Ext.panel.Panel',
74 alias: 'widget.pmgACMEConfigView',
75
76 title: gettext('ACME Accounts'),
77
78 //onlineHelp: 'sysadmin_certificate_management',
79
80 items: [
81 {
82 region: 'north',
83 border: false,
84 xtype: 'pmxACMEAccounts',
85 acmeUrl: '/config/acme',
86 },
87 {
88 region: 'center',
89 border: false,
90 xtype: 'pmxACMEPluginView',
91 acmeUrl: '/config/acme',
92 },
93 ],
94});
95
96