Browse Source

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

Enrico Berti 8 years ago
parent
commit
167b02f

+ 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')) {
           if (app.startsWith('oozie')) {
             huePubSub.clearAppSubscribers('oozie');
             huePubSub.clearAppSubscribers('oozie');
           }
           }
+          if (SKIP_CACHE.indexOf(app) > -1) {
+            $('#embeddable_' + app).html('');
+          }
           if (typeof self.embeddable_cache[app] === 'undefined') {
           if (typeof self.embeddable_cache[app] === 'undefined') {
             if (loadedApps.indexOf(app) == -1){
             if (loadedApps.indexOf(app) == -1){
               loadedApps.push(app);
               loadedApps.push(app);
@@ -808,7 +811,7 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
             huePubSub.resumeAppSubscribers(app);
             huePubSub.resumeAppSubscribers(app);
           }
           }
           $('.embeddable').hide();
           $('.embeddable').hide();
-          $('#embeddable_' + app).insertBefore($('.embeddable:first')).show();
+          $('#embeddable_' + app).show();
           huePubSub.publish('app.gained.focus', app);
           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.wizardEnabled = ko.observable(false);
       self.currentStep = ko.observable(self.createWizard.prefill.target_type() == 'database' ? 2 : 1);
       self.currentStep = ko.observable(self.createWizard.prefill.target_type() == 'database' ? 2 : 1);
       self.currentStep.subscribe(function () {
       self.currentStep.subscribe(function () {
+        %if is_embeddable:
+        $('.page-content').scrollTop(0);
+        %else:
         $('.content-panel').scrollTop(0);
         $('.content-panel').scrollTop(0);
+        %endif
       });
       });
       self.previousStepVisible = ko.pureComputed(function(){
       self.previousStepVisible = ko.pureComputed(function(){
         return self.currentStep() > 1 && self.createWizard.destination.outputFormat() != 'database';
         return self.currentStep() > 1 && self.createWizard.destination.outputFormat() != 'database';