diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js index 2f56ab81233..57126474cb8 100644 --- a/ambari-web/app/controllers/installer.js +++ b/ambari-web/app/controllers/installer.js @@ -1523,11 +1523,8 @@ App.InstallerController = App.WizardController.extend(App.Persist, { this.set('content.clients', clients); this.save('clients'); - //TODO: mpacks - // - for now, pull the stack from the single mpack that we can install - // - when we can support multiple mpacks, make this an array of selectedStacks (or just use the selectedServices array?) and add the repo data to it - const selectedService = selectedServices[0]; - this.set('content.selectedStack', { name: selectedService.stackName, version: selectedService.stackVersion }); + //TODO: mpacks - hard coding this for now. We need to get rid of the concept of "selected stack". + this.set('content.selectedStack', { name: "HDP", version: "3.0.0" }); this.save('selectedStack'); }); }); diff --git a/ambari-web/app/controllers/wizard/downloadMpacks_controller.js b/ambari-web/app/controllers/wizard/downloadMpacks_controller.js index c4de24d70be..1266e24dc54 100644 --- a/ambari-web/app/controllers/wizard/downloadMpacks_controller.js +++ b/ambari-web/app/controllers/wizard/downloadMpacks_controller.js @@ -118,8 +118,6 @@ App.WizardDownloadMpacksController = App.WizardStepController.extend({ ) ); - //TODO: mpacks - //var versionData = installerController.getSelectedRepoVersionData(); //This would be used to post a VDF xml for a local repo (I think), but do we still need to do this when we will just be using mpacks? $.when(...stackVersionsRegistered).always(() => { //this uses always() because the api call made by createMpackStackVersion will return a 500 error //if the stack version has already been registered, but we want to proceed anyway App.router.send('next'); diff --git a/ambari-web/app/controllers/wizard/selectMpacks_controller.js b/ambari-web/app/controllers/wizard/selectMpacks_controller.js index 38047f35a6d..da373235687 100644 --- a/ambari-web/app/controllers/wizard/selectMpacks_controller.js +++ b/ambari-web/app/controllers/wizard/selectMpacks_controller.js @@ -152,7 +152,7 @@ App.WizardSelectMpacksController = App.WizardStepController.extend({ const mpacks = this.get('content.mpacks'); if (mpacks) { - //TODO: mpacks - reinstate this if/when the test runner can handle it + //reinstate this if/when the test runner can handle for..of loops //for (let mpack of mpacks) { //if (mpack.get('name') === mpackName) { // return mpack.get('versions')[0]; //TODO: mpacks - change this to the last item when sort order is fixed diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js index 595bad044cb..1330bc3cbbc 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizard/step8_controller.js @@ -156,7 +156,7 @@ App.WizardStep8Controller = App.WizardStepController.extend(App.AddSecurityConfi getSelectedStack: function() { const selectedStack = this.get('content.selectedStack'); const stack = this.get('wizardController').getStack(selectedStack.name, selectedStack.version); - return stack; + return stack; }, installedServices: function() { @@ -916,32 +916,13 @@ App.WizardStep8Controller = App.WizardStepController.extend(App.AddSecurityConfi } }, - /** - * To Start deploy process - * @method startDeploy - */ - //TODO: mpacks - startDeploy: function () { - const self = this; - - if (!this.get('isInstaller')) { - this._startDeploy(); - } else { - const selectedStack = this.getSelectedStack(); - //skip this because we already updated the repo URLs if they were customized in the customProductRepos step's submit action - //this.get('wizardController').updateRepoOSInfo({ id: selectedStack.get('id'), stackName: selectedStack.get('stackName'), stackVersion: selectedStack.get('stackVersion') }, selectedStack).done(function() { - self._startDeploy(); - //}); - } - }, - /** * Start deploy process * @method startDeploy */ - _startDeploy: function () { + startDeploy: function () { this.createCluster(); - this.createServiceGroup(); + this.createServiceGroups(); this.createSelectedServices(); if (!this.get('isAddHost')) { if (this.get('isAddService')) { @@ -983,7 +964,6 @@ App.WizardStep8Controller = App.WizardStepController.extend(App.AddSecurityConfi * Queued request * @method createCluster */ - //TODO: mpacks createCluster: function () { if (!this.get('isInstaller')) return; const selectedStack = this.getSelectedStack() @@ -1001,18 +981,45 @@ App.WizardStep8Controller = App.WizardStepController.extend(App.AddSecurityConfi }, /** - * Creates the servcegroup + * Creates one service group per mpack. + * Skip if no mpacks were selected. * Queued request * @method createServiceGroup */ - createServiceGroup: function () { + createServiceGroups: function () { if (!this.get('isInstaller')) return; - this.addRequestToAjaxQueue({ - name: 'wizard.step8.create_service_group', - data: { - data: JSON.stringify({ "ServiceGroupInfo": { "cluster_name": App.get('clusterName') || App.clusterStatus.get('clusterName'), "service_group_name": App.get('defaultServiceGroupName') }}) - } - }); + + var data = this.createServiceGroupsData(); + if (data) { + this.addRequestToAjaxQueue({ + name: 'wizard.step8.create_service_group', + data: { + data: JSON.stringify(data) + } + }); + } + }, + + /** + * Format data for createServiceGroups request + * @returns {Object[]} + * @method createServiceGroupsData + */ + createServiceGroupsData: function () { + const mpacks = this.get('selectedMpacks'); + + if (mpacks) { + const serviceGroups = mpacks.map(mpack => ({ + "ServiceGroupInfo": { + "service_group_name": `${mpack.name}-${mpack.version}`, + } + }) + ); + + return serviceGroups; + } + + return null; }, /** @@ -1037,15 +1044,20 @@ App.WizardStep8Controller = App.WizardStepController.extend(App.AddSecurityConfi * @returns {Object[]} * @method createSelectedServicesData */ - //TODO: mpacks createSelectedServicesData: function () { - var selectedStack; - if (this.get('isInstaller')) { - selectedStack = this.getSelectedStack(); - } - return this.get('selectedServices').map(service => selectedStack ? - {"ServiceInfo": { "service_name": service.get('serviceName'), "service_type": service.get('serviceName'), "service_group_name": App.get('defaultServiceGroupName'), "desired_repository_version_id": selectedStack.get('id') }} : - {"ServiceInfo": { "service_name": service.get('serviceName'), "service_type": service.get('serviceName'), "service_group_name": App.get('defaultServiceGroupName'), }}); + const services = this.get('selectedServices'); + const data = services.map(service => ({ + "ServiceInfo": { + "service_name": service.get('serviceName'), + "service_type": service.get('serviceName'), + //TODO: mpacks - needs to be revisited when we are no longer hard coding service groups to be named + // for mpacks and when the concept of a "selected stack" is no longer a thing + "service_group_name": `${service.get('stackName')}-${service.get('stackVersion')}`, + "desired_stack": `${service.get('stackName')}-${service.get('stackVersion')}`, + } + }) + ); + return data; }, /** diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 70705ce748c..bba8fe76003 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -591,7 +591,6 @@ Em.I18n.translations = { 'installer.header':'Cluster Install Wizard', 'installer.navigation.warning.header':'Navigation Warning', 'installer.navigation.warning':'If you make changes to a previous step you will lose any changes saved in subsequent steps.', - 'installer.warning.changes.header':'Warning', 'installer.warning.changes':'If you make changes to this step you will lose any changes saved in subsequent steps.', 'installer.noHostsAssigned':'No host assigned', 'installer.slaveComponentHosts.selectHosts':'select hosts for this group', diff --git a/ambari-web/app/models/repository.js b/ambari-web/app/models/repository.js index b501d62f239..f03976eba97 100644 --- a/ambari-web/app/models/repository.js +++ b/ambari-web/app/models/repository.js @@ -80,8 +80,11 @@ App.Repository = DS.Model.extend({ * @type {boolean} */ showRepo: function () { - const isGPLAccepted = App.router.get('clusterController.ambariProperties')['gpl.license.accepted'] === 'true'; - return isGPLAccepted || !this.get('isGPL'); + const ambariProperties = App.router.get('clusterController.ambariProperties'); + if (ambariProperties && ambariProperties['gpl.license.accepted'] === true) { + return true; + } + return !this.get('isGPL'); }.property('isGPL'), undo: Em.computed.notEqualProperties('baseUrl', 'baseUrlInit'), diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index e21dcb452e8..5f6beae890a 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -2825,12 +2825,13 @@ a.abort-icon:hover { font-style: normal; } } + .display-flex { - display: flex; - display: -webkit-flex; - display: -moz-flex; - display: -ms-flex; - display: -o-flex; + display: flex !important; + display: -webkit-flex !important; + display: -moz-flex !important; + display: -ms-flex !important; + display: -o-flex !important; &.direction-row { flex-direction: row; } @@ -2843,8 +2844,13 @@ a.abort-icon:hover { &.justify-center { justify-content: center; } + + .flex-fill { + flex: auto; + } } + .no-data { position: absolute; color: #ccc; diff --git a/ambari-web/app/styles/bootstrap_overrides.less b/ambari-web/app/styles/bootstrap_overrides.less index 94309e93807..905fc84e925 100644 --- a/ambari-web/app/styles/bootstrap_overrides.less +++ b/ambari-web/app/styles/bootstrap_overrides.less @@ -506,6 +506,7 @@ select.form-control { background-color: inherit; } .wizard .wizard-body .wizard-nav { + min-width: 250px; padding: 30px; background-color: #333; margin-bottom: 0; diff --git a/ambari-web/app/styles/wizard.less b/ambari-web/app/styles/wizard.less index 129c8122cb7..ad7fcb1132a 100644 --- a/ambari-web/app/styles/wizard.less +++ b/ambari-web/app/styles/wizard.less @@ -873,7 +873,7 @@ } input[type="radio"]:checked + label:before { background: #fff; - border-width: 4px; + border-width: 3px; border-color: #1491c1; } input[type="radio"]:checked + label:after { @@ -945,6 +945,7 @@ .table.table-hover > tbody { > tr > td { vertical-align: middle; + line-height: 20px; } } } @@ -954,6 +955,7 @@ .table.table-hover > tbody { > tr > td { border-width: 0; + line-height: 20px; } > tr, > tr:hover > td { border-width: 0; @@ -969,16 +971,11 @@ #downloadMpacks, #verifyProductRepos { - .download-status { - .progress-wrapper { - padding:0px; - .progress { - height:8px; - margin:5px 5px 5px 0; - .progress-bar { - width:100%; - } - } + .progress { + width: 75%; + margin: 0; + .progress-bar { + width: 100%; } } } @@ -995,12 +992,6 @@ padding: 0; .wizard { border: none; - .wizard-nav { - width: 250px; - } - .wizard-content.col-md-9 { - width: calc(~"100% - 250px"); - } } } } @@ -1027,4 +1018,9 @@ flex: auto; margin-right: 10px; text-align: left; +} + +.dropdown-menu input[type="checkbox"]:checked + label:after, +.table input[type="checkbox"]:checked + label:after { + line-height: 2; } \ No newline at end of file diff --git a/ambari-web/app/templates/common/assign_master_components.hbs b/ambari-web/app/templates/common/assign_master_components.hbs index 49eaa106891..399e36a03d2 100644 --- a/ambari-web/app/templates/common/assign_master_components.hbs +++ b/ambari-web/app/templates/common/assign_master_components.hbs @@ -17,17 +17,17 @@ }}
{{#if view.showTitle}} -

{{view.title}}

+

{{view.title}}

{{/if}} -

- {{{view.alertMessage}}} -

{{#if isSaved}} - + {{/if}}
+

+ {{{view.alertMessage}}} +

{{#each msg in controller.generalErrorMessages}}
{{msg}}
{{/each}} diff --git a/ambari-web/app/templates/wizard/downloadMpacks.hbs b/ambari-web/app/templates/wizard/downloadMpacks.hbs index fc84b68e47c..0f46c28cfed 100644 --- a/ambari-web/app/templates/wizard/downloadMpacks.hbs +++ b/ambari-web/app/templates/wizard/downloadMpacks.hbs @@ -39,10 +39,8 @@ {{mpack.displayName}} {{mpack.version}} {{#if mpack.inProgress}} -
-
-
-
+
+
{{else}} {{#if mpack.succeeded}} @@ -56,7 +54,11 @@ - + {{#if mpack.failed}} + + {{else}} + + {{/if}} diff --git a/ambari-web/app/templates/wizard/selectMpacks.hbs b/ambari-web/app/templates/wizard/selectMpacks.hbs index dd8536a1ccd..9a1bb7fb8a4 100644 --- a/ambari-web/app/templates/wizard/selectMpacks.hbs +++ b/ambari-web/app/templates/wizard/selectMpacks.hbs @@ -18,11 +18,11 @@

{{t installer.selectMpacks.body.header}}

{{#if isSaved}} - + {{/if}}
-
+
{{#if controller.content.advancedMode}} @@ -51,7 +51,7 @@ {{/if}}
-
+
{{#if controller.content.advancedMode}}
@@ -91,9 +91,9 @@
-
+
{{t installer.selectMpacks.body.selected.header}} ({{controller.selectedMpackVersions.length}})
-
+
{{#if controller.hasSelectedMpackVersions}} {{#each mpackVersion in controller.selectedMpackVersions}} {{view App.WizardSelectedMpackVersionView mpackVersionBinding="mpackVersion"}} diff --git a/ambari-web/app/templates/wizard/step10.hbs b/ambari-web/app/templates/wizard/step10.hbs index 84e744de10c..a849cdb7fa6 100644 --- a/ambari-web/app/templates/wizard/step10.hbs +++ b/ambari-web/app/templates/wizard/step10.hbs @@ -16,17 +16,17 @@ * limitations under the License. }}
-

{{t installer.step10.header}}

+

{{t installer.step10.header}}

{{#if view.serviceRestartText}}
{{{view.serviceRestartText}}}
{{/if}} -

- {{t installer.step10.body}} -

+

+ {{t installer.step10.body}} +

    {{#each item in clusterInfo}} diff --git a/ambari-web/app/templates/wizard/step2.hbs b/ambari-web/app/templates/wizard/step2.hbs index 7d523b9a135..aa5dd04101f 100644 --- a/ambari-web/app/templates/wizard/step2.hbs +++ b/ambari-web/app/templates/wizard/step2.hbs @@ -19,7 +19,7 @@

    {{t installer.step2.header}}

    {{#if isSaved}} - + {{/if}}
    diff --git a/ambari-web/app/templates/wizard/step3.hbs b/ambari-web/app/templates/wizard/step3.hbs index c60d81142d9..0221d863d1e 100644 --- a/ambari-web/app/templates/wizard/step3.hbs +++ b/ambari-web/app/templates/wizard/step3.hbs @@ -19,7 +19,7 @@

    {{t installer.step3.header}}

    {{#if isSaved}} - + {{/if}}
    diff --git a/ambari-web/app/templates/wizard/step6.hbs b/ambari-web/app/templates/wizard/step6.hbs index 8d9e8834996..2e69e695e95 100644 --- a/ambari-web/app/templates/wizard/step6.hbs +++ b/ambari-web/app/templates/wizard/step6.hbs @@ -17,14 +17,14 @@ }}
    -

    {{t installer.step6.header}}

    -

    {{{view.label}}}

    +

    {{t installer.step6.header}}

    {{#if isSaved}} - + {{/if}}
    +

    {{{view.label}}}

    {{#if anyGeneralIssues}}
    {{t installer.step6.validationSlavesAndClients.hasIssues}} diff --git a/ambari-web/app/templates/wizard/step7.hbs b/ambari-web/app/templates/wizard/step7.hbs index 649f5d9f3a1..60e36cb9f7e 100644 --- a/ambari-web/app/templates/wizard/step7.hbs +++ b/ambari-web/app/templates/wizard/step7.hbs @@ -17,11 +17,11 @@ }}
    -

    {{t installer.step7.header}}{{controller.finnalyLoaded}}

    -

    {{t installer.step7.body}}

    +

    {{t installer.step7.header}}{{controller.finnalyLoaded}}

    +

    {{t installer.step7.body}}

    {{#if isConfigsLoaded}} {{view App.ServicesConfigView}} {{else}} diff --git a/ambari-web/app/templates/wizard/step8.hbs b/ambari-web/app/templates/wizard/step8.hbs index 7fc9ff1e19f..035c37a95ee 100644 --- a/ambari-web/app/templates/wizard/step8.hbs +++ b/ambari-web/app/templates/wizard/step8.hbs @@ -16,17 +16,17 @@ * limitations under the License. }}
    -

    {{t installer.step8.header}}

    -

    - {{t installer.step8.body}} - {{#if controller.isManualKerberos}} -

    - {{t installer.step8.kerberors.warning}} - {{/if}} -

    +

    {{t installer.step8.header}}

    +

    + {{t installer.step8.body}} + {{#if controller.isManualKerberos}} +

    + {{t installer.step8.kerberors.warning}} + {{/if}} +

    {{#each item in controller.clusterInfo}} diff --git a/ambari-web/app/templates/wizard/step9.hbs b/ambari-web/app/templates/wizard/step9.hbs index 155eb17c3b5..0f743967d06 100644 --- a/ambari-web/app/templates/wizard/step9.hbs +++ b/ambari-web/app/templates/wizard/step9.hbs @@ -17,11 +17,11 @@ }}
    -

    {{t installer.step9.header}}

    -

    {{t installer.step9.body}}

    +

    {{t installer.step9.header}}

    +

    {{t installer.step9.body}}

    diff --git a/ambari-web/app/templates/wizard/verifyProducts.hbs b/ambari-web/app/templates/wizard/verifyProducts.hbs index c973e3396a8..a5a12abd73a 100644 --- a/ambari-web/app/templates/wizard/verifyProducts.hbs +++ b/ambari-web/app/templates/wizard/verifyProducts.hbs @@ -58,10 +58,8 @@ {{repo.repoId}} {{#if repo.inProgress}} -
    -
    -
    -
    +
    +
    {{else}} {{#if repo.succeeded}} @@ -75,7 +73,11 @@ - + {{#if repo.failed}} + + {{else}} + + {{/if}} diff --git a/ambari-web/app/views/common/breadcrumbs_view.js b/ambari-web/app/views/common/breadcrumbs_view.js index 7c5ec4ef36d..6c2cfda1480 100644 --- a/ambari-web/app/views/common/breadcrumbs_view.js +++ b/ambari-web/app/views/common/breadcrumbs_view.js @@ -203,6 +203,9 @@ App.BreadcrumbsView = Em.View.extend({ if (!route && !disabled) { currentState.breadcrumbs.route = currentState.absoluteRoute(App.router).replace('/main/', ''); } + if (typeof label === "function") { + currentState.breadcrumbs.label = label(); + } items.pushObject(currentState.breadcrumbs); } } diff --git a/ambari-web/test/controllers/wizard/step8_test.js b/ambari-web/test/controllers/wizard/step8_test.js index c8137469e2d..0b69c6c555d 100644 --- a/ambari-web/test/controllers/wizard/step8_test.js +++ b/ambari-web/test/controllers/wizard/step8_test.js @@ -1992,9 +1992,9 @@ describe('App.WizardStep8Controller', function () { }); - describe('#_startDeploy', function () { + describe('#startDeploy', function () { - var stubbedNames = ['createCluster', 'createServiceGroup', 'createSelectedServices', 'createConfigurations', + var stubbedNames = ['createCluster', 'createServiceGroups', 'createSelectedServices', 'createConfigurations', 'applyConfigurationsToCluster', 'createComponents', 'registerHostsToCluster', 'createConfigurationGroups', 'createMasterHostComponents', 'createSlaveAndClientsHostComponents', 'createAdditionalClientComponents', 'createAdditionalHostComponents'], @@ -2074,7 +2074,7 @@ describe('App.WizardStep8Controller', function () { return Em.get(this, key); }); installerStep8Controller.set('content.controllerName', item.controllerName); - installerStep8Controller._startDeploy(); + installerStep8Controller.startDeploy(); }); stubbedNames.forEach(function (name) {