Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CA22218CCF for ; Tue, 26 May 2015 15:04:06 +0000 (UTC) Received: (qmail 85525 invoked by uid 500); 26 May 2015 15:04:06 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 85494 invoked by uid 500); 26 May 2015 15:04:06 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 85485 invoked by uid 99); 26 May 2015 15:04:06 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 May 2015 15:04:06 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 98AEDDFFC0; Tue, 26 May 2015 15:04:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: akovalenko@apache.org To: commits@ambari.apache.org Message-Id: <737e4a50f40440fb88522903110b55dc@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: =?utf-8?q?ambari_git_commit=3A_AMBARI-11390=2E_Hosts_-_Set_Rack_do?= =?utf-8?q?esn=E2=80=99t_update_rack_in_the_UI=2C_no_feedback/confirmation_?= =?utf-8?q?=28akovalenko=29?= Date: Tue, 26 May 2015 15:04:06 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk 614a74fbf -> 256f47ab1 AMBARI-11390. Hosts - Set Rack doesn’t update rack in the UI, no feedback/confirmation (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/256f47ab Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/256f47ab Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/256f47ab Branch: refs/heads/trunk Commit: 256f47ab18488d5783567bf6bd5aea8371a99279 Parents: 614a74f Author: Aleksandr Kovalenko Authored: Tue May 26 18:00:47 2015 +0300 Committer: Aleksandr Kovalenko Committed: Tue May 26 18:03:36 2015 +0300 ---------------------------------------------------------------------- ambari-web/app/utils/hosts.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/256f47ab/ambari-web/app/utils/hosts.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/hosts.js b/ambari-web/app/utils/hosts.js index c04d519..c559214 100644 --- a/ambari-web/app/utils/hosts.js +++ b/ambari-web/app/utils/hosts.js @@ -211,8 +211,10 @@ module.exports = { data: { hostNames: hostNames.join(','), requestInfo: operationData.message, - rackId: rackId + rackId: rackId, + hostNamesArray: hostNames }, + success: 'successRackId', error: 'errorRackId' }); } @@ -222,6 +224,17 @@ module.exports = { }, /** + * Success callback for set rack id request + */ + successRackId: function (response, request, params) { + App.Host.find().forEach(function(host){ + if (params.hostNamesArray.contains(host.get('hostName'))) { + host.set('rack', params.rackId) + } + }); + }, + + /** * Warn user that the rack id will not be updated */ errorRackId: function () {