Browse Source

HUE-7 [importer] Basic table comment input

Romain Rigaux 9 years ago
parent
commit
7106f8bc6c

+ 0 - 1
desktop/libs/indexer/src/indexer/api3.py

@@ -217,7 +217,6 @@ def _create_table_from_a_file(request, source, destination):
   columns = destination['columns']
   partition_columns = destination['partitionColumns']
   kudu_partition_columns = destination['kuduPartitionColumns']
-  print kudu_partition_columns
   comment = destination['description']
 
   source_path = source['path']

+ 2 - 1
desktop/libs/indexer/src/indexer/fields.py

@@ -65,7 +65,8 @@ class Field(object):
       'level': 0,
       'length': 100,
       'keyType': 'string',
-      'isPartition': False
+      'isPartition': False,
+      'comment': ''
     }
 
 FIELD_TYPES = [

+ 1 - 1
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -662,7 +662,7 @@ ${ assist.assistPanel() }
     </label>
 
     <span data-bind="visible: level() == 0 || ($parent.type() != 'array' && $parent.type() != 'map')">
-       ${_('Comment')}
+       <input type="text" class="input-mini" placeholder="${ _('Field comment') }" data-bind="value: comment">
     </span>
 
     <!-- ko if: level() > 0 && $parent.type() == 'struct' && $parent.nested().length > 1 -->