[pve-devel] [manager 3/6] Add function guestNode

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


This function extracts the node where the guest resists.
---
 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 ff1dc46f..5b8690e5 100644
--- a/www/manager6/data/ResourceStore.js
+++ b/www/manager6/data/ResourceStore.js
@@ -30,6 +30,14 @@ Ext.define('PVE.data.ResourceStore', {
 	return me.getAt(index).data.shared;
     },
 
+    guestNode: function(vmid) {
+	var me = this;
+
+	var index = me.findExact('vmid', parseInt(vmid, 10));
+
+	return me.getAt(index).data.node;
+    },
+
     constructor: function(config) {
 	// fixme: how to avoid those warnings
 	/*jslint confusion: true */
-- 
2.11.0





More information about the pve-devel mailing list