Author: yusaku
Date: Thu Jan 31 00:47:02 2013
New Revision: 1440767
URL: http://svn.apache.org/viewvc?rev=1440767&view=rev
Log:
AMBARI-1304. When switching jobs in timeline + tasks charts, blank charts show.
(Arun Kandregula via yusaku)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/assets/data/apps/jobs/mr_201301280808_0004.json
incubator/ambari/trunk/ambari-web/app/assets/data/apps/runs.json
incubator/ambari/trunk/ambari-web/app/views/main/apps/item/bar_view.js
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1440767&r1=1440766&r2=1440767&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Jan 31 00:47:02 2013
@@ -202,6 +202,9 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-1304. When switching jobs in timeline + tasks charts, blank charts
show.
+ (Arun Kandregula via yusaku)
+
AMBARI-1317. Deploy progress returns to deploy screen (momentarily).
(Arun Kandregula via yusaku)
Modified:
incubator/ambari/trunk/ambari-web/app/assets/data/apps/jobs/mr_201301280808_0004.json
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/assets/data/apps/jobs/mr_201301280808_0004.json?rev=1440767&r1=1440766&r2=1440767&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/assets/data/apps/jobs/mr_201301280808_0004.json
(original)
+++
incubator/ambari/trunk/ambari-web/app/assets/data/apps/jobs/mr_201301280808_0004.json
Thu Jan 31 00:47:02 2013
@@ -1,6 +1,21 @@
{
"jobs": [
{
+ "jobId": "job_201301280808_0002",
+ "jobName":
"oozie:action:T\\=map-reduce:W\\=map-reduce-wf:A\\=mr-node:ID\\=0000000-130128081151371-oozie-oozi-W",
+ "status": "SUCCESS",
+ "userName": "ambari_qa",
+ "submitTime": 1359378922503,
+ "elapsedTime": 27080,
+ "maps": 1,
+ "reduces": 1,
+ "inputBytes": 1550,
+ "outputBytes": 1547,
+ "confPath":
"hdfs:\/\/ip-10-83-1-168\\.ec2\\.internal:8020\/user\/ambari_qa\/\\.staging\/job_201301280808_0004\/job\\.xml",
+ "workflowId": "mr_201301280808_0002",
+ "workflowEntityName": "X"
+ },
+ {
"jobId": "job_201301280808_0004",
"jobName":
"oozie:action:T\\=map-reduce:W\\=map-reduce-wf:A\\=mr-node:ID\\=0000000-130128081151371-oozie-oozi-W",
"status": "SUCCESS",
@@ -14,6 +29,21 @@
"confPath":
"hdfs:\/\/ip-10-83-1-168\\.ec2\\.internal:8020\/user\/ambari_qa\/\\.staging\/job_201301280808_0004\/job\\.xml",
"workflowId": "mr_201301280808_0004",
"workflowEntityName": "X"
+ },
+ {
+ "jobId": "job_201301280808_0003",
+ "jobName":
"oozie:action:T\\=map-reduce:W\\=map-reduce-wf:A\\=mr-node:ID\\=0000000-130128081151371-oozie-oozi-W",
+ "status": "SUCCESS",
+ "userName": "ambari_qa",
+ "submitTime": 1359378922503,
+ "elapsedTime": 27080,
+ "maps": 1,
+ "reduces": 1,
+ "inputBytes": 1550,
+ "outputBytes": 1547,
+ "confPath":
"hdfs:\/\/ip-10-83-1-168\\.ec2\\.internal:8020\/user\/ambari_qa\/\\.staging\/job_201301280808_0004\/job\\.xml",
+ "workflowId": "mr_201301280808_0003",
+ "workflowEntityName": "X"
}
]
}
\ No newline at end of file
Modified: incubator/ambari/trunk/ambari-web/app/assets/data/apps/runs.json
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/assets/data/apps/runs.json?rev=1440767&r1=1440766&r2=1440767&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/assets/data/apps/runs.json (original)
+++ incubator/ambari/trunk/ambari-web/app/assets/data/apps/runs.json Thu Jan 31
00:47:02 2013
@@ -59,7 +59,7 @@
"elapsedTime": 27080,
"inputBytes": 1550,
"outputBytes": 1547,
- "numJobsTotal": 1,
+ "numJobsTotal": 3,
"numJobsCompleted": 1,
"workflowContext": {
"workflowDag": {
Modified: incubator/ambari/trunk/ambari-web/app/views/main/apps/item/bar_view.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/apps/item/bar_view.js?rev=1440767&r1=1440766&r2=1440767&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/apps/item/bar_view.js
(original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/apps/item/bar_view.js Thu
Jan 31 00:47:02 2013
@@ -24,9 +24,18 @@ App.MainAppsItemBarView = Em.View.extend
templateName:require('templates/main/apps/item/bar'),
width:300,
height:210,
-
+ /**
+ * Jobs list. Sorted by job id
+ */
content:function () {
- return this.get('controller.content.jobs');
+ return this.get('controller.content.jobs').sort(function(a, b) {
+ var jobIdA = a.get('id').toLowerCase(), jobIdB =
b.get('id').toLowerCase();
+ if (jobIdA < jobIdB)
+ return -1;
+ if (jobIdA > jobIdB)
+ return 1;
+ return 0;
+ });
}.property('controller.content.jobs'),
firstJob:function () {
return this.get('content').get('firstObject');
@@ -102,7 +111,7 @@ App.MainAppsItemBarView = Em.View.extend
var shuffle = JSON.stringify(this.get('shuffle'));
var reduce = JSON.stringify(this.get('reduce'));
if (!this.get('map') || !this.get('shuffle') || !this.get('reduce'))
{return;}
- $('#chart, #legend, #timeline1').html('');
+ $('#chart, #legend, #timeline1, #y-axis').html('');
graph.drawJobTimeLine(map, shuffle, reduce, this.get('width'),
this.get('height'), '#chart', 'legend', 'timeline1');
}.observes('map', 'shuffle', 'reduce'),
@@ -112,7 +121,7 @@ App.MainAppsItemBarView = Em.View.extend
var mapOffSwitch = JSON.stringify(this.get('mapOffSwitch'));
var reduceOffSwitch = JSON.stringify(this.get('reduceOffSwitch'));
if (!this.get('mapNodeLocal') || !this.get('mapRackLocal') ||
!this.get('mapOffSwitch') || !this.get('reduceOffSwitch')) {return;}
- $('#job_tasks, #tasks_legend, #timeline2').html('');
+ $('#job_tasks, #tasks_legend, #timeline2, #y-axis2').html('');
graph.drawJobTasks(mapNodeLocal, mapRackLocal, mapOffSwitch,
reduceOffSwitch, this.get('submit'), this.get('width'), this.get('height'),
'#job_tasks', 'tasks_legend', 'timeline2');
}.observes('mapNodeLocal', 'mapRackLocal', 'mapOffSwitch',
'reduceOffSwitch', 'submit')