فهرست منبع

HUE-6903 [fb] Fix opening an external SQL file into the editor

Romain Rigaux 8 سال پیش
والد
کامیت
1fdfd7a
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      desktop/core/src/desktop/templates/hue.mako

+ 3 - 2
desktop/core/src/desktop/templates/hue.mako

@@ -657,14 +657,15 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
         });
 
         huePubSub.subscribe('open.editor.new.query', function (statementOptions) {
-          self.loadApp('editor');
+          self.loadApp('editor'); // Should open in Default
 
           self.getActiveAppViewModel(function (viewModel) {
             var editorType = statementOptions['type'] || 'hive'; // Next: use file extensions and default type of Editor for SQL
             viewModel.newNotebook(editorType, function() {
-              self.changeEditorType(statementOptions['statementType'] || editorType);
+              self.changeEditorType(editorType);
 
               if (statementOptions['statementPath']) {
+                viewModel.selectedNotebook().snippets()[0].statementType(statementOptions['statementType']);
                 viewModel.selectedNotebook().snippets()[0].statementPath(statementOptions['statementPath']);
               }
               if (statementOptions['directoryUuid']) {