You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2014/02/27 17:09:24 UTC

git commit: AMBARI-4869. Refreshing individual Job page does not show certain data. (alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 7eb4bc6b9 -> 1187ea32f


AMBARI-4869. Refreshing individual Job page does not show certain data. (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1187ea32
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1187ea32
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1187ea32

Branch: refs/heads/trunk
Commit: 1187ea32f0dfb966fb26955afbff5993a7964a61
Parents: 7eb4bc6
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Feb 27 18:05:13 2014 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Thu Feb 27 18:05:13 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/mappers/jobs/hive_job_mapper.js | 6 +++++-
 ambari-web/app/routes/main.js                  | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1187ea32/ambari-web/app/mappers/jobs/hive_job_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/jobs/hive_job_mapper.js b/ambari-web/app/mappers/jobs/hive_job_mapper.js
index 126ed2e..cb14ccb 100644
--- a/ambari-web/app/mappers/jobs/hive_job_mapper.js
+++ b/ambari-web/app/mappers/jobs/hive_job_mapper.js
@@ -50,13 +50,17 @@ App.hiveJobMapper = App.QuickDataMapper.create({
     if (!model) {
       return;
     }
-    var hiveJob = {}
+    var hiveJob = {};
     if (json && json.entity) {
       var hiveJob = {};
       hiveJob.id = json.entity;
+      hiveJob.name = hiveJob.id;
       hiveJob.startTime = json.starttime;
       hiveJob.endTime = json.endtime;
       json.otherinfo.query = $.parseJSON(json.otherinfo.query);
+      if (json.otherinfo.query && json.otherinfo.query.queryText) {
+        hiveJob.query_text = json.otherinfo.query.queryText;
+      }
       hiveJob.stages = [];
       var stagePlans = json.otherinfo.query.queryPlan["STAGE PLANS"];
       for ( var stage in stagePlans) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1187ea32/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 6f9b185..ade682e 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -147,6 +147,7 @@ module.exports = Em.Route.extend({
       route : '/:job_id',
       connectOutlets : function(router, job) {
         if (job) {
+          router.get('mainHiveJobDetailsController').set('loaded', false);
           router.get('mainController').connectOutlet('mainHiveJobDetails', job);
           router.get('mainHiveJobDetailsController').loadJobDetails();
           router.get('mainJobsController').updateJobs('mainHiveJobDetailsController', 'loadJobDetails');