all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] ui: add shell panel under administration
Date: Wed,  4 Nov 2020 15:35:08 +0100	[thread overview]
Message-ID: <20201104143508.20983-1-d.csapak@proxmox.com> (raw)

some users prefer an inline console
we still have the pop-out console in 'Administration'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 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





             reply	other threads:[~2020-11-04 14:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 14:35 Dominik Csapak [this message]
2020-11-04 17:32 ` [pbs-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201104143508.20983-1-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal