Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-21348 a56f3f64c -> 408212f58
AMBARI-21395 Provide a Way To Skip Dependency Checks When Installing A Stack. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/408212f5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/408212f5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/408212f5 Branch: refs/heads/branch-feature-AMBARI-21348 Commit: 408212f58a8ccc6fec5b8007f241297322d43afd Parents: a56f3f6 Author: Andrii Tkach <[email protected]> Authored: Tue Jul 4 12:18:16 2017 +0300 Committer: Andrii Tkach <[email protected]> Committed: Tue Jul 4 12:18:16 2017 +0300 ---------------------------------------------------------------------- .../main/admin/stack_and_upgrade_controller.js | 29 +++++++++++++++----- ambari-web/app/messages.js | 2 ++ .../modal_popups/install_repo_confirmation.hbs | 27 ++++++++++++++++++ 3 files changed, 51 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/408212f5/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js index 7ff513e..7cc11dc 100644 --- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js +++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js @@ -1407,21 +1407,35 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, */ installRepoVersionConfirmation: function (repo) { var self = this; - return App.showConfirmationPopup(function () { - self.installRepoVersion(repo); - }, - Em.I18n.t('admin.stackVersions.version.install.confirm').format(repo.get('displayName')) - ); + return App.ModalPopup.show({ + header: Em.I18n.t('popup.confirmation.commonHeader'), + popupBody: Em.I18n.t('admin.stackVersions.version.install.confirm').format(repo.get('displayName')), + skipDependencyCheck: false, + bodyClass: Em.View.extend({ + didInsertElement: function () { + App.tooltip($('[rel="skip-dep-check"]'), { + placement: "top", + title: Em.I18n.t('admin.stackVersions.version.install.skipDependencies.tooltip') + }); + }, + templateName: require('templates/common/modal_popups/install_repo_confirmation') + }), + onPrimary: function () { + self.installRepoVersion(repo, this.get('skipDependencyCheck')); + this._super(); + } + }); }, /** * sends request to install repoVersion to the cluster * and create clusterStackVersion resourse * @param {Em.Object} repo + * @param {boolean} skipDependencyCheck * @return {$.ajax} * @method installRepoVersion */ - installRepoVersion: function (repo) { + installRepoVersion: function (repo, skipDependencyCheck) { this.set('requestInProgress', true); this.set('requestInProgressRepoId', repo.get('id')); @@ -1429,7 +1443,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage, ClusterStackVersions: { stack: repo.get('stackVersionType'), version: repo.get('stackVersionNumber'), - repository_version: repo.get('repositoryVersion') + repository_version: repo.get('repositoryVersion'), + ignore_package_dependencies: skipDependencyCheck }, id: repo.get('id') }; http://git-wip-us.apache.org/repos/asf/ambari/blob/408212f5/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index ecef27d..703a40a 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1702,6 +1702,8 @@ Em.I18n.translations = { 'admin.stackVersions.editRepositories.info': 'Provide Base URLs for the Operating Systems you are configuring. Uncheck all other Operating Systems.', 'admin.stackVersions.editRepositories.validation.warning': 'Some of the repositories failed validation. Make changes to the base url or skip validation if you are sure that urls are correct', 'admin.stackVersions.version.install.confirm': 'You are about to install packages for version <strong>{0}</strong> on all hosts.', + 'admin.stackVersions.version.install.skipDependencies': 'Skip Dependency Check', + 'admin.stackVersions.version.install.skipDependencies.tooltip': 'When selected, Ambari will not verify that all package dependencies have been satisfied after installing the new stack.', 'admin.stackVersions.version.linkTooltip': 'Click to Edit Repositories', 'admin.stackVersions.version.hostsTooltip': 'Click to List Hosts', 'admin.stackVersions.version.emptyHostsTooltip': 'No Hosts to List', http://git-wip-us.apache.org/repos/asf/ambari/blob/408212f5/ambari-web/app/templates/common/modal_popups/install_repo_confirmation.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/modal_popups/install_repo_confirmation.hbs b/ambari-web/app/templates/common/modal_popups/install_repo_confirmation.hbs new file mode 100644 index 0000000..13fd779 --- /dev/null +++ b/ambari-web/app/templates/common/modal_popups/install_repo_confirmation.hbs @@ -0,0 +1,27 @@ +{{! +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +}} +<p>{{{popupBody}}}</p> +<div class="row-fluid"> + <div class="tinyspan"> + {{view Ember.Checkbox classNames="align-checkbox" checkedBinding="skipDependencyCheck"}} + </div> + <div class="span10"> + {{t admin.stackVersions.version.install.skipDependencies}} + <i class="icon-question-sign icon-blue" rel="skip-dep-check" data-toggle="tooltip"></i> + </div> +</div>
