You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2014/10/06 19:54:07 UTC
[1/2] git commit: AMBARI-7654 Slider View: Apps table start/end time
columns not filtering properly and showing GMT. (ababiichuk)
Repository: ambari
Updated Branches:
refs/heads/branch-1.7.0 8c1dc9514 -> c6ece0896
AMBARI-7654 Slider View: Apps table start/end time columns not filtering properly and showing GMT. (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/112e86f1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/112e86f1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/112e86f1
Branch: refs/heads/branch-1.7.0
Commit: 112e86f1f15f4226b6fbd682d1ffc1d2ed141f09
Parents: 662df7f
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Mon Oct 6 20:51:54 2014 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Mon Oct 6 20:51:54 2014 +0300
----------------------------------------------------------------------
.../main/resources/ui/app/models/slider_app.js | 18 +++++++++++++++++-
.../resources/ui/app/templates/slider_apps.hbs | 4 ++--
.../resources/ui/app/views/common/filter_view.js | 2 +-
.../resources/ui/app/views/slider_apps_view.js | 14 ++------------
4 files changed, 22 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/112e86f1/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
index 3702b35..3f5c376 100644
--- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
+++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
@@ -49,11 +49,27 @@ App.SliderApp = DS.Model.extend({
started: DS.attr('number'),
/**
+ * @type {String}
+ */
+
+ startedToLocalTime: function () {
+ return new Date(this.get('started')).toString().replace("(FLE Daylight Time)","");
+ }.property('started'),
+
+ /**
* @type {number}
*/
ended: DS.attr('number'),
/**
+ * @type {String}
+ */
+
+ endedToLocalTime: function () {
+ return new Date(this.get('ended')).toString().replace("(FLE Daylight Time)","");
+ }.property('ended'),
+
+ /**
* @type {App.SliderAppType}
*/
appType: DS.belongsTo('sliderAppType'),
@@ -162,4 +178,4 @@ App.SliderApp.Status = {
new_saving: "NEW_SAVING",
running: "RUNNING" ,
submitted:"SUBMITTED"
-};
\ No newline at end of file
+};
http://git-wip-us.apache.org/repos/asf/ambari/blob/112e86f1/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
index 626dfb0..129db30 100644
--- a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
@@ -54,9 +54,9 @@
<td>{{slider.user}}</td>
- <td>{{slider.started}}</td>
+ <td>{{slider.startedToLocalTime}}</td>
- <td>{{slider.ended}}</td>
+ <td>{{slider.endedToLocalTime}}</td>
{{/view}}
{{/each}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/112e86f1/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js b/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js
index 3390a44..2d357e3 100644
--- a/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js
+++ b/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js
@@ -291,7 +291,7 @@ module.exports = {
case 'date':
return function (rowValue, rangeExp) {
var match = false;
- var timePassed = new Date().getTime() - rowValue;
+ var timePassed = new Date().getTime() - new Date(rowValue).getTime();
switch (rangeExp) {
case 'Past 1 hour':
match = timePassed <= 3600000;
http://git-wip-us.apache.org/repos/asf/ambari/blob/112e86f1/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js b/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js
index fa8ae98..4e6ed1e 100644
--- a/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js
+++ b/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js
@@ -141,23 +141,13 @@ App.SliderAppsView = App.TableView.extend({
startFilterView: filters.createSelectView({
column: 4,
- fieldType: 'filter-input-width',
- content: ['', 'Past 1 hour', 'Past 1 Day', 'Past 2 Days', 'Past 7 Days', 'Past 14 Days', 'Past 30 Days', 'Custom'],
- onChangeValue: function(){
- this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'date');
- },
- type: 'number'
- }),
-
- startFilterView: filters.createSelectView({
- column: 4,
defaultValue: "All Dates",
fieldType: 'filter-input-width',
content: ['All Dates', 'Past 1 hour', 'Past 1 Day', 'Past 2 Days', 'Past 7 Days', 'Past 14 Days', 'Past 30 Days'],
onChangeValue: function(){
this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'date', this.get('defaultValue'));
},
- type: 'date'
+ type: 'number'
}),
/**
@@ -179,4 +169,4 @@ App.SliderAppsView = App.TableView.extend({
App.SliderTooltip = Em.View.extend({
templateName: "common/app_tooltip"
-});
\ No newline at end of file
+});
[2/2] git commit: Merge remote-tracking branch 'origin/branch-1.7.0'
into branch-1.7.0
Posted by ab...@apache.org.
Merge remote-tracking branch 'origin/branch-1.7.0' into branch-1.7.0
Conflicts:
contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c6ece089
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c6ece089
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c6ece089
Branch: refs/heads/branch-1.7.0
Commit: c6ece0896f215fff226a3e34d2dc53db621a05c4
Parents: 112e86f 8c1dc95
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Mon Oct 6 20:53:44 2014 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Mon Oct 6 20:53:44 2014 +0300
----------------------------------------------------------------------
.../internal/StackDefinedPropertyProvider.java | 10 ++-
.../metrics/RestMetricsPropertyProvider.java | 19 +++--
.../stacks/HDP/2.2/services/HIVE/metainfo.xml | 5 ++
.../ui/app/controllers/slider_app_controller.js | 89 ++++++++++++--------
.../main/resources/ui/app/models/slider_app.js | 35 ++++----
.../ui/test/integration/pages/index_test.js | 13 ++-
.../controllers/slider_app_controller_test.js | 64 ++++++++++++++
7 files changed, 173 insertions(+), 62 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c6ece089/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
----------------------------------------------------------------------