From d466dd0c349657c069176f131043e2895c149a7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20A=CC=8Ahle=CC=81n?= Date: Wed, 1 Nov 2023 10:01:48 +0100 Subject: [PATCH] [frontend] Replace deprecated xlink:href with href in svg use elements --- .../filebrowser/templates/fb_components.mako | 8 +- .../static/jobbrowser/js/impala_dagre.js | 10 +- .../templates/editor2/bundle_editor.mako | 2 +- .../templates/editor2/coordinator_editor.mako | 2 +- .../templates/editor2/workflow_editor.mako | 2 +- .../src/oozie/templates/navigation-bar.mako | 2 +- .../src/desktop/js/components/HueIcon.vue | 2 +- .../__snapshots__/HueIcon.test.ts.snap | 2 +- .../components/icons/vue/ChevronLeftIcon.ts | 2 +- .../js/components/icons/vue/ColumnIcon.ts | 2 +- .../js/components/icons/vue/ConnectorIcon.ts | 2 +- .../js/components/icons/vue/DatabaseIcon.ts | 2 +- .../js/components/icons/vue/DropDownIcon.ts | 2 +- .../js/components/icons/vue/DropRightIcon.ts | 2 +- .../components/icons/vue/SpinnerLargeIcon.ts | 2 +- .../components/icons/vue/SpinnerSmallIcon.ts | 2 +- .../js/components/icons/vue/TableIcon.ts | 2 +- .../js/components/icons/vue/ViewIcon.ts | 2 +- .../js/components/sidebar/HueSidebar.vue | 60 +++++------ .../desktop/js/components/sidebar/Sidebar.vue | 2 +- .../js/jquery/plugins/jquery.filechooser.js | 2 +- .../components/appSwitcher/ko.appSwitcher.js | 6 +- .../assist/ko.assistDocumentsPanel.js | 2 +- .../js/ko/components/assist/ko.assistPanel.js | 2 +- .../src/desktop/templates/common_header.mako | 28 ++--- .../desktop/templates/document_browser.mako | 6 +- .../core/src/desktop/templates/hue_icons.mako | 100 +++++++++--------- desktop/core/src/desktop/templates/login.mako | 2 +- .../dashboard/templates/common_search.mako | 2 +- .../src/notebook/templates/editor2.mako | 2 +- .../notebook/templates/editor_components.mako | 2 +- 31 files changed, 133 insertions(+), 133 deletions(-) diff --git a/apps/filebrowser/src/filebrowser/templates/fb_components.mako b/apps/filebrowser/src/filebrowser/templates/fb_components.mako index e353e7546cb..5f1adf0987d 100644 --- a/apps/filebrowser/src/filebrowser/templates/fb_components.mako +++ b/apps/filebrowser/src/filebrowser/templates/fb_components.mako @@ -43,25 +43,25 @@ else: %elif path.lower().find('gs://') == 0:
  • - +
  • %elif path.lower().find('adl:/') == 0:
  • - +
  • %elif path.lower().find('abfs://') == 0:
  • - +
  • %elif path.lower().find('ofs://') == 0:
  • - +
  • %else: diff --git a/apps/jobbrowser/src/jobbrowser/static/jobbrowser/js/impala_dagre.js b/apps/jobbrowser/src/jobbrowser/static/jobbrowser/js/impala_dagre.js index e6346f609c6..2171f1671b8 100644 --- a/apps/jobbrowser/src/jobbrowser/static/jobbrowser/js/impala_dagre.js +++ b/apps/jobbrowser/src/jobbrowser/static/jobbrowser/js/impala_dagre.js @@ -245,7 +245,7 @@ function impalaDagre(id) { function getIcon(icon) { var html = ''; if (icon && icon.svg) { - html += '' + html += '' } else if (icon && icon.font) { html += "
    "; } @@ -507,7 +507,7 @@ function impalaDagre(id) { if (topNodes && topNodes.length) { var cpuTimelineSection = detailsContent.append('div').classed('details-section', true); var cpuTimelineTitle = cpuTimelineSection.append('header'); - cpuTimelineTitle.append('svg').classed('hi', true).append('use').attr('xlink:href', '#hi-filter'); + cpuTimelineTitle.append('svg').classed('hi', true).append('use').attr('href', '#hi-filter'); var metricsMax = getMetricsMax() ? ' (' + ko.bindingHandlers.numberFormat.human(getMetricsMax(), 5) + ')' : ''; cpuTimelineTitle.append('h5').text(window.I18n('Top Nodes') + metricsMax); var cpuTimelineSectionTable = cpuTimelineSection.append('table').classed('clickable ncolumn', true); @@ -547,7 +547,7 @@ function impalaDagre(id) { var executionSum = sum(data, 'duration'); var cpuTimelineSection = detailsContent.append('div').classed('details-section', true); var cpuTimelineTitle = cpuTimelineSection.append('header'); - cpuTimelineTitle.append('svg').classed('hi', true).append('use').attr('xlink:href', icon); + cpuTimelineTitle.append('svg').classed('hi', true).append('use').attr('href', icon); cpuTimelineTitle.append('h5').text(title + ' (' + ko.bindingHandlers.numberFormat.human(executionSum, 5) + ')'); cpuTimelineSection.node().appendChild($.parseXML(timeline).children[0]); @@ -581,7 +581,7 @@ function impalaDagre(id) { var timelineSum = sum(timelineData, 'duration'); var timelineSection = detailsContent.append('div').classed('details-section', true); var timelineTitle = timelineSection.append('header'); - timelineTitle.append('svg').classed('hi', true).append('use').attr('xlink:href', '#hi-access-time'); + timelineTitle.append('svg').classed('hi', true).append('use').attr('href', '#hi-access-time'); timelineTitle.append('h5').text(window.I18n('Timeline') + ' (' + ko.bindingHandlers.numberFormat.human(timelineSum, 5) + ')'); timelineSection.node().appendChild($.parseXML(timeline).children[0]); @@ -599,7 +599,7 @@ function impalaDagre(id) { var metricsChildSections = metricsSection.selectAll('div').data(Object.keys(data.children)); var metricsTitle = metricsSection.append('header'); - metricsTitle.append('svg').classed('hi', true).append('use').attr('xlink:href', '#hi-bar-chart'); + metricsTitle.append('svg').classed('hi', true).append('use').attr('href', '#hi-bar-chart'); metricsTitle.append('h5').text(window.I18n('Metrics')); var metricsContent = metricsSection.append('table').classed('column metrics', true); diff --git a/apps/oozie/src/oozie/templates/editor2/bundle_editor.mako b/apps/oozie/src/oozie/templates/editor2/bundle_editor.mako index 663ff7316ad..3c7305a04fa 100644 --- a/apps/oozie/src/oozie/templates/editor2/bundle_editor.mako +++ b/apps/oozie/src/oozie/templates/editor2/bundle_editor.mako @@ -65,7 +65,7 @@ ${ commonheader(_("Bundle Editor"), "Oozie", user, request) | n,unicode } %if is_embeddable:
  • - ${ _('Bundles') } + ${ _('Bundles') }
  • %endif diff --git a/apps/oozie/src/oozie/templates/editor2/coordinator_editor.mako b/apps/oozie/src/oozie/templates/editor2/coordinator_editor.mako index 8c18e6fae71..26d34dbc3f8 100644 --- a/apps/oozie/src/oozie/templates/editor2/coordinator_editor.mako +++ b/apps/oozie/src/oozie/templates/editor2/coordinator_editor.mako @@ -67,7 +67,7 @@ ${ commonheader(_("Coordinator Editor"), "Oozie", user, request) | n,unicode } %if is_embeddable:
  • - ${ _('Schedules') } + ${ _('Schedules') }
  • %endif diff --git a/apps/oozie/src/oozie/templates/editor2/workflow_editor.mako b/apps/oozie/src/oozie/templates/editor2/workflow_editor.mako index 730cb2040cf..d2276b4adfd 100644 --- a/apps/oozie/src/oozie/templates/editor2/workflow_editor.mako +++ b/apps/oozie/src/oozie/templates/editor2/workflow_editor.mako @@ -70,7 +70,7 @@ ${ commonheader(_("Workflow Editor"), "Oozie", user, request, "40px") | n,unicod %if is_embeddable:
  • - ${ _('Workflows') } + ${ _('Workflows') }
  • %endif diff --git a/apps/oozie/src/oozie/templates/navigation-bar.mako b/apps/oozie/src/oozie/templates/navigation-bar.mako index 81e770bd699..4d1bfb919c4 100644 --- a/apps/oozie/src/oozie/templates/navigation-bar.mako +++ b/apps/oozie/src/oozie/templates/navigation-bar.mako @@ -79,7 +79,7 @@ % else: - ${ _('Oozie Editor') } + ${ _('Oozie Editor') } % endif diff --git a/desktop/core/src/desktop/js/components/HueIcon.vue b/desktop/core/src/desktop/js/components/HueIcon.vue index e965867305c..ba8d91da741 100644 --- a/desktop/core/src/desktop/js/components/HueIcon.vue +++ b/desktop/core/src/desktop/js/components/HueIcon.vue @@ -18,7 +18,7 @@ diff --git a/desktop/core/src/desktop/js/components/__snapshots__/HueIcon.test.ts.snap b/desktop/core/src/desktop/js/components/__snapshots__/HueIcon.test.ts.snap index 783e3088b91..5d5cc3085c9 100644 --- a/desktop/core/src/desktop/js/components/__snapshots__/HueIcon.test.ts.snap +++ b/desktop/core/src/desktop/js/components/__snapshots__/HueIcon.test.ts.snap @@ -5,7 +5,7 @@ exports[`HueIcon.vue should render 1`] = ` class="hue-icon" > `; diff --git a/desktop/core/src/desktop/js/components/icons/vue/ChevronLeftIcon.ts b/desktop/core/src/desktop/js/components/icons/vue/ChevronLeftIcon.ts index 2bb73746544..e92cd977de2 100644 --- a/desktop/core/src/desktop/js/components/icons/vue/ChevronLeftIcon.ts +++ b/desktop/core/src/desktop/js/components/icons/vue/ChevronLeftIcon.ts @@ -2,5 +2,5 @@ import { defineComponent } from 'vue'; export default defineComponent({ name: 'ChevronLeftIcon', - template: '' + template: '' }); diff --git a/desktop/core/src/desktop/js/components/icons/vue/ColumnIcon.ts b/desktop/core/src/desktop/js/components/icons/vue/ColumnIcon.ts index aa3b58e8172..530b2d06dc5 100644 --- a/desktop/core/src/desktop/js/components/icons/vue/ColumnIcon.ts +++ b/desktop/core/src/desktop/js/components/icons/vue/ColumnIcon.ts @@ -2,5 +2,5 @@ import { defineComponent } from 'vue'; export default defineComponent({ name: 'ColumnIcon', - template: '' + template: '' }); diff --git a/desktop/core/src/desktop/js/components/icons/vue/ConnectorIcon.ts b/desktop/core/src/desktop/js/components/icons/vue/ConnectorIcon.ts index db6b89574e7..12dbf7f3187 100644 --- a/desktop/core/src/desktop/js/components/icons/vue/ConnectorIcon.ts +++ b/desktop/core/src/desktop/js/components/icons/vue/ConnectorIcon.ts @@ -2,5 +2,5 @@ import { defineComponent } from 'vue'; export default defineComponent({ name: 'ConnectorIcon', - template: '' + template: '' }); diff --git a/desktop/core/src/desktop/js/components/icons/vue/DatabaseIcon.ts b/desktop/core/src/desktop/js/components/icons/vue/DatabaseIcon.ts index bb366562ab0..865a43afe03 100644 --- a/desktop/core/src/desktop/js/components/icons/vue/DatabaseIcon.ts +++ b/desktop/core/src/desktop/js/components/icons/vue/DatabaseIcon.ts @@ -2,5 +2,5 @@ import { defineComponent } from 'vue'; export default defineComponent({ name: 'DatabaseIcon', - template: '' + template: '' }); diff --git a/desktop/core/src/desktop/js/components/icons/vue/DropDownIcon.ts b/desktop/core/src/desktop/js/components/icons/vue/DropDownIcon.ts index efa562b75af..ed8799a9359 100644 --- a/desktop/core/src/desktop/js/components/icons/vue/DropDownIcon.ts +++ b/desktop/core/src/desktop/js/components/icons/vue/DropDownIcon.ts @@ -2,5 +2,5 @@ import { defineComponent } from 'vue'; export default defineComponent({ name: 'DropDownIcon', - template: '' + template: '' }); diff --git a/desktop/core/src/desktop/js/components/icons/vue/DropRightIcon.ts b/desktop/core/src/desktop/js/components/icons/vue/DropRightIcon.ts index b83620805e5..09f8f97ed30 100644 --- a/desktop/core/src/desktop/js/components/icons/vue/DropRightIcon.ts +++ b/desktop/core/src/desktop/js/components/icons/vue/DropRightIcon.ts @@ -2,5 +2,5 @@ import { defineComponent } from 'vue'; export default defineComponent({ name: 'DropRightIcon', - template: '' + template: '' }); diff --git a/desktop/core/src/desktop/js/components/icons/vue/SpinnerLargeIcon.ts b/desktop/core/src/desktop/js/components/icons/vue/SpinnerLargeIcon.ts index c1de70495c5..3dbf6c7d575 100644 --- a/desktop/core/src/desktop/js/components/icons/vue/SpinnerLargeIcon.ts +++ b/desktop/core/src/desktop/js/components/icons/vue/SpinnerLargeIcon.ts @@ -2,5 +2,5 @@ import { defineComponent } from 'vue'; export default defineComponent({ name: 'SpinnerLargeIcon', - template: '' + template: '' }); diff --git a/desktop/core/src/desktop/js/components/icons/vue/SpinnerSmallIcon.ts b/desktop/core/src/desktop/js/components/icons/vue/SpinnerSmallIcon.ts index 427b878e717..d2743dd8b9c 100644 --- a/desktop/core/src/desktop/js/components/icons/vue/SpinnerSmallIcon.ts +++ b/desktop/core/src/desktop/js/components/icons/vue/SpinnerSmallIcon.ts @@ -2,5 +2,5 @@ import { defineComponent } from 'vue'; export default defineComponent({ name: 'SpinnerSmallIcon', - template: '' + template: '' }); diff --git a/desktop/core/src/desktop/js/components/icons/vue/TableIcon.ts b/desktop/core/src/desktop/js/components/icons/vue/TableIcon.ts index 15ed846e16d..55e550f60eb 100644 --- a/desktop/core/src/desktop/js/components/icons/vue/TableIcon.ts +++ b/desktop/core/src/desktop/js/components/icons/vue/TableIcon.ts @@ -2,5 +2,5 @@ import { defineComponent } from 'vue'; export default defineComponent({ name: 'TableIcon', - template: '' + template: '' }); diff --git a/desktop/core/src/desktop/js/components/icons/vue/ViewIcon.ts b/desktop/core/src/desktop/js/components/icons/vue/ViewIcon.ts index 2b0b22b00ff..d1d6d164b53 100644 --- a/desktop/core/src/desktop/js/components/icons/vue/ViewIcon.ts +++ b/desktop/core/src/desktop/js/components/icons/vue/ViewIcon.ts @@ -2,5 +2,5 @@ import { defineComponent } from 'vue'; export default defineComponent({ name: 'ViewIcon', - template: '' + template: '' }); diff --git a/desktop/core/src/desktop/js/components/sidebar/HueSidebar.vue b/desktop/core/src/desktop/js/components/sidebar/HueSidebar.vue index 5973ba3e717..fb43a95df2c 100644 --- a/desktop/core/src/desktop/js/components/sidebar/HueSidebar.vue +++ b/desktop/core/src/desktop/js/components/sidebar/HueSidebar.vue @@ -76,54 +76,54 @@ } const APP_ICON_INDEX: { [name: string]: string } = { - abfs: ``, - adls: ``, - dashboard: ``, - 'data-browser': ``, + abfs: ``, + adls: ``, + dashboard: ``, + 'data-browser': ``, default: ``, 'dist-cp': ``, - documents: ``, - editor: ``, + documents: ``, + editor: ``, hbase: ``, hdfs: ``, - hive: ``, - impala: ``, + hive: ``, + impala: ``, importer: ``, indexes: ``, - jar: ``, + jar: ``, java: ``, - 'job-designer': ``, + 'job-designer': ``, kafka: ``, mapreduce: ``, - markdown: ``, - notebook: ``, - oozie: ``, - 'oozie-bundle': ``, - 'oozie-coordinator': ``, - 'oozie-workflow': ``, - ofs: ``, - gs: ``, - pig: ``, - py: ``, - pyspark: ``, + markdown: ``, + notebook: ``, + oozie: ``, + 'oozie-bundle': ``, + 'oozie-coordinator': ``, + 'oozie-workflow': ``, + ofs: ``, + gs: ``, + pig: ``, + py: ``, + pyspark: ``, queries: ``, - r: ``, + r: ``, report: ``, s3: ``, - scala: ``, - scheduler: ``, + scala: ``, + scheduler: ``, security: ``, shell: ``, solr: ``, - spark2: ``, - spark: ``, - sqoop1: ``, - sqoop: ``, - support: ``, + spark2: ``, + spark: ``, + sqoop1: ``, + sqoop: ``, + support: ``, tables: ``, text: ``, warehouses: ``, - workflows: ``, + workflows: ``, yarn: `` }; diff --git a/desktop/core/src/desktop/js/components/sidebar/Sidebar.vue b/desktop/core/src/desktop/js/components/sidebar/Sidebar.vue index 10c36acb299..239a811c5f0 100644 --- a/desktop/core/src/desktop/js/components/sidebar/Sidebar.vue +++ b/desktop/core/src/desktop/js/components/sidebar/Sidebar.vue @@ -39,7 +39,7 @@ diff --git a/desktop/core/src/desktop/js/jquery/plugins/jquery.filechooser.js b/desktop/core/src/desktop/js/jquery/plugins/jquery.filechooser.js index 4d30025befe..b66f4f05083 100644 --- a/desktop/core/src/desktop/js/jquery/plugins/jquery.filechooser.js +++ b/desktop/core/src/desktop/js/jquery/plugins/jquery.filechooser.js @@ -350,7 +350,7 @@ Plugin.prototype.navigateTo = function (path) { //var filesysteminfo = self.options.filesysteminfo; const fs = _parent.options.filesysteminfo[_parent.options.fsSelected || 'hdfs']; const el = fs.icon.svg - ? '' + ? '' : ' ' + fs.label.home; const _homelink = $('') .addClass('nounderline') diff --git a/desktop/core/src/desktop/js/ko/components/appSwitcher/ko.appSwitcher.js b/desktop/core/src/desktop/js/ko/components/appSwitcher/ko.appSwitcher.js index d19f5d322ac..ddc12a42c2a 100644 --- a/desktop/core/src/desktop/js/ko/components/appSwitcher/ko.appSwitcher.js +++ b/desktop/core/src/desktop/js/ko/components/appSwitcher/ko.appSwitcher.js @@ -23,13 +23,13 @@ import { getAltusBaseUrl, getMowBaseUrl } from 'ko/components/appSwitcher/enviro const TEMPLATE = `
    - - + +
    - + ×
    diff --git a/desktop/core/src/desktop/js/ko/components/assist/ko.assistDocumentsPanel.js b/desktop/core/src/desktop/js/ko/components/assist/ko.assistDocumentsPanel.js index 239d9445190..b8470d61925 100644 --- a/desktop/core/src/desktop/js/ko/components/assist/ko.assistDocumentsPanel.js +++ b/desktop/core/src/desktop/js/ko/components/assist/ko.assistDocumentsPanel.js @@ -157,7 +157,7 @@ const TEMPLATE = `
  • - ${I18n( + ${I18n( 'New folder' )}
  • diff --git a/desktop/core/src/desktop/js/ko/components/assist/ko.assistPanel.js b/desktop/core/src/desktop/js/ko/components/assist/ko.assistPanel.js index 17ba02b7fbc..e46944e7755 100644 --- a/desktop/core/src/desktop/js/ko/components/assist/ko.assistPanel.js +++ b/desktop/core/src/desktop/js/ko/components/assist/ko.assistPanel.js @@ -46,7 +46,7 @@ const TEMPLATE = `
    - +
    diff --git a/desktop/core/src/desktop/templates/common_header.mako b/desktop/core/src/desktop/templates/common_header.mako index cd0216fd3e1..5ff8f78588f 100644 --- a/desktop/core/src/desktop/templates/common_header.mako +++ b/desktop/core/src/desktop/templates/common_header.mako @@ -248,7 +248,7 @@ ${ hueIcons.symbols() } % endif % if is_adls_enabled:
  • - ${_('ADLS Browser')} + ${_('ADLS Browser')}
  • % endif @@ -269,7 +269,7 @@ ${ hueIcons.symbols() }
  • % if is_adls_enabled: - + % endif
  • @@ -325,7 +325,7 @@ ${ hueIcons.symbols() }
    - + % if user.is_authenticated and section != 'login': @@ -340,16 +340,16 @@ ${ hueIcons.symbols() } % elif query_apps[1] == 1: % if 'beeswax' in apps: % if USE_NEW_EDITOR.get(): -
  • ${_('Hive')}
  • +
  • ${_('Hive')}
  • % else: -
  • ${_('Hive')}
  • +
  • ${_('Hive')}
  • % endif % elif 'impala' in apps: % if USE_NEW_EDITOR.get(): ## impala requires beeswax anyway -
  • ${_('Impala')}
  • +
  • ${_('Impala')}
  • % else: -
  • ${_('Impala')}
  • +
  • ${_('Impala')}
  • % endif % else:
  • ${apps[query_apps[0]].nice_name}
  • diff --git a/desktop/core/src/desktop/templates/document_browser.mako b/desktop/core/src/desktop/templates/document_browser.mako index d325e7f1658..c09c0aeca1a 100644 --- a/desktop/core/src/desktop/templates/document_browser.mako +++ b/desktop/core/src/desktop/templates/document_browser.mako @@ -85,7 +85,7 @@ else:
    - + @@ -226,7 +226,7 @@ else: