(function($, cloudStack) { cloudStack.installWizard = { // Check if install wizard should be invoked check: function(args) { $.ajax({ url: createURL('listZones'), dataType: 'json', async: true, success: function(data) { args.response.success({ doInstall: !data.listzonesresponse.zone }); } }); }, changeUser: function(args) { $.ajax({ url: createURL('updateUser'), data: { id: cloudStack.context.users[0].userid, password: md5Hashed ? $.md5(args.data.password) : todb(args.data.password) }, dataType: 'json', async: true, success: function(data) { args.response.success({ data: { newUser: data.updateuserresponse.user } }); } }); }, // Copy text copy: { // Tooltips 'tooltip.addZone.name': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addZone.name' }); }, 'tooltip.addZone.dns1': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addZone.dns1' }); }, 'tooltip.addZone.dns2': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addZone.dns2' }); }, 'tooltip.addZone.internaldns1': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addZone.internaldns1' }); }, 'tooltip.addZone.internaldns2': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addZone.internaldns2' }); }, 'tooltip.configureGuestTraffic.name': function(args) { args.response.success({ text: 'message.installWizard.tooltip.configureGuestTraffic.name' }); }, 'tooltip.configureGuestTraffic.description': function(args) { args.response.success({ text: 'message.installWizard.tooltip.configureGuestTraffic.description' }); }, 'tooltip.configureGuestTraffic.guestGateway': function(args) { args.response.success({ text: 'message.installWizard.tooltip.configureGuestTraffic.guestGateway' }); }, 'tooltip.configureGuestTraffic.guestNetmask': function(args) { args.response.success({ text: 'message.installWizard.tooltip.configureGuestTraffic.guestNetmask' }); }, 'tooltip.configureGuestTraffic.guestStartIp': function(args) { args.response.success({ text: 'message.installWizard.tooltip.configureGuestTraffic.guestStartIp' }); }, 'tooltip.configureGuestTraffic.guestEndIp': function(args) { args.response.success({ text: 'message.installWizard.tooltip.configureGuestTraffic.guestEndIp' }); }, 'tooltip.addPod.name': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addPod.name' }); }, 'tooltip.addPod.reservedSystemGateway': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addPod.reservedSystemGateway' }); }, 'tooltip.addPod.reservedSystemNetmask': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addPod.reservedSystemNetmask' }); }, 'tooltip.addPod.reservedSystemStartIp': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addPod.reservedSystemStartIp' }); }, 'tooltip.addPod.reservedSystemEndIp': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addPod.reservedSystemEndIp' }); }, 'tooltip.addCluster.name': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addCluster.name' }); }, 'tooltip.addHost.hostname': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addHost.hostname' }); }, 'tooltip.addHost.username': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addHost.username' }); }, 'tooltip.addHost.password': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addHost.password' }); }, 'tooltip.addPrimaryStorage.name': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addPrimaryStorage.name' }); }, 'tooltip.addPrimaryStorage.server': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addPrimaryStorage.server' }); }, 'tooltip.addPrimaryStorage.path': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addPrimaryStorage.path' }); }, 'tooltip.addSecondaryStorage.nfsServer': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addSecondaryStorage.nfsServer' }); }, 'tooltip.addSecondaryStorage.path': function(args) { args.response.success({ text: 'message.installWizard.tooltip.addSecondaryStorage.path' }); }, // Intro text whatIsCloudStack: function(args) { args.response.success({ text: 'message.installWizard.copy.whatIsCloudStack' }); }, // EULA eula: function(args) { args.response.success({ text: '