Author: yusaku
Date: Thu Jan 31 00:59:04 2013
New Revision: 1440775
URL: http://svn.apache.org/viewvc?rev=1440775&view=rev
Log:
AMBARI-1312. Remake clearFilters function in app_view (part2). (Arun Kandregula
via yusaku)
Modified:
incubator/ambari/trunk/CHANGES.txt
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=1440775&r1=1440774&r2=1440775&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Jan 31 00:59:04 2013
@@ -35,6 +35,9 @@ Trunk (unreleased changes):
accessible for demo/test purposes. (mahadev)
IMPROVEMENTS
+
+ AMBARI-1312. Remake clearFilters function in app_view (part2). (Arun
Kandregula
+ via yusaku)
AMBARI-1309. Remove all text from Apps views, controllers, templates to
messages.js. (Arun Kandregula via yusaku)
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=1440775&r1=1440774&r2=1440775&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:59:04 2013
@@ -66,8 +66,14 @@ App.MainAppsView = Em.View.extend({
}
}),
+ /**
+ * If there are table rows with runs.
+ */
emptyData:true,
+ /*
+ If no runs to display set emptyData to true and reset Avg table data, else
to set emptyData to false.
+ */
emptyDataObserver:function(){
//debugger;
if(this.get("controller.paginationObject.iTotalRecords") != null &&
this.get("controller.paginationObject.iTotalDisplayRecords")>0){
@@ -83,7 +89,6 @@ App.MainAppsView = Em.View.extend({
* View for RunPerPage select component
*/
runPerPageSelectView: Em.Select.extend({
-
selected: '10',
content: ['10', '25', '50', '100']
}),
@@ -267,26 +272,20 @@ App.MainAppsView = Em.View.extend({
}.observes("controller.filterObject.viewType"),
/**
- * reset all filters in dataTable
+ * reset all filters in table
*
- * @param event
*/
clearFilters: function (event) {
- this._childViews.forEach(function (item) {
- if (item.get("viewName") === "runPerPageSelectView") {
- return "";
- }
- if (item.get('tagName') === 'input') {
- item.set('value', '');
- }
- if (item.get('tagName') === 'select') {
- item.set('value', 'Any');
- item.change();
- }
- if (item.get('multiple')) {
- item.get('clearFilter')(item);
- }
- });
+ this.set("controller.filterObject.sSearch_0","");
+ this.set("controller.filterObject.sSearch_1","");
+ this.set("controller.filterObject.sSearch_2","");
+ this.set("controller.filterObject.sSearch_3","");
+ this.set("controller.filterObject.runType","Any");
+ this.set("controller.filterObject.jobs","");
+ this.set("controller.filterObject.input","");
+ this.set("controller.filterObject.output","");
+ this.set("controller.filterObject.duration","");
+ this.set("controller.filterObject.runDate","Any");
},
/**