Browse Source

HUE-6316 [metastore] The sample table is not striped and the first column not aligned

Enrico Berti 8 years ago
parent
commit
2252567176

+ 11 - 2
apps/metastore/src/metastore/templates/metastore.mako

@@ -1230,6 +1230,11 @@ ${ components.menubar() }
           // viewModel.database().table().getRelationships();
           // viewModel.database().table().getRelationships();
         } else if (tab == 'table-sample') {
         } else if (tab == 'table-sample') {
           var selector = '#sample .sample-table';
           var selector = '#sample .sample-table';
+          % if conf.CUSTOM.BANNER_TOP_HTML.get():
+            var bannerTopHeight = 30;
+          % else:
+            var bannerTopHeight = 0;
+          % endif
           if ($(selector).parents('.dataTables_wrapper').length == 0){
           if ($(selector).parents('.dataTables_wrapper').length == 0){
             hueUtils.waitForRendered(selector, function(el){ return el.find('td').length > 0 }, function(){
             hueUtils.waitForRendered(selector, function(el){ return el.find('td').length > 0 }, function(){
               $(selector).dataTable({
               $(selector).dataTable({
@@ -1245,14 +1250,18 @@ ${ components.menubar() }
                 },
                 },
                 "fnDrawCallback": function (oSettings) {
                 "fnDrawCallback": function (oSettings) {
                   $(selector).parents('.dataTables_wrapper').css('overflow-x', 'hidden');
                   $(selector).parents('.dataTables_wrapper').css('overflow-x', 'hidden');
-                  $(selector).jHueTableExtender({
+                  $(selector).jHueTableExtender2({
                     fixedHeader: true,
                     fixedHeader: true,
                     fixedFirstColumn: true,
                     fixedFirstColumn: true,
                     includeNavigator: false,
                     includeNavigator: false,
                     parentId: 'sample',
                     parentId: 'sample',
                     classToRemove: 'sample-table',
                     classToRemove: 'sample-table',
                     mainScrollable: '${ MAIN_SCROLLABLE }',
                     mainScrollable: '${ MAIN_SCROLLABLE }',
-                    stickToTopPosition: 73,
+                    % if is_embeddable:
+                    stickToTopPosition: 51 + bannerTopHeight,
+                    % else:
+                    stickToTopPosition: 76 + bannerTopHeight,
+                    % endif
                     clonedContainerPosition: 'fixed',
                     clonedContainerPosition: 'fixed',
                     app: 'metastore'
                     app: 'metastore'
                   });
                   });

File diff suppressed because it is too large
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


File diff suppressed because it is too large
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


+ 9 - 1
desktop/core/src/desktop/static/desktop/less/components/hue-tables.less

@@ -162,7 +162,7 @@ table.display td.center {
   background: url('../art/datatables/sort_desc.png') no-repeat center right;
   background: url('../art/datatables/sort_desc.png') no-repeat center right;
 }
 }
 
 
-.table-huedatatable {
+.table-huedatatable, .dataTables_wrapper table {
   margin-bottom: 0!important;
   margin-bottom: 0!important;
   thead {
   thead {
     th {
     th {
@@ -170,6 +170,14 @@ table.display td.center {
       background-color: @cui-white;
       background-color: @cui-white;
     }
     }
   }
   }
+  border: none;
+  tbody tr:nth-child(odd) {
+    background-color: @cui-gray-050;
+  }
+}
+
+.dataTables_wrapper table th {
+  border-top: 1px solid transparent!important;
 }
 }
 
 
 .table-huedatatable td.stripe {
 .table-huedatatable td.stripe {

+ 0 - 7
desktop/core/src/desktop/static/desktop/less/hue-cross-version.less

@@ -91,13 +91,6 @@ input[type='password']::-ms-reveal {
   font-size: 12px;
   font-size: 12px;
 }
 }
 
 
-.table-huedatatable {
-  border: none;
-  tbody tr:nth-child(odd) {
-    background-color: @cui-gray-050;
-  }
-}
-
 .clear {
 .clear {
   clear: both;
   clear: both;
 }
 }

+ 1 - 1
desktop/core/src/desktop/templates/common_header.mako

@@ -75,7 +75,7 @@ if USE_NEW_EDITOR.get():
         padding-top: ${str(int(padding[:-2]) + 30) + 'px'};
         padding-top: ${str(int(padding[:-2]) + 30) + 'px'};
       }
       }
       .banner {
       .banner {
-        height: 40px;
+        height: 30px;
         width: 100%;
         width: 100%;
         padding: 0;
         padding: 0;
         position: fixed;
         position: fixed;

Some files were not shown because too many files changed in this diff