Browse Source

HUE-2661 [oozie] Open relative HDFS path from the workspace

Romain Rigaux 10 years ago
parent
commit
023b63335c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      apps/oozie/src/oozie/templates/editor2/common_workflow.mako

+ 2 - 2
apps/oozie/src/oozie/templates/editor2/common_workflow.mako

@@ -516,13 +516,13 @@
 <script type="text/html" id="common-fs-link">
 <script type="text/html" id="common-fs-link">
 <!-- ko if: $data.path.length > 0 -->
 <!-- ko if: $data.path.length > 0 -->
   <!-- ko if: with_label -->
   <!-- ko if: with_label -->
-    <a data-bind="attr: {href: '/filebrowser/view' + ($data.path.indexOf('/') == -1 ? $root.workflow.properties.deployment_dir() + '/' : '') + $data.path , title: '${ _('Open') } '+ $data.path }" target="_blank">
+    <a data-bind="attr: {href: '/filebrowser/view' + ($data.path[0] != '/' ? $root.workflow.properties.deployment_dir() + '/' : '') + $data.path , title: '${ _('Open') } '+ $data.path }" target="_blank">
       <span data-bind="text: $data.path.lastIndexOf('/') == $data.path.length - 1 ? $data.path : $data.path.split('/').pop()"></span>
       <span data-bind="text: $data.path.lastIndexOf('/') == $data.path.length - 1 ? $data.path : $data.path.split('/').pop()"></span>
     </a>
     </a>
   <!-- /ko -->
   <!-- /ko -->
 
 
    <!-- ko if: ! with_label -->
    <!-- ko if: ! with_label -->
-     <a data-bind="attr: {href: '/filebrowser/view' + ($data.path.indexOf('/') == -1 ? $root.workflow.properties.deployment_dir() + '/' : '') + $data.path }" target="_blank" title="${ _('Open') }">
+     <a data-bind="attr: {href: '/filebrowser/view' + ($data.path[0] != '/' ? $root.workflow.properties.deployment_dir() + '/' : '') + $data.path }" target="_blank" title="${ _('Open') }">
        <i class="fa fa-external-link-square"></i>
        <i class="fa fa-external-link-square"></i>
      </a>
      </a>
    <!-- /ko -->
    <!-- /ko -->