[pve-devel] [PATCH manager] ui: ceph installer: set initial tab depending on current state

Tim Marx t.marx at proxmox.com
Mon Apr 1 13:31:24 CEST 2019


Signed-off-by: Tim Marx <t.marx at proxmox.com>
---
 www/manager6/ceph/CephInstallWizard.js | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/www/manager6/ceph/CephInstallWizard.js b/www/manager6/ceph/CephInstallWizard.js
index 1c8808d1..bd50bf81 100644
--- a/www/manager6/ceph/CephInstallWizard.js
+++ b/www/manager6/ceph/CephInstallWizard.js
@@ -27,6 +27,20 @@ Ext.define('PVE.ceph.CephInstallWizard', {
 		tp.setActiveTab(ntab);
 	    }
 	},
+	setInitialTab: function (index) {
+	    var tp = this.down('#wizcontent');
+	    var initialTab = tp.items.getAt(index);
+	    initialTab.enable();
+	    tp.setActiveTab(initialTab);
+	},
+	onShow: function() {
+		this.callParent(arguments);
+		var isInstalled = this.getViewModel().get('isInstalled');
+		if (isInstalled) {
+		    this.getViewModel().set('configuration', false);
+		    this.setInitialTab(2);
+		}
+	},
 	items: [
 	    {
 		title: gettext('Info'),
-- 
2.11.0




More information about the pve-devel mailing list