Author: srimanth
Date: Thu Jan 31 22:06:46 2013
New Revision: 1441219
URL: http://svn.apache.org/viewvc?rev=1441219&view=rev
Log:
AMBARI-1326. Remake clearFilters function in app_view (part 3). (srimanth)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/controllers/main/apps_controller.js
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=1441219&r1=1441218&r2=1441219&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Jan 31 22:06:46 2013
@@ -36,6 +36,8 @@ Trunk (unreleased changes):
IMPROVEMENTS
+ AMBARI-1326. Remake clearFilters function in app_view (part 3). (srimanth)
+
AMBARI-1305. Make sure that Ambari Web renders all elements correctly when
the browser width is 1024px or narrower (refactor). (Arun Kandregula via
yusaku)
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=1441219&r1=1441218&r2=1441219&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 22:06:46 2013
@@ -310,6 +310,11 @@ App.MainAppsController = Em.ArrayControl
}
return tmp;
},
+
+ /**
+ * Create link for server request
+ * @return {String}
+ */
createAppLink:function(){
var link = "/jobhistory/datatable?";
@@ -386,6 +391,25 @@ App.MainAppsController = Em.ArrayControl
}
}),
+ /**
+ * reset all filters in table
+ *
+ */
+ clearFilters: function () {
+ var obj=this.get("filterObject");
+ obj.set("sSearch_0","");
+ obj.set("sSearch_1","");
+ obj.set("sSearch_2","");
+ obj.set("sSearch_3","");
+ obj.set("runType","Any");
+ obj.set("jobs","");
+ obj.set("input","");
+ obj.set("output","");
+ obj.set("duration","");
+ obj.set("runDate","Any");
+ },
+
+
runUrl : "/jobhistory/datatable",
runTimeout : null,
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=1441219&r1=1441218&r2=1441219&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
22:06:46 2013
@@ -59,7 +59,7 @@
({{controller.filterObject.filteredDisplayRecords}})</a>
</div>
<div class="span2 clear_filter">
- <a {{action "clearFilters" target="view"}}>{{t
apps.filters.clearFilters}}</a>
+ <a {{action "clearFilters" target="controller"}}>{{t
apps.filters.clearFilters}}</a>
</div>
<div class="search-bar">
{{view view.appSearchThrough
valueBinding="controller.filterObject.sSearch"}}
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=1441219&r1=1441218&r2=1441219&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
22:06:46 2013
@@ -286,23 +286,6 @@ App.MainAppsView = Em.View.extend({
}.observes("controller.filterObject.viewType"),
/**
- * reset all filters in table
- *
- */
- clearFilters: function (event) {
- 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");
- },
-
- /**
* This Container View is used to render static table row(appTableRow) and
additional dynamic content
*/
containerRow: Em.ContainerView.extend({