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 4B56265AAC for ; Wed, 4 Nov 2020 15:35:40 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 40099EE0A for ; Wed, 4 Nov 2020 15:35:10 +0100 (CET) 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 C2232EE02 for ; Wed, 4 Nov 2020 15:35:09 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 8480846031 for ; Wed, 4 Nov 2020 15:35:09 +0100 (CET) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Wed, 4 Nov 2020 15:35:08 +0100 Message-Id: <20201104143508.20983-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.408 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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] [PATCH proxmox-backup] ui: add shell panel under administration 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: Wed, 04 Nov 2020 14:35:40 -0000 some users prefer an inline console we still have the pop-out console in 'Administration' Signed-off-by: Dominik Csapak --- www/Makefile | 1 + www/NavigationTree.js | 6 ++++++ www/panel/XtermJsConsole.js | 25 +++++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 www/panel/XtermJsConsole.js diff --git a/www/Makefile b/www/Makefile index affeb6a9..dc23e602 100644 --- a/www/Makefile +++ b/www/Makefile @@ -37,6 +37,7 @@ JSSRC= \ dashboard/RunningTasks.js \ dashboard/TaskSummary.js \ panel/Tasks.js \ + panel/XtermJsConsole.js \ Utils.js \ AccessControlPanel.js \ ZFSList.js \ diff --git a/www/NavigationTree.js b/www/NavigationTree.js index f0f48c0a..09c58938 100644 --- a/www/NavigationTree.js +++ b/www/NavigationTree.js @@ -55,6 +55,12 @@ Ext.define('PBS.store.NavigationStore', { expanded: true, leaf: false, children: [ + { + text: gettext('Shell'), + iconCls: 'fa fa-terminal', + path: 'pbsXtermJsConsole', + leaf: true, + }, { text: gettext('Disks'), iconCls: 'fa fa-hdd-o', diff --git a/www/panel/XtermJsConsole.js b/www/panel/XtermJsConsole.js new file mode 100644 index 00000000..dd83251f --- /dev/null +++ b/www/panel/XtermJsConsole.js @@ -0,0 +1,25 @@ +Ext.define('PBS.panel.XtermJsConsole', { + extend: 'Ext.panel.Panel', + alias: 'widget.pbsXtermJsConsole', + + layout: 'fit', + + items: [ + { + xtype: 'uxiframe', + itemId: 'iframe', + }, + ], + + listeners: { + 'afterrender': function() { + let me = this; + let params = { + console: 'shell', + node: 'localhost', + xtermjs: 1, + }; + me.getComponent('iframe').load('/?' + Ext.Object.toQueryString(params)); + }, + }, +}); -- 2.20.1