Răsfoiți Sursa

HUE-8115 [assist] Indicate which columns are partition keys in the context popover

Johan Ahlen 7 ani în urmă
părinte
comite
2a90bde

+ 3 - 0
desktop/core/src/desktop/templates/ko_components/ko_catalog_entries_table.mako

@@ -90,6 +90,9 @@ from desktop.views import _ko
               <!-- ko if: catalogEntry.isPrimaryKey() -->
               &nbsp;<i title="${ _("Primary Key") }"class="fa fa-key"></i>
               <!-- /ko -->
+              <!-- ko if: catalogEntry.isPartitionKey() -->
+              &nbsp;<i title="${ _("Partition Key") }"class="fa fa-key"></i>
+              <!-- /ko -->
               <!-- ko if: popularity -->
               &nbsp;<i data-bind="attr: { 'title': '${ _ko("Popularity") }: ' + popularity() + '%' }" class="fa fa-star-o"></i>
               <!-- /ko -->

+ 3 - 1
desktop/core/src/desktop/templates/ko_components/ko_context_popover.mako

@@ -304,7 +304,9 @@ from metadata.conf import has_navigator
           <span data-bind="text: name"></span>
           <!-- ko with: catalogEntry -->
           <!-- ko if: isField() -->
-          (<span data-bind="text: getType()"></span>) <i class="fa fa-key" data-bind="visible: definition.primary_key === 'true'"></i>
+          (<span data-bind="text: getType()"></span>)
+          <i class="fa fa-key" title="${ _('Primary Key') }" data-bind="visible: isPrimaryKey()"></i>
+          <i class="fa fa-key" title="${ _('Partition Key') }" data-bind="visible: isPartitionKey()"></i>
           <!-- /ko -->
           <!-- /ko -->
         </div>