Jelajahi Sumber

HUE-2124 [oozie] HDFS Deployment directory is missing "slash" symbol

Added leading slash on FB link
Enrico Berti 11 tahun lalu
induk
melakukan
caaf31efca
1 mengubah file dengan 8 tambahan dan 1 penghapusan
  1. 8 1
      apps/oozie/src/oozie/templates/editor/edit_workflow.mako

+ 8 - 1
apps/oozie/src/oozie/templates/editor/edit_workflow.mako

@@ -44,7 +44,7 @@ ${ layout.menubar(section='workflows') }
         <li><a href="#properties"><i class="fa fa-cog"></i> ${ _('Properties') }</a></li>
         % if user_can_edit_job:
           <li>
-            <a data-bind="attr: {href: '/filebrowser/view' + deployment_dir() }" target="_blank" title="${ _('Go upload additional files and libraries to the deployment directory on HDFS') }" rel="tooltip" data-placement="right"><i class="fa fa-folder-open"></i> ${ _('Workspace') }</a>
+            <a data-bind="attr: {href: '/filebrowser/view' + fixLeadingSlash(deployment_dir()) }" target="_blank" title="${ _('Go upload additional files and libraries to the deployment directory on HDFS') }" rel="tooltip" data-placement="right"><i class="fa fa-folder-open"></i> ${ _('Workspace') }</a>
           </li>
         % endif
 
@@ -982,6 +982,13 @@ window.onresize = function () {
   }
 };
 
+function fixLeadingSlash(path) {
+  if (path[0] != "/") {
+    return "/" + path;
+  }
+  return path;
+}
+
 var AUTOCOMPLETE_PROPERTIES;
 
 $(document).ready(function () {