Commit 19abdf68 by kevalbhatt Committed by Madhan Neethiraj

ATLAS-2539: UI fix to handle page loader in entity-details page when no lineage data is present

parent 3709842a
...@@ -228,6 +228,14 @@ define(['require', ...@@ -228,6 +228,14 @@ define(['require',
this.renderSchemaLayoutView(_.extend({}, obj, { this.renderSchemaLayoutView(_.extend({}, obj, {
attribute: collectionJSON.attributes[schemaOptions.schemaElementsAttribute] attribute: collectionJSON.attributes[schemaOptions.schemaElementsAttribute]
})); }));
} else if (this.value && this.value.tabActive == "schema") {
Utils.setUrl({
url: Utils.getUrlState.getQueryUrl().queyParams[0],
urlParams: { tabActive: 'properties' },
mergeBrowserUrl: false,
trigger: true,
updateTabState: true
});
} }
if (this.activeEntityDef && _.contains(this.activeEntityDef.get('superTypes'), "DataSet")) { if (this.activeEntityDef && _.contains(this.activeEntityDef.get('superTypes'), "DataSet")) {
this.$('.lineageGraph').show(); this.$('.lineageGraph').show();
...@@ -245,6 +253,14 @@ define(['require', ...@@ -245,6 +253,14 @@ define(['require',
ui.element.height(($(this).height())); ui.element.height(($(this).height()));
}, },
}); });
} else if (this.value && this.value.tabActive == "lineage") {
Utils.setUrl({
url: Utils.getUrlState.getQueryUrl().queyParams[0],
urlParams: { tabActive: 'properties' },
mergeBrowserUrl: false,
trigger: true,
updateTabState: true
});
} }
}, this); }, this);
this.listenTo(this.collection, 'error', function(model, response) { this.listenTo(this.collection, 'error', function(model, response) {
...@@ -285,10 +301,9 @@ define(['require', ...@@ -285,10 +301,9 @@ define(['require',
// }) // })
}, },
onShow: function() { onShow: function() {
var params = Utils.getUrlState.getQueryParams(); if (this.value && this.value.tabActive) {
if (params && params.tabActive) { this.$('.nav.nav-tabs').find('[role="' + this.value.tabActive + '"]').addClass('active').siblings().removeClass('active');
this.$('.nav.nav-tabs').find('[role="' + params.tabActive + '"]').addClass('active').siblings().removeClass('active'); this.$('.tab-content').find('[role="' + this.value.tabActive + '"]').addClass('active').siblings().removeClass('active');
this.$('.tab-content').find('[role="' + params.tabActive + '"]').addClass('active').siblings().removeClass('active');
$("html, body").animate({ scrollTop: (this.$('.tab-content').offset().top + 1200) }, 1000); $("html, body").animate({ scrollTop: (this.$('.tab-content').offset().top + 1200) }, 1000);
} }
}, },
......
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