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

Signed-off-by: Madhan Neethiraj <mad...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/19abdf68
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/19abdf68
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/19abdf68

Branch: refs/heads/master
Commit: 19abdf68ea227cb329ed90228d990cee5a5c16c3
Parents: 3709842
Author: kevalbhatt <kbh...@apache.org>
Authored: Mon Apr 16 21:26:13 2018 +0530
Committer: Madhan Neethiraj <mad...@apache.org>
Committed: Mon Apr 16 14:19:57 2018 -0700

----------------------------------------------------------------------
 .../views/detail_page/DetailPageLayoutView.js   | 23 ++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/19abdf68/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js 
b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
index 5d5ad2b..9c2d146 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -228,6 +228,14 @@ define(['require',
                         this.renderSchemaLayoutView(_.extend({}, obj, {
                             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")) {
                         this.$('.lineageGraph').show();
@@ -245,6 +253,14 @@ define(['require',
                                 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.listenTo(this.collection, 'error', function(model, 
response) {
@@ -285,10 +301,9 @@ define(['require',
                 // })
             },
             onShow: function() {
-                var params = Utils.getUrlState.getQueryParams();
-                if (params && params.tabActive) {
-                    this.$('.nav.nav-tabs').find('[role="' + params.tabActive 
+ '"]').addClass('active').siblings().removeClass('active');
-                    this.$('.tab-content').find('[role="' + params.tabActive + 
'"]').addClass('active').siblings().removeClass('active');
+                if (this.value && this.value.tabActive) {
+                    this.$('.nav.nav-tabs').find('[role="' + 
this.value.tabActive + 
'"]').addClass('active').siblings().removeClass('active');
+                    this.$('.tab-content').find('[role="' + 
this.value.tabActive + 
'"]').addClass('active').siblings().removeClass('active');
                     $("html, body").animate({ scrollTop: 
(this.$('.tab-content').offset().top + 1200) }, 1000);
                 }
             },

Reply via email to