[pve-devel] [manager 2/6] Add function storageIsShared

Wolfgang Link w.link at proxmox.com
Wed Nov 21 17:05:35 CET 2018


This function extracts the shared flag of the storage state.
---
 www/manager6/data/ResourceStore.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/www/manager6/data/ResourceStore.js b/www/manager6/data/ResourceStore.js
index 0a36dee2..ff1dc46f 100644
--- a/www/manager6/data/ResourceStore.js
+++ b/www/manager6/data/ResourceStore.js
@@ -22,6 +22,14 @@ Ext.define('PVE.data.ResourceStore', {
 	return nodes;
     },
 
+    storageIsShared: function(storage_path) {
+	var me = this;
+
+	var index = me.findExact('id', storage_path);
+
+	return me.getAt(index).data.shared;
+    },
+
     constructor: function(config) {
 	// fixme: how to avoid those warnings
 	/*jslint confusion: true */
-- 
2.11.0





More information about the pve-devel mailing list