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 E30DB19FDA for ; Tue, 15 Mar 2016 12:00:22 +0000 (UTC) Received: (qmail 32810 invoked by uid 500); 15 Mar 2016 12:00:22 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 32780 invoked by uid 500); 15 Mar 2016 12:00:22 -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 32771 invoked by uid 99); 15 Mar 2016 12:00:22 -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, 15 Mar 2016 12:00:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8FE11DFBC8; Tue, 15 Mar 2016 12:00:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dbhowmick@apache.org To: commits@ambari.apache.org Message-Id: <28b3d4d8a11644d68d092bc7acbb80a5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-15334. Files view does not show directory permission for folders. (dipayanb) Date: Tue, 15 Mar 2016 12:00:22 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/branch-2.2 04a9aa393 -> 7db352828 AMBARI-15334. Files view does not show directory permission for folders. (dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7db35282 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7db35282 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7db35282 Branch: refs/heads/branch-2.2 Commit: 7db352828dfe6e83d1480f97da7a6fba956d607a Parents: 04a9aa3 Author: Dipayan Bhowmick Authored: Tue Mar 15 17:30:06 2016 +0530 Committer: Dipayan Bhowmick Committed: Tue Mar 15 17:30:06 2016 +0530 ---------------------------------------------------------------------- .../ui/app/helpers/show-permission-string.js | 30 ++++++++++++++++++++ .../ui/app/templates/components/file-row.hbs | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/7db35282/contrib/views/files/src/main/resources/ui/app/helpers/show-permission-string.js ---------------------------------------------------------------------- diff --git a/contrib/views/files/src/main/resources/ui/app/helpers/show-permission-string.js b/contrib/views/files/src/main/resources/ui/app/helpers/show-permission-string.js new file mode 100644 index 0000000..e6decc6 --- /dev/null +++ b/contrib/views/files/src/main/resources/ui/app/helpers/show-permission-string.js @@ -0,0 +1,30 @@ +/** + * 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. + */ + +import Ember from 'ember'; + +export function showPermissionString(params) { + let file = params[0]; + let permission = file.get('permission'); + if (file.get('isDirectory')) { + return `d${permission.substring(1)}` + } + return permission; +} + +export default Ember.Helper.helper(showPermissionString); http://git-wip-us.apache.org/repos/asf/ambari/blob/7db35282/contrib/views/files/src/main/resources/ui/app/templates/components/file-row.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/files/src/main/resources/ui/app/templates/components/file-row.hbs b/contrib/views/files/src/main/resources/ui/app/templates/components/file-row.hbs index 2976cf9..a631335 100644 --- a/contrib/views/files/src/main/resources/ui/app/templates/components/file-row.hbs +++ b/contrib/views/files/src/main/resources/ui/app/templates/components/file-row.hbs @@ -41,6 +41,6 @@ {{file.group}}
- {{file.permission}} + {{show-permission-string file}}