Browse Source

[ui-leftnav] Remove "Edit List" tab from Editor dropdown in left navbar (#3784)

## What changes were proposed in this pull request?

- Earlier, the `Edit List...` tab was generation no UX value and clicking on it was redirecting to gethue docs connector page for non-connector setup scenarios.
- This change removes the `Edit List...` tab from the editor dropdown in the left navigation. The plan is to make the editor dropdown section clean and to only show the configured editors.

## How was this patch tested?

- Manually
Harsh Gupta 1 year ago
parent
commit
cd0a92e18d

+ 0 - 13
desktop/core/src/desktop/js/components/sidebar/HueSidebar.vue

@@ -453,19 +453,6 @@
                     }
                     }
                   });
                   });
 
 
-                  if (appName === 'editor' && (<hueWindow>window).SHOW_ADD_MORE_EDITORS) {
-                    subApps.push({ type: 'spacer' });
-                    const url = (<hueWindow>window).HAS_CONNECTORS
-                      ? '/desktop/connectors'
-                      : 'https://docs.gethue.com/administrator/configuration/connectors/';
-                    subApps.push({
-                      type: 'navigation',
-                      name: 'editor-AddMoreInterpreters',
-                      displayName: I18n('Edit list...'),
-                      url,
-                      handler: (event: Event) => onHueLinkClick(event, url)
-                    });
-                  }
                   const mainUrl = (<SidebarNavigationItem>subApps[0]).url || config.page || '/';
                   const mainUrl = (<SidebarNavigationItem>subApps[0]).url || config.page || '/';
                   appsItems.push({
                   appsItems.push({
                     type: 'accordion',
                     type: 'accordion',

+ 0 - 1
desktop/core/src/desktop/js/types/types.ts

@@ -58,7 +58,6 @@ export interface hueWindow {
   HUE_LANG?: string;
   HUE_LANG?: string;
   HUE_VERSION?: string;
   HUE_VERSION?: string;
   LOGGED_USERNAME?: string;
   LOGGED_USERNAME?: string;
-  SHOW_ADD_MORE_EDITORS?: boolean;
   SQL_ANALYZER_MODE?: string;
   SQL_ANALYZER_MODE?: string;
   USER_IS_ADMIN?: boolean;
   USER_IS_ADMIN?: boolean;
   USER_IS_HUE_ADMIN?: boolean;
   USER_IS_HUE_ADMIN?: boolean;

+ 0 - 1
desktop/core/src/desktop/static/desktop/locales/en/translation.json

@@ -138,7 +138,6 @@
   "Drop a SQL file here": "Drop a SQL file here",
   "Drop a SQL file here": "Drop a SQL file here",
   "Drop iPython/Zeppelin notebooks here": "Drop iPython/Zeppelin notebooks here",
   "Drop iPython/Zeppelin notebooks here": "Drop iPython/Zeppelin notebooks here",
   "Edit": "Edit",
   "Edit": "Edit",
-  "Edit list...": "Edit list...",
   "Edit Profile": "Edit Profile",
   "Edit Profile": "Edit Profile",
   "Edit tags": "Edit tags",
   "Edit tags": "Edit tags",
   "Edit this privilege": "Edit this privilege",
   "Edit this privilege": "Edit this privilege",

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

@@ -211,9 +211,6 @@
 
 
   window.SHOW_NOTEBOOKS = '${ SHOW_NOTEBOOKS.get() }' === 'True'
   window.SHOW_NOTEBOOKS = '${ SHOW_NOTEBOOKS.get() }' === 'True'
   window.SHOW_UPLOAD_BUTTON = '${ hasattr(SHOW_UPLOAD_BUTTON, 'get') and SHOW_UPLOAD_BUTTON.get() }' === 'True'
   window.SHOW_UPLOAD_BUTTON = '${ hasattr(SHOW_UPLOAD_BUTTON, 'get') and SHOW_UPLOAD_BUTTON.get() }' === 'True'
-  % if is_admin(user):
-  window.SHOW_ADD_MORE_EDITORS = true;
-  % endif
 
 
   window.UPLOAD_CHUNK_SIZE = ${ UPLOAD_CHUNK_SIZE.get() };
   window.UPLOAD_CHUNK_SIZE = ${ UPLOAD_CHUNK_SIZE.get() };
   window.MAX_FILE_SIZE_UPLOAD_LIMIT = ${ MAX_FILE_SIZE_UPLOAD_LIMIT.get() if hasattr(MAX_FILE_SIZE_UPLOAD_LIMIT, 'get') and MAX_FILE_SIZE_UPLOAD_LIMIT.get() >= 0 else 'undefined' };
   window.MAX_FILE_SIZE_UPLOAD_LIMIT = ${ MAX_FILE_SIZE_UPLOAD_LIMIT.get() if hasattr(MAX_FILE_SIZE_UPLOAD_LIMIT, 'get') and MAX_FILE_SIZE_UPLOAD_LIMIT.get() >= 0 else 'undefined' };
@@ -374,7 +371,6 @@
     'Done.': '${ _('Done.') }',
     'Done.': '${ _('Done.') }',
     'Drop a SQL file here': '${_('Drop a SQL file here')}',
     'Drop a SQL file here': '${_('Drop a SQL file here')}',
     'Drop iPython/Zeppelin notebooks here': '${_('Drop iPython/Zeppelin notebooks here')}',
     'Drop iPython/Zeppelin notebooks here': '${_('Drop iPython/Zeppelin notebooks here')}',
-    'Edit list...': '${ _('Edit list...') }',
     'Edit Profile': '${ _('Edit Profile') }',
     'Edit Profile': '${ _('Edit Profile') }',
     'Edit tags': '${ _('Edit tags') }',
     'Edit tags': '${ _('Edit tags') }',
     'Edit this privilege': '${ _('Edit this privilege') }',
     'Edit this privilege': '${ _('Edit this privilege') }',