Pārlūkot izejas kodu

HUE-3450 [metadata] Load relationships after getting the table id

Romain Rigaux 9 gadi atpakaļ
vecāks
revīzija
ca315bd2ce

+ 3 - 2
apps/metastore/src/metastore/static/metastore/js/metastore.ko.js

@@ -448,6 +448,7 @@
               }, function(data) {
                 if (data && data.status == 0) {
                   self.navigatorStats(ko.mapping.fromJS(data.entity));
+                  self.getRelationships();
                 } else {
                   $(document).trigger("info", data.message);
                 }
@@ -455,8 +456,6 @@
                 $(document).trigger("error", xhr.responseText);
               });
 
-              self.getRelationships();
-
               $.post('/metadata/api/optimizer_api/table_details', {
                 tableName: self.name
               }, function(data){
@@ -539,6 +538,8 @@
         } else {
           $(document).trigger("error", data.message);
         }
+      }).fail(function (xhr, textStatus, errorThrown) {
+        $(document).trigger("info", xhr.responseText);
       });
     };
   }