瀏覽代碼

HUE-8626 [security] Fix navigation issues after visiting the security app

Johan Ahlen 7 年之前
父節點
當前提交
22fcf93
共有 2 個文件被更改,包括 7 次插入3 次删除
  1. 3 1
      apps/security/src/security/templates/hdfs.mako
  2. 4 2
      apps/security/src/security/templates/hive.mako

+ 3 - 1
apps/security/src/security/templates/hdfs.mako

@@ -384,7 +384,9 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
 
       huePubSub.subscribe('app.gained.focus', function (app) {
         if (app === 'security_hdfs') {
-          window.location.hash = viewModel.lastHash;
+          window.setTimeout(function () {
+            window.location.hash = viewModel.lastHash;
+          }, 0);
         }
       }, 'security_hdfs');
 

+ 4 - 2
apps/security/src/security/templates/hive.mako

@@ -779,8 +779,10 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
 
       huePubSub.subscribe('app.gained.focus', function (app) {
         if (app === 'security_hive') {
-          window.location.hash = viewModel.lastHash;
-          showMainSection(viewModel.getSectionHash());
+          window.setTimeout(function () {
+            window.location.hash = viewModel.lastHash;
+            showMainSection(viewModel.getSectionHash());
+          }, 0);
         }
       }, 'security_hive');
     });