Browse Source

HUE-8552 [oozie] Add context popup to preview linked document actions

Mini Kafka clean-up
Romain Rigaux 7 years ago
parent
commit
3526a83

+ 2 - 0
apps/jobbrowser/src/jobbrowser/templates/job_browser.mako

@@ -1970,6 +1970,7 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
   <!-- /ko -->
 </script>
 
+
 <script type="text/html" id="link-or-text${ SUFFIX }">
   <!-- ko if: typeof $data.value === 'string' -->
     <!-- ko if: $data.name.indexOf('logs') > -1 || $data.name.indexOf('trackingUrl') > -1 -->
@@ -1988,6 +1989,7 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
   <!-- /ko -->
 </script>
 
+
 <script type="text/javascript">
 
   (function () {

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

@@ -643,7 +643,9 @@
         <i class="fa fa-spinner fa-spin muted"></i>
       <!-- /ko -->
       <!-- ko with: associatedDocument -->
-        <a data-bind="hueLink: absoluteUrl"><span data-bind='text: name'></span></a>
+        <a data-bind="documentContextPopover: { uuid: absoluteUrl.split('=')[1], orientation: 'right', offset: { top: 5 } }" href="javascript: void(0);" title="${ _('Preview document') }">
+          <span data-bind="text: name"></span> <i class="fa fa-info"></i>
+        </a>
         <br/>
         <span data-bind='text: description' class="muted"></span>
       <!-- /ko -->
@@ -655,7 +657,7 @@
           <select placeholder="${ _('Search your documents...') }" data-bind="documentChooser: { loading: associatedDocumentLoading, value: associatedDocumentUuid, document: associatedDocument, type: type }"></select>
         </div>
         <!-- ko if: associatedDocument -->
-          <a class="pointer" data-bind="hueLink: associatedDocument().absoluteUrl" title="${ _('Open') }">
+          <a data-bind="documentContextPopover: { uuid: associatedDocument().absoluteUrl.split('=')[1], orientation: 'right', offset: { top: 5 } }" href="javascript: void(0);" title="${ _('Preview document') }">
             <i class="fa fa-external-link-square"></i>
           </a>
           <div class="clearfix"></div>

+ 5 - 1
desktop/libs/indexer/src/indexer/templates/topics.mako

@@ -54,6 +54,7 @@ ${ assist.assistPanel() }
 <script src="${ static('desktop/js/hue.json.js') }" type="text/javascript" charset="utf-8"></script>
 <script src="${ static('dashboard/js/search.ko.js') }" type="text/javascript" charset="utf-8"></script>
 
+
 <script type="text/html" id="indexes-breadcrumbs">
   <h1>
     <!-- ko with: index() -->
@@ -153,9 +154,12 @@ ${ assist.assistPanel() }
               </%def>
 
               <%def name="creation()">
-                <a href="javascript:void(0)" class="btn" data-bind="hueLink: '/indexer/importer/prefill/kafka'">
+                <a data-bind="click: function() { $root.alias.name(''); $root.alias.chosenCollections.removeAll(); $('#createAlias').modal('show'); }" class="btn">
                   <i class="fa fa-plus-circle"></i> ${ _('Create') }
                 </a>
+                <a href="javascript:void(0)" class="btn" data-bind="hueLink: '/indexer/importer/prefill/kafka'">
+                  <i class="fa fa-cloud-download"></i> ${ _('Consume') }
+                </a>
               </%def>
             </%actionbar:render>
             <!-- /ko -->

+ 1 - 1
desktop/libs/kafka/src/kafka/conf.py

@@ -34,7 +34,7 @@ def has_kafka_api():
 
 KAFKA = ConfigSection(
   key='kafka',
-  help=_t("""Configuration options for Kafka management"""),
+  help=_t("""Configuration options for Kafka API integration"""),
   members=dict(
     IS_ENABLED = Config(
       key="is_enabled",

+ 0 - 5
desktop/libs/kafka/src/kafka/kafka_api.py

@@ -19,11 +19,6 @@
 import json
 import logging
 
-try:
-  from collections import OrderedDict
-except ImportError:
-  from ordereddict import OrderedDict # Python 2.6
-
 from django.http import Http404
 from django.utils.html import escape
 from django.utils.translation import ugettext as _

+ 2 - 0
desktop/libs/kafka/src/kafka/kafka_client.py

@@ -46,6 +46,8 @@ class KafkaApiException(Exception):
 class KafkaApi(object):
   """
   https://github.com/confluentinc/kafka-rest
+  
+  create/delete topics are not available in the REST API.
   """
 
   def __init__(self, user=None, security_enabled=False, ssl_cert_ca_verify=False):