Bläddra i källkod

HUE-8143 [assist] Limit the column description length in the table context popover

Johan Ahlen 7 år sedan
förälder
incheckning
8cc0280d19

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue-embedded.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


+ 20 - 1
desktop/core/src/desktop/static/desktop/less/components/hue-popover.less

@@ -423,8 +423,27 @@
 .catalog-entries-list-container {
   .flex(1 1 100%);
 
+  table td.name-column {
+    max-width: 130px;
+    width: 15%;
+    .nowrap-ellipsis();
+  }
+
+  table td.type-column {
+    max-width: 60px;
+    width: 5%;
+    .nowrap-ellipsis();
+  }
+
+  table td.comment-column {
+    max-width: 90px;
+    width: 20%;
+    .nowrap-ellipsis();
+  }
+
   table td.sample-column {
-    max-width: 500px;
+    width: 20%;
+    max-width: 400px;
     .nowrap-ellipsis();
     height: 24px;
   }

+ 5 - 5
desktop/core/src/desktop/templates/ko_components/ko_catalog_entries_table.mako

@@ -84,7 +84,7 @@ from desktop.views import _ko
         <!-- ko if: filteredEntries().length -->
         <tbody data-bind="foreach: filteredEntries">
         <tr>
-          <td width="10%" data-bind="attr: { 'title': catalogEntry.name + ' - ${ _ko("Click for more details") }' }">
+          <td class="name-column" data-bind="attr: { 'title': catalogEntry.name + ' - ${ _ko("Click for more details") }' }">
             <a href="javascript: void(0);" data-bind="click: onClick">
               <span data-bind="text: catalogEntry.name"></span>
               <!-- ko if: catalogEntry.isPrimaryKey() -->
@@ -98,10 +98,10 @@ from desktop.views import _ko
               <!-- /ko -->
             </a>
           </td>
-          <td width="10%" data-bind="text: catalogEntry.getType(), attr: { 'title': catalogEntry.getRawType() }"></td>
-          <td width="30%" data-bind="text: catalogEntry.getCommentObservable(), attr: { 'title': catalogEntry.getCommentObservable() }"></td>
-          <td width="25%" class="sample-column" data-bind="html: firstSample, attr: { 'title': hueUtils.html2text(firstSample()) }"></td>
-          <td width="25%" class="sample-column" data-bind="html: secondSample, attr: { 'title': hueUtils.html2text(secondSample()) }"></td>
+          <td class="type-column" data-bind="text: catalogEntry.getType(), attr: { 'title': catalogEntry.getRawType() }"></td>
+          <td class="comment-column" data-bind="text: catalogEntry.getCommentObservable(), attr: { 'title': catalogEntry.getCommentObservable() }"></td>
+          <td class="sample-column" data-bind="html: firstSample, attr: { 'title': hueUtils.html2text(firstSample()) }"></td>
+          <td class="sample-column" data-bind="html: secondSample, attr: { 'title': hueUtils.html2text(secondSample()) }"></td>
         </tr>
         </tbody>
         <!-- /ko -->

Vissa filer visades inte eftersom för många filer har ändrats