Преглед на файлове

HUE-6506 [importer] Fix scroll to bottom and reliability on Hue 4

Enrico Berti преди 8 години
родител
ревизия
167b02f
променени са 2 файла, в които са добавени 8 реда и са изтрити 1 реда
  1. 4 1
      desktop/core/src/desktop/templates/hue.mako
  2. 4 0
      desktop/libs/indexer/src/indexer/templates/importer.mako

+ 4 - 1
desktop/core/src/desktop/templates/hue.mako

@@ -745,6 +745,9 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
           if (app.startsWith('oozie')) {
             huePubSub.clearAppSubscribers('oozie');
           }
+          if (SKIP_CACHE.indexOf(app) > -1) {
+            $('#embeddable_' + app).html('');
+          }
           if (typeof self.embeddable_cache[app] === 'undefined') {
             if (loadedApps.indexOf(app) == -1){
               loadedApps.push(app);
@@ -808,7 +811,7 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
             huePubSub.resumeAppSubscribers(app);
           }
           $('.embeddable').hide();
-          $('#embeddable_' + app).insertBefore($('.embeddable:first')).show();
+          $('#embeddable_' + app).show();
           huePubSub.publish('app.gained.focus', app);
         };
 

+ 4 - 0
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -1813,7 +1813,11 @@ ${ assist.assistPanel() }
       self.wizardEnabled = ko.observable(false);
       self.currentStep = ko.observable(self.createWizard.prefill.target_type() == 'database' ? 2 : 1);
       self.currentStep.subscribe(function () {
+        %if is_embeddable:
+        $('.page-content').scrollTop(0);
+        %else:
         $('.content-panel').scrollTop(0);
+        %endif
       });
       self.previousStepVisible = ko.pureComputed(function(){
         return self.currentStep() > 1 && self.createWizard.destination.outputFormat() != 'database';