diff --git a/client/htmls/private/ajax/Settings/Dashboard.html b/client/htmls/private/ajax/Settings/Dashboard.html index 7e5948ded..2f95820ed 100755 --- a/client/htmls/private/ajax/Settings/Dashboard.html +++ b/client/htmls/private/ajax/Settings/Dashboard.html @@ -119,6 +119,7 @@
//on click of new button to create a new wizard.. $('#createNew').click(function(e) { + $('#wizardActionListLoader').show(); clearActiveClasses(); $('#orgDropdown option:selected').val(''); $('.providerSelect').addClass('hidden'); @@ -126,10 +127,12 @@
$('#createNew').addClass('hidden'); $('#startConfig a').addClass('green-btn').removeClass('process-btn'); $('#orgConfiguration a').addClass('wizardActiveBtn').removeClass('process-btn'); + $('#orgConfiguration a').attr('href','ajax/Settings/settingsWizard.html'); $('#orgConfiguration a').trigger('click'); + $('#wizardActionListLoader').hide(); }); $('#orgConfiguration a').trigger('click'); -var firstOrgValue; +var firstOrgValue,currentOrgValue; $.get('/d4dMasters/readmasterjsonnew/1', function(data) { $("#orgDropdown").empty(); for (var i = 0; i < data.length; i++) { @@ -163,6 +166,7 @@
if (selectedDropdownValue) { getOrgValues(); } else { + $('.wizardFlow').empty(); lastDropdownValue = $('#orgDropdown option:last').val(); } }); @@ -177,6 +181,21 @@
orgForBg = $('#orgDropdown option:selected').text(); }); +$('#galleryConfiguration a').click(function(e) { + selectedDropdownValue = $('#orgDropdown option:selected').val(); + orgForBg = $('#orgDropdown option:selected').text(); +}); + +$('#devopsConfiguration a').click(function(e) { + selectedDropdownValue = $('#orgDropdown option:selected').val(); + orgForBg = $('#orgDropdown option:selected').text(); +}); + +$('#cmdbConfiguration a').click(function(e) { + selectedDropdownValue = $('#orgDropdown option:selected').val(); + orgForBg = $('#orgDropdown option:selected').text(); +}); + function changeWizardStatus(orgIdForSetup) { $('#wizardActionListLoader').show(); $.get('/setting-wizard/org/' + orgIdForSetup, function(data) { diff --git a/client/htmls/private/ajax/Settings/bgWizard.html b/client/htmls/private/ajax/Settings/bgWizard.html index f27b06af7..88a71a894 100644 --- a/client/htmls/private/ajax/Settings/bgWizard.html +++ b/client/htmls/private/ajax/Settings/bgWizard.html @@ -18,7 +18,7 @@

Create Business Group
-
@@ -33,10 +33,8 @@

Create Business Group - - - \ No newline at end of file diff --git a/client/htmls/private/ajax/Settings/configManagementWizard.html b/client/htmls/private/ajax/Settings/configManagementWizard.html index d19de1aa6..f2ddd8772 100644 --- a/client/htmls/private/ajax/Settings/configManagementWizard.html +++ b/client/htmls/private/ajax/Settings/configManagementWizard.html @@ -90,13 +90,13 @@

New Configuration Management

+ \ No newline at end of file diff --git a/client/htmls/private/ajax/Settings/galleryWizard.html b/client/htmls/private/ajax/Settings/galleryWizard.html index 215b727f4..b9c336785 100644 --- a/client/htmls/private/ajax/Settings/galleryWizard.html +++ b/client/htmls/private/ajax/Settings/galleryWizard.html @@ -169,28 +169,31 @@

Create Templates

//api call for getting the status of wizard + orgIdForSetup = selectedDropdownValue || firstOrgValue if(clicked){ - $('#wizardActionListLoader').show(); - $.get('/setting-wizard/org/' + orgIdForSetup, function(data) { - if (data.currentStep.nestedSteps) { - var nestedSteps = data.currentStep.nestedSteps; - if (nestedSteps[0].name === 'Templates' && nestedSteps[0].isCompleted === true && - nestedSteps[1].name === 'ServiceCommand' && nestedSteps[1].isCompleted === false && - nestedSteps[2].name === 'ScriptGallery' && nestedSteps[2].isCompleted === false) { - $('.btn-2 a').parent('.bwizard-steps li').removeClass('active').addClass('green-btn'); - $('.contentSetting').find('ol li#serviceCreate').addClass('active'); - $('.content').load('ajax/Settings/serviceCommandWizard.html'); - } else if (nestedSteps[0].name === 'Templates' && nestedSteps[0].isCompleted === true && - nestedSteps[1].name === 'ServiceCommand' && nestedSteps[1].isCompleted === true && - nestedSteps[2].name === 'ScriptGallery' && nestedSteps[2].isCompleted === false) { - $('.btn-2 a').parent('.bwizard-steps li').removeClass('active').addClass('green-btn'); - $('.contentSetting').find('ol li#serviceCreate').removeClass('active').addClass('green-btn'); - $('.contentSetting').find('ol li#scriptCreate').addClass('active'); - $('.content').load('ajax/Settings/scriptWizard.html'); - } else {} - } - }); - $('#wizardActionListLoader').hide(); + if(orgIdForSetup){ + $('#wizardActionListLoader').show(); + $.get('/setting-wizard/org/' + orgIdForSetup, function(data) { + if (data.currentStep.nestedSteps) { + var nestedSteps = data.currentStep.nestedSteps; + if (nestedSteps[0].name === 'Templates' && nestedSteps[0].isCompleted === true && + nestedSteps[1].name === 'ServiceCommand' && nestedSteps[1].isCompleted === false && + nestedSteps[2].name === 'ScriptGallery' && nestedSteps[2].isCompleted === false) { + $('.btn-2 a').parent('.bwizard-steps li').removeClass('active').addClass('green-btn'); + $('.contentSetting').find('ol li#serviceCreate').addClass('active'); + $('.content').load('ajax/Settings/serviceCommandWizard.html'); + } else if (nestedSteps[0].name === 'Templates' && nestedSteps[0].isCompleted === true && + nestedSteps[1].name === 'ServiceCommand' && nestedSteps[1].isCompleted === true && + nestedSteps[2].name === 'ScriptGallery' && nestedSteps[2].isCompleted === false) { + $('.btn-2 a').parent('.bwizard-steps li').removeClass('active').addClass('green-btn'); + $('.contentSetting').find('ol li#serviceCreate').removeClass('active').addClass('green-btn'); + $('.contentSetting').find('ol li#scriptCreate').addClass('active'); + $('.content').load('ajax/Settings/scriptWizard.html'); + } else {} + } + }); + $('#wizardActionListLoader').hide(); + } } else { //getTemplateValues(); $('.btn-2 a').parent('.bwizard-steps li').removeClass('active').addClass('green-btn'); diff --git a/client/htmls/private/ajax/Settings/projWizard.html b/client/htmls/private/ajax/Settings/projWizard.html index eeeee50d4..8c00c8eb6 100644 --- a/client/htmls/private/ajax/Settings/projWizard.html +++ b/client/htmls/private/ajax/Settings/projWizard.html @@ -76,6 +76,7 @@

Create Project getBusinessGroupName(selectedDropdownValue); $('.nextFormWizard').removeAttr('disabled'); } else { + $('.btn-3 a').removeClass('not-activeAnchor'); orgNameForSetup = $('#orgDropdown option:last').attr('rowid'); orgIdForSetup = $('#orgDropdown option:last').val(); $('#orgDropdown option:last').attr('selected', 'selected') @@ -111,7 +112,7 @@

Create Project $(".nextFormWizard").click(function() { $('#wizardActionListLoader').show(); - $('#providerConfiguration a').attr('href','ajax/Settings/providerWizard.html'); + $('#configManagement a').attr('href','ajax/Settings/configManagementWizard.html'); $('#configManagement a').trigger('click'); $('#startConfig a, #orgConfiguration a').addClass('green-btn').removeClass('process-btn'); $('.wizardFlow').empty(); diff --git a/client/htmls/private/ajax/Settings/providerWizard.html b/client/htmls/private/ajax/Settings/providerWizard.html index 859fb010c..06e274c4a 100644 --- a/client/htmls/private/ajax/Settings/providerWizard.html +++ b/client/htmls/private/ajax/Settings/providerWizard.html @@ -265,7 +265,6 @@

Create Provider var $option = $('').val(orgIdForSetup).html(orgNameForSetup); var providerIdForImage; $('#orgId').append($option); - var providerWizardFlow = $('
  1. 1Create Providers
  2. 2Create VmImages
'); $('.wizardFlow').append(providerWizardFlow); @@ -308,15 +307,13 @@

Create Provider var providerIdForImage = $('#providerHiddenId').val(); var providerNameForImage = $('#providerHiddenName').val(); $('#myForm22').find('select#orgId').empty(); - $.get('/vmimages', function(data) { for(var i =0;i').val(orgIdForSetup).html(orgNameForSetup); $('#myForm22').find('select#orgId').append($option).attr('disabled','disabled'); - var $optionForOs = $('').val(data[i].osName).html(data[i].osName); - + var $optionForOs = $('').val(data[i].osName).html(data[i].osName); $('#myForm22').find('select.providerVMImageDisplay').remove(); $('#myForm22').find('input.imageNameForVM').val(data[i].name).attr('disabled','disabled'); $('#myForm22').find('input#providerIdHiddenName').removeClass('hidden').val(providerNameForImage); @@ -338,19 +335,17 @@

Create Provider $('.contentSetting').load(this.getAttribute('href')); }); $('.btn-3 a').click(function(e) { - $('.content').empty(); e.preventDefault(); $('.nextFormWizard').removeAttr('disabled'); - getVmImages(); $('.btn-2 a').parent('.bwizard-steps li').removeClass('active') $(this).parent('.bwizard-steps li').addClass('active'); $('.content').load(this.getAttribute('href')); + getVmImages(); }); //api call for getting the status of wizard - if (clicked) { - if(orgIdForSetup){ - $('#wizardActionListLoader').show(); - $.get('/setting-wizard/org/' + orgIdForSetup, function(data) { + + function getProviderWizardStatus(orgIdForSetup) { + $.get('/setting-wizard/org/' + orgIdForSetup, function(data) { if (data.currentStep.name === 'Provider Configuration') { if (data.currentStep.nestedSteps) { var nestedSteps = data.currentStep.nestedSteps; @@ -365,20 +360,25 @@

Create Provider } } else { getProviderValues(); - getVmImages(); $('.btn-3 a').removeClass('not-activeAnchor'); $('.btn-2 a').parent('.bwizard-steps li').removeClass('active').addClass('green-btn'); $('.btn-3 a').parent('.bwizard-steps li').removeClass('active').addClass('green-btn'); } }); + } + orgIdForSetup = selectedDropdownValue; + if (clicked) { + if(orgIdForSetup){ + $('#wizardActionListLoader').show(); + getProviderWizardStatus(orgIdForSetup); } $('#wizardActionListLoader').hide(); } else { - getProviderValues(); - getVmImages(); - $('.btn-3 a').removeClass('not-activeAnchor'); - $('.btn-2 a').parent('.bwizard-steps li').removeClass('active').addClass('green-btn'); - $('.btn-3 a').parent('.bwizard-steps li').removeClass('active').addClass('green-btn'); + if(orgIdForSetup){ + getProviderValues(); + getVmImages(); + $('.btn-3 a').removeClass('not-activeAnchor'); + } } diff --git a/client/htmls/private/ajax/Settings/serviceCommandWizard.html b/client/htmls/private/ajax/Settings/serviceCommandWizard.html index 614761943..a082ac607 100644 --- a/client/htmls/private/ajax/Settings/serviceCommandWizard.html +++ b/client/htmls/private/ajax/Settings/serviceCommandWizard.html @@ -162,13 +162,13 @@

Create Services

\ No newline at end of file