Browse Source

HUE-8721 [frontend] Remove the is_hue_4 and disable_hue_3 configuration flags

Johan Ahlen 6 years ago
parent
commit
f779446c57
59 changed files with 250 additions and 786 deletions
  1. 1 1
      .eslintrc.js
  2. 1 2
      apps/about/src/about/templates/admin_wizard.mako
  3. 1 1
      apps/filebrowser/src/filebrowser/templates/listdir_components.mako
  4. 2 11
      apps/jobbrowser/src/jobbrowser/templates/job_browser.mako
  5. 0 2
      apps/jobsub/src/jobsub/templates/designs.mako
  6. 1 3
      apps/jobsub/src/jobsub/views.py
  7. 2 6
      apps/metastore/src/metastore/static/metastore/js/metastore.ko.js
  8. 6 28
      apps/metastore/src/metastore/templates/metastore.mako
  9. 4 10
      apps/metastore/src/metastore/templates/popups/load_data.mako
  10. 1 2
      apps/oozie/src/oozie/conf.py
  11. 14 40
      apps/oozie/src/oozie/management/commands/oozie_setup.py
  12. 2 7
      apps/oozie/src/oozie/static/oozie/js/bundle-editor.ko.js
  13. 3 6
      apps/oozie/src/oozie/static/oozie/js/coordinator-editor.ko.js
  14. 1 1
      apps/oozie/src/oozie/static/oozie/js/sla.utils.js
  15. 5 15
      apps/oozie/src/oozie/static/oozie/js/workflow-editor.ko.js
  16. 2 4
      apps/oozie/src/oozie/templates/editor2/workflow_editor.mako
  17. 1 1
      apps/oozie/src/oozie/templates/navigation-bar.mako
  18. 4 33
      apps/pig/src/pig/management/commands/pig_setup.py
  19. 4 6
      apps/pig/src/pig/templates/app.mako
  20. 0 49
      apps/pig/src/pig/tests.py
  21. 1 3
      apps/pig/src/pig/views.py
  22. 3 3
      apps/security/src/security/templates/hdfs.mako
  23. 0 6
      desktop/conf.dist/hue.ini
  24. 0 6
      desktop/conf/pseudo-distributed.ini.tmpl
  25. 1 1
      desktop/core/src/desktop/app_template_proxy/src/app_name/templates/index.mako
  26. 1 5
      desktop/core/src/desktop/auth/views_test.py
  27. 2 22
      desktop/core/src/desktop/conf.py
  28. 59 116
      desktop/core/src/desktop/converter_tests.py
  29. 15 28
      desktop/core/src/desktop/converters.py
  30. 9 49
      desktop/core/src/desktop/js/apps/notebook/notebook.ko.js
  31. 15 27
      desktop/core/src/desktop/js/assist/assistDbEntry.js
  32. 3 7
      desktop/core/src/desktop/js/assist/assistStorageEntry.js
  33. 4 6
      desktop/core/src/desktop/js/jquery/plugins/jquery.huedatatable.js
  34. 1 5
      desktop/core/src/desktop/js/jquery/plugins/jquery.rowselector.js
  35. 2 9
      desktop/core/src/desktop/js/ko/bindings/ko.hueLink.js
  36. 1 10
      desktop/core/src/desktop/static/desktop/js/document/hueFileEntry.js
  37. 4 6
      desktop/core/src/desktop/static/desktop/js/jquery.huedatatable.js
  38. 2 8
      desktop/core/src/desktop/static/desktop/js/jquery.rowselector.js
  39. 19 28
      desktop/core/src/desktop/templates/assist.mako
  40. 2 9
      desktop/core/src/desktop/templates/common_header.mako
  41. 2 50
      desktop/core/src/desktop/templates/common_header_footer_components.mako
  42. 1 1
      desktop/core/src/desktop/templates/common_header_m.mako
  43. 16 20
      desktop/core/src/desktop/templates/common_notebook_ko_components.mako
  44. 1 1
      desktop/core/src/desktop/templates/document_browser.mako
  45. 1 1
      desktop/core/src/desktop/templates/global_js_constants.mako
  46. 0 4
      desktop/core/src/desktop/templates/hue.mako
  47. 5 11
      desktop/core/src/desktop/templates/ko_components/ko_favorite_app.mako
  48. 0 28
      desktop/core/src/desktop/templates/login.mako
  49. 3 19
      desktop/core/src/desktop/views.py
  50. 1 1
      desktop/libs/dashboard/src/dashboard/static/dashboard/js/collections.ko.js
  51. 2 2
      desktop/libs/dashboard/src/dashboard/static/dashboard/js/search.ko.js
  52. 1 10
      desktop/libs/dashboard/src/dashboard/templates/common_search.mako
  53. 12 26
      desktop/libs/indexer/src/indexer/indexers/envelope.py
  54. 2 2
      desktop/libs/indexer/src/indexer/static/indexer/js/collections.js
  55. 1 5
      desktop/libs/indexer/src/indexer/templates/indexes.mako
  56. 1 5
      desktop/libs/indexer/src/indexer/templates/topics.mako
  57. 2 12
      desktop/libs/notebook/src/notebook/templates/editor_components.mako
  58. 0 6
      tools/kubernetes/services/hue-frontend/conf/hue.ini
  59. 0 0
      webpack-stats.json

+ 1 - 1
.eslintrc.js

@@ -4,7 +4,7 @@ const normalGlobals = [
 ];
 ];
 const hueGlobals = [
 const hueGlobals = [
   // global_js_constants.mako
   // global_js_constants.mako
-  'IS_HUE_4', 'AUTOCOMPLETE_TIMEOUT','CACHEABLE_TTL','CSRF_TOKEN','HAS_MULTI_CLUSTER',
+  'AUTOCOMPLETE_TIMEOUT','CACHEABLE_TTL','CSRF_TOKEN','HAS_MULTI_CLUSTER',
   'DROPZONE_HOME_DIR', 'ENABLE_SQL_SYNTAX_CHECK', 'HAS_NAVIGATOR', 'HAS_OPTIMIZER', 'HAS_WORKLOAD_ANALYTICS',
   'DROPZONE_HOME_DIR', 'ENABLE_SQL_SYNTAX_CHECK', 'HAS_NAVIGATOR', 'HAS_OPTIMIZER', 'HAS_WORKLOAD_ANALYTICS',
   'HUE_CONTAINER', 'IS_EMBEDDED', 'isIE11', 'IS_K8S_ONLY', 'HUE_VERSION', 'IS_NEW_INDEXER_ENABLED','HUE_I18n',
   'HUE_CONTAINER', 'IS_EMBEDDED', 'isIE11', 'IS_K8S_ONLY', 'HUE_VERSION', 'IS_NEW_INDEXER_ENABLED','HUE_I18n',
   'IS_S3_ENABLED', 'KO_DATERANGEPICKER_LABELS', 'DOCUMENT_TYPES', 'LOGGED_USERNAME', 'USER_HOME_DIR',
   'IS_S3_ENABLED', 'KO_DATERANGEPICKER_LABELS', 'DOCUMENT_TYPES', 'LOGGED_USERNAME', 'USER_HOME_DIR',

+ 1 - 2
apps/about/src/about/templates/admin_wizard.mako

@@ -19,7 +19,6 @@ from django.urls import reverse
 from django.utils.encoding import smart_unicode
 from django.utils.encoding import smart_unicode
 from django.utils.translation import ugettext as _
 from django.utils.translation import ugettext as _
 
 
-from desktop.conf import IS_HUE_4
 from desktop.views import commonheader, commonfooter
 from desktop.views import commonheader, commonfooter
 from metadata.conf import OPTIMIZER, has_optimizer
 from metadata.conf import OPTIMIZER, has_optimizer
 
 
@@ -141,7 +140,7 @@ ${ layout.menubar(section='quick_start') }
                     </a>
                     </a>
                   </li>
                   </li>
               % endif
               % endif
-              % if IS_HUE_4.get() and 'oozie' in app_names:
+              % if 'oozie' in app_names:
                   <li>
                   <li>
                     <a href="javascript:void(0)" class="installBtn" data-loading-text="${ _('Installing...') }"
                     <a href="javascript:void(0)" class="installBtn" data-loading-text="${ _('Installing...') }"
                        data-sample-url="${ url('oozie:install_examples') }">
                        data-sample-url="${ url('oozie:install_examples') }">

+ 1 - 1
apps/filebrowser/src/filebrowser/templates/listdir_components.mako

@@ -1668,7 +1668,7 @@ from filebrowser.conf import ENABLE_EXTRACT_UPLOADED_ARCHIVE
 
 
       self.submitSelected = function() {
       self.submitSelected = function() {
         % if 'oozie' in apps:
         % if 'oozie' in apps:
-          $.get("${ url('oozie:submit_external_job', application_path='/') }../" + self.selectedFile().path, {'format': IS_HUE_4 ? 'json' : 'html'}, function (response) {
+          $.get("${ url('oozie:submit_external_job', application_path='/') }../" + self.selectedFile().path, { 'format': 'json' }, function (response) {
             $('#submit-wf-modal').html(response);
             $('#submit-wf-modal').html(response);
             $('#submit-wf-modal').modal('show');
             $('#submit-wf-modal').modal('show');
           });
           });

+ 2 - 11
apps/jobbrowser/src/jobbrowser/templates/job_browser.mako

@@ -16,7 +16,7 @@
 <%
 <%
 from django.utils.translation import ugettext as _
 from django.utils.translation import ugettext as _
 
 
-from desktop.conf import CUSTOM, IS_K8S_ONLY, is_hue4
+from desktop.conf import CUSTOM, IS_K8S_ONLY
 from desktop.views import commonheader, commonfooter, _ko
 from desktop.views import commonheader, commonfooter, _ko
 from metadata.conf import PROMETHEUS
 from metadata.conf import PROMETHEUS
 
 
@@ -2829,11 +2829,6 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
 
 
         $('canvas').remove();
         $('canvas').remove();
 
 
-        if (!IS_HUE_4) {
-          huePubSub.subscribe('hue4.process.headers', function (opts) {
-            opts.callback(opts.response);
-          });
-        }
         if (vm.job().type() === 'workflow') {
         if (vm.job().type() === 'workflow') {
           $('#workflow-page-graph${ SUFFIX }').html('<div class="hue-spinner"><i class="fa fa-spinner fa-spin hue-spinner-center hue-spinner-xlarge"></i></div>');
           $('#workflow-page-graph${ SUFFIX }').html('<div class="hue-spinner"><i class="fa fa-spinner fa-spin hue-spinner-center hue-spinner-xlarge"></i></div>');
           $.ajax({
           $.ajax({
@@ -2957,11 +2952,7 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
       });
       });
       self.paginationPage = ko.observable(1);
       self.paginationPage = ko.observable(1);
       self.paginationOffset = ko.observable(1); // Starting index
       self.paginationOffset = ko.observable(1); // Starting index
-      % if is_hue4():
-        self.paginationResultPage = ko.observable(100);
-      % else:
-        self.paginationResultPage = ko.observable(50);
-      % endif
+      self.paginationResultPage = ko.observable(100);
       self.pagination = ko.computed(function() {
       self.pagination = ko.computed(function() {
         return {
         return {
             'page': self.paginationPage(),
             'page': self.paginationPage(),

+ 0 - 2
apps/jobsub/src/jobsub/templates/designs.mako

@@ -57,12 +57,10 @@ ${ commonheader(None, "jobsub", user, request) | n,unicode }
 
 
 <div class="container-fluid">
 <div class="container-fluid">
   <div class="card card-small">
   <div class="card card-small">
-  % if is_hue_4:
     <div class="alert">
     <div class="alert">
       ${ _('This is the old Job Editor, it is recommended to instead use the new ') }
       ${ _('This is the old Job Editor, it is recommended to instead use the new ') }
         <a href="${ url('notebook:editor') }" target="_blank">${_('Editor')}</a>
         <a href="${ url('notebook:editor') }" target="_blank">${_('Editor')}</a>
     </div>
     </div>
-  % endif
 
 
   <h1 class="card-heading simple">${_('Designs')}</h1>
   <h1 class="card-heading simple">${_('Designs')}</h1>
 
 

+ 1 - 3
apps/jobsub/src/jobsub/views.py

@@ -31,7 +31,6 @@ import time as py_time
 from django.utils.translation import ugettext as _
 from django.utils.translation import ugettext as _
 
 
 from desktop import appmanager
 from desktop import appmanager
-from desktop.conf import IS_HUE_4
 from desktop.lib.django_util import render, render_json
 from desktop.lib.django_util import render, render_json
 from desktop.lib.exceptions import StructuredException
 from desktop.lib.exceptions import StructuredException
 from desktop.lib.exceptions_renderable import PopupException
 from desktop.lib.exceptions_renderable import PopupException
@@ -107,8 +106,7 @@ def list_designs(request):
       'currentuser': request.user,
       'currentuser': request.user,
       'owner': owner,
       'owner': owner,
       'name': name,
       'name': name,
-      'apps': appmanager.get_apps_dict(),
-      'is_hue_4': IS_HUE_4.get()
+      'apps': appmanager.get_apps_dict()
     })
     })
 
 
 def not_available(request):
 def not_available(request):

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

@@ -27,7 +27,6 @@ var MetastoreViewModel = (function () {
     self.partitionsLimit = options.partitionsLimit;
     self.partitionsLimit = options.partitionsLimit;
     self.assistAvailable = ko.observable(true);
     self.assistAvailable = ko.observable(true);
     self.apiHelper = window.apiHelper;
     self.apiHelper = window.apiHelper;
-    self.isHue4 = ko.observable(options.hue4);
     self.isLeftPanelVisible = ko.observable();
     self.isLeftPanelVisible = ko.observable();
     self.apiHelper.withTotalStorage('assist', 'assist_panel_visible', self.isLeftPanelVisible, true);
     self.apiHelper.withTotalStorage('assist', 'assist_panel_visible', self.isLeftPanelVisible, true);
     self.optimizerEnabled = ko.observable(options.optimizerEnabled || false);
     self.optimizerEnabled = ko.observable(options.optimizerEnabled || false);
@@ -143,10 +142,7 @@ var MetastoreViewModel = (function () {
     });
     });
 
 
     huePubSub.subscribe('metastore.url.change', function () {
     huePubSub.subscribe('metastore.url.change', function () {
-      var prefix = '/metastore/';
-      if (self.isHue4()){
-        prefix = '/hue' + prefix;
-      }
+      var prefix = '/hue/metastore/';
       if (self.source() && self.source().namespace()) {
       if (self.source() && self.source().namespace()) {
         var params = {
         var params = {
           source: self.source().type
           source: self.source().type
@@ -247,7 +243,7 @@ var MetastoreViewModel = (function () {
   MetastoreViewModel.prototype.loadUrl = function () {
   MetastoreViewModel.prototype.loadUrl = function () {
     var self = this;
     var self = this;
 
 
-    var path = (IS_HUE_4 ? window.location.pathname.substr(4) : window.location.pathname);
+    var path = window.location.pathname.substr(4);
     if (!path) {
     if (!path) {
       path = '/metastore/tables';
       path = '/metastore/tables';
     }
     }

+ 6 - 28
apps/metastore/src/metastore/templates/metastore.mako

@@ -181,23 +181,13 @@ ${ components.menubar(is_embeddable) }
           <!-- /ko -->
           <!-- /ko -->
         </td>
         </td>
         <td title="${_('Query partition data')}">
         <td title="${_('Query partition data')}">
-          <!-- ko if: IS_HUE_4 -->
-            <a data-bind="click: function() { queryAndWatchUrl(notebookUrl, $root.source().type); }, text: '[\'' + columns.join('\',\'') + '\']'" href="javascript:void(0)"></a>
-          <!-- /ko -->
-          <!-- ko if: ! IS_HUE_4 -->
-            <a data-bind="attr: { 'href': readUrl }, text: '[\'' + columns.join('\',\'') + '\']'"></a>
-          <!-- /ko -->
+          <a data-bind="click: function() { queryAndWatchUrl(notebookUrl, $root.source().type); }, text: '[\'' + columns.join('\',\'') + '\']'" href="javascript:void(0)"></a>
         </td>
         </td>
         <td data-bind="text: partitionSpec"></td>
         <td data-bind="text: partitionSpec"></td>
         <td data-bind="visible: $root.source().type != 'impala'">
         <td data-bind="visible: $root.source().type != 'impala'">
-          <!-- ko if: IS_HUE_4 -->
-            <a data-bind="click: function () { browsePartitionFolder(browseUrl); }" href="javascript:void(0)" title="${_('Browse partition files')}">
-              ${_('Files')}
-            </a>
-          <!-- /ko -->
-          <!-- ko if: ! IS_HUE_4 -->
-            <a data-bind="attr: { 'href': browseUrl }" title="${_('Browse partition files')}">${_('Files')}</a>
-          <!-- /ko -->
+          <a data-bind="click: function () { browsePartitionFolder(browseUrl); }" href="javascript:void(0)" title="${_('Browse partition files')}">
+            ${_('Files')}
+          </a>
         </td>
         </td>
       </tr>
       </tr>
       <!-- /ko -->
       <!-- /ko -->
@@ -926,12 +916,7 @@ ${ components.menubar(is_embeddable) }
               <!-- ko with: database -->
               <!-- ko with: database -->
               <!-- ko with: table -->
               <!-- ko with: table -->
               % if USE_NEW_EDITOR.get():
               % if USE_NEW_EDITOR.get():
-                <!-- ko if: IS_HUE_4 -->
                 <a href="javascript: void(0);" class="btn btn-default" data-bind="click: function() { queryAndWatch(catalogEntry); }" title="${_('Query')}"><i class="fa fa-play fa-fw"></i> ${_('Query')}</a>
                 <a href="javascript: void(0);" class="btn btn-default" data-bind="click: function() { queryAndWatch(catalogEntry); }" title="${_('Query')}"><i class="fa fa-play fa-fw"></i> ${_('Query')}</a>
-                <!-- /ko -->
-                <!-- ko if: ! IS_HUE_4 -->
-                <a class="btn btn-default" data-bind="attr: { 'href': '/notebook/browse/' + catalogEntry.path.join('/') }" title="${_('Query')}"><i class="fa fa-play fa-fw"></i> ${_('Query')}</a>
-                <!-- /ko -->
               % else:
               % else:
                 <a class="btn btn-default" data-bind="attr: { 'href': '/metastore/table/'+ catalogEntry.path.join('/') + '/read' }" title="${_('Browse Data')}"><i class="fa fa-play fa-fw"></i> ${_('Browse Data')}</a>
                 <a class="btn btn-default" data-bind="attr: { 'href': '/metastore/table/'+ catalogEntry.path.join('/') + '/read' }" title="${_('Browse Data')}"><i class="fa fa-play fa-fw"></i> ${_('Browse Data')}</a>
               % endif
               % endif
@@ -1062,12 +1047,8 @@ ${ components.menubar(is_embeddable) }
   }
   }
 
 
   function queryAndWatch(catalogEntry) {
   function queryAndWatch(catalogEntry) {
-    if (!IS_HUE_4) {
-      location.href = '/notebook/browse/' + catalogEntry.path.join('/')
-    } else {
-      queryAndWatchUrl('/notebook/browse/' + catalogEntry.path.join('/') + '/', catalogEntry.getSourceType(),
-              catalogEntry.namespace && catalogEntry.namespace.id, catalogEntry.compute)
-    }
+    queryAndWatchUrl('/notebook/browse/' + catalogEntry.path.join('/') + '/', catalogEntry.getSourceType(),
+            catalogEntry.namespace && catalogEntry.namespace.id, catalogEntry.compute)
   }
   }
 
 
   (function () {
   (function () {
@@ -1078,9 +1059,6 @@ ${ components.menubar(is_embeddable) }
     $(document).ready(function () {
     $(document).ready(function () {
       var options = {
       var options = {
         user: '${ user.username }',
         user: '${ user.username }',
-        % if is_embeddable:
-        hue4: true,
-        % endif
         optimizerEnabled: '${ is_optimizer_enabled }' === 'True',
         optimizerEnabled: '${ is_optimizer_enabled }' === 'True',
         navigatorEnabled: '${ is_navigator_enabled }' === 'True',
         navigatorEnabled: '${ is_navigator_enabled }' === 'True',
         optimizerUrl: '${ optimizer_url }',
         optimizerUrl: '${ optimizer_url }',

+ 4 - 10
apps/metastore/src/metastore/templates/popups/load_data.mako

@@ -132,10 +132,8 @@ from django.utils.translation import ugettext as _
     }
     }
 
 
     $("#load-data-submit-btn").click(function (e) {
     $("#load-data-submit-btn").click(function (e) {
-      if (IS_HUE_4) {
-        $("#load_data_is_embeddable").val("true");
-        $("#load-data-form").find('input[name=start_time]').val(ko.mapping.toJSON(new Date().getTime()));
-      }
+      $("#load_data_is_embeddable").val("true");
+      $("#load-data-form").find('input[name=start_time]').val(ko.mapping.toJSON(new Date().getTime()));
       $.post("${ url('metastore:load_table', database=database, table=table.name) }",
       $.post("${ url('metastore:load_table', database=database, table=table.name) }",
         $("#load-data-form").serialize(),
         $("#load-data-form").serialize(),
         function (response) {
         function (response) {
@@ -147,12 +145,8 @@ from django.utils.translation import ugettext as _
               $('#import-data-modal').html(response['data']);
               $('#import-data-modal').html(response['data']);
             }
             }
           } else {
           } else {
-            if (IS_HUE_4) {
-              huePubSub.publish('notebook.task.submitted', response.history_uuid);
-              $("#import-data-modal").modal("hide");
-            } else {
-              window.location.replace(response['data']);
-            }
+            huePubSub.publish('notebook.task.submitted', response.history_uuid);
+            $("#import-data-modal").modal("hide");
           }
           }
         }
         }
       ).always(function () {
       ).always(function () {

+ 1 - 2
apps/oozie/src/oozie/conf.py

@@ -19,7 +19,6 @@ import os.path
 
 
 from django.utils.translation import ugettext as _, ugettext_lazy as _t
 from django.utils.translation import ugettext as _, ugettext_lazy as _t
 
 
-from desktop.conf import is_hue4
 from desktop.lib.conf import Config, coerce_bool
 from desktop.lib.conf import Config, coerce_bool
 from desktop.lib import paths
 from desktop.lib import paths
 from liboozie.conf import get_oozie_status
 from liboozie.conf import get_oozie_status
@@ -64,7 +63,7 @@ REMOTE_SAMPLE_DIR = Config(
 
 
 def get_oozie_job_count():
 def get_oozie_job_count():
   '''Returns the maximum of jobs fetched by the API depending on the Hue version'''
   '''Returns the maximum of jobs fetched by the API depending on the Hue version'''
-  return 100 if is_hue4() else 50
+  return 100
 
 
 OOZIE_JOBS_COUNT = Config(
 OOZIE_JOBS_COUNT = Config(
   key='oozie_jobs_count',
   key='oozie_jobs_count',

+ 14 - 40
apps/oozie/src/oozie/management/commands/oozie_setup.py

@@ -25,7 +25,7 @@ from django.core.management.base import BaseCommand
 from django.db import transaction
 from django.db import transaction
 from django.utils.translation import ugettext as _
 from django.utils.translation import ugettext as _
 
 
-from desktop.conf import USE_NEW_EDITOR, IS_HUE_4
+from desktop.conf import USE_NEW_EDITOR
 from desktop.models import Directory, Document, Document2, Document2Permission
 from desktop.models import Directory, Document, Document2, Document2Permission
 from hadoop import cluster
 from hadoop import cluster
 from liboozie.submittion import create_directories
 from liboozie.submittion import create_directories
@@ -366,42 +366,20 @@ class Command(BaseCommand):
       with transaction.atomic():
       with transaction.atomic():
         management.call_command('loaddata', 'initial_oozie_examples.json', verbosity=2, commit=False)
         management.call_command('loaddata', 'initial_oozie_examples.json', verbosity=2, commit=False)
 
 
-    if IS_HUE_4.get():
-      # Install editor oozie examples without doc1 link
-      LOG.info("Using Hue 4, will install oozie editor samples.")
-
-      example_jobs = []
-      example_jobs.append(self._install_mapreduce_example())
-      example_jobs.append(self._install_java_example())
-      example_jobs.append(self._install_spark_example())
-      example_jobs.append(self._install_pyspark_example())
-
-      # If documents exist but have been trashed, recover from Trash
-      for doc in example_jobs:
-        if doc is not None and doc.parent_directory != examples_dir:
-          doc.parent_directory = examples_dir
-          doc.save()
-
-    elif USE_NEW_EDITOR.get():
-      # Install as link-workflow doc2 to old Job Designs
-      docs = Document.objects.get_docs(self.user, Workflow).filter(owner=self.user)
-      for doc in docs:
-        if doc.content_object:
-          data = doc.content_object.data_dict
-          data.update({'content_type': doc.content_type.model, 'object_id': doc.object_id})
-          data = json.dumps(data)
-
-          # Don't overwrite
-          doc2, created = Document2.objects.get_or_create(
-            owner=self.user,
-            parent_directory=examples_dir,
-            name=doc.name,
-            type='link-workflow',
-            description=doc.description,
-            data=data
-          )
+    # Install editor oozie examples without doc1 link
+    LOG.info("Using Hue 4, will install oozie editor samples.")
 
 
-          LOG.info('Successfully installed sample link to jobsub: %s' % (doc2.name,))
+    example_jobs = []
+    example_jobs.append(self._install_mapreduce_example())
+    example_jobs.append(self._install_java_example())
+    example_jobs.append(self._install_spark_example())
+    example_jobs.append(self._install_pyspark_example())
+
+    # If documents exist but have been trashed, recover from Trash
+    for doc in example_jobs:
+      if doc is not None and doc.parent_directory != examples_dir:
+        doc.parent_directory = examples_dir
+        doc.save()
 
 
     # Share oozie examples with default group
     # Share oozie examples with default group
     oozie_examples = Document2.objects.filter(
     oozie_examples = Document2.objects.filter(
@@ -411,7 +389,3 @@ class Command(BaseCommand):
     )
     )
     oozie_examples.update(parent_directory=examples_dir)
     oozie_examples.update(parent_directory=examples_dir)
     examples_dir.share(self.user, Document2Permission.READ_PERM, groups=[get_default_user_group()])
     examples_dir.share(self.user, Document2Permission.READ_PERM, groups=[get_default_user_group()])
-
-    if not IS_HUE_4.get():
-      self.install_examples()
-      Document.objects.sync()

+ 2 - 7
apps/oozie/src/oozie/static/oozie/js/bundle-editor.ko.js

@@ -111,12 +111,7 @@ var BundleEditorViewModel = function (bundle_json, coordinators_json, can_edit_j
           self.bundle.id(data.id);
           self.bundle.id(data.id);
           self.bundle.tracker().markCurrentStateAsClean();
           self.bundle.tracker().markCurrentStateAsClean();
           $(document).trigger("info", data.message);
           $(document).trigger("info", data.message);
-          if (window.location.search.indexOf("bundle") == -1 && !IS_HUE_4) {
-            window.location.hash = '#bundle=' + data.id;
-          }
-          else if (IS_HUE_4) {
-            hueUtils.changeURL('/hue/oozie/editor/bundle/edit/?bundle=' + data.id);
-          }
+          hueUtils.changeURL('/hue/oozie/editor/bundle/edit/?bundle=' + data.id);
         }
         }
         else {
         else {
           $(document).trigger("error", data.message);
           $(document).trigger("error", data.message);
@@ -135,7 +130,7 @@ var BundleEditorViewModel = function (bundle_json, coordinators_json, can_edit_j
     if (!self.bundle.isDirty()) {
     if (!self.bundle.isDirty()) {
       hueAnalytics.log('oozie/editor/bundle', 'submit');
       hueAnalytics.log('oozie/editor/bundle', 'submit');
       $.get("/oozie/editor/bundle/submit/" + self.bundle.id(), {
       $.get("/oozie/editor/bundle/submit/" + self.bundle.id(), {
-        format: IS_HUE_4 ? 'json' : 'html'
+        format: 'json'
       }, function (data) {
       }, function (data) {
         $(document).trigger("showSubmitPopup", data);
         $(document).trigger("showSubmitPopup", data);
       }).fail(function (xhr, textStatus, errorThrown) {
       }).fail(function (xhr, textStatus, errorThrown) {

+ 3 - 6
apps/oozie/src/oozie/static/oozie/js/coordinator-editor.ko.js

@@ -246,13 +246,10 @@ var CoordinatorEditorViewModel = (function () {
             self.coordinator.tracker().markCurrentStateAsClean();
             self.coordinator.tracker().markCurrentStateAsClean();
             if (typeof cb === 'function') {
             if (typeof cb === 'function') {
               cb(data);
               cb(data);
-            }
-            else {
+            } else {
               $(document).trigger("info", data.message);
               $(document).trigger("info", data.message);
             }
             }
-            if (window.location.search.indexOf("coordinator") == -1 && !IS_HUE_4) {
-              window.location.hash = '#coordinator=' + data.id;
-            } else if (IS_HUE_4 && ! cb) { // cb from integrated scheduler
+            if (!cb) { // cb from integrated scheduler
               hueUtils.changeURL('/hue/oozie/editor/coordinator/edit/?coordinator=' + data.id);
               hueUtils.changeURL('/hue/oozie/editor/coordinator/edit/?coordinator=' + data.id);
             }
             }
           }
           }
@@ -291,7 +288,7 @@ var CoordinatorEditorViewModel = (function () {
       if (!self.coordinator.isDirty()) {
       if (!self.coordinator.isDirty()) {
         hueAnalytics.log('oozie/editor/coordinator', 'submit');
         hueAnalytics.log('oozie/editor/coordinator', 'submit');
         $.get("/oozie/editor/coordinator/submit/" + self.coordinator.id(), {
         $.get("/oozie/editor/coordinator/submit/" + self.coordinator.id(), {
-          format: IS_HUE_4 ? 'json' : 'html'
+          format: 'json'
         }, function (data) {
         }, function (data) {
           $(document).trigger("showSubmitPopup", data);
           $(document).trigger("showSubmitPopup", data);
         }).fail(function (xhr, textStatus, errorThrown) {
         }).fail(function (xhr, textStatus, errorThrown) {

+ 1 - 1
apps/oozie/src/oozie/static/oozie/js/sla.utils.js

@@ -45,7 +45,7 @@ function getSLArow(row) {
     getSLAStatusLabel(row.slaStatus),
     getSLAStatusLabel(row.slaStatus),
     emptyStringIfNull(row.appName),
     emptyStringIfNull(row.appName),
     emptyStringIfNull(row.appType),
     emptyStringIfNull(row.appType),
-    IS_HUE_4 ? '<a href="/hue/jobbrowser/#!id=' + row.id + '">' + row.id + '</a>' : '<a href="' + row.appUrl + '#showSla" data-row-selector="true">' + row.id + '</a>',
+    '<a href="/hue/jobbrowser/#!id=' + row.id + '">' + row.id + '</a>',
     '<span class="nominalTime">' + emptyStringIfNull(row.nominalTime) + '</span>',
     '<span class="nominalTime">' + emptyStringIfNull(row.nominalTime) + '</span>',
     '<span class="expectedStart">' + emptyStringIfNull(row.expectedStart) + '</span>',
     '<span class="expectedStart">' + emptyStringIfNull(row.expectedStart) + '</span>',
     '<span class="actualStart">' + emptyStringIfNull(row.actualStart) + '</span>',
     '<span class="actualStart">' + emptyStringIfNull(row.actualStart) + '</span>',

+ 5 - 15
apps/oozie/src/oozie/static/oozie/js/workflow-editor.ko.js

@@ -1204,13 +1204,8 @@ var WorkflowEditorViewModel = function (layout_json, workflow_json, credentials_
           $(document).trigger("info", data.message);
           $(document).trigger("info", data.message);
           self.workflow.tracker().markCurrentStateAsClean();
           self.workflow.tracker().markCurrentStateAsClean();
           huePubSub.publish('assist.document.refresh');
           huePubSub.publish('assist.document.refresh');
-          if (window.location.search.indexOf("workflow") == -1 && !IS_HUE_4) {
-            window.location.hash = '#workflow=' + data.id;
-          } else if (IS_HUE_4) {
-            hueUtils.changeURL('/hue/oozie/editor/workflow/edit/?workflow=' + data.id);
-          }
-        }
-        else {
+          hueUtils.changeURL('/hue/oozie/editor/workflow/edit/?workflow=' + data.id);
+        } else {
           $(document).trigger("error", data.message);
           $(document).trigger("error", data.message);
         }
         }
       }).fail(function (xhr, textStatus, errorThrown) {
       }).fail(function (xhr, textStatus, errorThrown) {
@@ -1241,7 +1236,7 @@ var WorkflowEditorViewModel = function (layout_json, workflow_json, credentials_
   self.showSubmitPopup = function () {
   self.showSubmitPopup = function () {
     $(".jHueNotify").remove();
     $(".jHueNotify").remove();
     $.get("/oozie/editor/workflow/submit/" + self.workflow.id(), {
     $.get("/oozie/editor/workflow/submit/" + self.workflow.id(), {
-      format: IS_HUE_4 ? 'json' : 'html',
+      format: 'json',
       cluster: self.compute() ? ko.mapping.toJSON(self.compute()) : '{}'
       cluster: self.compute() ? ko.mapping.toJSON(self.compute()) : '{}'
     }, function (data) {
     }, function (data) {
       $(document).trigger("showSubmitPopup", data);
       $(document).trigger("showSubmitPopup", data);
@@ -1253,7 +1248,7 @@ var WorkflowEditorViewModel = function (layout_json, workflow_json, credentials_
   self.showSubmitActionPopup = function (w) {
   self.showSubmitActionPopup = function (w) {
     $(".jHueNotify").remove();
     $(".jHueNotify").remove();
     $.get("/oozie/editor/workflow/submit_single_action/" + self.workflow.id() + "/" + self.workflow.getNodeById(w.id()).id(), {
     $.get("/oozie/editor/workflow/submit_single_action/" + self.workflow.id() + "/" + self.workflow.getNodeById(w.id()).id(), {
-      format: IS_HUE_4 ? 'json' : 'html'
+      format: 'json'
     }, function (data) {
     }, function (data) {
       $(document).trigger("showSubmitPopup", data);
       $(document).trigger("showSubmitPopup", data);
     }).fail(function (xhr, textStatus, errorThrown) {
     }).fail(function (xhr, textStatus, errorThrown) {
@@ -1263,12 +1258,7 @@ var WorkflowEditorViewModel = function (layout_json, workflow_json, credentials_
 
 
   self.schedule = function () {
   self.schedule = function () {
     hueAnalytics.log('oozie/editor/workflow', 'schedule');
     hueAnalytics.log('oozie/editor/workflow', 'schedule');
-    if (IS_HUE_4) {
-      huePubSub.publish('open.link', '/oozie/editor/coordinator/new/?workflow=' + self.workflow.uuid());
-    }
-    else {
-      window.location.replace('/oozie/editor/coordinator/new/?workflow=' + self.workflow.uuid());
-    }
+    huePubSub.publish('open.link', '/oozie/editor/coordinator/new/?workflow=' + self.workflow.uuid());
   };
   };
 
 
 
 

+ 2 - 4
apps/oozie/src/oozie/templates/editor2/workflow_editor.mako

@@ -109,10 +109,8 @@ ${ layout.menubar(section='workflows', is_editor=True, pullright=buttons, is_emb
 
 
 
 
 <script type="text/javascript">
 <script type="text/javascript">
-  if (window.location.hash != "") {
-    if (window.location.hash.indexOf("workflow") > -1) {
-      location.href = (IS_HUE_4 ? '/hue' : '') + "/oozie/editor/workflow/edit/?" + window.location.hash.substr(1).replace(/(<([^>]+)>)/ig, "");
-    }
+  if (window.location.hash && window.location.hash.indexOf('workflow') !== -1) {
+    location.href = '/hue/oozie/editor/workflow/edit/?' + window.location.hash.substr(1).replace(/(<([^>]+)>)/ig, '');
   }
   }
 </script>
 </script>
 
 

+ 1 - 1
apps/oozie/src/oozie/templates/navigation-bar.mako

@@ -74,7 +74,7 @@
                 % else:
                 % else:
                 <a title="${ _('Switch to the dashboard') }" href="${ is_embeddable and '/hue/jobbrowser/#!workflows' or getURL(section, dashboard, ENABLE_V2.get())}">
                 <a title="${ _('Switch to the dashboard') }" href="${ is_embeddable and '/hue/jobbrowser/#!workflows' or getURL(section, dashboard, ENABLE_V2.get())}">
                   <svg class="svg-app-icon"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#hi-oozie"></use></svg> ${ _('Oozie Editor') }
                   <svg class="svg-app-icon"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#hi-oozie"></use></svg> ${ _('Oozie Editor') }
-                  <!-- ko component: { name: 'hue-favorite-app', params: { hue4: IS_HUE_4, app: 'scheduler', interpreter: '${ getInterpreter(section) }' }} --><!-- /ko -->
+                  <!-- ko component: { name: 'hue-favorite-app', params: { app: 'scheduler', interpreter: '${ getInterpreter(section) }' }} --><!-- /ko -->
                 </a>
                 </a>
                 % endif
                 % endif
                </li>
                </li>

+ 4 - 33
apps/pig/src/pig/management/commands/pig_setup.py

@@ -24,7 +24,7 @@ from django.core.management.base import BaseCommand
 from django.db import transaction
 from django.db import transaction
 from django.utils.translation import ugettext as _
 from django.utils.translation import ugettext as _
 
 
-from desktop.conf import USE_NEW_EDITOR, IS_HUE_4
+from desktop.conf import USE_NEW_EDITOR
 from desktop.lib import paths
 from desktop.lib import paths
 from desktop.models import Directory, Document, Document2, Document2Permission
 from desktop.models import Directory, Document, Document2, Document2Permission
 from hadoop import cluster
 from hadoop import cluster
@@ -122,16 +122,9 @@ STORE upper_case INTO '$output';
     # Initialize doc2, whether editor script or link
     # Initialize doc2, whether editor script or link
     doc2 = None
     doc2 = None
 
 
-    if IS_HUE_4.get():
-      # Install editor pig script without doc1 link
-      LOG.info("Using Hue 4, will install pig editor sample.")
-      doc2 = self.install_pig_script(sample_user)
-    else:
-      # Install old pig script fixture
-      LOG.info("Using Hue 3, will install pig script fixture.")
-      with transaction.atomic():
-        management.call_command('loaddata', 'initial_pig_examples.json', verbosity=2, commit=False)
-        Document.objects.sync()
+    # Install editor pig script without doc1 link
+    LOG.info("Using Hue 4, will install pig editor sample.")
+    doc2 = self.install_pig_script(sample_user)
 
 
     if USE_NEW_EDITOR.get():
     if USE_NEW_EDITOR.get():
       # Get or create sample user directories
       # Get or create sample user directories
@@ -143,28 +136,6 @@ STORE upper_case INTO '$output';
         owner=sample_user,
         owner=sample_user,
         name=Document2.EXAMPLES_DIR)
         name=Document2.EXAMPLES_DIR)
 
 
-      if not IS_HUE_4.get():
-        try:
-          # Don't overwrite
-          doc = Document.objects.get(object_id=1100713)
-          doc2 = Document2.objects.get(owner=sample_user, name=doc.name, type='link-pigscript')
-        except Document.DoesNotExist:
-          LOG.warn('Sample pig script document not found.')
-        except Document2.DoesNotExist:
-          if doc.content_object:
-            data = doc.content_object.dict
-            data.update({'content_type': doc.content_type.model, 'object_id': doc.object_id})
-            data = json.dumps(data)
-
-            doc2 = Document2.objects.create(
-              owner=sample_user,
-              parent_directory=examples_dir,
-              name=doc.name,
-              type='link-pigscript',
-              description=doc.description,
-              data=data)
-            LOG.info('Successfully installed sample link to pig script: %s' % (doc2.name,))
-
       # If document exists but has been trashed, recover from Trash
       # If document exists but has been trashed, recover from Trash
       if doc2 and doc2.parent_directory != examples_dir:
       if doc2 and doc2.parent_directory != examples_dir:
         doc2.parent_directory = examples_dir
         doc2.parent_directory = examples_dir

+ 4 - 6
apps/pig/src/pig/templates/app.mako

@@ -44,12 +44,10 @@ ${ commonheader(None, "pig", user, request) | n,unicode }
   </div>
   </div>
 
 
   <div class="container-fluid">
   <div class="container-fluid">
-    % if is_hue_4:
-      <div class="alert">
-        ${ _('This is the old Pig Editor, it is recommended to instead use the new ') }
-        <a href="${ url('notebook:editor') }?type=pig" target="_blank">${_('Editor')}</a>
-      </div>
-    % endif
+    <div class="alert">
+      ${ _('This is the old Pig Editor, it is recommended to instead use the new ') }
+      <a href="${ url('notebook:editor') }?type=pig" target="_blank">${_('Editor')}</a>
+    </div>
   </div>
   </div>
 
 
   <div class="container-fluid">
   <div class="container-fluid">

+ 0 - 49
apps/pig/src/pig/tests.py

@@ -25,7 +25,6 @@ from django.urls import reverse
 from nose.plugins.skip import SkipTest
 from nose.plugins.skip import SkipTest
 from nose.tools import assert_true, assert_equal, assert_false
 from nose.tools import assert_true, assert_equal, assert_false
 
 
-from desktop.conf import IS_HUE_4
 from desktop.lib.django_test_util import make_logged_in_client
 from desktop.lib.django_test_util import make_logged_in_client
 from desktop.lib.test_utils import grant_access
 from desktop.lib.test_utils import grant_access
 from desktop.models import SAMPLE_USER_ID
 from desktop.models import SAMPLE_USER_ID
@@ -255,54 +254,6 @@ class TestWithHadoop(OozieBase):
 
 
     return pig_script_id
     return pig_script_id
 
 
-  def test_submit(self):
-    if is_live_cluster():
-      raise SkipTest('HUE-2909: Skipping because test is not reentrant')
-
-    if not IS_HUE_4.get():
-      script = PigScript.objects.get(id=SAMPLE_USER_ID)
-      script_dict = script.dict
-
-      post_data = {
-        'id': script.id,
-        'name': script_dict['name'],
-        'script': script_dict['script'],
-        'user': script.owner,
-        'parameters': json.dumps(script_dict['parameters']),
-        'resources': json.dumps(script_dict['resources']),
-        'hadoopProperties': json.dumps(script_dict['hadoopProperties']),
-        'submissionVariables': json.dumps([{"name": "output", "value": self.cluster.fs_prefix + '/test_pig_script_submit'}]),
-      }
-
-      response = self.c.post(reverse('pig:run'), data=post_data, follow=True)
-      job_id = json.loads(response.content)['id']
-
-      self.wait_until_completion(job_id)
-
-  def test_stop(self):
-    if not IS_HUE_4.get():
-      script = PigScript.objects.get(id=SAMPLE_USER_ID)
-      script_dict = script.dict
-
-      post_data = {
-        'id': script.id,
-        'name': script_dict['name'],
-        'script': script_dict['script'],
-        'user': script.owner,
-        'parameters': json.dumps(script_dict['parameters']),
-        'resources': json.dumps(script_dict['resources']),
-        'hadoopProperties': json.dumps(script_dict['hadoopProperties']),
-        'submissionVariables': json.dumps([{"name": "output", "value": self.cluster.fs_prefix + '/test_pig_script_stop'}]),
-      }
-
-      submit_response = self.c.post(reverse('pig:run'), data=post_data, follow=True)
-      script = PigScript.objects.get(id=json.loads(submit_response.content)['id'])
-      assert_true(script.dict['job_id'], script.dict)
-
-      self.c.post(reverse('pig:stop'), data={'id': script.id}, follow=True)
-      self.wait_until_completion(json.loads(submit_response.content)['id'], expected_status='KILLED')
-
-
 OOZIE_LOGS ="""  Log Type: stdout
 OOZIE_LOGS ="""  Log Type: stdout
 
 
   Log Length: 117627
   Log Length: 117627

+ 1 - 3
apps/pig/src/pig/views.py

@@ -22,7 +22,6 @@ from django.urls import reverse
 from django.utils.translation import ugettext as _
 from django.utils.translation import ugettext as _
 from django.views.decorators.csrf import ensure_csrf_cookie
 from django.views.decorators.csrf import ensure_csrf_cookie
 
 
-from desktop.conf import IS_HUE_4
 from desktop.lib.django_util import JsonResponse, render
 from desktop.lib.django_util import JsonResponse, render
 from desktop.lib.exceptions_renderable import PopupException
 from desktop.lib.exceptions_renderable import PopupException
 from desktop.lib.rest.http_client import RestException
 from desktop.lib.rest.http_client import RestException
@@ -48,8 +47,7 @@ def app(request):
     LOG.exception('failed to find autocomplete base url')
     LOG.exception('failed to find autocomplete base url')
 
 
   return render('app.mako', request, {
   return render('app.mako', request, {
-    'autocomplete_base_url': autocomplete_base_url,
-    'is_hue_4': IS_HUE_4.get()
+    'autocomplete_base_url': autocomplete_base_url
   })
   })
 
 
 
 

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

@@ -101,7 +101,7 @@ ${ layout.menubar(section='hdfs', is_embeddable=is_embeddable) }
               <div class="path-container">
               <div class="path-container">
                 <div class="input-append span12">
                 <div class="input-append span12">
                   <input id="path" class="path" type="text" data-bind="value: $root.assist.path" autocomplete="off" />
                   <input id="path" class="path" type="text" data-bind="value: $root.assist.path" autocomplete="off" />
-                  <a data-bind="hueLink: '/filebrowser/view=' + $root.assist.path(), attr: {target: IS_HUE_4 ? 'self' : 'blank'}" title="${ _('Open in File Browser') }" class="btn btn-inverse">
+                  <a target="self" data-bind="hueLink: '/filebrowser/view=' + $root.assist.path()" title="${ _('Open in File Browser') }" class="btn btn-inverse">
                     <i class="fa fa-external-link"></i>
                     <i class="fa fa-external-link"></i>
                   </a>
                   </a>
                 </div>
                 </div>
@@ -162,7 +162,7 @@ ${ layout.menubar(section='hdfs', is_embeddable=is_embeddable) }
 
 
                     <span data-bind="visible: ! $root.assist.showAclsAsText()">
                     <span data-bind="visible: ! $root.assist.showAclsAsText()">
                       <h4>${ _('Path') }</h4>
                       <h4>${ _('Path') }</h4>
-                      <a class="force-word-break" data-bind="hueLink: '/filebrowser/view=' + $root.assist.path(), text: $root.assist.path(), attr: {target: IS_HUE_4 ? 'self' : 'blank'}" title="${ _('Open in File Browser') }" rel="tooltip"></a>
+                      <a class="force-word-break" target="self" data-bind="hueLink: '/filebrowser/view=' + $root.assist.path(), text: $root.assist.path()" title="${ _('Open in File Browser') }" rel="tooltip"></a>
 
 
                       <h4>${ _('User/Group') }</h4>
                       <h4>${ _('User/Group') }</h4>
                       <i class="fa fa-user" style="color: #999999" title="${_('User')}"></i> <span title="${_('User')}" data-bind="text: $root.assist.owner"></span>&nbsp;
                       <i class="fa fa-user" style="color: #999999" title="${_('User')}"></i> <span title="${_('User')}" data-bind="text: $root.assist.owner"></span>&nbsp;
@@ -235,7 +235,7 @@ ${ layout.menubar(section='hdfs', is_embeddable=is_embeddable) }
       <div class="span4">
       <div class="span4">
         <h4>${ _('to apply to the selection') }</h4>
         <h4>${ _('to apply to the selection') }</h4>
         <ul class="unstyled modal-panel" data-bind="foreach: $root.assist.checkedItems">
         <ul class="unstyled modal-panel" data-bind="foreach: $root.assist.checkedItems">
-          <li><a class="force-word-break" data-bind="hueLink: '/filebrowser/view=' + path, text: path, attr: {target: IS_HUE_4 ? 'self' : 'blank'}" title="${ _('Open in File Browser') }" rel="tooltip"></a></li>
+          <li><a target="self" class="force-word-break" data-bind="hueLink: '/filebrowser/view=' + path, text: path" title="${ _('Open in File Browser') }" rel="tooltip"></a></li>
         </ul>
         </ul>
       </div>
       </div>
     </div>
     </div>

+ 0 - 6
desktop/conf.dist/hue.ini

@@ -28,12 +28,6 @@
   http_host=0.0.0.0
   http_host=0.0.0.0
   http_port=8888
   http_port=8888
 
 
-  # Choose whether to enable the new Hue 4 interface.
-  ## is_hue_4=true
-
-  # Choose whether to still allow users to enable the old Hue 3 interface.
-  ## disable_hue_3=true
-
   # Choose whether the Hue pages are embedded or not. This will improve the rendering of Hue when added inside a
   # Choose whether the Hue pages are embedded or not. This will improve the rendering of Hue when added inside a
   # container element.
   # container element.
   ## is_embedded=false
   ## is_embedded=false

+ 0 - 6
desktop/conf/pseudo-distributed.ini.tmpl

@@ -32,12 +32,6 @@
   http_host=0.0.0.0
   http_host=0.0.0.0
   http_port=8000
   http_port=8000
 
 
-  # Choose whether to enable the new Hue 4 interface.
-  ## is_hue_4=true
-
-  # Choose whether to still allow users to enable the old Hue 3 interface.
-  ## disable_hue_3=true
-
   # Choose whether the Hue pages are embedded or not. This will improve the rendering of Hue when added inside a
   # Choose whether the Hue pages are embedded or not. This will improve the rendering of Hue when added inside a
   # container element.
   # container element.
   ## is_embedded=false
   ## is_embedded=false

+ 1 - 1
desktop/core/src/desktop/app_template_proxy/src/app_name/templates/index.mako

@@ -44,7 +44,7 @@ ${'#'}# Main body
     });
     });
 
 
     function resizeAppframe() {
     function resizeAppframe() {
-      $("#appframe").height($(window).height() - (IS_HUE_4 ? 48 : 34)); // magic: navigator height + safety pixels
+      $("#appframe").height($(window).height() - 48); // magic: navigator height + safety pixels
     }
     }
 
 
     resizeAppframe();
     resizeAppframe();

+ 1 - 5
desktop/core/src/desktop/auth/views_test.py

@@ -32,7 +32,6 @@ from useradmin.views import import_ldap_groups
 
 
 from desktop import conf, middleware
 from desktop import conf, middleware
 from desktop.auth import backend
 from desktop.auth import backend
-from desktop.conf import is_hue4
 from desktop.lib.django_test_util import make_logged_in_client
 from desktop.lib.django_test_util import make_logged_in_client
 from desktop.lib.test_utils import add_to_group
 from desktop.lib.test_utils import add_to_group
 
 
@@ -679,10 +678,7 @@ class TestLogin(PseudoHdfsTestBase):
     client.get('/accounts/logout')
     client.get('/accounts/logout')
     # Login
     # Login
     response = client.post('/hue/accounts/login/', dict(username=self.test_username, password="test"), follow=True)
     response = client.post('/hue/accounts/login/', dict(username=self.test_username, password="test"), follow=True)
-    if is_hue4():
-      template = 'hue.mako'
-    else:
-      template = 'admin_wizard.mako'
+    template = 'hue.mako'
     assert_true(any([template in _template.filename for _template in response.templates]), response.content) # Go to superuser wizard
     assert_true(any([template in _template.filename for _template in response.templates]), response.content) # Go to superuser wizard
 
 
   def test_login_expiration(self):
   def test_login_expiration(self):

+ 2 - 22
desktop/core/src/desktop/conf.py

@@ -47,7 +47,7 @@ LOG = logging.getLogger(__name__)
 
 
 def is_oozie_enabled():
 def is_oozie_enabled():
   """Oozie needs to be available as it is the backend."""
   """Oozie needs to be available as it is the backend."""
-  return len([app for app in appmanager.DESKTOP_MODULES if app.name == 'oozie']) > 0 and is_hue4()
+  return len([app for app in appmanager.DESKTOP_MODULES if app.name == 'oozie']) > 0
 
 
 def coerce_database(database):
 def coerce_database(database):
   if database == 'mysql':
   if database == 'mysql':
@@ -1581,14 +1581,9 @@ DJANGO_DEBUG_TOOL_USERS = Config(
   help=_('Comma separated list of users that allow to use django debug tool. If it is empty, all users are allowed.')
   help=_('Comma separated list of users that allow to use django debug tool. If it is empty, all users are allowed.')
 )
 )
 
 
-def is_hue4():
-  """Hue is configured to show version 4."""
-  return IS_HUE_4.get()
-
-
 USE_NEW_SIDE_PANELS = Config( # To remove in Hue 4
 USE_NEW_SIDE_PANELS = Config( # To remove in Hue 4
   key='use_new_side_panels',
   key='use_new_side_panels',
-  dynamic_default=is_hue4,
+  default=True,
   type=coerce_bool,
   type=coerce_bool,
   help=_('Choose whether to show extended left and right panels.')
   help=_('Choose whether to show extended left and right panels.')
 )
 )
@@ -1607,21 +1602,6 @@ USE_NEW_CHARTS = Config(
   help=_('Choose whether to use new charting library across the whole Hue.')
   help=_('Choose whether to use new charting library across the whole Hue.')
 )
 )
 
 
-
-IS_HUE_4 = Config( # To remove in Hue 5
-  key='is_hue_4',
-  default=True,
-  type=coerce_bool,
-  help=_('Choose whether to enable the new Hue 4 interface.')
-)
-
-DISABLE_HUE_3 = Config( # To remove in Hue 5
-  key='disable_hue_3',
-  default=True,
-  type=coerce_bool,
-  help=_('Choose whether to still allow users to enable the old Hue 3 interface.')
-)
-
 IS_MULTICLUSTER_ONLY = Config(
 IS_MULTICLUSTER_ONLY = Config(
   key='is_multicluster_only',
   key='is_multicluster_only',
   default=False,
   default=False,

+ 59 - 116
desktop/core/src/desktop/converter_tests.py

@@ -22,7 +22,6 @@ import json
 from nose.tools import assert_equal, assert_false, assert_true
 from nose.tools import assert_equal, assert_false, assert_true
 from django.contrib.auth.models import User
 from django.contrib.auth.models import User
 
 
-from desktop.conf import IS_HUE_4
 from desktop.converters import DocumentConverter
 from desktop.converters import DocumentConverter
 from desktop.lib.django_test_util import make_logged_in_client
 from desktop.lib.django_test_util import make_logged_in_client
 from desktop.lib.test_utils import grant_access
 from desktop.lib.test_utils import grant_access
@@ -328,32 +327,18 @@ class TestDocumentConverter(object):
     doc = Document.objects.get(id=doc.id)
     doc = Document.objects.get(id=doc.id)
 
 
     try:
     try:
-      if IS_HUE_4.get():
-        # Test that corresponding doc2 is created after convert
-        assert_false(Document2.objects.filter(owner=self.user, type='query-mapreduce').exists())
-
-        converter = DocumentConverter(self.user)
-        converter.convert()
-
-        doc2 = Document2.objects.get(owner=self.user, type='query-mapreduce')
-
-        # Verify snippet values
-        assert_equal('ready', doc2.data_dict['snippets'][0]['status'])
-        assert_equal('/user/hue/oozie/examples/lib/hadoop-examples.jar', doc2.data_dict['snippets'][0]['properties']['app_jar'])
-        assert_equal(['sleep.job.map.sleep.time=5', 'sleep.job.reduce.sleep.time=10'], doc2.data_dict['snippets'][0]['properties']['hadoopProperties'])
-      else:
-        # Test that corresponding doc2 is created after convert
-        assert_false(Document2.objects.filter(owner=self.user, type='link-workflow').exists())
+      # Test that corresponding doc2 is created after convert
+      assert_false(Document2.objects.filter(owner=self.user, type='query-mapreduce').exists())
 
 
-        converter = DocumentConverter(self.user)
-        converter.convert()
+      converter = DocumentConverter(self.user)
+      converter.convert()
 
 
-        doc2 = Document2.objects.get(owner=self.user, type='link-workflow')
+      doc2 = Document2.objects.get(owner=self.user, type='query-mapreduce')
 
 
-        # Verify absolute_url
-        response = self.client.get(doc2.get_absolute_url())
-        assert_equal(200, response.status_code)
-        assert_equal(doc.last_modified.strftime('%Y-%m-%dT%H:%M:%S'), doc2.last_modified.strftime('%Y-%m-%dT%H:%M:%S'))
+      # Verify snippet values
+      assert_equal('ready', doc2.data_dict['snippets'][0]['status'])
+      assert_equal('/user/hue/oozie/examples/lib/hadoop-examples.jar', doc2.data_dict['snippets'][0]['properties']['app_jar'])
+      assert_equal(['sleep.job.map.sleep.time=5', 'sleep.job.reduce.sleep.time=10'], doc2.data_dict['snippets'][0]['properties']['hadoopProperties'])
     finally:
     finally:
       wf.delete()
       wf.delete()
 
 
@@ -383,37 +368,23 @@ class TestDocumentConverter(object):
     doc = Document.objects.get(id=doc.id)
     doc = Document.objects.get(id=doc.id)
 
 
     try:
     try:
-      if IS_HUE_4.get():
-        # Test that corresponding doc2 is created after convert
-        assert_false(Document2.objects.filter(owner=self.user, type='query-shell').exists())
-
-        converter = DocumentConverter(self.user)
-        converter.convert()
-
-        doc2 = Document2.objects.get(owner=self.user, type='query-shell')
-
-        # Verify snippet values
-        assert_equal('ready', doc2.data_dict['snippets'][0]['status'])
-        assert_equal('hello.py', doc2.data_dict['snippets'][0]['properties']['command_path'])
-        assert_equal(['baz'], doc2.data_dict['snippets'][0]['properties']['arguments'])
-        assert_equal(['foo=bar'], doc2.data_dict['snippets'][0]['properties']['env_var'])
-        assert_equal(['mapred.job.queue.name=test'], doc2.data_dict['snippets'][0]['properties']['hadoopProperties'])
-        assert_equal(['test.zip'], doc2.data_dict['snippets'][0]['properties']['archives'])
-        assert_equal([{'type': 'file', 'path': 'hello.py'}], doc2.data_dict['snippets'][0]['properties']['files'])
-        assert_equal(True, doc2.data_dict['snippets'][0]['properties']['capture_output'])
-      else:
-        # Test that corresponding doc2 is created after convert
-        assert_false(Document2.objects.filter(owner=self.user, type='link-workflow').exists())
-
-        converter = DocumentConverter(self.user)
-        converter.convert()
-
-        doc2 = Document2.objects.get(owner=self.user, type='link-workflow')
-
-        # Verify absolute_url
-        response = self.client.get(doc2.get_absolute_url())
-        assert_equal(200, response.status_code)
-        assert_equal(doc.last_modified.strftime('%Y-%m-%dT%H:%M:%S'), doc2.last_modified.strftime('%Y-%m-%dT%H:%M:%S'))
+      # Test that corresponding doc2 is created after convert
+      assert_false(Document2.objects.filter(owner=self.user, type='query-shell').exists())
+
+      converter = DocumentConverter(self.user)
+      converter.convert()
+
+      doc2 = Document2.objects.get(owner=self.user, type='query-shell')
+
+      # Verify snippet values
+      assert_equal('ready', doc2.data_dict['snippets'][0]['status'])
+      assert_equal('hello.py', doc2.data_dict['snippets'][0]['properties']['command_path'])
+      assert_equal(['baz'], doc2.data_dict['snippets'][0]['properties']['arguments'])
+      assert_equal(['foo=bar'], doc2.data_dict['snippets'][0]['properties']['env_var'])
+      assert_equal(['mapred.job.queue.name=test'], doc2.data_dict['snippets'][0]['properties']['hadoopProperties'])
+      assert_equal(['test.zip'], doc2.data_dict['snippets'][0]['properties']['archives'])
+      assert_equal([{'type': 'file', 'path': 'hello.py'}], doc2.data_dict['snippets'][0]['properties']['files'])
+      assert_equal(True, doc2.data_dict['snippets'][0]['properties']['capture_output'])
     finally:
     finally:
       wf.delete()
       wf.delete()
 
 
@@ -446,38 +417,24 @@ class TestDocumentConverter(object):
     doc = Document.objects.get(id=doc.id)
     doc = Document.objects.get(id=doc.id)
 
 
     try:
     try:
-      if IS_HUE_4.get():
-        # Test that corresponding doc2 is created after convert
-        assert_false(Document2.objects.filter(owner=self.user, type='query-java').exists())
-
-        converter = DocumentConverter(self.user)
-        converter.convert()
-
-        doc2 = Document2.objects.get(owner=self.user, type='query-java')
-
-        # Verify snippet values
-        assert_equal('ready', doc2.data_dict['snippets'][0]['status'])
-        assert_equal('/user/hue/oozie/workspaces/lib/hadoop-examples.jar', doc2.data_dict['snippets'][0]['properties']['app_jar'])
-        assert_equal('org.apache.hadoop.examples.terasort.TeraGen', doc2.data_dict['snippets'][0]['properties']['class'])
-        assert_equal('1000 ${output_dir}/teragen', doc2.data_dict['snippets'][0]['properties']['args'])
-        assert_equal('-Dexample-property=natty', doc2.data_dict['snippets'][0]['properties']['java_opts'])
-        assert_equal(['mapred.job.queue.name=test'], doc2.data_dict['snippets'][0]['properties']['hadoopProperties'])
-        assert_equal(['my_archive', 'my_archive2'], doc2.data_dict['snippets'][0]['properties']['archives'])
-        assert_equal([{'type': 'file', 'path': 'my_file'}, {'type': 'file', 'path': 'my_file2'}], doc2.data_dict['snippets'][0]['properties']['files'])
-        assert_equal(True, doc2.data_dict['snippets'][0]['properties']['capture_output'])
-      else:
-        # Test that corresponding doc2 is created after convert
-        assert_false(Document2.objects.filter(owner=self.user, type='link-workflow').exists())
-
-        converter = DocumentConverter(self.user)
-        converter.convert()
-
-        doc2 = Document2.objects.get(owner=self.user, type='link-workflow')
-
-        # Verify absolute_url
-        response = self.client.get(doc2.get_absolute_url())
-        assert_equal(200, response.status_code)
-        assert_equal(doc.last_modified.strftime('%Y-%m-%dT%H:%M:%S'), doc2.last_modified.strftime('%Y-%m-%dT%H:%M:%S'))
+      # Test that corresponding doc2 is created after convert
+      assert_false(Document2.objects.filter(owner=self.user, type='query-java').exists())
+
+      converter = DocumentConverter(self.user)
+      converter.convert()
+
+      doc2 = Document2.objects.get(owner=self.user, type='query-java')
+
+      # Verify snippet values
+      assert_equal('ready', doc2.data_dict['snippets'][0]['status'])
+      assert_equal('/user/hue/oozie/workspaces/lib/hadoop-examples.jar', doc2.data_dict['snippets'][0]['properties']['app_jar'])
+      assert_equal('org.apache.hadoop.examples.terasort.TeraGen', doc2.data_dict['snippets'][0]['properties']['class'])
+      assert_equal('1000 ${output_dir}/teragen', doc2.data_dict['snippets'][0]['properties']['args'])
+      assert_equal('-Dexample-property=natty', doc2.data_dict['snippets'][0]['properties']['java_opts'])
+      assert_equal(['mapred.job.queue.name=test'], doc2.data_dict['snippets'][0]['properties']['hadoopProperties'])
+      assert_equal(['my_archive', 'my_archive2'], doc2.data_dict['snippets'][0]['properties']['archives'])
+      assert_equal([{'type': 'file', 'path': 'my_file'}, {'type': 'file', 'path': 'my_file2'}], doc2.data_dict['snippets'][0]['properties']['files'])
+      assert_equal(True, doc2.data_dict['snippets'][0]['properties']['capture_output'])
     finally:
     finally:
       wf.delete()
       wf.delete()
 
 
@@ -510,35 +467,21 @@ class TestDocumentConverter(object):
     doc = Document.objects.get(id=doc.id)
     doc = Document.objects.get(id=doc.id)
 
 
     try:
     try:
-      if IS_HUE_4.get():
-        # Test that corresponding doc2 is created after convert
-        assert_false(Document2.objects.filter(owner=self.user, type='query-pig').exists())
-
-        converter = DocumentConverter(self.user)
-        converter.convert()
-
-        doc2 = Document2.objects.get(owner=self.user, type='query-pig')
-
-        # Verify snippet values
-        assert_equal('ready', doc2.data_dict['snippets'][0]['status'])
-        assert_equal(attrs['script'], doc2.data_dict['snippets'][0]['statement'], doc2.data_dict)
-        assert_equal(attrs['script'], doc2.data_dict['snippets'][0]['statement_raw'])
-        assert_equal(['mapred.job.queue.name=pig', 'mapreduce.task.profile=true'], doc2.data_dict['snippets'][0]['properties']['hadoopProperties'])
-        assert_equal(['input=/user/test/data', 'verbose=true'], doc2.data_dict['snippets'][0]['properties']['parameters'])
-        assert_equal(['/user/test/test.txt', '/user/test/test.jar'], doc2.data_dict['snippets'][0]['properties']['resources'])
-      else:
-        # Test that corresponding doc2 is created after convert
-        assert_false(Document2.objects.filter(owner=self.user, type='link-pigscript').exists())
-
-        converter = DocumentConverter(self.user)
-        converter.convert()
-
-        doc2 = Document2.objects.get(owner=self.user, type='link-pigscript')
-
-        # Verify absolute_url
-        response = self.client.get(doc2.get_absolute_url())
-        assert_equal(200, response.status_code)
-        assert_equal(doc.last_modified.strftime('%Y-%m-%dT%H:%M:%S'), doc2.last_modified.strftime('%Y-%m-%dT%H:%M:%S'))
+      # Test that corresponding doc2 is created after convert
+      assert_false(Document2.objects.filter(owner=self.user, type='query-pig').exists())
+
+      converter = DocumentConverter(self.user)
+      converter.convert()
+
+      doc2 = Document2.objects.get(owner=self.user, type='query-pig')
+
+      # Verify snippet values
+      assert_equal('ready', doc2.data_dict['snippets'][0]['status'])
+      assert_equal(attrs['script'], doc2.data_dict['snippets'][0]['statement'], doc2.data_dict)
+      assert_equal(attrs['script'], doc2.data_dict['snippets'][0]['statement_raw'])
+      assert_equal(['mapred.job.queue.name=pig', 'mapreduce.task.profile=true'], doc2.data_dict['snippets'][0]['properties']['hadoopProperties'])
+      assert_equal(['input=/user/test/data', 'verbose=true'], doc2.data_dict['snippets'][0]['properties']['parameters'])
+      assert_equal(['/user/test/test.txt', '/user/test/test.jar'], doc2.data_dict['snippets'][0]['properties']['resources'])
     finally:
     finally:
       pig_script.delete()
       pig_script.delete()
 
 

+ 15 - 28
desktop/core/src/desktop/converters.py

@@ -22,7 +22,6 @@ import time
 from django.db import transaction
 from django.db import transaction
 from django.utils.translation import ugettext as _
 from django.utils.translation import ugettext as _
 
 
-from desktop.conf import IS_HUE_4
 from desktop.lib.exceptions_renderable import PopupException
 from desktop.lib.exceptions_renderable import PopupException
 from desktop.models import Document, DocumentPermission, DocumentTag, Document2, Directory, Document2Permission
 from desktop.models import Document, DocumentPermission, DocumentTag, Document2, Directory, Document2Permission
 from notebook.api import _historify
 from notebook.api import _historify
@@ -155,13 +154,12 @@ class DocumentConverter(object):
             node = doc.content_object.start.get_child('to')
             node = doc.content_object.start.get_child('to')
             notebook = None
             notebook = None
 
 
-            if IS_HUE_4.get():
-              if node.node_type == 'mapreduce':
-                notebook = import_saved_mapreduce_job(doc.content_object)
-              elif node.node_type == 'shell':
-                notebook = import_saved_shell_job(doc.content_object)
-              elif node.node_type == 'java':
-                notebook = import_saved_java_job(doc.content_object)
+            if node.node_type == 'mapreduce':
+              notebook = import_saved_mapreduce_job(doc.content_object)
+            elif node.node_type == 'shell':
+              notebook = import_saved_shell_job(doc.content_object)
+            elif node.node_type == 'java':
+              notebook = import_saved_java_job(doc.content_object)
 
 
             if notebook:
             if notebook:
               data = notebook.get_data()
               data = notebook.get_data()
@@ -200,27 +198,16 @@ class DocumentConverter(object):
       for doc in docs:
       for doc in docs:
         try:
         try:
           if doc.content_object:
           if doc.content_object:
-            if IS_HUE_4.get():
-              notebook = import_saved_pig_script(doc.content_object)
-              data = notebook.get_data()
+            notebook = import_saved_pig_script(doc.content_object)
+            data = notebook.get_data()
 
 
-              doc2 = self._create_doc2(
-                document=doc,
-                doctype=data['type'],
-                name=data['name'],
-                description=data['description'],
-                data=notebook.get_json()
-              )
-            else:
-              data = doc.content_object.dict
-              data.update({'content_type': doc.content_type.model, 'object_id': doc.object_id})
-              doc2 = self._create_doc2(
-                document=doc,
-                doctype='link-pigscript',
-                name=data['name'],
-                description=doc.description,
-                data=json.dumps(data)
-              )
+            doc2 = self._create_doc2(
+              document=doc,
+              doctype=data['type'],
+              name=data['name'],
+              description=data['description'],
+              data=notebook.get_json()
+            )
 
 
             self.imported_doc_count += 1
             self.imported_doc_count += 1
         except Exception, e:
         except Exception, e:

+ 9 - 49
desktop/core/src/desktop/js/apps/notebook/notebook.ko.js

@@ -2071,11 +2071,7 @@ const Snippet = function(vm, notebook, snippet) {
 
 
         if (vm.editorMode() && data.history_id) {
         if (vm.editorMode() && data.history_id) {
           if (!vm.isNotificationManager()) {
           if (!vm.isNotificationManager()) {
-            let url =
-              '/notebook/editor' + (vm.isMobile() ? '_m' : '') + '?editor=' + data.history_id;
-            if (vm.isHue4()) {
-              url = vm.URLS.hue4 + '?editor=' + data.history_id;
-            }
+            let url = vm.URLS.editor + '?editor=' + data.history_id;
             vm.changeURL(url);
             vm.changeURL(url);
           }
           }
           notebook.id(data.history_id);
           notebook.id(data.history_id);
@@ -3420,15 +3416,11 @@ const Notebook = function(vm, notebook) {
                   '&statement=' +
                   '&statement=' +
                   self.snippets()[0].result.handle().statement_id
                   self.snippets()[0].result.handle().statement_id
               );
               );
-            } else if (vm.isHue4()) {
-              vm.changeURL(vm.URLS.hue4 + '?editor=' + data.id);
             } else {
             } else {
-              vm.changeURL('/notebook/editor' + (vm.isMobile() ? '_m' : '') + '?editor=' + data.id);
+              vm.changeURL(vm.URLS.editor + '?editor=' + data.id);
             }
             }
-          } else if (vm.isHue4()) {
-            vm.changeURL(vm.URLS.hue4_notebook + '?notebook=' + data.id);
           } else {
           } else {
-            vm.changeURL('/notebook/notebook?notebook=' + data.id);
+            vm.changeURL(vm.URLS.notebook + '?notebook=' + data.id);
           }
           }
           if (typeof callback == 'function') {
           if (typeof callback == 'function') {
             callback();
             callback();
@@ -3627,13 +3619,7 @@ const Notebook = function(vm, notebook) {
         if (self.isHistory()) {
         if (self.isHistory()) {
           self.id(null);
           self.id(null);
           self.uuid(hueUtils.UUID());
           self.uuid(hueUtils.UUID());
-          if (vm.isHue4()) {
-            vm.changeURL(vm.URLS.hue4 + '?type=' + vm.editorType());
-          } else {
-            vm.changeURL(
-              '/notebook/editor' + (vm.isMobile() ? '_m' : '') + '?type=' + vm.editorType()
-            );
-          }
+          vm.changeURL(vm.URLS.editor + '?type=' + vm.editorType());
         }
         }
       }
       }
     ).fail(xhr => {
     ).fail(xhr => {
@@ -3715,16 +3701,6 @@ const Notebook = function(vm, notebook) {
         });
         });
       };
       };
 
 
-      if (!IS_HUE_4) {
-        huePubSub.subscribe(
-          'hue4.process.headers',
-          opts => {
-            opts.callback(opts.response);
-          },
-          vm.huePubSubId
-        );
-      }
-
       getCoordinator();
       getCoordinator();
     }
     }
   };
   };
@@ -3860,11 +3836,8 @@ function EditorViewModel(
   const self = this;
   const self = this;
 
 
   self.URLS = {
   self.URLS = {
-    editor: '/notebook/editor',
-    editorMobile: '/notebook/editor_m',
-    notebook: '/notebook/notebook',
-    hue4: '/hue/editor',
-    hue4_notebook: '/hue/notebook',
+    editor: '/hue/editor',
+    notebook: '/hue/notebook',
     report: '/hue/dashboard/new_search?engine=report'
     report: '/hue/dashboard/new_search?engine=report'
   };
   };
 
 
@@ -3873,7 +3846,6 @@ function EditorViewModel(
   self.userId = options.userId;
   self.userId = options.userId;
   self.suffix = options.suffix;
   self.suffix = options.suffix;
   self.isMobile = ko.observable(options.mobile);
   self.isMobile = ko.observable(options.mobile);
-  self.isHue4 = ko.observable(options.hue4);
   self.isNotificationManager = ko.observable(options.is_notification_manager || false);
   self.isNotificationManager = ko.observable(options.is_notification_manager || false);
   self.editorType = ko.observable(options.editor_type);
   self.editorType = ko.observable(options.editor_type);
   self.editorType.subscribe(newVal => {
   self.editorType.subscribe(newVal => {
@@ -4392,21 +4364,9 @@ function EditorViewModel(
             if (self.editorMode()) {
             if (self.editorMode()) {
               self.editorType(data.document.type.substring('query-'.length));
               self.editorType(data.document.type.substring('query-'.length));
               huePubSub.publish('active.snippet.type.changed', self.editorType());
               huePubSub.publish('active.snippet.type.changed', self.editorType());
-              if (self.isHue4()) {
-                self.changeURL(
-                  self.URLS.hue4 + '?editor=' + data.document.id + '&type=' + self.editorType()
-                );
-              } else {
-                self.changeURL(
-                  (self.isMobile() ? self.URLS.editorMobile : self.URLS.editor) +
-                    '?editor=' +
-                    data.document.id +
-                    '&type=' +
-                    self.editorType()
-                );
-              }
-            } else if (self.isHue4()) {
-              self.changeURL(self.URLS.hue4_notebook + '?notebook=' + data.document.id);
+              self.changeURL(
+                self.URLS.editor + '?editor=' + data.document.id + '&type=' + self.editorType()
+              );
             } else {
             } else {
               self.changeURL(self.URLS.notebook + '?notebook=' + data.document.id);
               self.changeURL(self.URLS.notebook + '?notebook=' + data.document.id);
             }
             }

+ 15 - 27
desktop/core/src/desktop/js/assist/assistDbEntry.js

@@ -497,42 +497,30 @@ class AssistDbEntry {
       return;
       return;
     }
     }
 
 
-    if (IS_HUE_4) {
-      huePubSub.publish('open.link', url);
-    } else {
-      window.open(url, '_blank');
-    }
+    huePubSub.publish('open.link', url);
   }
   }
 
 
   openInIndexer() {
   openInIndexer() {
     const self = this;
     const self = this;
     const definitionName = self.catalogEntry.name;
     const definitionName = self.catalogEntry.name;
     if (window.IS_NEW_INDEXER_ENABLED) {
     if (window.IS_NEW_INDEXER_ENABLED) {
-      if (window.IS_HUE_4) {
-        huePubSub.publish('open.link', '/indexer/indexes/' + definitionName);
-      } else {
-        window.open('/indexer/indexes/' + definitionName);
-      }
+      huePubSub.publish('open.link', '/indexer/indexes/' + definitionName);
     } else {
     } else {
       const hash = '#edit/' + definitionName;
       const hash = '#edit/' + definitionName;
-      if (window.IS_HUE_4) {
-        if (
-          window.location.pathname.startsWith('/hue/indexer') &&
-          !window.location.pathname.startsWith('/hue/indexer/importer')
-        ) {
-          window.location.hash = hash;
-        } else {
-          huePubSub.subscribeOnce('app.gained.focus', app => {
-            if (app === 'indexes') {
-              window.setTimeout(() => {
-                window.location.hash = hash;
-              }, 0);
-            }
-          });
-          huePubSub.publish('open.link', '/indexer');
-        }
+      if (
+        window.location.pathname.startsWith('/hue/indexer') &&
+        !window.location.pathname.startsWith('/hue/indexer/importer')
+      ) {
+        window.location.hash = hash;
       } else {
       } else {
-        window.open('/indexer/' + hash);
+        huePubSub.subscribeOnce('app.gained.focus', app => {
+          if (app === 'indexes') {
+            window.setTimeout(() => {
+              window.location.hash = hash;
+            }, 0);
+          }
+        });
+        huePubSub.publish('open.link', '/indexer');
       }
       }
     }
     }
   }
   }

+ 3 - 7
desktop/core/src/desktop/js/assist/assistStorageEntry.js

@@ -226,14 +226,10 @@ class AssistStorageEntry {
   toggleOpen(data, event) {
   toggleOpen(data, event) {
     const self = this;
     const self = this;
     if (self.definition.type === 'file') {
     if (self.definition.type === 'file') {
-      if (IS_HUE_4) {
-        if (event.ctrlKey || event.metaKey || event.which === 2) {
-          window.open('/hue' + self.definition.url, '_blank');
-        } else {
-          huePubSub.publish('open.link', self.definition.url);
-        }
+      if (event.ctrlKey || event.metaKey || event.which === 2) {
+        window.open('/hue' + self.definition.url, '_blank');
       } else {
       } else {
-        window.open(self.definition.url, '_blank');
+        huePubSub.publish('open.link', self.definition.url);
       }
       }
       return;
       return;
     }
     }

+ 4 - 6
desktop/core/src/desktop/js/jquery/plugins/jquery.huedatatable.js

@@ -260,12 +260,10 @@ $.fn.hueDataTable = function(oInit) {
         .focus();
         .focus();
     }
     }
     let right = -30;
     let right = -30;
-    if (IS_HUE_4) {
-      const adjustRight =
-        $(window).width() - ($('.page-content').width() + $('.page-content').offset().left);
-      if (adjustRight > 0) {
-        right = adjustRight;
-      }
+    const adjustRight =
+      $(window).width() - ($('.page-content').width() + $('.page-content').offset().left);
+    if (adjustRight > 0) {
+      right = adjustRight;
     }
     }
     $('.hueAnchorScroller:visible').each(function() {
     $('.hueAnchorScroller:visible').each(function() {
       const visibleRight =
       const visibleRight =

+ 1 - 5
desktop/core/src/desktop/js/jquery/plugins/jquery.rowselector.js

@@ -54,11 +54,7 @@ Plugin.prototype.init = function() {
       if (!$(e.target).is('a')) {
       if (!$(e.target).is('a')) {
         const href = $.trim($(_this.element).attr('href'));
         const href = $.trim($(_this.element).attr('href'));
         if (href != '' && href != '#' && href.indexOf('void(0)') == -1) {
         if (href != '' && href != '#' && href.indexOf('void(0)') == -1) {
-          if (window.IS_HUE_4) {
-            huePubSub.publish('open.link', $(_this.element).attr('href'));
-          } else {
-            location.href = $(_this.element).attr('href');
-          }
+          huePubSub.publish('open.link', $(_this.element).attr('href'));
         } else {
         } else {
           $(_this.element).click();
           $(_this.element).click();
         }
         }

+ 2 - 9
desktop/core/src/desktop/js/ko/bindings/ko.hueLink.js

@@ -27,10 +27,7 @@ ko.bindingHandlers.hueLink = {
         return function(data, event) {
         return function(data, event) {
           const url = ko.unwrap(valueAccessor());
           const url = ko.unwrap(valueAccessor());
           if (url) {
           if (url) {
-            let prefix = '';
-            if (window.IS_HUE_4) {
-              prefix = '/hue' + (url.indexOf('/') === 0 ? '' : '/');
-            }
+            let prefix = '/hue' + (url.indexOf('/') === 0 ? '' : '/');
             if ($(element).attr('target')) {
             if ($(element).attr('target')) {
               window.open(prefix + url, $(element).attr('target'));
               window.open(prefix + url, $(element).attr('target'));
             } else if (event.ctrlKey || event.metaKey || event.which === 2) {
             } else if (event.ctrlKey || event.metaKey || event.which === 2) {
@@ -51,11 +48,7 @@ ko.bindingHandlers.hueLink = {
   update: function(element, valueAccessor) {
   update: function(element, valueAccessor) {
     const url = ko.unwrap(valueAccessor());
     const url = ko.unwrap(valueAccessor());
     if (url) {
     if (url) {
-      if (window.IS_HUE_4) {
-        $(element).attr('href', '/hue' + (url.indexOf('/') === 0 ? url : '/' + url));
-      } else {
-        $(element).attr('href', url);
-      }
+      $(element).attr('href', '/hue' + (url.indexOf('/') === 0 ? url : '/' + url));
     } else {
     } else {
       $(element).attr('href', 'javascript: void(0);');
       $(element).attr('href', 'javascript: void(0);');
     }
     }

+ 1 - 10
desktop/core/src/desktop/static/desktop/js/document/hueFileEntry.js

@@ -560,16 +560,7 @@ var HueFileEntry = (function () {
         self.load();
         self.load();
       }
       }
     } else {
     } else {
-      if (IS_HUE_4) {
-        huePubSub.publish('open.link', self.definition().absoluteUrl);
-      } else {
-        if (e && ((e.which || e.button) !== 1 || (e.ctrlKey || e.shiftKey || e.metaKey))) {
-          window.open(self.definition().absoluteUrl);
-        }
-        else {
-          window.location.href = self.definition().absoluteUrl;
-        }
-      }
+      huePubSub.publish('open.link', self.definition().absoluteUrl);
     }
     }
   };
   };
 
 

+ 4 - 6
desktop/core/src/desktop/static/desktop/js/jquery.huedatatable.js

@@ -231,11 +231,9 @@
         $('.hue-datatable-search').find('input').focus();
         $('.hue-datatable-search').find('input').focus();
       }
       }
       var right = -30;
       var right = -30;
-      if (IS_HUE_4){
-        var adjustRight = $(window).width() - ($('.page-content').width() + $('.page-content').offset().left);
-        if (adjustRight > 0) {
-          right = adjustRight;
-        }
+      var adjustRight = $(window).width() - ($('.page-content').width() + $('.page-content').offset().left);
+      if (adjustRight > 0) {
+        right = adjustRight;
       }
       }
       $('.hueAnchorScroller:visible').each(function () {
       $('.hueAnchorScroller:visible').each(function () {
         var visibleRight = $(this).css('right').replace(/px/gi, '') * 1;
         var visibleRight = $(this).css('right').replace(/px/gi, '') * 1;
@@ -244,7 +242,7 @@
         }
         }
       });
       });
       $('.hue-datatable-search').css('right', (right + 50) + 'px');
       $('.hue-datatable-search').css('right', (right + 50) + 'px');
-    }
+    };
 
 
     self.fnSearch = function (what, avoidScroll) {
     self.fnSearch = function (what, avoidScroll) {
       var $t = self.$table;
       var $t = self.$table;

+ 2 - 8
desktop/core/src/desktop/static/desktop/js/jquery.rowselector.js

@@ -44,14 +44,8 @@
       if (!$(e.target).is("a")) {
       if (!$(e.target).is("a")) {
         var href = $.trim($(_this.element).attr("href"));
         var href = $.trim($(_this.element).attr("href"));
         if (href != "" && href != "#" && href.indexOf("void(0)") == -1) {
         if (href != "" && href != "#" && href.indexOf("void(0)") == -1) {
-          if (IS_HUE_4) {
-            huePubSub.publish('open.link', $(_this.element).attr("href"));
-          }
-          else {
-            location.href = $(_this.element).attr("href");
-          }
-        }
-        else {
+          huePubSub.publish('open.link', $(_this.element).attr("href"));
+        } else {
           $(_this.element).click();
           $(_this.element).click();
         }
         }
       }
       }

+ 19 - 28
desktop/core/src/desktop/templates/assist.mako

@@ -158,7 +158,7 @@ from desktop.views import _ko
   <script type="text/html" id="hdfs-context-items">
   <script type="text/html" id="hdfs-context-items">
     <li><a href="javascript:void(0);" data-bind="click: function (data) { showContextPopover(data, { target: $parentContext.$contextSourceElement }, { left: -15, top: 2 }); }"><i class="fa fa-fw fa-info"></i> ${ _('Show details') }</a></li>
     <li><a href="javascript:void(0);" data-bind="click: function (data) { showContextPopover(data, { target: $parentContext.$contextSourceElement }, { left: -15, top: 2 }); }"><i class="fa fa-fw fa-info"></i> ${ _('Show details') }</a></li>
     <li><a href="javascript:void(0);" data-bind="hueLink: definition.url"><i class="fa fa-fw" data-bind="css: {'fa-folder-open-o': definition.type === 'dir', 'fa-file-text-o': definition.type === 'file'}"></i> ${ _('Open in Browser') }</a></li>
     <li><a href="javascript:void(0);" data-bind="hueLink: definition.url"><i class="fa fa-fw" data-bind="css: {'fa-folder-open-o': definition.type === 'dir', 'fa-file-text-o': definition.type === 'file'}"></i> ${ _('Open in Browser') }</a></li>
-    <!-- ko if: IS_HUE_4 && definition.type === 'file' -->
+    <!-- ko if: definition.type === 'file' -->
     <li><a href="javascript:void(0);" data-bind="click: openInImporter"><!-- ko template: { name: 'app-icon-template', data: { icon: 'importer' } } --><!-- /ko --> ${ _('Open in Importer') }</a></li>
     <li><a href="javascript:void(0);" data-bind="click: openInImporter"><!-- ko template: { name: 'app-icon-template', data: { icon: 'importer' } } --><!-- /ko --> ${ _('Open in Importer') }</a></li>
     <!-- /ko -->
     <!-- /ko -->
     <!-- ko if: $currentApp() === 'editor' -->
     <!-- ko if: $currentApp() === 'editor' -->
@@ -1936,22 +1936,16 @@ from desktop.views import _ko
 
 
         huePubSub.subscribe('assist.dblClickHBaseItem', function (entry) {
         huePubSub.subscribe('assist.dblClickHBaseItem', function (entry) {
           var hash = self.selectedHBaseEntry().definition.name + '/' + entry.definition.name;
           var hash = self.selectedHBaseEntry().definition.name + '/' + entry.definition.name;
-          if (IS_HUE_4) {
-            if (window.location.pathname.startsWith('/hue/hbase')) {
-              window.location.hash = hash;
-            }
-            else {
-              self.lastClickeHBaseEntry = entry;
-              huePubSub.subscribeOnce('app.gained.focus', function (app) {
-                if (app === 'hbase' && self.HBaseLoaded) {
-                  delayChangeHash(hash);
-                }
-              });
-              huePubSub.publish('open.link', '/hbase');
-            }
-          }
-          else {
-            window.open('/hbase/#' + hash);
+          if (window.location.pathname.startsWith('/hue/hbase')) {
+            window.location.hash = hash;
+          } else {
+            self.lastClickeHBaseEntry = entry;
+            huePubSub.subscribeOnce('app.gained.focus', function (app) {
+              if (app === 'hbase' && self.HBaseLoaded) {
+                delayChangeHash(hash);
+              }
+            });
+            huePubSub.publish('open.link', '/hbase');
           }
           }
         });
         });
 
 
@@ -3639,7 +3633,7 @@ from desktop.views import _ko
           self.dashboardAssistantTabAvailable(type === 'dashboard');
           self.dashboardAssistantTabAvailable(type === 'dashboard');
           self.schedulesTabAvailable(false);
           self.schedulesTabAvailable(false);
           if (type !== 'dashboard') {
           if (type !== 'dashboard') {
-            if ('${ ENABLE_QUERY_SCHEDULING.get() }' === 'True' && IS_HUE_4) {
+            if ('${ ENABLE_QUERY_SCHEDULING.get() }' === 'True') {
               huePubSub.subscribeOnce('set.current.app.view.model', function (viewModel) {
               huePubSub.subscribeOnce('set.current.app.view.model', function (viewModel) {
                 // Async
                 // Async
                 self.schedulesTabAvailable(!!viewModel.selectedNotebook);
                 self.schedulesTabAvailable(!!viewModel.selectedNotebook);
@@ -3647,8 +3641,7 @@ from desktop.views import _ko
               });
               });
               huePubSub.publish('get.current.app.view.model');
               huePubSub.publish('get.current.app.view.model');
             } else {
             } else {
-              // Right assist is only available in the Hue 3 editor and notebook.
-              self.schedulesTabAvailable('${ ENABLE_QUERY_SCHEDULING.get() }' === 'True');
+              self.schedulesTabAvailable(false);
             }
             }
           }
           }
           updateTabs();
           updateTabs();
@@ -3657,14 +3650,12 @@ from desktop.views import _ko
         var snippetTypeSub = huePubSub.subscribe('active.snippet.type.changed', updateContentsForType);
         var snippetTypeSub = huePubSub.subscribe('active.snippet.type.changed', updateContentsForType);
         self.disposals.push(snippetTypeSub.remove.bind(snippetTypeSub));
         self.disposals.push(snippetTypeSub.remove.bind(snippetTypeSub));
 
 
-        if (IS_HUE_4) {
-          huePubSub.subscribe('set.current.app.name', function (appName) {
-            if (appName === 'dashboard') {
-              updateContentsForType(appName);
-            }
-          });
-          huePubSub.publish('get.current.app.name');
-        }
+        huePubSub.subscribe('set.current.app.name', function (appName) {
+          if (appName === 'dashboard') {
+            updateContentsForType(appName);
+          }
+        });
+        huePubSub.publish('get.current.app.name');
         updateTabs();
         updateTabs();
       }
       }
 
 

+ 2 - 9
desktop/core/src/desktop/templates/common_header.mako

@@ -121,10 +121,6 @@ if USE_NEW_EDITOR.get():
     % endif
     % endif
   </style>
   </style>
 
 
-  <script type="text/javascript">
-    var IS_HUE_4 = false;
-  </script>
-
   ${ commonHeaderFooterComponents.header_i18n_redirection() }
   ${ commonHeaderFooterComponents.header_i18n_redirection() }
 
 
   % if user.is_authenticated():
   % if user.is_authenticated():
@@ -218,7 +214,7 @@ if USE_NEW_EDITOR.get():
 ${ hueIcons.symbols() }
 ${ hueIcons.symbols() }
 
 
 
 
-% if conf.DISABLE_HUE_3.get() and conf.IS_HUE_4.get() and request.environ.get("PATH_INFO").find("/hue/") < 0:
+% if request.environ.get("PATH_INFO").find("/hue/") < 0:
   <script>
   <script>
     window.location.replace("/");
     window.location.replace("/");
   </script>
   </script>
@@ -311,7 +307,7 @@ ${ hueIcons.symbols() }
     <%
     <%
       view_profile = user.has_hue_permission(action="access_view:useradmin:edit_user", app="useradmin") or is_admin(user)
       view_profile = user.has_hue_permission(action="access_view:useradmin:edit_user", app="useradmin") or is_admin(user)
     %>
     %>
-    % if view_profile or conf.IS_HUE_4.get():
+    % if view_profile:
     <li class="dropdown">
     <li class="dropdown">
       <a title="${'Administration' if view_profile else ''}" href="#" data-rel="navigator-tooltip" data-toggle="dropdown" class="dropdown-toggle">
       <a title="${'Administration' if view_profile else ''}" href="#" data-rel="navigator-tooltip" data-toggle="dropdown" class="dropdown-toggle">
         <i class="fa fa-cogs"></i>&nbsp;${user.username}&nbsp;
         <i class="fa fa-cogs"></i>&nbsp;${user.username}&nbsp;
@@ -332,9 +328,6 @@ ${ hueIcons.symbols() }
           <li><a href="${ url('useradmin.views.list_users') }"><i class="fa fa-fw fa-group"></i> ${_('Manage Users')}</a></li>
           <li><a href="${ url('useradmin.views.list_users') }"><i class="fa fa-fw fa-group"></i> ${_('Manage Users')}</a></li>
         % endif
         % endif
       % endif
       % endif
-      % if conf.IS_HUE_4.get():
-      <li><a href="javascript:void(0)" onclick="huePubSub.publish('set.hue.version', 4)"><i class="fa fa-fw fa-exchange"></i> ${_('Switch to Hue 4')}</a></li>
-      % endif
       </ul>
       </ul>
     </li>
     </li>
     % else:
     % else:

+ 2 - 50
desktop/core/src/desktop/templates/common_header_footer_components.mako

@@ -161,40 +161,6 @@ from metadata.conf import has_optimizer, OPTIMIZER
         placement: "bottom"
         placement: "bottom"
       });
       });
 
 
-      % if 'jobbrowser' in apps:
-      if (!IS_HUE_4) {
-        var checkJobBrowserStatusIdx = window.setTimeout(checkJobBrowserStatus, 10);
-        var lastJobBrowserRequest = null;
-
-        function checkJobBrowserStatus() {
-          if (lastJobBrowserRequest !== null && lastJobBrowserRequest.readyState < 4) {
-            return;
-          }
-          window.clearTimeout(checkJobBrowserStatusIdx);
-          lastJobBrowserRequest = $.post("/jobbrowser/jobs/", {
-                "format": "json",
-                "state": "running",
-                "user": "${user.username}"
-              },
-              function (data) {
-                if (data != null && data.jobs != null) {
-                  huePubSub.publish('jobbrowser.data', data.jobs);
-                  if (data.jobs.length > 0) {
-                    $("#jobBrowserCount").show().text(data.jobs.length);
-                  } else {
-                    $("#jobBrowserCount").hide();
-                  }
-                }
-                checkJobBrowserStatusIdx = window.setTimeout(checkJobBrowserStatus, window.JB_HEADER_CHECK_INTERVAL_IN_MILLIS);
-              }).fail(function () {
-            window.clearTimeout(checkJobBrowserStatusIdx);
-          });
-        }
-
-        huePubSub.subscribe('check.job.browser', checkJobBrowserStatus);
-      }
-      % endif
-
       function openDropdown(which, timeout){
       function openDropdown(which, timeout){
         var _this = which;
         var _this = which;
         var _timeout = timeout!=null?timeout:800;
         var _timeout = timeout!=null?timeout:800;
@@ -308,20 +274,6 @@ from metadata.conf import has_optimizer, OPTIMIZER
 
 
 <script type="text/javascript">
 <script type="text/javascript">
 
 
-  huePubSub.subscribe('set.hue.version', function (version) {
-    $.post("/desktop/api2/user_preferences/hue_version", {
-      set: version
-    }, function (data) {
-      if (data && data.status == 0) {
-        location.href = version === 3 && '${ conf.DISABLE_HUE_3.get() }' == 'False' ? window.location.pathname.substr(4) + window.location.search : '/hue' + window.location.pathname + window.location.search
-      }
-      else {
-        $.jHueNotify.error("${ _('An error occurred while saving your default Hue preference. Please try again...') }");
-      }
-    });
-  });
-
-
   $(document).ready(function () {
   $(document).ready(function () {
 
 
     if (window.performance && window.performance.navigation && window.performance.navigation.type === 1) {
     if (window.performance && window.performance.navigation && window.performance.navigation.type === 1) {
@@ -615,14 +567,14 @@ from metadata.conf import has_optimizer, OPTIMIZER
     _pathName = _splits[0] + (_splits.length > 1 && $.trim(_splits[1]) != "" ? "/" + _splits[1] : "");
     _pathName = _splits[0] + (_splits.length > 1 && $.trim(_splits[1]) != "" ? "/" + _splits[1] : "");
 
 
     ga('send', 'pageview', {
     ga('send', 'pageview', {
-      'page': '/remote/${ version }/' + (IS_HUE_4 ? '4/' : '3/') + _pathName
+      'page': '/remote/${ version }/4/' + _pathName
     });
     });
 
 
     function trackOnGA(path) {
     function trackOnGA(path) {
       if (typeof ga != "undefined" && ga != null) {
       if (typeof ga != "undefined" && ga != null) {
         ga('set', 'referrer', 'http://gethue.com'); // we force the referrer to prevent leaking sensitive information
         ga('set', 'referrer', 'http://gethue.com'); // we force the referrer to prevent leaking sensitive information
         ga('send', 'pageview', {
         ga('send', 'pageview', {
-          'page': '/remote/${ version }/' + (IS_HUE_4 ? '4/' : '3/') + path
+          'page': '/remote/${ version }/4/' + path
         });
         });
       }
       }
     }
     }

+ 1 - 1
desktop/core/src/desktop/templates/common_header_m.mako

@@ -88,7 +88,7 @@ if USE_NEW_EDITOR.get():
         'link-workflow': '${_('Job Design')}',
         'link-workflow': '${_('Job Design')}',
         'notebook': '${_('Notebook')}',
         'notebook': '${_('Notebook')}',
         'oozie-bundle2': '${_('Oozie Bundle')}',
         'oozie-bundle2': '${_('Oozie Bundle')}',
-        'oozie-coordinator2': (IS_HUE_4 ? '${_('Oozie Schedule')}' : '${_('Oozie Coordinator')}'),
+        'oozie-coordinator2': '${_('Oozie Schedule')}',
         'oozie-workflow2': '${_('Oozie Workflow')}',
         'oozie-workflow2': '${_('Oozie Workflow')}',
         'query-hive': '${_('Hive Query')}',
         'query-hive': '${_('Hive Query')}',
         'query-impala': '${_('Impala Query')}',
         'query-impala': '${_('Impala Query')}',

+ 16 - 20
desktop/core/src/desktop/templates/common_notebook_ko_components.mako

@@ -440,30 +440,26 @@ except ImportError, e:
             format: ko.mapping.toJSON(self.saveTarget()),
             format: ko.mapping.toJSON(self.saveTarget()),
             destination: ko.mapping.toJSON(self.savePath()),
             destination: ko.mapping.toJSON(self.savePath()),
             overwrite: ko.mapping.toJSON(self.saveOverwrite()),
             overwrite: ko.mapping.toJSON(self.saveOverwrite()),
-            is_embedded: ko.mapping.toJSON(IS_HUE_4),
+            is_embedded: ko.mapping.toJSON(true),
             start_time: ko.mapping.toJSON((new Date()).getTime())
             start_time: ko.mapping.toJSON((new Date()).getTime())
           },
           },
           function(resp) {
           function(resp) {
             if (resp.status == 0) {
             if (resp.status == 0) {
-              if (IS_HUE_4) {
-                $(".modal-backdrop").remove();
-                if (self.saveTarget() == 'hdfs-file') {
-                  $(self.saveResultsModalId).modal('hide');
-                  huePubSub.publish('open.link', resp.watch_url);
-                } else if (self.saveTarget() == 'search-index') {
-                  $(self.saveResultsModalId).modal('hide');
-                  huePubSub.publish('open.importer.query', resp);
-                } else if (self.saveTarget() == 'dashboard') {
-                   $(self.saveResultsModalId).modal('hide');
-                  huePubSub.publish('open.link', resp.watch_url);
-                } else if (resp.history_uuid) {
-                  $(self.saveResultsModalId).modal('hide');
-                  huePubSub.publish('notebook.task.submitted', resp.history_uuid);
-                } else if (resp && resp.message) {
-                  $(document).trigger("error", resp.message);
-                }
-              } else {
-                window.location.href = resp.watch_url;
+              $(".modal-backdrop").remove();
+              if (self.saveTarget() == 'hdfs-file') {
+                $(self.saveResultsModalId).modal('hide');
+                huePubSub.publish('open.link', resp.watch_url);
+              } else if (self.saveTarget() == 'search-index') {
+                $(self.saveResultsModalId).modal('hide');
+                huePubSub.publish('open.importer.query', resp);
+              } else if (self.saveTarget() == 'dashboard') {
+                 $(self.saveResultsModalId).modal('hide');
+                huePubSub.publish('open.link', resp.watch_url);
+              } else if (resp.history_uuid) {
+                $(self.saveResultsModalId).modal('hide');
+                huePubSub.publish('notebook.task.submitted', resp.history_uuid);
+              } else if (resp && resp.message) {
+                $(document).trigger("error", resp.message);
               }
               }
             } else {
             } else {
               $(document).trigger('error', resp.message);
               $(document).trigger('error', resp.message);

+ 1 - 1
desktop/core/src/desktop/templates/document_browser.mako

@@ -387,7 +387,7 @@ from desktop.views import _ko
                 <li class="app-header">
                 <li class="app-header">
                   <a href="/hue/useradmin">
                   <a href="/hue/useradmin">
                     <svg class="hi"><use xlink:href="#hi-documents"></use></svg>
                     <svg class="hi"><use xlink:href="#hi-documents"></use></svg>
-                    <!-- ko component: { name: 'hue-favorite-app', params: { hue4: IS_HUE_4, app: 'home' }} --><!-- /ko -->
+                    <!-- ko component: { name: 'hue-favorite-app', params: { app: 'home' }} --><!-- /ko -->
                   </a>
                   </a>
                 </li>
                 </li>
                <!-- ko with: activeEntry -->
                <!-- ko with: activeEntry -->

+ 1 - 1
desktop/core/src/desktop/templates/global_js_constants.mako

@@ -109,7 +109,7 @@
       'link-workflow': '${_('Job Design')}',
       'link-workflow': '${_('Job Design')}',
       'notebook': '${_('Notebook')}',
       'notebook': '${_('Notebook')}',
       'oozie-bundle2': '${_('Oozie Bundle')}',
       'oozie-bundle2': '${_('Oozie Bundle')}',
-      'oozie-coordinator2': IS_HUE_4 ? '${_('Oozie Schedule')}' : '${_('Oozie Coordinator')}',
+      'oozie-coordinator2': '${_('Oozie Schedule')}',
       'oozie-workflow2': '${_('Oozie Workflow')}',
       'oozie-workflow2': '${_('Oozie Workflow')}',
       'query-hive': '${_('Hive Query')}',
       'query-hive': '${_('Hive Query')}',
       'query-impala': '${_('Impala Query')}',
       'query-impala': '${_('Impala Query')}',

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

@@ -91,7 +91,6 @@
   <link href="${ static('desktop/css/home.css') }" rel="stylesheet">
   <link href="${ static('desktop/css/home.css') }" rel="stylesheet">
 % endif
 % endif
   <script type="text/javascript">
   <script type="text/javascript">
-    window.IS_HUE_4 = true;
 % if IS_EMBEDDED.get():
 % if IS_EMBEDDED.get():
   // Bootstrap 2.3.2 relies on the hide css class presence for modals but doesn't remove it when opened for fade type
   // Bootstrap 2.3.2 relies on the hide css class presence for modals but doesn't remove it when opened for fade type
   // modals, a parent container might have it set to !important which will prevent the modal from showing. This
   // modals, a parent container might have it set to !important which will prevent the modal from showing. This
@@ -262,9 +261,6 @@ ${ hueIcons.symbols() }
             % if is_admin(user):
             % if is_admin(user):
             <li data-bind="hueLink: '/useradmin/users/'"><a href="javascript: void(0);"><i class="fa fa-fw fa-group"></i> ${_('Manage Users')}</a></li>
             <li data-bind="hueLink: '/useradmin/users/'"><a href="javascript: void(0);"><i class="fa fa-fw fa-group"></i> ${_('Manage Users')}</a></li>
             % endif
             % endif
-            % if not conf.DISABLE_HUE_3.get():
-            <li><a href="javascript:void(0)" onclick="huePubSub.publish('set.hue.version', 3)"><i class="fa fa-fw fa-exchange"></i> ${_('Switch to Hue 3')}</a></li>
-            % endif
             <li><a href="http://gethue.com" target="_blank"><span class="dropdown-no-icon">${_('Help')}</span></a></li>
             <li><a href="http://gethue.com" target="_blank"><span class="dropdown-no-icon">${_('Help')}</span></a></li>
             <li><a href="javascript:void(0)" onclick="huePubSub.publish('show.welcome.tour')"><span class="dropdown-no-icon">${_('Welcome Tour')}</span></a></li>
             <li><a href="javascript:void(0)" onclick="huePubSub.publish('show.welcome.tour')"><span class="dropdown-no-icon">${_('Welcome Tour')}</span></a></li>
             % if is_admin(user):
             % if is_admin(user):

+ 5 - 11
desktop/core/src/desktop/templates/ko_components/ko_favorite_app.mako

@@ -25,11 +25,9 @@ from desktop.views import _ko
 <%def name="favoriteApp()">
 <%def name="favoriteApp()">
 
 
   <script type="text/html" id="hue-favorite-app-template">
   <script type="text/html" id="hue-favorite-app-template">
-    <!-- ko if: isHue4 -->
     <div class="inline pointer favorite-app" data-bind="click: setAsFavoriteApp, tooltip: { placement: 'bottom', title: isFavorite() ? '${ _ko("Unset from default application") }' : '${ _ko("Set as default application") }' }">
     <div class="inline pointer favorite-app" data-bind="click: setAsFavoriteApp, tooltip: { placement: 'bottom', title: isFavorite() ? '${ _ko("Unset from default application") }' : '${ _ko("Set as default application") }' }">
       <i class="fa inactive-action" data-bind="css: { 'fa-star-o': !isFavorite(), 'fa-star': isFavorite }"></i>
       <i class="fa inactive-action" data-bind="css: { 'fa-star-o': !isFavorite(), 'fa-star': isFavorite }"></i>
     </div>
     </div>
-    <!-- /ko -->
   </script>
   </script>
 
 
   <script type="text/javascript">
   <script type="text/javascript">
@@ -37,7 +35,6 @@ from desktop.views import _ko
 
 
       var FavoriteApp = function (params) {
       var FavoriteApp = function (params) {
         var self = this;
         var self = this;
-        self.isHue4 = ko.observable(params.hue4);
         self.isFavorite = ko.observable(false);
         self.isFavorite = ko.observable(false);
         self.app = params.app;
         self.app = params.app;
         self.interpreter = params.interpreter;
         self.interpreter = params.interpreter;
@@ -69,8 +66,7 @@ from desktop.views import _ko
           var post = {};
           var post = {};
           if (self.isFavorite()) {
           if (self.isFavorite()) {
             post['delete'] = true;
             post['delete'] = true;
-          }
-          else {
+          } else {
             post['set'] = ko.mapping.toJSON(postParams);
             post['set'] = ko.mapping.toJSON(postParams);
           }
           }
           $.post('/desktop/api2/user_preferences/default_app', post, function (data) {
           $.post('/desktop/api2/user_preferences/default_app', post, function (data) {
@@ -78,12 +74,10 @@ from desktop.views import _ko
           });
           });
         };
         };
 
 
-        if (self.isHue4()) {
-          // Load the fav app status
-          $.get('/desktop/api2/user_preferences/default_app', function (data) {
-            self.parseCurrentFavorite(data);
-          });
-        }
+        // Load the fav app status
+        $.get('/desktop/api2/user_preferences/default_app', function (data) {
+          self.parseCurrentFavorite(data);
+        });
       };
       };
 
 
       ko.components.register('hue-favorite-app', {
       ko.components.register('hue-favorite-app', {

+ 0 - 28
desktop/core/src/desktop/templates/login.mako

@@ -19,7 +19,6 @@
   from django.utils.translation import ugettext as _
   from django.utils.translation import ugettext as _
   from desktop.views import commonheader, commonfooter
   from desktop.views import commonheader, commonfooter
   from useradmin.hue_password_policy import is_password_policy_enabled, get_password_hint
   from useradmin.hue_password_policy import is_password_policy_enabled, get_password_hint
-  from desktop.conf import is_hue4
 %>
 %>
 
 
 <%namespace name="hueIcons" file="/hue_icons.mako" />
 <%namespace name="hueIcons" file="/hue_icons.mako" />
@@ -27,9 +26,7 @@
 ${ commonheader(_("Welcome to Hue"), "login", user, request, "50px", True, True) | n,unicode }
 ${ commonheader(_("Welcome to Hue"), "login", user, request, "50px", True, True) | n,unicode }
 
 
 <link rel="stylesheet" href="${ static('desktop/css/login.css') }">
 <link rel="stylesheet" href="${ static('desktop/css/login.css') }">
-%if is_hue4():
 <link rel="stylesheet" href="${ static('desktop/css/login4.css') }">
 <link rel="stylesheet" href="${ static('desktop/css/login4.css') }">
-%endif
 
 
 <style type="text/css">
 <style type="text/css">
   body {
   body {
@@ -50,34 +47,13 @@ ${ commonheader(_("Welcome to Hue"), "login", user, request, "50px", True, True)
   }
   }
 </style>
 </style>
 
 
-%if not is_hue4():
-<div class="navigator">
-  <div class="pull-right">
-
-  <ul class="nav nav-pills">
-    <li><a href="http://gethue.com" target="_blank" title="${_('Go to gethue.com')}" data-rel="navigator-tooltip" data-placement="left"><i class="fa fa-globe"></i></a></li>
-  </ul>
-
-  </div>
-  <a class="brand pull-left" href="/">
-    <svg style="margin-top: 2px; margin-left:8px;width: 60px;height: 16px;display: inline-block;">
-      <use xlink:href="#hi-logo"></use>
-    </svg>
-  </a>
-</div>
-%endif
-
 <div class="login-container">
 <div class="login-container">
 
 
   <form method="POST" action="${action}" autocomplete="off">
   <form method="POST" action="${action}" autocomplete="off">
     ${ csrf_token(request) | n,unicode }
     ${ csrf_token(request) | n,unicode }
 
 
     <div class="logo">
     <div class="logo">
-      %if is_hue4():
       <svg style="height: 80px; width: 200px;"><use xlink:href="#hi-logo"></use></svg>
       <svg style="height: 80px; width: 200px;"><use xlink:href="#hi-logo"></use></svg>
-      %else:
-      <img src="${ static('desktop/art/hue-login-logo-ellie@2x.png') }" width="70" height="70" alt="${ _('Hue logo') }">
-      %endif
     </div>
     </div>
     <h3>Query. Explore. Repeat.</h3>
     <h3>Query. Explore. Repeat.</h3>
 
 
@@ -173,10 +149,6 @@ ${ commonheader(_("Welcome to Hue"), "login", user, request, "50px", True, True)
   ${ _('Hue and the Hue logo are trademarks of Cloudera, Inc.') }
   ${ _('Hue and the Hue logo are trademarks of Cloudera, Inc.') }
 </div>
 </div>
 
 
-%if not is_hue4():
-<div class="footer"></div>
-%endif
-
 <script>
 <script>
   $(document).ready(function () {
   $(document).ready(function () {
     $("form").on("submit", function () {
     $("form").on("submit", function () {

+ 3 - 19
desktop/core/src/desktop/views.py

@@ -49,7 +49,7 @@ import desktop.log.log_buffer
 from desktop import appmanager
 from desktop import appmanager
 from desktop.api import massaged_tags_for_json, massaged_documents_for_json, _get_docs
 from desktop.api import massaged_tags_for_json, massaged_documents_for_json, _get_docs
 from desktop.auth.backend import is_admin
 from desktop.auth.backend import is_admin
-from desktop.conf import USE_NEW_EDITOR, IS_HUE_4, HUE_LOAD_BALANCER, get_clusters, DISABLE_HUE_3
+from desktop.conf import USE_NEW_EDITOR, HUE_LOAD_BALANCER, get_clusters
 from desktop.lib import django_mako
 from desktop.lib import django_mako
 from desktop.lib.conf import GLOBAL_CONFIG, BoundConfig, _configs_from_dir
 from desktop.lib.conf import GLOBAL_CONFIG, BoundConfig, _configs_from_dir
 from desktop.lib.config_spec_dump import ConfigSpec
 from desktop.lib.config_spec_dump import ConfigSpec
@@ -385,23 +385,7 @@ def unsupported(request):
   return render('unsupported.mako', request, None)
   return render('unsupported.mako', request, None)
 
 
 def index(request):
 def index(request):
-  is_hue_4 = IS_HUE_4.get() or DISABLE_HUE_3.get()
-  if is_hue_4:
-    try:
-      user_hue_version = json.loads(UserPreferences.objects.get(user=request.user, key='hue_version').value)
-      is_hue_4 = user_hue_version >= 4 or DISABLE_HUE_3.get()
-    except UserPreferences.DoesNotExist:
-      pass
-
-  if is_admin(request.user) and request.COOKIES.get('hueLandingPage') != 'home' and not IS_HUE_4.get():
-    return redirect(reverse('about:index'))
-  else:
-    if is_hue_4:
-      return redirect('desktop_views_hue')
-    elif USE_NEW_EDITOR.get():
-      return redirect('desktop_views_home2')
-    else:
-      return home(request)
+  return redirect('desktop_views_hue')
 
 
 def csrf_failure(request, reason=None):
 def csrf_failure(request, reason=None):
   """Registered handler for CSRF."""
   """Registered handler for CSRF."""
@@ -515,7 +499,7 @@ def get_banner_message(request):
 
 
   message = None
   message = None
   path_info = request.environ.get("PATH_INFO")
   path_info = request.environ.get("PATH_INFO")
-  if IS_HUE_4.get() and path_info.find("/hue/") < 0 and path_info.find("accounts/login") < 0:
+  if path_info.find("/hue/") < 0 and path_info.find("accounts/login") < 0:
     url = request.build_absolute_uri("/hue")
     url = request.build_absolute_uri("/hue")
     link = '<a href="%s" style="color: #FFF; font-weight: bold">%s</a>' % (url, url)
     link = '<a href="%s" style="color: #FFF; font-weight: bold">%s</a>' % (url, url)
     message = _('You are accessing an older version of Hue, please switch to the latest version: %s.') % link
     message = _('You are accessing an older version of Hue, please switch to the latest version: %s.') % link

+ 1 - 1
desktop/libs/dashboard/src/dashboard/static/dashboard/js/collections.ko.js

@@ -125,7 +125,7 @@ var SearchCollectionsModel = function (props) {
 
 
   self.editCollection = function (collection) {
   self.editCollection = function (collection) {
     cleanCollections();
     cleanCollections();
-    location.href = (IS_HUE_4 ? '/hue' : '') + collection.absoluteUrl();
+    location.href = '/hue' + collection.absoluteUrl();
   };
   };
 
 
   self.markManyForDeletion = function (collections) {
   self.markManyForDeletion = function (collections) {

+ 2 - 2
desktop/libs/dashboard/src/dashboard/static/dashboard/js/search.ko.js

@@ -2949,7 +2949,7 @@ var SearchViewModel = function (collection_json, query_json, initial_json, has_g
           self.collection.id(data.id);
           self.collection.id(data.id);
           $(document).trigger("info", data.message);
           $(document).trigger("info", data.message);
           if (oldId !== data.id) {
           if (oldId !== data.id) {
-            hueUtils.changeURL((IS_HUE_4 ? '/hue' : '') + '/dashboard/?collection=' + data.id);
+            hueUtils.changeURL('/hue/dashboard/?collection=' + data.id);
           }
           }
         }
         }
         else {
         else {
@@ -3119,7 +3119,7 @@ var SearchViewModel = function (collection_json, query_json, initial_json, has_g
     // loadDashboardLayout(self, self.collectionJson.gridItems); // TODO
     // loadDashboardLayout(self, self.collectionJson.gridItems); // TODO
 
 
     if (window.location.search.indexOf("collection") > -1) {
     if (window.location.search.indexOf("collection") > -1) {
-      hueUtils.changeURL((IS_HUE_4 ? '/hue' : '') + '/dashboard/new_search');
+      hueUtils.changeURL('/hue/dashboard/new_search');
     }
     }
   };
   };
 
 

+ 1 - 10
desktop/libs/dashboard/src/dashboard/templates/common_search.mako

@@ -57,7 +57,7 @@ from dashboard.conf import USE_GRIDSTER, USE_NEW_ADD_METHOD, HAS_REPORT_ENABLED,
       <div class="app-header">
       <div class="app-header">
         <a href="#" data-bind="hueLink: '${ url('dashboard:new_search') }'">
         <a href="#" data-bind="hueLink: '${ url('dashboard:new_search') }'">
           <!-- ko template: { name: 'app-icon-template', data: { icon: 'dashboard' } } --><!-- /ko --> ${ _('Dashboard') }
           <!-- ko template: { name: 'app-icon-template', data: { icon: 'dashboard' } } --><!-- /ko --> ${ _('Dashboard') }
-          <!-- ko component: { name: 'hue-favorite-app', params: { hue4: IS_HUE_4, app: 'dashboard' }} --><!-- /ko -->
+          <!-- ko component: { name: 'hue-favorite-app', params: { app: 'dashboard' }} --><!-- /ko -->
         </a>
         </a>
       </div>
       </div>
     </div>
     </div>
@@ -195,20 +195,11 @@ from dashboard.conf import USE_GRIDSTER, USE_NEW_ADD_METHOD, HAS_REPORT_ENABLED,
               <i class="fa fa-fw fa-file-o"></i> ${ _('New') }
               <i class="fa fa-fw fa-file-o"></i> ${ _('New') }
             </a>
             </a>
           </li>
           </li>
-          <!-- ko if: IS_HUE_4 -->
           <li>
           <li>
             <a href="javascript:void(0);" data-bind="publish: { 'assist.show.documents': 'search-dashboard' }">
             <a href="javascript:void(0);" data-bind="publish: { 'assist.show.documents': 'search-dashboard' }">
               <svg class="hi hi-fw hi-bigger"><use xlink:href="#hi-documents"></use></svg> ${ _('Dashboards') }
               <svg class="hi hi-fw hi-bigger"><use xlink:href="#hi-documents"></use></svg> ${ _('Dashboards') }
             </a>
             </a>
           </li>
           </li>
-          <!-- /ko -->
-          <!-- ko ifnot: IS_HUE_4 -->
-          <li>
-            <a href="${ url('dashboard:admin_collections') }">
-              <svg class="hi hi-fw hi-bigger"><use xlink:href="#hi-documents"></use></svg> ${ _('Dashboards') }
-            </a>
-          </li>
-          <!-- /ko -->
           <li data-bind="visible: columns().length != 0" class="divider"></li>
           <li data-bind="visible: columns().length != 0" class="divider"></li>
           <li data-bind="visible: isSaved()">
           <li data-bind="visible: isSaved()">
             <a class="share-link" data-bind="click: prepareShareModal, css: {'isShared': isShared()}">
             <a class="share-link" data-bind="click: prepareShareModal, css: {'isShared': isShared()}">

+ 12 - 26
desktop/libs/indexer/src/indexer/indexers/envelope.py

@@ -22,7 +22,6 @@ from django.core.urlresolvers import reverse
 from django.utils.translation import ugettext as _
 from django.utils.translation import ugettext as _
 
 
 from desktop.lib.exceptions_renderable import PopupException
 from desktop.lib.exceptions_renderable import PopupException
-from desktop.conf import DISABLE_HUE_3
 from hadoop.fs.hadoopfs import Hdfs
 from hadoop.fs.hadoopfs import Hdfs
 from notebook.models import make_notebook
 from notebook.models import make_notebook
 
 
@@ -72,37 +71,24 @@ class EnvelopeIndexer(object):
       last_executed=start_time
       last_executed=start_time
     )
     )
 
 
-    if not DISABLE_HUE_3.config.default_value or True: # CDH5
-      shell_command_name = "pipeline.sh"
-      shell_command = """#!/bin/bash
+    shell_command_name = "pipeline.sh"
+    shell_command = """#!/bin/bash
 
 
 export SPARK_DIST_CLASSPATH=`hadoop classpath`
 export SPARK_DIST_CLASSPATH=`hadoop classpath`
 export SPARK_DIST_CLASSPATH=/etc/hive/conf:`hadoop classpath`
 export SPARK_DIST_CLASSPATH=/etc/hive/conf:`hadoop classpath`
 export JAVA_HOME=/usr/java/jdk1.8.0_162
 export JAVA_HOME=/usr/java/jdk1.8.0_162
 
 
 SPARK_KAFKA_VERSION=0.10 spark2-submit envelope.jar envelope.conf"""
 SPARK_KAFKA_VERSION=0.10 spark2-submit envelope.jar envelope.conf"""
-      hdfs_shell_cmd_path = os.path.join(workspace_path, shell_command_name)
-      self.fs.do_as_user(self.username, self.fs.create, hdfs_shell_cmd_path, data=shell_command)
-      task.add_shell_snippet(
-        shell_command=shell_command_name,
-        files=[
-            {u'value': u'%s/envelope.conf' % workspace_path},
-            {u'value': hdfs_shell_cmd_path},
-            {u'value': lib_path}
-        ]
-      )
-    else:
-      task.add_spark_snippet(
-        clazz='com.cloudera.labs.envelope.EnvelopeMain',
-        jars=Hdfs.basename(lib_path),
-        arguments=[
-            u'envelope.conf'
-        ],
-        files=[
-            {u'path': u'%s/envelope.conf' % workspace_path, u'type': u'file'},
-            {u'path': lib_path, u'type': u'file'},
-        ]
-      )
+    hdfs_shell_cmd_path = os.path.join(workspace_path, shell_command_name)
+    self.fs.do_as_user(self.username, self.fs.create, hdfs_shell_cmd_path, data=shell_command)
+    task.add_shell_snippet(
+      shell_command=shell_command_name,
+      files=[
+          {u'value': u'%s/envelope.conf' % workspace_path},
+          {u'value': hdfs_shell_cmd_path},
+          {u'value': lib_path}
+      ]
+    )
 
 
     return task.execute(request, batch=True)
     return task.execute(request, batch=True)
 
 

+ 2 - 2
desktop/libs/indexer/src/indexer/static/indexer/js/collections.js

@@ -255,7 +255,7 @@ var CreateCollectionViewModel = function() {
           'quote': self.fieldQuoteCharacter()
           'quote': self.fieldQuoteCharacter()
         }).done(function(data) {
         }).done(function(data) {
           if (data.status == 0) {
           if (data.status == 0) {
-            window.location.href = (IS_HUE_4 ? '/hue' : '') + '/indexer/'; // Can't open on collection name as no collections refresh yet
+            window.location.href = '/hue/indexer/'; // Can't open on collection name as no collections refresh yet
           } else {
           } else {
             self.isLoading(false);
             self.isLoading(false);
             $(document).trigger("error", data.message);
             $(document).trigger("error", data.message);
@@ -274,7 +274,7 @@ var CreateCollectionViewModel = function() {
           'source': self.source()
           'source': self.source()
         }).done(function(data) {
         }).done(function(data) {
           if (data.status == 0) {
           if (data.status == 0) {
-            window.location.href = (IS_HUE_4 ? '/hue' : '') + '/indexer/'; // Can't open on collection name as no collections refresh yet
+            window.location.href = '/hue/indexer/'; // Can't open on collection name as no collections refresh yet
           } else {
           } else {
             $(document).trigger("error", data.message);
             $(document).trigger("error", data.message);
           }
           }

+ 1 - 5
desktop/libs/indexer/src/indexer/templates/indexes.mako

@@ -643,7 +643,7 @@ ${ assist.assistPanel() }
     var IndexesViewModel = function (options) {
     var IndexesViewModel = function (options) {
       var self = this;
       var self = this;
 
 
-      self.baseURL = (IS_HUE_4 ? '/hue' : '') + '/indexer/indexes/';
+      self.baseURL = '/hue/indexer/indexes/';
 
 
       self.activeNamespace = ko.observable();
       self.activeNamespace = ko.observable();
       self.activeCompute = ko.observable();
       self.activeCompute = ko.observable();
@@ -656,7 +656,6 @@ ${ assist.assistPanel() }
 
 
       self.assistAvailable = ko.observable(true);
       self.assistAvailable = ko.observable(true);
       self.apiHelper = window.apiHelper;
       self.apiHelper = window.apiHelper;
-      self.isHue4 = ko.observable(options.hue4);
       self.isLeftPanelVisible = ko.observable();
       self.isLeftPanelVisible = ko.observable();
       self.apiHelper.withTotalStorage('assist', 'assist_panel_visible', self.isLeftPanelVisible, true);
       self.apiHelper.withTotalStorage('assist', 'assist_panel_visible', self.isLeftPanelVisible, true);
 
 
@@ -885,9 +884,6 @@ ${ assist.assistPanel() }
     $(document).ready(function () {
     $(document).ready(function () {
       var options = {
       var options = {
         user: '${ user.username }',
         user: '${ user.username }',
-        % if is_embeddable:
-          hue4: true,
-        % endif
         index: '${ index }'
         index: '${ index }'
       };
       };
       var viewModel = new IndexesViewModel(options);
       var viewModel = new IndexesViewModel(options);

+ 1 - 5
desktop/libs/indexer/src/indexer/templates/topics.mako

@@ -574,7 +574,7 @@ ${ assist.assistPanel() }
     var IndexesViewModel = function (options) {
     var IndexesViewModel = function (options) {
       var self = this;
       var self = this;
 
 
-      self.baseURL = (IS_HUE_4 ? '/hue' : '') + '/indexer/topics/';
+      self.baseURL = '/hue/indexer/topics/';
 
 
       self.activeNamespace = ko.observable();
       self.activeNamespace = ko.observable();
       self.activeCompute = ko.observable();
       self.activeCompute = ko.observable();
@@ -587,7 +587,6 @@ ${ assist.assistPanel() }
 
 
       self.assistAvailable = ko.observable(true);
       self.assistAvailable = ko.observable(true);
       self.apiHelper = window.apiHelper;
       self.apiHelper = window.apiHelper;
-      self.isHue4 = ko.observable(options.hue4);
       self.isLeftPanelVisible = ko.observable();
       self.isLeftPanelVisible = ko.observable();
       self.apiHelper.withTotalStorage('assist', 'assist_panel_visible', self.isLeftPanelVisible, true);
       self.apiHelper.withTotalStorage('assist', 'assist_panel_visible', self.isLeftPanelVisible, true);
 
 
@@ -815,9 +814,6 @@ ${ assist.assistPanel() }
     $(document).ready(function () {
     $(document).ready(function () {
       var options = {
       var options = {
         user: '${ user.username }',
         user: '${ user.username }',
-        % if is_embeddable:
-          hue4: true,
-        % endif
         index: '${ index }'
         index: '${ index }'
       };
       };
       var viewModel = new IndexesViewModel(options);
       var viewModel = new IndexesViewModel(options);

+ 2 - 12
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -211,14 +211,14 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
                 <!-- ko case: 'clickhouse' -->ClickHouse<!-- /ko -->
                 <!-- ko case: 'clickhouse' -->ClickHouse<!-- /ko -->
                 <!-- ko case: $default -->SQL<!-- /ko -->
                 <!-- ko case: $default -->SQL<!-- /ko -->
               <!-- /ko -->
               <!-- /ko -->
-              <!-- ko component: { name: 'hue-favorite-app', params: { hue4: IS_HUE_4, app: 'editor', interpreter: editorType() }} --><!-- /ko -->
+              <!-- ko component: { name: 'hue-favorite-app', params: { app: 'editor', interpreter: editorType() }} --><!-- /ko -->
               </a>
               </a>
               % endif
               % endif
             <!-- /ko -->
             <!-- /ko -->
             <!-- ko ifnot: editorMode -->
             <!-- ko ifnot: editorMode -->
               <i class="fa fa-file-text-o app-icon" style="vertical-align: middle"></i>
               <i class="fa fa-file-text-o app-icon" style="vertical-align: middle"></i>
                 Notebook
                 Notebook
-              <!-- ko component: { name: 'hue-favorite-app', params: { hue4: IS_HUE_4, app: 'notebook' }} --><!-- /ko -->
+              <!-- ko component: { name: 'hue-favorite-app', params: { app: 'notebook' }} --><!-- /ko -->
             <!-- /ko -->
             <!-- /ko -->
           </li>
           </li>
 
 
@@ -341,16 +341,9 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
           <!-- /ko -->
           <!-- /ko -->
           </li>
           </li>
           <li>
           <li>
-            <!-- ko if: IS_HUE_4 -->
             <a href="javascript:void(0)" data-bind="publish: { 'assist.show.documents': editorMode() ? 'query-' + editorType() : editorType() }">
             <a href="javascript:void(0)" data-bind="publish: { 'assist.show.documents': editorMode() ? 'query-' + editorType() : editorType() }">
               <svg class="hi hi-fw hi-bigger"><use xlink:href="#hi-documents"></use></svg> <span data-bind="text: editorMode() ? '${ _ko('Queries') }' : '${ _ko('Notebooks') }'"></span>
               <svg class="hi hi-fw hi-bigger"><use xlink:href="#hi-documents"></use></svg> <span data-bind="text: editorMode() ? '${ _ko('Queries') }' : '${ _ko('Notebooks') }'"></span>
             </a>
             </a>
-            <!-- /ko -->
-            <!-- ko ifnot: IS_HUE_4 -->
-            <a href="javascript:void(0)" class="btn" data-bind="hueLink: '${ url('notebook:notebooks') }?type=' + editorType()">
-              <svg class="hi hi-fw hi-bigger"><use xlink:href="#hi-documents"></use></svg> <span data-bind="text: editorMode() ? '${ _ko('Queries') }' : '${ _ko('Notebooks') }'"></span>
-            </a>
-            <!-- /ko -->
           </li>
           </li>
           <li class="divider"></li>
           <li class="divider"></li>
           <!-- ko if: $root.canSave -->
           <!-- ko if: $root.canSave -->
@@ -2841,9 +2834,6 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
       user: '${ user.username }',
       user: '${ user.username }',
       userId: ${ user.id },
       userId: ${ user.id },
       suffix: '${ suffix }',
       suffix: '${ suffix }',
-      % if is_embeddable:
-      hue4: true,
-      % endif
       assistAvailable: true,
       assistAvailable: true,
       % if conf.USE_NEW_AUTOCOMPLETER.get():
       % if conf.USE_NEW_AUTOCOMPLETER.get():
       useNewAutocompleter: true,
       useNewAutocompleter: true,

+ 0 - 6
tools/kubernetes/services/hue-frontend/conf/hue.ini

@@ -31,12 +31,6 @@
   http_host=0.0.0.0
   http_host=0.0.0.0
   http_port=8888
   http_port=8888
 
 
-  # Choose whether to enable the new Hue 4 interface.
-  # is_hue_4=true
-
-  # Choose whether to still allow users to enable the old Hue 3 interface.
-  ## disable_hue_3=true
-
   # Choose whether the Hue pages are embedded or not. This will improve the rendering of Hue when added inside a
   # Choose whether the Hue pages are embedded or not. This will improve the rendering of Hue when added inside a
   # container element.
   # container element.
   ## is_embedded=false
   ## is_embedded=false

File diff suppressed because it is too large
+ 0 - 0
webpack-stats.json


Some files were not shown because too many files changed in this diff