Explorar el Código

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

Added leading slash on FB link
Enrico Berti hace 11 años
padre
commit
caaf31e
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  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 () {