pmg-gui/js/Certificates.js
Thomas Lamprecht a78fbb7037 certs: show onlineHelp tool linking directly to context chapter
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-18 10:42:09 +01:00

99 lines
1.9 KiB
JavaScript

Ext.define('PMG.CertificateConfiguration', {
extend: 'Ext.tab.Panel',
alias: 'widget.pmgCertificateConfiguration',
title: gettext('Certificates'),
...PMG.Utils.onlineHelpTool('sysadmin_certificate_management'),
border: false,
defaults: { border: false },
items: [
{
itemId: 'certificates',
xtype: 'pmgCertificatesView',
},
{
itemId: 'acme',
xtype: 'pmgACMEConfigView',
},
],
});
Ext.define('PMG.CertificateView', {
extend: 'Ext.panel.Panel',
alias: 'widget.pmgCertificatesView',
title: gettext('Certificates'),
items: [
{
xtype: 'pmxCertificates',
border: 0,
infoUrl: '/nodes/' + Proxmox.NodeName + '/certificates/info',
uploadButtons: [
{
name: 'API',
id: 'pmg-api.pem',
url: `/nodes/${Proxmox.NodeName}/certificates/custom/api`,
deletable: false,
reloadUi: true,
},
{
name: 'SMTP',
id: 'pmg-tls.pem',
url: `/nodes/${Proxmox.NodeName}/certificates/custom/smtp`,
deletable: true,
},
],
},
{
xtype: 'pmxACMEDomains',
border: 0,
url: `/nodes/${Proxmox.NodeName}/config`,
nodename: Proxmox.NodeName,
acmeUrl: '/config/acme',
domainUsages: [
{
usage: 'api',
name: 'API',
url: `/nodes/${Proxmox.NodeName}/certificates/acme/api`,
reloadUi: true,
},
{
usage: 'smtp',
name: 'SMTP',
url: `/nodes/${Proxmox.NodeName}/certificates/acme/smtp`,
},
],
},
],
});
Ext.define('PMG.ACMEConfigView', {
extend: 'Ext.panel.Panel',
alias: 'widget.pmgACMEConfigView',
title: gettext('ACME Accounts/Challenges'),
//onlineHelp: 'sysadmin_certificate_management',
items: [
{
xtype: 'pmxACMEAccounts',
region: 'north',
border: false,
acmeUrl: '/config/acme',
},
{
xtype: 'pmxACMEPluginView',
region: 'center',
border: false,
acmeUrl: '/config/acme',
},
],
});