From 9c01e73c2fa9bc0e1f7fa004072c460131090fe6 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 16 Dec 2019 18:16:06 +0100 Subject: [PATCH] ui: add "Documentation" button to main view Similar to PVE and PMG, for quick access when one has the basic webinterface open anyway. Should move to the "proxmoxHelpButton" once we have an onlineHelp mapping to the docs. Signed-off-by: Thomas Lamprecht --- src/bin/proxmox-backup-proxy.rs | 1 + www/MainView.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs index 716c6888..652d7dad 100644 --- a/src/bin/proxmox-backup-proxy.rs +++ b/src/bin/proxmox-backup-proxy.rs @@ -48,6 +48,7 @@ async fn run() -> Result<(), Error> { config.add_alias("xtermjs", "/usr/share/pve-xtermjs"); config.add_alias("widgettoolkit", "/usr/share/javascript/proxmox-widget-toolkit"); config.add_alias("css", "/usr/share/javascript/proxmox-backup/css"); + config.add_alias("docs", "/usr/share/doc/proxmox-backup/html"); let rest_server = RestServer::new(config); diff --git a/www/MainView.js b/www/MainView.js index 74c968cf..a43b92ac 100644 --- a/www/MainView.js +++ b/www/MainView.js @@ -133,6 +133,15 @@ Ext.define('PBS.MainView', { padding: '0 5', tpl: Ext.String.format(gettext("You are logged in as {0}"), "'{username}'") }, + { + xtype: 'button', + baseCls: 'x-btn', + cls: 'x-btn-default-toolbar-small proxmox-inline-button', + iconCls: 'fa fa-book x-btn-icon-el-default-toolbar-small ', + text: gettext('Documentation'), + href: '/docs/index.html', + margin: '0 5 0 0', + }, { reference: 'logoutButton', xtype: 'button',