Browse Source

AMBARI-5522. Jobs table is rendered incorrectly when there are no jobs available (alexantonenko)

Alex Antonenko 11 years ago
parent
commit
86da4e6a8d

+ 4 - 1
ambari-web/app/controllers/main/jobs_controller.js

@@ -359,7 +359,10 @@ App.MainJobsController = Em.Controller.extend({
       { name: Em.I18n.t('jobs.column.start.time'), index: 2 },
       { name: Em.I18n.t('jobs.column.end.time'), index: 3 },
       { name: Em.I18n.t('jobs.column.duration'), index: 4 }
-    ]
+    ],
+    columnsCount: function () {
+      return this.get('content.length') + 1;
+    }.property('content.length')
   }),
 
   lastIDSuccessCallback: function(data, jqXHR, textStatus) {

+ 1 - 1
ambari-web/app/templates/main/jobs.hbs

@@ -52,7 +52,7 @@
           <tbody>
           {{#if view.noDataToShow}}
               <tr>
-                <td class="no-data" {{bindAttr colspan="controller.columnsName.content.length"}}>
+                <td class="no-data" {{bindAttr colspan="controller.columnsName.columnsCount"}}>
                   {{#if controller.loaded}}
                     {{t jobs.nothingToShow}}
                   {{else}}