Commit 81ceabbd by Keval Bhatt Committed by Keval Bhatt

ATLAS-1080 : Regression - UI - hive_storagedesc is shown as undefined in UI (kbhatt)

parent a2801f0e
...@@ -263,33 +263,10 @@ define(['require', ...@@ -263,33 +263,10 @@ define(['require',
var that = this, var that = this,
count = 5; count = 5;
require(['utils/TableLayout'], function(TableLayout) { require(['utils/TableLayout'], function(TableLayout) {
var columnCollection = Backgrid.Columns.extend({ var columns = new Backgrid.Columns(that.getEntityTableColumns());
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();
that.REntityTableLayoutView.show(new TableLayout(_.extend({}, that.commonTableOptions, { that.REntityTableLayoutView.show(new TableLayout(_.extend({}, that.commonTableOptions, {
globalVent: that.globalVent, globalVent: that.globalVent,
columns: columns, columns: columns
includeOrderAbleColumns: true
}))); })));
that.$('.searchResult').find(".inputAssignTag.multiSelect").hide(); that.$('.searchResult').find(".inputAssignTag.multiSelect").hide();
that.renderBreadcrumb(); that.renderBreadcrumb();
...@@ -392,29 +369,91 @@ define(['require', ...@@ -392,29 +369,91 @@ define(['require',
}, },
getFixedDslColumn: function() { getFixedDslColumn: function() {
var that = this, var that = this,
nameCheck = 0,
col = {}; col = {};
col['name'] = { this.searchCollection.each(function(model) {
label: "Name", if (model.get('name') || model.get('qualifiedName')) {
cell: "html", ++nameCheck
editable: false, }
sortable: false, });
formatter: _.extend({}, Backgrid.CellFormatter.prototype, { if (Globals.taxonomy) {
fromRaw: function(rawValue, model) { col['Check'] = {
var nameHtml = ""; name: "selected",
if (model.get('$id$')) { label: "",
nameHtml = '<a href="#!/detailPage/' + model.get('$id$').id + '">' + rawValue + '</a>'; cell: "select-row",
} else { headerCell: "select-all"
nameHtml = '<a>' + rawValue + '</a>'; };
}
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 = '<a href="#!/detailPage/' + model.get('$id$').id + '">' + rawValue + '</a>';
} else {
nameHtml = '<a>' + rawValue + '</a>';
}
if (model.get('$id$') && model.get('$id$').state && Globals.entityStateReadOnly[model.get('$id$').state]) {
nameHtml += '<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>';
return '<div class="readOnly readOnlyLink">' + nameHtml + '</div>';
} else {
return nameHtml;
}
} }
if (model.get('$id$') && model.get('$id$').state && Globals.entityStateReadOnly[model.get('$id$').state]) { })
nameHtml += '<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>'; }
return '<div class="readOnly readOnlyLink">' + nameHtml + '</div>'; }
} else { if (nameCheck === 0) {
return nameHtml; 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 = '<a href="#!/detailPage/' + model.get('$id$').id + '">' + rawValue + '</a>';
} else {
nameHtml = '<a>' + rawValue + '</a>';
}
if (model.get('$id$') && model.get('$id$').state && Globals.entityStateReadOnly[model.get('$id$').state]) {
nameHtml += '<button title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>';
return '<div class="readOnly readOnlyLink">' + nameHtml + '</div>';
} else {
return nameHtml;
}
} }
} })
}) }
} }
col['description'] = { col['description'] = {
label: "Description", label: "Description",
cell: "String", cell: "String",
...@@ -446,13 +485,6 @@ define(['require', ...@@ -446,13 +485,6 @@ define(['require',
}) })
}; };
if (Globals.taxonomy) { if (Globals.taxonomy) {
col['Check'] = {
name: "selected",
label: "",
cell: "select-row",
headerCell: "select-all",
position: 1
};
col['terms'] = { col['terms'] = {
label: "Terms", label: "Terms",
cell: "Html", cell: "Html",
......
...@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES: ...@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ALL 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-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-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) ATLAS-1088 Fix /search api to default to fulltext on dsl failure (sumasai)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment