Browse Source

HUE-4219 [oozie] Add quick link to selected d&dropped query

Romain Rigaux 9 years ago
parent
commit
1f0d785

+ 4 - 1
apps/oozie/src/oozie/templates/editor2/common_workflow.mako

@@ -951,7 +951,7 @@
       <span data-bind="template: { name: 'logs-icon' }"></span>
       <!-- ko if: $root.getHiveQueryById(properties.uuid()) -->
       <!-- ko with: $root.getHiveQueryById(properties.uuid()) -->
-        <a data-bind="attr: {href: absoluteUrl()}" target="_blank"><span data-bind='text: name'></span></a>
+        <a data-bind="attr: { href: absoluteUrl() }" target="_blank"><span data-bind='text: name'></span></a>
         <br/>
         <span data-bind='text: description' class="muted"></span>
       <!-- /ko -->
@@ -963,6 +963,9 @@
         <!-- ko if: $root.getHiveQueryById(properties.uuid()) -->
         <!-- ko with: $root.getHiveQueryById(properties.uuid()) -->
           <select data-bind="options: $root.hiveQueries, optionsText: 'name', optionsValue: 'uuid', value: $parent.properties.uuid, select2Version4:{ placeholder: '${ _ko('Hive query name...')}'}"></select>
+          <a href="#" data-bind="attr: { href: absoluteUrl() }" target="_blank" title="${ _('Open') }">
+            <i class="fa fa-external-link-square"></i>
+          </a>
           <div data-bind='text: description' style="padding: 3px; margin-top: 2px" class="muted"></div>
         <!-- /ko -->
         <!-- /ko -->

+ 10 - 1
apps/oozie/src/oozie/templates/editor2/workflow_editor.mako

@@ -270,7 +270,16 @@ ${ workflow.render() }
           <select data-bind="options: $root.subworkflows, optionsText: 'name', optionsValue: 'value', value: value"></select>
           <!-- /ko -->
           <!-- ko if: type() == 'hive' -->
-         <select data-bind="options: $root.hiveQueries, optionsText: 'name', optionsValue: 'uuid', value: value, select2Version4:{ placeholder: '${ _ko('Hive query name...')}'}"></select>
+          <select data-bind="options: $root.hiveQueries, optionsText: 'name', optionsValue: 'uuid', value: value, select2Version4:{ placeholder: '${ _ko('Hive query name...')}'}"></select>
+          <!-- ko if: $root.getHiveQueryById(value()) -->
+            <!-- ko with: $root.getHiveQueryById(value()) -->
+              <a href="#" data-bind="attr: { href: $data.absoluteUrl() }" target="_blank" title="${ _('Open') }">
+                <i class="fa fa-external-link-square"></i>
+              </a>
+              </br>
+              <span data-bind='text: $data.description' class="muted"></span>
+            <!-- /ko -->
+          <!-- /ko -->
           <!-- /ko -->
 
           <!-- ko if: type() == 'distcp' -->