diff --git a/www/Utils.js b/www/Utils.js index a84ef664..4fae705c 100644 --- a/www/Utils.js +++ b/www/Utils.js @@ -224,6 +224,30 @@ Ext.define('PBS.Utils', { Proxmox.Utils.format_size(val), Proxmox.Utils.format_size(max)) + ')'; }, + get_help_tool: function(blockid) { + + let info = Proxmox.Utils.get_help_info(blockid); + if (info === undefined) { + info = Proxmox.Utils.get_help_info('pbs_documentation_index'); + } + if (info === undefined) { + throw "get_help_info failed"; // should not happen + } + + let docsURI = window.location.origin + info.link; + let title = info.title; + if (info.subtitle) { + title += ' - ' + info.subtitle; + } + return { + type: 'help', + tooltip: title, + handler: function() { + window.open(docsURI); + } + }; + }, + constructor: function() { var me = this; diff --git a/www/datastore/DataStoreList.js b/www/datastore/DataStoreList.js index 71dd5fdb..12d311a6 100644 --- a/www/datastore/DataStoreList.js +++ b/www/datastore/DataStoreList.js @@ -203,6 +203,8 @@ Ext.define('PBS.datastore.DataStores', { border: false, }, + tools: [PBS.Utils.get_help_tool("datastore_intro")], + items: [ { xtype: 'pbsDataStoreList', diff --git a/www/datastore/Panel.js b/www/datastore/Panel.js index bca663e8..f0d1317c 100644 --- a/www/datastore/Panel.js +++ b/www/datastore/Panel.js @@ -34,6 +34,8 @@ Ext.define('PBS.DataStorePanel', { border: false, }, + tools: [PBS.Utils.get_help_tool("datastore_intro")], + items: [ { xtype: 'pbsDataStoreSummary',