Updated Branches:
  refs/heads/branch-4.0 901ca12ea -> cfba5e905

OOZIE-1626 pig action pop-up is not working properly in UI (puru via rohini)


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

Branch: refs/heads/branch-4.0
Commit: cfba5e905c64cd8e3f483824fddd7abbe5db2fb3
Parents: 901ca12
Author: Rohini Palaniswamy <[email protected]>
Authored: Thu Jan 9 11:29:58 2014 -0800
Committer: Rohini Palaniswamy <[email protected]>
Committed: Thu Jan 9 11:29:58 2014 -0800

----------------------------------------------------------------------
 release-log.txt                         |  2 +-
 webapp/src/main/webapp/oozie-console.js | 56 +++++++++++++++-------------
 2 files changed, 31 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oozie/blob/cfba5e90/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index ee27fe5..65285c9 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -2,7 +2,7 @@
 
 OOZIE-1630 <prepare> operations fail when path doesn't have scheme (ryota)
 OOZIE-1627 Rerun doesn't resolve workflow app name (puru via rohini)
-OOZIE-1626 pig action pop-up is not working properly in UI (ryota)
+OOZIE-1626 pig action pop-up is not working properly in UI (ryota, puru via 
rohini)
 OOZIE-1607 [Doc]Update workflow specification for chgrp command (puru via 
rohini)
 OOZIE-1542 When extjs isn't installed, the web UI is unhelpfully blank 
(rkanter)
 OOZIE-1565 OOZIE-1481 should only affect v2 of the API, not v1 (rkanter)

http://git-wip-us.apache.org/repos/asf/oozie/blob/cfba5e90/webapp/src/main/webapp/oozie-console.js
----------------------------------------------------------------------
diff --git a/webapp/src/main/webapp/oozie-console.js 
b/webapp/src/main/webapp/oozie-console.js
index efd63bc..2511178 100644
--- a/webapp/src/main/webapp/oozie-console.js
+++ b/webapp/src/main/webapp/oozie-console.js
@@ -566,41 +566,45 @@ function jobDetailsPopup(response, request) {
         }
     }
 
-       function populateUrlUnit(actionStatus, urlUnit) {
-               var consoleUrl = actionStatus["consoleUrl"];
+    function populateUrlUnit(actionStatus, urlUnit) {
+        var consoleUrl = actionStatus["consoleUrl"];
         var externalChildIDs = actionStatus["externalChildIDs"];
-               if(consoleUrl && externalChildIDs && externalChildIDs != 
"null") {
-               var urlPrefix = consoleUrl.trim().split(/_/)[0];
-            //externalChildIds is a comma-separated string of each child job 
ID.
-            //Create URL list by appending jobID portion after stripping "job"
+        if (consoleUrl && externalChildIDs && externalChildIDs != "null") {
+            var urlPrefix = consoleUrl.trim().split(/_/)[0];
+            // externalChildIds is a comma-separated string of each child job
+            // ID.
+            // Create URL list by appending jobID portion after stripping "job"
             var jobIds = externalChildIDs.split(/,/);
             var count = 1;
             jobIds.forEach(function(jobId) {
-                jobId = jobId.trim().split(/job/)[1];
-                       var jobUrl = new Ext.form.TriggerField({
-                               fieldLabel: 'Child Job ' + count,
-                               editable: false,
-                               name: 'childJobURLs',
-                               width: 400,
-                               value: urlPrefix + jobId,
-                               triggerClass: 'x-form-search-trigger',
-                               onTriggerClick: function() {
-                                   window.open(urlPrefix + jobId);
-                               }
-                   });
-                   if(jobId != undefined) {
-                    urlUnit.add(jobUrl);
-                       count++;
-                   }
-               });
+                jobId = jobId.trim().split(/job/);
+                if (jobId.length > 1) {
+                    jobId = jobId[1];
+                    var jobUrl = new Ext.form.TriggerField({
+                        fieldLabel : 'Child Job ' + count,
+                        editable : false,
+                        name : 'childJobURLs',
+                        width : 400,
+                        value : urlPrefix + jobId,
+                        triggerClass : 'x-form-search-trigger',
+                        onTriggerClick : function() {
+                            window.open(urlPrefix + jobId);
+                        }
+                    });
+                    if (jobId != undefined) {
+                        urlUnit.add(jobUrl);
+                        count++;
+                    }
+                }
+            });
         } else {
             var note = new Ext.form.TextField({
-                fieldLabel: 'Child Job',
-                value: 'n/a'
+                fieldLabel : 'Child Job',
+                value : 'n/a'
             });
             urlUnit.add(note);
         }
-       }
+    }
 
     function refreshActionDetails(actionId, detail, urlUnit) {
         Ext.Ajax.request({

Reply via email to