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 0F54DDE90 for ; Mon, 17 Jul 2023 17:02:20 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7EA83FD30 for ; Mon, 17 Jul 2023 17:01:32 +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 for ; Mon, 17 Jul 2023 17:01:29 +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 7ED8242BCA for ; Mon, 17 Jul 2023 17:01:25 +0200 (CEST) From: Lukas Wagner To: pve-devel@lists.proxmox.com Date: Mon, 17 Jul 2023 17:00:47 +0200 Message-Id: <20230717150051.710464-63-l.wagner@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230717150051.710464-1-l.wagner@proxmox.com> References: <20230717150051.710464-1-l.wagner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.118 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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 T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH v3 proxmox-widget-toolkit 62/66] notification: add gui for gotify notification endpoints X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2023 15:02:20 -0000 Signed-off-by: Lukas Wagner --- src/Makefile | 1 + src/Schema.js | 5 ++++ src/panel/GotifyEditPanel.js | 52 ++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 src/panel/GotifyEditPanel.js diff --git a/src/Makefile b/src/Makefile index e83038f..2e620e3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -66,6 +66,7 @@ JSSRC= \ panel/PruneKeepPanel.js \ panel/RRDChart.js \ panel/GaugeWidget.js \ + panel/GotifyEditPanel.js \ panel/Certificates.js \ panel/ACMEAccount.js \ panel/ACMEPlugin.js \ diff --git a/src/Schema.js b/src/Schema.js index 99bb3fa..37ecd88 100644 --- a/src/Schema.js +++ b/src/Schema.js @@ -43,6 +43,11 @@ Ext.define('Proxmox.Schema', { // a singleton ipanel: 'pmxSendmailEditPanel', iconCls: 'fa-envelope-o', }, + gotify: { + name: gettext('Gotify'), + ipanel: 'pmxGotifyEditPanel', + iconCls: 'fa-bell-o', + }, }, pxarFileTypes: { diff --git a/src/panel/GotifyEditPanel.js b/src/panel/GotifyEditPanel.js new file mode 100644 index 0000000..a661c1a --- /dev/null +++ b/src/panel/GotifyEditPanel.js @@ -0,0 +1,52 @@ +Ext.define('Proxmox.panel.GotifyEditPanel', { + extend: 'Proxmox.panel.InputPanel', + xtype: 'pmxGotifyEditPanel', + mixins: ['Proxmox.Mixin.CBind'], + + type: 'gotify', + + columnT: [ + { + xtype: 'pmxDisplayEditField', + name: 'name', + cbind: { + value: '{name}', + editable: '{isCreate}', + }, + fieldLabel: gettext('Endpoint Name'), + allowBlank: false, + }, + { + xtype: 'proxmoxtextfield', + fieldLabel: gettext('Server URL'), + name: 'server', + allowBlank: false, + }, + { + xtype: 'proxmoxtextfield', + inputType: 'password', + fieldLabel: gettext('API Token'), + name: 'token', + cbind: { + emptyText: get => !get('isCreate') ? gettext('Unchanged') : '', + allowBlank: '{!isCreate}', + }, + }, + ], + + column1: [], + + column2: [], + + columnB: [ + { + xtype: 'proxmoxtextfield', + name: 'comment', + fieldLabel: gettext('Comment'), + cbind: { + deleteEmpty: '{!isCreate}', + }, + }, + ], +}); + -- 2.39.2