Skip to content

Commit c759a02

Browse files
tabraiz12athithyaaselvam
authored andcommitted
Datahub left menu are not working redirecting to wrong link (#4027)
Co-authored-by: Mohammed Tabraiz <tabraiz@cloudera.com>
1 parent 38f0293 commit c759a02

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

desktop/core/src/desktop/js/onePageViewModel.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -959,13 +959,16 @@ class OnePageViewModel {
959959

960960
huePubSub.subscribe('open.link', href => {
961961
if (href) {
962+
const prefix = '/hue';
962963
if (href.startsWith('/')) {
963-
if (window.HUE_BASE_URL && !href.startsWith(window.HUE_BASE_URL)) {
964+
if (window.HUE_BASE_URL.length && href.startsWith(window.HUE_BASE_URL)) {
965+
page(href);
966+
} else if (href.startsWith(prefix)) {
964967
page(window.HUE_BASE_URL + href);
965968
} else {
966-
page(href); // Already includes the base_url
969+
page(window.HUE_BASE_URL + prefix + href);
967970
}
968-
} else if (href.indexOf('#') === 0) {
971+
} else if (href.indexOf('#') == 0) {
969972
// Only place that seem to use this is hbase onclick row
970973
window.location.hash = href;
971974
} else {

0 commit comments

Comments
 (0)