You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by vi...@apache.org on 2013/03/18 18:42:17 UTC

svn commit: r1457890 - /oozie/branches/branch-4.0/webapp/src/main/webapp/oozie-console.js

Author: virag
Date: Mon Mar 18 17:42:17 2013
New Revision: 1457890

URL: http://svn.apache.org/r1457890
Log:
OOZIE-1270 Querying job directly does not pop correct information for coordinator and bundle (rohini via virag)

Modified:
    oozie/branches/branch-4.0/webapp/src/main/webapp/oozie-console.js

Modified: oozie/branches/branch-4.0/webapp/src/main/webapp/oozie-console.js
URL: http://svn.apache.org/viewvc/oozie/branches/branch-4.0/webapp/src/main/webapp/oozie-console.js?rev=1457890&r1=1457889&r2=1457890&view=diff
==============================================================================
--- oozie/branches/branch-4.0/webapp/src/main/webapp/oozie-console.js (original)
+++ oozie/branches/branch-4.0/webapp/src/main/webapp/oozie-console.js Mon Mar 18 17:42:17 2013
@@ -86,6 +86,13 @@ function getTimeZone() {
     return Ext.state.Manager.get("TimezoneId","GMT");
 }
 
+if ( !String.prototype.endsWith ) {
+    String.prototype.endsWith = function(pattern) {
+        var d = this.length - pattern.length;
+        return d >= 0 && this.lastIndexOf(pattern) === d;
+    };
+}
+
 // Makes a tree node from an XML
 function treeNodeFromXml(XmlEl) {
     var t = ((XmlEl.nodeType == 3) ? XmlEl.nodeValue : XmlEl.tagName);
@@ -2192,7 +2199,17 @@ function initConsole() {
     // viewCoordJobs.execute();
     var jobId = getReqParam("job");
     if (jobId != "") {
-        jobDetailsGridWindow(jobId);
+        if (jobId.endsWith("-C")) {
+            coordJobDetailsGridWindow(jobId);
+        }
+        else if (jobId.endsWith("-B")) {
+            bundleJobDetailsGridWindow(jobId);
+        }
+        else
+        {
+            jobDetailsGridWindow(jobId);
+        }
+
     }
 }
 // now the on ready function