Procházet zdrojové kódy

AMBARI-4704. Mirroring: Convert tables so that they use the same style as Hosts table. (akovalenko)

Aleksandr Kovalenko před 11 roky
rodič
revize
33bf1d44c1

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 51 - 34
ambari-web/app/styles/application.less


+ 2 - 2
ambari-web/app/templates/main/mirroring/datasets.hbs

@@ -46,13 +46,13 @@
       <table class="table table-bordered">
         <thead>
         <tr>
-          {{#view view.sortView contentBinding="view.filteredContent"}}
+          {{#view view.sortView contentBinding="view.filteredContent" class="label-row"}}
           <th class="first"></th>
           {{view view.parentView.nameSort}}
           {{view view.parentView.statusSort}}
           {{/view}}
         </tr>
-        <tr>
+        <tr class="filter-row">
           <th class="first"></th>
           <th>{{view view.nameFilterView}}</th>
           <th>{{view view.statusFilterView}}</th>

+ 2 - 2
ambari-web/app/templates/main/mirroring/jobs.hbs

@@ -89,14 +89,14 @@
   <table class="table table-bordered table-striped">
     <thead>
     <tr>
-      {{#view view.sortView contentBinding="view.filteredContent"}}
+      {{#view view.sortView contentBinding="view.filteredContent" class="label-row"}}
       <th class="first"></th>
       {{view view.parentView.idSort}}
       {{view view.parentView.startSort}}
       {{view view.parentView.endSort}}
       {{/view}}
     </tr>
-    <tr>
+    <tr class="filter-row">
       <th class="first"></th>
       <th>{{view view.idFilterView}}</th>
       <th>{{view view.startFilterView}}</th>

+ 1 - 1
ambari-web/app/views/common/filter_view.js

@@ -74,7 +74,7 @@ var wrapperView = Ember.View.extend({
       return;
     }
     // get the sort view element in the same column to current filter view to highlight them together
-    var relatedSort = $('.sort-view-' + this.get('column'));
+    var relatedSort = $(this.get('element')).parents('thead').find('.sort-view-' + this.get('column'));
     if(this.isEmpty()){
       this.get('parentNode').removeClass('active-filter');
       this.get('parentNode').addClass('notActive');

+ 2 - 0
ambari-web/app/views/main/mirroring/datasets_view.js

@@ -41,11 +41,13 @@ App.MainDatasetsView = App.TableView.extend({
 
   sortView: sort.wrapperView,
   nameSort: sort.fieldView.extend({
+    column: '1',
     name: 'name',
     displayName: Em.I18n.t('common.name')
   }),
 
   statusSort: sort.fieldView.extend({
+    column: '2',
     name: 'status',
     displayName: Em.I18n.t('mirroring.table.datasetStatus')
   }),

+ 3 - 0
ambari-web/app/views/main/mirroring/jobs_view.js

@@ -32,16 +32,19 @@ App.MainDatasetJobsView = App.TableView.extend({
 
   sortView: sort.wrapperView,
   idSort: sort.fieldView.extend({
+    column: 1,
     name: 'name',
     displayName: Em.I18n.t('mirroring.table.jobId'),
     type: 'string'
   }),
   startSort: sort.fieldView.extend({
+    column: 2,
     name: 'startDate',
     displayName: Em.I18n.t('mirroring.table.start'),
     type: 'number'
   }),
   endSort: sort.fieldView.extend({
+    column: 3,
     name: 'endDate',
     displayName: Em.I18n.t('mirroring.table.end'),
     type: 'number'

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů