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 9938E73ADB for ; Fri, 16 Apr 2021 15:35:54 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 185A124EF2 for ; Fri, 16 Apr 2021 15:35:29 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 0B44C24C82 for ; Fri, 16 Apr 2021 15:35:24 +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 CB47D45B34 for ; Fri, 16 Apr 2021 15:35:23 +0200 (CEST) From: Wolfgang Bumiller To: pbs-devel@lists.proxmox.com Date: Fri, 16 Apr 2021 15:35:15 +0200 Message-Id: <20210416133517.23349-23-w.bumiller@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210416133517.23349-1-w.bumiller@proxmox.com> References: <20210416133517.23349-1-w.bumiller@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.119 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_2 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_4 0.1 random spam to be learned in bayes RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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] [RFC backup 22/23] 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: Fri, 16 Apr 2021 13:35:54 -0000 Signed-off-by: Wolfgang Bumiller --- 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..8472ad64 --- /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