You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/02/03 14:53:31 UTC
[27/50] [abbrv] ambari git commit: AMBARI-19792. Hive View 2.0: Jobs
page shows 'Invalid date - Jan 24'. (dipayanb)
AMBARI-19792. Hive View 2.0: Jobs page shows 'Invalid date - Jan 24'. (dipayanb)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/318f3522
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/318f3522
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/318f3522
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 318f352252d31e97d9110f0fb5013d006dd0adab
Parents: 1d17baf
Author: Dipayan Bhowmick <di...@gmail.com>
Authored: Thu Feb 2 12:05:14 2017 +0530
Committer: Dipayan Bhowmick <di...@gmail.com>
Committed: Thu Feb 2 12:05:46 2017 +0530
----------------------------------------------------------------------
.../hive20/src/main/resources/ui/app/app.js | 9 -------
.../resources/ui/app/components/jobs-browser.js | 4 ----
.../main/resources/ui/app/controllers/jobs.js | 7 +++---
.../src/main/resources/ui/app/routes/jobs.js | 25 ++++++++++++--------
.../app/templates/components/jobs-browser.hbs | 1 +
.../src/main/resources/ui/config/environment.js | 2 --
6 files changed, 20 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/318f3522/contrib/views/hive20/src/main/resources/ui/app/app.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/app.js b/contrib/views/hive20/src/main/resources/ui/app/app.js
index 0f83ee5..af4fdc4 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/app.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/app.js
@@ -26,15 +26,6 @@ let App;
Ember.MODEL_FACTORY_INJECTIONS = true;
App = Ember.Application.extend({
- // Basic logging, e.g. "Transitioned into 'post'"
- LOG_TRANSITIONS: false,
-
- // Extremely detailed logging, highlighting every internal
- // step made while transitioning into a route, including
- // `beforeModel`, `model`, and `afterModel` hooks, and
- // information about redirects and aborted transitions
- LOG_TRANSITIONS_INTERNAL: false,
-
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
http://git-wip-us.apache.org/repos/asf/ambari/blob/318f3522/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js b/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
index e3b22e9..b0a82b0 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/jobs-browser.js
@@ -39,10 +39,6 @@ export default Ember.Component.extend({
actions: {
setDateRange(startDate, endDate) {
this.sendAction('filterChanged', startDate, endDate);
- },
-
- expandJob(jobId) {
- console.log("Job to be expanded", jobId);
}
}
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/318f3522/contrib/views/hive20/src/main/resources/ui/app/controllers/jobs.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/controllers/jobs.js b/contrib/views/hive20/src/main/resources/ui/app/controllers/jobs.js
index 9ab46f3..2ca4474 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/controllers/jobs.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/controllers/jobs.js
@@ -26,12 +26,13 @@ export default Ember.Controller.extend({
startTimeText: Ember.computed('startTime', function() {
- return this.get('moment').moment(this.get('startTime')).format('YYYY-MM-DD');
+ let st = typeof(this.get('startTime')) === 'string' ? parseInt(this.get('startTime')) : this.get('startTime');
+ return this.get('moment').moment(st).format('YYYY-MM-DD');
}),
endTimeText: Ember.computed('endTime', function() {
- return this.get('moment').moment(this.get('endTime')).format('YYYY-MM-DD');
+ let et = typeof(this.get('endTime')) === 'string' ? parseInt(this.get('endTime')) : this.get('endTime');
+ return this.get('moment').moment(et).format('YYYY-MM-DD');
})
-
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/318f3522/contrib/views/hive20/src/main/resources/ui/app/routes/jobs.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/jobs.js b/contrib/views/hive20/src/main/resources/ui/app/routes/jobs.js
index a2ebc25..419fd07 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/jobs.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/jobs.js
@@ -34,22 +34,24 @@ export default Ember.Route.extend({
model(params) {
let now = this.get('moment').moment();
if(Ember.isEmpty(params.startTime) || Ember.isEmpty(params.endTime)) {
- let initialValue = now.clone();
- params.endTime = now.valueOf();
- params.startTime = now.subtract('7', 'days').valueOf();
- this.set('timeInitializedTo', initialValue);
+ let clone = now.clone();
+ params.endTime = now.endOf('day').valueOf();
+ params.startTime = clone.subtract('7', 'days').startOf('day').valueOf();
+ this.set('startInitTo', params.startTime);
+ this.set('endInitTo', params.endTime);
}
return this.store.query('job', params);
},
setupController(controller, model) {
- if(!Ember.isEmpty(this.get('timeInitializedTo'))) {
+ if(!(Ember.isEmpty(this.get('startInitTo')) || Ember.isEmpty(this.get('endInitTo')))) {
- controller.set('endTime', this.get('timeInitializedTo').valueOf());
- controller.set('startTime', this.get('timeInitializedTo').subtract('7', 'days').valueOf());
+ controller.set('endTime', this.get('endInitTo'));
+ controller.set('startTime', this.get('startInitTo'));
//unset timeInitializedTo
- this.set('timeInitializedTo');
+ this.set('endInitTo');
+ this.set('startInitTo');
}
this._super(...arguments);
@@ -58,9 +60,12 @@ export default Ember.Route.extend({
actions: {
dateFilterChanged(startTime, endTime) {
- this.controller.set('startTime', this.get('moment').moment(startTime, 'YYYY-MM-DD').valueOf())
- this.controller.set('endTime', this.get('moment').moment(endTime, 'YYYY-MM-DD').valueOf())
+ this.controller.set('startTime', this.get('moment').moment(startTime, 'YYYY-MM-DD').startOf('day').valueOf())
+ this.controller.set('endTime', this.get('moment').moment(endTime, 'YYYY-MM-DD').endOf('day').valueOf())
this.refresh();
+ },
+ hideDatePicker() {
+ console.log("Hiddennnnn");
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/318f3522/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
index 47b499a..abb4a97 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/jobs-browser.hbs
@@ -32,6 +32,7 @@
start=startTime
end=endTime
opens="left"
+ autoApply=true
applyAction=(action "setDateRange")
}}
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/318f3522/contrib/views/hive20/src/main/resources/ui/config/environment.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/config/environment.js b/contrib/views/hive20/src/main/resources/ui/config/environment.js
index 42dde20..9efd491 100644
--- a/contrib/views/hive20/src/main/resources/ui/config/environment.js
+++ b/contrib/views/hive20/src/main/resources/ui/config/environment.js
@@ -34,8 +34,6 @@ module.exports = function(environment) {
APP: {
// Here you can pass flags/options to your application instance
// when it is created
- LOG_VIEW_LOOKUPS: false,
- LOG_ACTIVE_GENERATION: false
}
};