diff --git a/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config-wizard.js b/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config-wizard.js index 68851d781a..08b4a2573e 100644 --- a/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config-wizard.js +++ b/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config-wizard.js @@ -116,6 +116,24 @@ Sonia.hg.ConfigWizardPanel = Ext.extend(Ext.Panel,{ initComponent: function(){ this.addEvents('finish'); + var packageStore = new Ext.data.JsonStore({ + id: 'pkgStore', + proxy: new Ext.data.HttpProxy({ + url: restUrl + 'config/repositories/hg/packages.json', + disableCaching: false + }), + fields: [ 'id', 'hg-version', 'python-version', 'size' ], + root: 'package', + listeners: { + load: { + fn: this.checkIfPackageAvailable, + scope: this + } + } + }); + + packageStore.load(); + var hgInstallationStore = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: restUrl + 'config/repositories/hg/installations/hg.json' @@ -165,20 +183,28 @@ Sonia.hg.ConfigWizardPanel = Ext.extend(Ext.Panel,{ disabled: true }], items: [{ - id: 'step-1', + id: 'cod', items: [{ + id: 'configureOrDownload', xtype: 'radiogroup', name: 'configureOrDownload', columns: 1, - items: [ - {boxLabel: 'Configure local installation', name: 'cod', inputValue: 'local', checked: true}, - {boxLabel: 'Download and install', name: 'cod', inputValue: 'remote', disabled: true}, - ] + items: [{ + boxLabel: 'Configure local installation', + name: 'cod', + inputValue: 'localInstall', + checked: true + },{ + id: 'remoteInstallRadio', + boxLabel: 'Download and install', + name: 'cod', + inputValue: 'remoteInstall', + disabled: true + }] }] },{ - id: 'step-2', + id: 'localInstall', layout: 'form', - width: '100%', defaults: { width: 230 }, @@ -214,8 +240,26 @@ Sonia.hg.ConfigWizardPanel = Ext.extend(Ext.Panel,{ value: this.hgConfig.pythonBinary }] },{ - id: 'step-3', - html: '