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 9464B200B5A for ; Thu, 4 Aug 2016 11:18:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 92E63160AAB; Thu, 4 Aug 2016 09:18:47 +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 8D4B3160A7C for ; Thu, 4 Aug 2016 11:18:46 +0200 (CEST) Received: (qmail 42056 invoked by uid 500); 4 Aug 2016 09:18:45 -0000 Mailing-List: contact commits-help@atlas.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.incubator.apache.org Delivered-To: mailing list commits@atlas.incubator.apache.org Received: (qmail 42047 invoked by uid 99); 4 Aug 2016 09:18:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2016 09:18:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 42CF7CBAF9 for ; Thu, 4 Aug 2016 09:18:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.465 X-Spam-Level: X-Spam-Status: No, score=-4.465 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.245] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id MJgusu7MVXBp for ; Thu, 4 Aug 2016 09:18:44 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id C86DE61275 for ; Thu, 4 Aug 2016 09:18:43 +0000 (UTC) Received: (qmail 42027 invoked by uid 99); 4 Aug 2016 09:18:43 -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; Thu, 04 Aug 2016 09:18:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EC233E0A7D; Thu, 4 Aug 2016 09:18:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kbhatt@apache.org To: commits@atlas.incubator.apache.org Message-Id: <18477b2809424bdb9ac8ca9ea7fe64f4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-atlas git commit: ATLAS-1080 : Regression - UI - hive_storagedesc is shown as undefined in UI (kbhatt) Date: Thu, 4 Aug 2016 09:18:42 +0000 (UTC) archived-at: Thu, 04 Aug 2016 09:18:47 -0000 Repository: incubator-atlas Updated Branches: refs/heads/master a2801f0ea -> 81ceabbdf ATLAS-1080 : Regression - UI - hive_storagedesc is shown as undefined in UI (kbhatt) Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/81ceabbd Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/81ceabbd Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/81ceabbd Branch: refs/heads/master Commit: 81ceabbdf6f817c1a25f439073941d5e19b88c9c Parents: a2801f0 Author: Keval Bhatt Authored: Thu Aug 4 14:45:56 2016 +0530 Committer: Keval Bhatt Committed: Thu Aug 4 14:47:35 2016 +0530 ---------------------------------------------------------------------- .../js/views/search/SearchResultLayoutView.js | 134 ++++++++++++------- release-log.txt | 1 + 2 files changed, 84 insertions(+), 51 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/81ceabbd/dashboardv2/public/js/views/search/SearchResultLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js index 62852e5..b28328c 100644 --- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js +++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js @@ -263,33 +263,10 @@ define(['require', var that = this, count = 5; require(['utils/TableLayout'], function(TableLayout) { - var columnCollection = Backgrid.Columns.extend({ - sortKey: "position", - comparator: function(item) { - return item.get(this.sortKey) || 999; - }, - setPositions: function() { - _.each(this.models, function(model, index) { - if (model.get('name') == "name") { - model.set("position", 2, { silent: true }); - model.set("label", "Name"); - } else if (model.get('name') == "description") { - model.set("position", 3, { silent: true }); - model.set("label", "Description"); - } else if (model.get('name') == "owner") { - model.set("position", 4, { silent: true }); - model.set("label", "Owner"); - } - }); - return this; - } - }); - var columns = new columnCollection(that.getEntityTableColumns()); - columns.setPositions().sort(); + var columns = new Backgrid.Columns(that.getEntityTableColumns()); that.REntityTableLayoutView.show(new TableLayout(_.extend({}, that.commonTableOptions, { globalVent: that.globalVent, - columns: columns, - includeOrderAbleColumns: true + columns: columns }))); that.$('.searchResult').find(".inputAssignTag.multiSelect").hide(); that.renderBreadcrumb(); @@ -392,29 +369,91 @@ define(['require', }, getFixedDslColumn: function() { var that = this, + nameCheck = 0, col = {}; - col['name'] = { - label: "Name", - cell: "html", - editable: false, - sortable: false, - formatter: _.extend({}, Backgrid.CellFormatter.prototype, { - fromRaw: function(rawValue, model) { - var nameHtml = ""; - if (model.get('$id$')) { - nameHtml = '' + rawValue + ''; - } else { - nameHtml = '' + rawValue + ''; + this.searchCollection.each(function(model) { + if (model.get('name') || model.get('qualifiedName')) { + ++nameCheck + } + }); + if (Globals.taxonomy) { + col['Check'] = { + name: "selected", + label: "", + cell: "select-row", + headerCell: "select-all" + }; + } + if (nameCheck > 0) { + col['name'] = { + label: "Name", + cell: "html", + editable: false, + sortable: false, + className: "searchTableName", + formatter: _.extend({}, Backgrid.CellFormatter.prototype, { + fromRaw: function(rawValue, model) { + var nameHtml = ""; + if (rawValue === undefined) { + if (model.get('qualifiedName')) { + rawValue = model.get('qualifiedName'); + } else if (model.get('$id$') && model.get('$id$').qualifiedName) { + rawValue = model.get('$id$').qualifiedName + } else { + return ""; + } + } + if (model.get('$id$') && model.get('$id$').id) { + nameHtml = '' + rawValue + ''; + } else { + nameHtml = '' + rawValue + ''; + } + if (model.get('$id$') && model.get('$id$').state && Globals.entityStateReadOnly[model.get('$id$').state]) { + nameHtml += ''; + return ''; + } else { + return nameHtml; + } } - if (model.get('$id$') && model.get('$id$').state && Globals.entityStateReadOnly[model.get('$id$').state]) { - nameHtml += ''; - return ''; - } else { - return nameHtml; + }) + } + } + if (nameCheck === 0) { + col['typeName'] = { + label: "Type Name", + cell: "html", + editable: false, + sortable: false, + formatter: _.extend({}, Backgrid.CellFormatter.prototype, { + fromRaw: function(rawValue, model) { + var nameHtml = ""; + if (rawValue === undefined) { + if (model.get('$id$') && model.get('$id$')['$typeName$']) { + rawValue = model.get('$id$')['$typeName$'] + } else if (model.get('$typeName$')) { + rawValue = model.get('$typeName$'); + } else if (model.get('typeName')) { + rawValue = model.get('typeName') + } else { + return ""; + } + } + if (model.get('$id$') && model.get('$id$').id) { + nameHtml = '' + rawValue + ''; + } else { + nameHtml = '' + rawValue + ''; + } + if (model.get('$id$') && model.get('$id$').state && Globals.entityStateReadOnly[model.get('$id$').state]) { + nameHtml += ''; + return ''; + } else { + return nameHtml; + } } - } - }) + }) + } } + col['description'] = { label: "Description", cell: "String", @@ -446,13 +485,6 @@ define(['require', }) }; if (Globals.taxonomy) { - col['Check'] = { - name: "selected", - label: "", - cell: "select-row", - headerCell: "select-all", - position: 1 - }; col['terms'] = { label: "Terms", cell: "Html", http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/81ceabbd/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index d620cc6..dec8f0f 100644 --- a/release-log.txt +++ b/release-log.txt @@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES: ALL CHANGES: +ATLAS-1080 Regression - UI - hive_storagedesc is shown as "undefined" in UI.(kevalbhatt) ATLAS-1089 Storm hook should handle cyclic references in topology object (mneethiraj via sumasai) ATLAS-1086 Build failure in hive-bridge after security fixes in ATLAS-762 (sumasai) ATLAS-1088 Fix /search api to default to fulltext on dsl failure (sumasai)