From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 0056B75C69 for ; Thu, 22 Apr 2021 16:02:56 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EBA0B1CDC9 for ; Thu, 22 Apr 2021 16:02:26 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 2A8BE1CC7E for ; Thu, 22 Apr 2021 16:02:20 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 0314746379 for ; Thu, 22 Apr 2021 16:02:20 +0200 (CEST) From: Wolfgang Bumiller To: pbs-devel@lists.proxmox.com Date: Thu, 22 Apr 2021 16:02:09 +0200 Message-Id: <20210422140213.30989-24-w.bumiller@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210422140213.30989-1-w.bumiller@proxmox.com> References: <20210422140213.30989-1-w.bumiller@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.066 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH v2 backup 23/27] ui: add certificate & acme view X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 14:02:57 -0000 Signed-off-by: Wolfgang Bumiller --- Changes to v1: Added a missing semicolon. www/Makefile | 1 + www/NavigationTree.js | 6 +++ www/config/CertificateView.js | 80 +++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 www/config/CertificateView.js diff --git a/www/Makefile b/www/Makefile index 2b847e74..f0b795ca 100644 --- a/www/Makefile +++ b/www/Makefile @@ -53,6 +53,7 @@ JSSRC= \ config/SyncView.js \ config/VerifyView.js \ config/WebauthnView.js \ + config/CertificateView.js \ window/ACLEdit.js \ window/AddTfaRecovery.js \ window/AddTotp.js \ diff --git a/www/NavigationTree.js b/www/NavigationTree.js index 8b1b96d9..6035526c 100644 --- a/www/NavigationTree.js +++ b/www/NavigationTree.js @@ -50,6 +50,12 @@ Ext.define('PBS.store.NavigationStore', { path: 'pbsRemoteView', leaf: true, }, + { + text: gettext('Certificates'), + iconCls: 'fa fa-certificate', + path: 'pbsCertificateConfiguration', + leaf: true, + }, { text: gettext('Subscription'), iconCls: 'fa fa-support', diff --git a/www/config/CertificateView.js b/www/config/CertificateView.js new file mode 100644 index 00000000..d1e26632 --- /dev/null +++ b/www/config/CertificateView.js @@ -0,0 +1,80 @@ +Ext.define('PBS.config.CertificateConfiguration', { + extend: 'Ext.tab.Panel', + alias: 'widget.pbsCertificateConfiguration', + + title: gettext('Certificates'), + + border: false, + defaults: { border: false }, + + items: [ + { + itemId: 'certificates', + xtype: 'pbsCertificatesView', + }, + { + itemId: 'acme', + xtype: 'pbsACMEConfigView', + }, + ], +}); + +Ext.define('PBS.config.CertificatesView', { + extend: 'Ext.panel.Panel', + alias: 'widget.pbsCertificatesView', + + title: gettext('Certificates'), + border: false, + defaults: { + border: false, + }, + + items: [ + { + xtype: 'pmxCertificates', + nodename: 'localhost', + infoUrl: '/nodes/localhost/certificates/info', + uploadButtons: [ + { + id: 'proxy.pem', + url: '/nodes/localhost/certificates/custom', + deletable: true, + reloadUi: true, + }, + ], + }, + { + xtype: 'pmxACMEDomains', + border: 0, + url: `/nodes/localhost/config`, + nodename: 'localhost', + acmeUrl: '/config/acme', + orderUrl: `/nodes/localhost/certificates/acme/certificate`, + separateDomainEntries: true, + }, + ], +}); + +Ext.define('PBS.ACMEConfigView', { + extend: 'Ext.panel.Panel', + alias: 'widget.pbsACMEConfigView', + + title: gettext('ACME Accounts'), + + //onlineHelp: 'sysadmin_certificate_management', + + items: [ + { + region: 'north', + border: false, + xtype: 'pmxACMEAccounts', + acmeUrl: '/config/acme', + }, + { + region: 'center', + border: false, + xtype: 'pmxACMEPluginView', + acmeUrl: '/config/acme', + }, + ], +}); -- 2.20.1