Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CC8DC200D0C for ; Tue, 5 Sep 2017 11:40:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CB8B4162B02; Tue, 5 Sep 2017 09:40:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E1BDC162EC6 for ; Tue, 5 Sep 2017 11:40:58 +0200 (CEST) Received: (qmail 23432 invoked by uid 500); 5 Sep 2017 09:40:58 -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 21841 invoked by uid 99); 5 Sep 2017 09:40:57 -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, 05 Sep 2017 09:40:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 84C28F568F; Tue, 5 Sep 2017 09:40:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lpuskas@apache.org To: commits@ambari.apache.org Date: Tue, 05 Sep 2017 09:41:14 -0000 Message-Id: <892ebe3626d74591a563a392e3e4264c@git.apache.org> In-Reply-To: <6893a6ac3af84cd6b9c891e67b3a54c0@git.apache.org> References: <6893a6ac3af84cd6b9c891e67b3a54c0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [19/50] [abbrv] ambari git commit: AMBARI-21851. Allow Hidden Repos To Become Visible So They Can Be Made Visible Permanently (alexantonenko) archived-at: Tue, 05 Sep 2017 09:41:00 -0000 AMBARI-21851. Allow Hidden Repos To Become Visible So They Can Be Made Visible Permanently (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2fc74535 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2fc74535 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2fc74535 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: 2fc74535d79e4f677233f6caf12166bc7f837c2a Parents: 7758a51 Author: Alex Antonenko Authored: Thu Aug 31 11:56:35 2017 +0300 Committer: Alex Antonenko Committed: Thu Aug 31 11:56:35 2017 +0300 ---------------------------------------------------------------------- .../stackVersions/StackVersionsListCtrl.js | 18 ++++++++++++++++++ .../ui/admin-web/app/scripts/i18n.config.js | 1 + .../admin-web/app/views/stackVersions/list.html | 2 ++ 3 files changed, 21 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/2fc74535/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js ---------------------------------------------------------------------- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js index 8d75e79..03088d5 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js @@ -192,4 +192,22 @@ angular.module('ambariAdminConsole') || (filter.cluster.current && filter.cluster.current.value) || (filter.stack.current && filter.stack.current.value)); }, true); + + $scope.toggleVisibility = function (repo) { + repo.isProccessing = true; + var payload = { + RepositoryVersions:{ + hidden: repo.hidden + } + } + Stack.updateRepo(repo.stack_name, repo.stack_version, repo.id, payload).then( null, function () { + repo.hidden = !repo.hidden; + }).finally( function () { + delete repo.isProccessing; + }); + } + + $scope.isHideCheckBoxEnabled = function ( repo ) { + return !repo.isProccessing && ( !repo.cluster || repo.isPatch && ( repo.status === 'installed' || repo.status === 'install_failed') ); + } }]); http://git-wip-us.apache.org/repos/asf/ambari/blob/2fc74535/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js ---------------------------------------------------------------------- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js index 239b149..1711543 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js @@ -159,6 +159,7 @@ angular.module('ambariAdminConsole') 'common.alerts.cannotUpdateAdminStatus': 'Cannot update User Admin status', 'common.alerts.checkFailed': 'CHECK FAILED', 'common.alerts.onlySimpleChars': 'Must contain only simple characters.', + 'common.hidden' : 'Hidden', 'main.title': 'Welcome to Apache Ambari', 'main.noClusterDescription': 'Provision a cluster, manage who can access the cluster, and customize views for Ambari users.', http://git-wip-us.apache.org/repos/asf/ambari/blob/2fc74535/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html ---------------------------------------------------------------------- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html index 70212c0..bf19a62 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html +++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html @@ -59,6 +59,7 @@ > + {{'common.hidden' | translate}} @@ -106,6 +107,7 @@ +