Commit 5ca1ed3f by kevalbhatt

ATLAS-1149 Changes to UI to sort the hive table schema based on position…

ATLAS-1149 Changes to UI to sort the hive table schema based on position attribute of hive_column (Kalyanikashikar via kevalbhatt)
parent 8044ca48
...@@ -33,7 +33,9 @@ define(['require', ...@@ -33,7 +33,9 @@ define(['require',
* @constructs * @constructs
*/ */
initialize: function() {}, initialize: function() {
this.sort_key = 'id';
},
bindErrorEvents: function() { bindErrorEvents: function() {
this.bind("error", Utils.defaultErrorHandler); this.bind("error", Utils.defaultErrorHandler);
}, },
...@@ -47,6 +49,15 @@ define(['require', ...@@ -47,6 +49,15 @@ define(['require',
}, },
ajaxStart: function(model, ajaxObj, collectionObj) {}, ajaxStart: function(model, ajaxObj, collectionObj) {},
ajaxComplete: function(model, ajaxObj, collectionObj) {}, ajaxComplete: function(model, ajaxObj, collectionObj) {},
comparator: function(key, value) {
key = key.get(this.sort_key);
value = value.get(this.sort_key);
return key > value ? 1 : key < value ? -1 : 0;
},
sortByKey: function(sortKey) {
this.sort_key = sortKey;
this.sort();
},
/** /**
* state required for the PageableCollection * state required for the PageableCollection
*/ */
......
...@@ -58,7 +58,11 @@ define(['require', ...@@ -58,7 +58,11 @@ define(['require',
entityTableGenerate: function() { entityTableGenerate: function() {
var that = this, var that = this,
valueObject = this.collectionObject[0].values, valueObject = this.collectionObject[0].values,
table = CommonViewFunction.propertyTable(valueObject, this); valueSorted = _.sortBy(valueObject.columns, function(val) {
return val.values.position
});
valueObject.columns = valueSorted;
var table = CommonViewFunction.propertyTable(valueObject, this);
that.ui.detailValue.append(table); that.ui.detailValue.append(table);
} }
}); });
......
...@@ -163,6 +163,7 @@ define(['require', ...@@ -163,6 +163,7 @@ define(['require',
this.$('.fontLoader').show(); this.$('.fontLoader').show();
this.schemaCollection.fetch({ this.schemaCollection.fetch({
success: function() { success: function() {
that.schemaCollection.sortByKey('position');
that.renderTableLayoutView(); that.renderTableLayoutView();
$('.schemaTable').show(); $('.schemaTable').show();
that.$('.fontLoader').hide(); that.$('.fontLoader').hide();
...@@ -263,7 +264,7 @@ define(['require', ...@@ -263,7 +264,7 @@ define(['require',
}; };
_.keys(modelJSON).map(function(key) { _.keys(modelJSON).map(function(key) {
if (key.indexOf("$") == -1) { if (key.indexOf("$") == -1) {
if (!(key === "qualifiedName" || key === "name")) { if (!(key === "qualifiedName" || key === "name" || key === "position")) {
col[key] = { col[key] = {
cell: "Html", cell: "Html",
editable: false, editable: false,
......
...@@ -10,6 +10,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al ...@@ -10,6 +10,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai) ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES: ALL CHANGES:
ATLAS-1149 Changes to UI to sort the hive table schema based on "position" attribute of hive_column (Kalyanikashikar via kevalbhatt)
ATLAS-1162 Register shutdown hooks with Hadoop's ShutdownHookManager, instead of directly with Java Runtime (mneethiraj via sumasai) ATLAS-1162 Register shutdown hooks with Hadoop's ShutdownHookManager, instead of directly with Java Runtime (mneethiraj via sumasai)
ATLAS-1098 Atlas allows creation of tag with name "isa" which causes exceptions during search (apoorvnaik via kevalbhatt) ATLAS-1098 Atlas allows creation of tag with name "isa" which causes exceptions during search (apoorvnaik via kevalbhatt)
ATLAS-1160 Update Atlas hive hook to read configuration from atlas-application.properties instead of hive-site.xml (mneethiraj via kevalbhatt) ATLAS-1160 Update Atlas hive hook to read configuration from atlas-application.properties instead of hive-site.xml (mneethiraj via kevalbhatt)
......
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