[pbs-devel] [RFC PATCH] ui: add datastore usage also to 'datastore' navigation element

Dominik Csapak d.csapak at proxmox.com
Thu Nov 5 11:57:44 CET 2020


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
it is not much, but better than nothing i suppose?
i also tried moving the whole dashboard there, but that was very
weird and confusing to use....

 www/Dashboard.js                     | 1 +
 www/NavigationTree.js                | 6 ++----
 www/dashboard/DataStoreStatistics.js | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/www/Dashboard.js b/www/Dashboard.js
index 6d5ccc27..55aac493 100644
--- a/www/Dashboard.js
+++ b/www/Dashboard.js
@@ -311,6 +311,7 @@ Ext.define('PBS.Dashboard', {
 	},
 	{
 	    xtype: 'pbsDatastoresStatistics',
+	    title: gettext('Datastore Usage'),
 	    height: 250,
 	},
 	{
diff --git a/www/NavigationTree.js b/www/NavigationTree.js
index 09c58938..7eab4c33 100644
--- a/www/NavigationTree.js
+++ b/www/NavigationTree.js
@@ -84,8 +84,9 @@ Ext.define('PBS.store.NavigationStore', {
 		],
 	    },
 	    {
-		text: gettext('Datastore'),
+		text: gettext('Datastores'),
 		iconCls: 'fa fa-archive',
+		path: 'pbsDatastoresStatistics',
 		id: 'datastores',
 		expanded: true,
 		expandable: false,
@@ -174,9 +175,6 @@ Ext.define('PBS.view.main.NavigationTree', {
 
     listeners: {
 	itemclick: function(tl, info) {
-	    if (info.node.data.id === 'datastores') {
-		return false;
-	    }
 	    if (info.node.data.id === 'addbutton') {
 		let me = this;
 		Ext.create('PBS.DataStoreEdit', {
diff --git a/www/dashboard/DataStoreStatistics.js b/www/dashboard/DataStoreStatistics.js
index 3aaa3c9b..478f576f 100644
--- a/www/dashboard/DataStoreStatistics.js
+++ b/www/dashboard/DataStoreStatistics.js
@@ -40,7 +40,7 @@ Ext.define('PBS.DatastoreStatistics', {
     extend: 'Ext.grid.Panel',
     alias: 'widget.pbsDatastoresStatistics',
 
-    title: gettext('Datastore Usage'),
+    title: gettext('Datastores'),
 
     emptyText: gettext('No Data'),
 
-- 
2.20.1






More information about the pbs-devel mailing list