Author: yusaku
Date: Thu Jan 31 00:53:24 2013
New Revision: 1440773
URL: http://svn.apache.org/viewvc?rev=1440773&view=rev
Log:
AMBARI-1308. Properly display Apps page aggregate summary and data table when
there are no data to be shown. (Arun Kandregula via yusaku)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/controllers/main/apps_controller.js
incubator/ambari/trunk/ambari-web/app/mappers/runs_mapper.js
incubator/ambari/trunk/ambari-web/app/styles/apps.less
incubator/ambari/trunk/ambari-web/app/templates/main/apps.hbs
incubator/ambari/trunk/ambari-web/app/views/main/apps_view.js
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1440773&r1=1440772&r2=1440773&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Jan 31 00:53:24 2013
@@ -36,6 +36,9 @@ Trunk (unreleased changes):
IMPROVEMENTS
+ AMBARI-1308. Properly display Apps page aggregate summary and data table when
+ there are no data to be show. (Arun Kandregula via yusaku)
+
AMBARI-1306. Change color of rack_local_map to #66B366. (yusaku)
AMBARI-1311. Host health indicator should have a tooltip showing few details
-
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/main/apps_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/apps_controller.js?rev=1440773&r1=1440772&r2=1440773&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/apps_controller.js
(original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/apps_controller.js
Thu Jan 31 00:53:24 2013
@@ -432,7 +432,7 @@ App.MainAppsController = Em.ArrayControl
'filterObject.viewType'
),
- serverData: null,
+ serverData: "",
summary: null,
/**
@@ -444,28 +444,28 @@ App.MainAppsController = Em.ArrayControl
if(!summary){
tmp = {
'jobs': {
- 'avg': 'undefined',
- 'min': 'undefined',
- 'max': 'undefined'
+ 'avg': '-',
+ 'min': '-',
+ 'max': '-'
},
'input': {
- 'avg': 'undefined',
- 'min': 'undefined',
- 'max': 'undefined'
+ 'avg': '-',
+ 'min': '-',
+ 'max': '-'
},
'output': {
- 'avg': 'undefined',
- 'min': 'undefined',
- 'max': 'undefined'
+ 'avg': '-',
+ 'min': '-',
+ 'max': '-'
},
'duration': {
- 'avg': 'undefined',
- 'min': 'undefined',
- 'max': 'undefined'
+ 'avg': '-',
+ 'min': '-',
+ 'max': '-'
},
'times': {
- 'oldest': 'undefined',
- 'youngest': 'undefined'
+ 'oldest': '-',
+ 'youngest': '-'
}
};
}else{
Modified: incubator/ambari/trunk/ambari-web/app/mappers/runs_mapper.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/mappers/runs_mapper.js?rev=1440773&r1=1440772&r2=1440773&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/mappers/runs_mapper.js (original)
+++ incubator/ambari/trunk/ambari-web/app/mappers/runs_mapper.js Thu Jan 31
00:53:24 2013
@@ -66,8 +66,8 @@ App.runsMapper = App.QuickDataMapper.cre
});
App.router.get('mainAppsController').set('content', r);
- App.router.get('mainAppsController').set('paginationObject',
pagination_info);
App.router.get('mainAppsController').set('serverData', json.summary);
+ App.router.get('mainAppsController').set('paginationObject',
pagination_info);
}
Modified: incubator/ambari/trunk/ambari-web/app/styles/apps.less
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/styles/apps.less?rev=1440773&r1=1440772&r2=1440773&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/styles/apps.less (original)
+++ incubator/ambari/trunk/ambari-web/app/styles/apps.less Thu Jan 31 00:53:24
2013
@@ -34,7 +34,7 @@
border:none;
}
}
-
+
#filter_buttons .selected{
cursor: default;
}
@@ -60,6 +60,10 @@
width: 77%;
}
+ .no-data{
+ text-align: center;
+ }
+
input.input-super-mini{
width: 47px;
max-width: 57%;
Modified: incubator/ambari/trunk/ambari-web/app/templates/main/apps.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/apps.hbs?rev=1440773&r1=1440772&r2=1440773&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/apps.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/apps.hbs Thu Jan 31
00:53:24 2013
@@ -88,9 +88,15 @@
</tr>
</thead>
<tbody>
- {{#each run in content}}
- {{view view.containerRow runBinding="run"
currentViewBinding="view.appTableRow"}}
- {{/each}}
+ {{#if view.emptyData}}
+ <tr>
+ <td class="no-data" colspan="9">No jobs to display</td>
+ </tr>
+ {{else}}
+ {{#each run in content}}
+ {{view view.containerRow runBinding="run"
currentViewBinding="view.appTableRow"}}
+ {{/each}}
+ {{/if}}
</tbody>
</table>
Modified: incubator/ambari/trunk/ambari-web/app/views/main/apps_view.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/apps_view.js?rev=1440773&r1=1440772&r2=1440773&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/apps_view.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/apps_view.js Thu Jan 31
00:53:24 2013
@@ -64,6 +64,19 @@ App.MainAppsView = Em.View.extend({
}
}),
+ emptyData:true,
+
+ emptyDataObserver:function(){
+ //debugger;
+ if(this.get("controller.paginationObject.iTotalRecords") != null &&
this.get("controller.paginationObject.iTotalDisplayRecords")>0){
+ this.set("emptyData",false);
+ }else{
+ this.set("emptyData",true);
+ this.set("controller.serverData",null);
+ }
+
}.observes("controller.paginationObject.iTotalDisplayRecords","controller.paginationObject.iTotalRecords"),
+
+
/**
* View for RunPerPage select component
*/