[frontend] Fix issue with item non-unique item naming in the sidebar
currentAppChanged(appName: string): void {
let adaptedName;
+ const params = new URLSearchParams(location.search);
switch (appName) {
+ case 'dashboard':
+ adaptedName = params.get('engine') ? `${appName}-${params.get('engine')}` : appName;
+ break;
case 'editor':
- const params = new URLSearchParams(location.search);
- adaptedName = params.get('type') || appName;
+ adaptedName = params.get('type') ? `${appName}-${params.get('type')}` : appName;
break;
case 'filebrowser':
if (location.href.indexOf('=S3A') !== -1) {
adaptedName = 'tables';
break;
case 'oozie_bundle':
- adaptedName = 'oozie-bundle';
+ adaptedName = 'scheduler-oozie-bundle';
break;
case 'oozie_coordinator':
- adaptedName = 'oozie-coordinator';
+ adaptedName = 'scheduler-oozie-coordinator';
break;
case 'oozie_workflow':
- adaptedName = 'oozie-workflow';
+ adaptedName = 'scheduler-oozie-workflow';
break;
case 'security_hive':
adaptedName = 'security';
case 'useradmin_users':
adaptedName = 'user';
break;
- case 'dashboard':
case 'hbase':
case 'importer':
case 'indexes':
if (config.interpreters.length === 1) {
appsItems.push({
type: 'navigation',
- name: config.name,
+ name: `${appName}-${config.name}`,
displayName: config.displayName,
iconHtml: getIconHtml(config.name),
url: config.page,
}
const interpreterItem: SidebarAccordionSubItem = {
type: 'navigation',
- name: interpreter.type,
+ name: `${appName}-${interpreter.type}`,
displayName: interpreter.displayName,
url: interpreter.page,
handler: (event: Event) => onHueLinkClick(event, interpreter.page)
: 'https://docs.gethue.com/administrator/configuration/connectors/';
subApps.push({
type: 'navigation',
- name: 'addMoreInterpreters',
+ name: 'editor-AddMoreInterpreters',
displayName: I18n('Edit list...'),
url,
handler: (event: Event) => onHueLinkClick(event, url)
