You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by ro...@apache.org on 2013/06/25 17:14:18 UTC
svn commit: r1496515 - in /oozie/trunk: ./
core/src/main/java/org/apache/oozie/servlet/
core/src/test/java/org/apache/oozie/servlet/ webapp/src/main/webapp/
webapp/src/main/webapp/console/sla/ webapp/src/main/webapp/console/sla/css/
webapp/src/main/web...
Author: rohini
Date: Tue Jun 25 15:14:18 2013
New Revision: 1496515
URL: http://svn.apache.org/r1496515
Log:
OOZIE-1429 Fix bugs in SLA UI (rohini)
Modified:
oozie/trunk/core/src/main/java/org/apache/oozie/servlet/V2SLAServlet.java
oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV2SLAServlet.java
oozie/trunk/release-log.txt
oozie/trunk/webapp/src/main/webapp/console/sla/css/oozie-sla-table.css
oozie/trunk/webapp/src/main/webapp/console/sla/js/oozie-sla-table.js
oozie/trunk/webapp/src/main/webapp/console/sla/oozie-sla.html
oozie/trunk/webapp/src/main/webapp/oozie-console.js
Modified: oozie/trunk/core/src/main/java/org/apache/oozie/servlet/V2SLAServlet.java
URL: http://svn.apache.org/viewvc/oozie/trunk/core/src/main/java/org/apache/oozie/servlet/V2SLAServlet.java?rev=1496515&r1=1496514&r2=1496515&view=diff
==============================================================================
--- oozie/trunk/core/src/main/java/org/apache/oozie/servlet/V2SLAServlet.java (original)
+++ oozie/trunk/core/src/main/java/org/apache/oozie/servlet/V2SLAServlet.java Tue Jun 25 15:14:18 2013
@@ -85,14 +85,12 @@ public class V2SLAServlet extends SLASer
}
}
catch (CommandException ce) {
- ce.printStackTrace();
XLog.getLog(getClass()).error("Command exception ", ce);
- throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ce);
+ throw new XServletException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ce);
}
catch (RuntimeException re) {
- re.printStackTrace();
XLog.getLog(getClass()).error("Runtime error ", re);
- throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ErrorCode.E0307, re.getMessage());
+ throw new XServletException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ErrorCode.E0307, re.getMessage());
}
}
@@ -108,6 +106,11 @@ public class V2SLAServlet extends SLASer
numMaxResults = Integer.parseInt(maxResults);
}
+ if (filterString == null || filterString.equals("")) {
+ throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ErrorCode.E0305,
+ RestConstants.JOBS_FILTER_PARAM);
+ }
+
try {
Map<String, List<String>> filterList = parseFilter(URLDecoder.decode(filterString, "UTF-8"), SLA_FILTER_NAMES);
SLASummaryFilter filter = new SLASummaryFilter();
Modified: oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV2SLAServlet.java
URL: http://svn.apache.org/viewvc/oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV2SLAServlet.java?rev=1496515&r1=1496514&r2=1496515&view=diff
==============================================================================
--- oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV2SLAServlet.java (original)
+++ oozie/trunk/core/src/test/java/org/apache/oozie/servlet/TestV2SLAServlet.java Tue Jun 25 15:14:18 2013
@@ -60,9 +60,9 @@ public class TestV2SLAServlet extends Da
public Void call() throws Exception {
final Date currentTime = new Date(System.currentTimeMillis());
- final Date nominalTime1 = DateUtils.parseDateUTC("2012-06-01T010:00Z");
- final Date nominalTime2 = DateUtils.parseDateUTC("2012-06-02T010:20Z");
- final Date nominalTime3 = DateUtils.parseDateUTC("2012-06-03T014:00Z");
+ final Date nominalTime1 = DateUtils.parseDateUTC("2012-06-01T10:00Z");
+ final Date nominalTime2 = DateUtils.parseDateUTC("2012-06-02T10:20Z");
+ final Date nominalTime3 = DateUtils.parseDateUTC("2012-06-03T14:00Z");
insertEntriesIntoSLASummaryTable(2, "1-", "-W", "1-C", nominalTime1, "testapp-1", AppType.WORKFLOW_JOB,
currentTime);
insertEntriesIntoSLASummaryTable(3, "2-", "-W", null, nominalTime2, "testapp-2", AppType.WORKFLOW_JOB,
@@ -90,14 +90,14 @@ public class TestV2SLAServlet extends Da
assertSLAJSONResponse(array, 2, 2, "2-", "-W", null, nominalTime2, "testapp-2", AppType.WORKFLOW_JOB,
currentTime);
- queryParams.put(RestConstants.JOBS_FILTER_PARAM, "app_name=testapp-3;nominal_start=2012-06-03T016:00Z");
+ queryParams.put(RestConstants.JOBS_FILTER_PARAM, "app_name=testapp-3;nominal_start=2012-06-03T16:00Z");
array = getSLAJSONResponse(queryParams);
// Matches 3-6 elements - 3-3-W 3-4-W 3-5-W 3-6-W
assertSLAJSONResponse(array, 3, 6, "3-", "-W", "2-C", nominalTime3, "testapp-3", AppType.WORKFLOW_JOB,
currentTime);
queryParams.put(RestConstants.JOBS_FILTER_PARAM,
- "parent_id=2-C;nominal_start=2012-06-03T016:00Z;nominal_end=2012-06-03T017:00Z");
+ "parent_id=2-C;nominal_start=2012-06-03T016:00Z;nominal_end=2012-06-03T17:00Z");
array = getSLAJSONResponse(queryParams);
// Matches 3rd and 4th element - 3-3-W 3-4-W
assertSLAJSONResponse(array, 3, 4, "3-", "-W", "2-C", nominalTime3, "testapp-3", AppType.WORKFLOW_JOB,
Modified: oozie/trunk/release-log.txt
URL: http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1496515&r1=1496514&r2=1496515&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Tue Jun 25 15:14:18 2013
@@ -1,5 +1,6 @@
-- Oozie 4.1.0 release (trunk - unreleased)
+OOZIE-1429 Fix bugs in SLA UI (rohini)
OOZIE-1423 Coordinator job change command not removing SLA Registration bean (mona)
OOZIE-1424 Improve SLA reliability on restart, fix bugs related to SLA and event generation (virag)
OOZIE-1417 Exlude **/oozie/store/* **/oozie/examples/* from clover reports (dennisyv via virag)
Modified: oozie/trunk/webapp/src/main/webapp/console/sla/css/oozie-sla-table.css
URL: http://svn.apache.org/viewvc/oozie/trunk/webapp/src/main/webapp/console/sla/css/oozie-sla-table.css?rev=1496515&r1=1496514&r2=1496515&view=diff
==============================================================================
--- oozie/trunk/webapp/src/main/webapp/console/sla/css/oozie-sla-table.css (original)
+++ oozie/trunk/webapp/src/main/webapp/console/sla/css/oozie-sla-table.css Tue Jun 25 15:14:18 2013
@@ -162,4 +162,10 @@ a:active {
.ui-buttonset {
margin-right: 0;
-}
\ No newline at end of file
+}
+
+.paging_full_numbers .ui-button {
+ cursor: pointer;
+ margin: 0;
+ padding: 2px 6px;
+}
Modified: oozie/trunk/webapp/src/main/webapp/console/sla/js/oozie-sla-table.js
URL: http://svn.apache.org/viewvc/oozie/trunk/webapp/src/main/webapp/console/sla/js/oozie-sla-table.js?rev=1496515&r1=1496514&r2=1496515&view=diff
==============================================================================
--- oozie/trunk/webapp/src/main/webapp/console/sla/js/oozie-sla-table.js (original)
+++ oozie/trunk/webapp/src/main/webapp/console/sla/js/oozie-sla-table.js Tue Jun 25 15:14:18 2013
@@ -85,7 +85,7 @@ function initializeTable() {
"sScrollY": "360px",
"bPaginate": true,
"bStateSave": true,
- "aaSorting": [[ 1, 'desc' ]],
+ "aaSorting": [[ 3, 'desc' ]],
"bDestroy": true
});
@@ -101,8 +101,10 @@ function drawTable(jsonData) {
slaSummary.nominalTimeTZ = new Date(slaSummary.nominalTime).toUTCString();
if (slaSummary.expectedStart) {
slaSummary.expectedStartTZ = new Date(slaSummary.expectedStart).toUTCString();
- if (slaSummary.actualStart && slaSummary.actualStart > slaSummary.expectedStart) {
- slaMisses = "START_MISS, ";
+ if (slaSummary.actualStart) {
+ if (slaSummary.actualStart > slaSummary.expectedStart) {
+ slaMisses = "START_MISS, ";
+ }
}
else if (currentTime > slaSummary.expectedStart) {
slaMisses = "START_MISS, ";
@@ -113,8 +115,10 @@ function drawTable(jsonData) {
}
if (slaSummary.expectedEnd) {
slaSummary.expectedEndTZ = new Date(slaSummary.expectedEnd).toUTCString();
- if (slaSummary.actualEnd && slaSummary.actualEnd > slaSummary.expectedEnd) {
- slaMisses += "END_MISS, ";
+ if (slaSummary.actualEnd) {
+ if (slaSummary.actualEnd > slaSummary.expectedEnd) {
+ slaMisses += "END_MISS, ";
+ }
}
else if (currentTime > slaSummary.expectedEnd) {
slaMisses += "END_MISS, ";
@@ -151,9 +155,17 @@ function drawTable(jsonData) {
"sScrollY" : "360px",
"sScrollX" : "100%",
"bPaginate" : true,
+ "sPaginationType": "full_numbers",
"oTableTools" : {
"sSwfPath" : "console/sla/js/table/copy_csv_xls_pdf.swf",
- "aButtons" : [ "copy", "csv" ],
+ "aButtons" : [
+ "copy",
+ {
+ "sExtends": "csv",
+ // Ignore column 0
+ "mColumns": [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
+ },
+ ],
},
"aaData" : jsonData.slaSummaryList,
"aoColumns" : columnsToShow,
@@ -175,14 +187,25 @@ function drawTable(jsonData) {
if (aData.endDiff || aData.endDiff == 0) {
$(rowAllColumns[9]).html(timeElapsed(aData.endDiff));
}
+ if (aData.expectedDuration == -1) {
+ $(rowAllColumns[10]).html("");
+ } else {
+ // Convert from minutes to milliseconds
+ $(rowAllColumns[10]).html(timeElapsed(aData.expectedDuration * 60000));
+ }
+ if (aData.actualDuration == -1) {
+ $(rowAllColumns[11]).html("");
+ } else {
+ $(rowAllColumns[11]).html(timeElapsed(aData.actualDuration * 60000));
+ }
if (aData.durDiff || aData.durDiff == 0) {
- $(rowAllColumns[12]).html(timeElapsed(aData.durDiff * 1000));
+ $(rowAllColumns[12]).html(timeElapsed(aData.durDiff * 60000));
}
$("td:first", nRow).html(iDisplayIndexFull + 1);
return nRow;
},
- "aaSorting" : [ [ 1, 'desc' ] ],
+ "aaSorting" : [ [ 3, 'desc' ] ],
"bDestroy" : true
});
-
-}
\ No newline at end of file
+ oTable.fnSetFilteringDelay(200);
+}
Modified: oozie/trunk/webapp/src/main/webapp/console/sla/oozie-sla.html
URL: http://svn.apache.org/viewvc/oozie/trunk/webapp/src/main/webapp/console/sla/oozie-sla.html?rev=1496515&r1=1496514&r2=1496515&view=diff
==============================================================================
--- oozie/trunk/webapp/src/main/webapp/console/sla/oozie-sla.html (original)
+++ oozie/trunk/webapp/src/main/webapp/console/sla/oozie-sla.html Tue Jun 25 15:14:18 2013
@@ -70,7 +70,7 @@
<label><span class="OR">(or)</span></label>
<label>JobId: <input type="text" id ="job_id" ><br></label>
</div>
- <label><span class="NominalStart">Nominal Time Range (UTC) - From: <input id="startDate"></span></label>
+ <label><span class="NominalStart">Nominal Time Range (GMT) - From: <input id="startDate"></span></label>
<label>To: </label><input id="endDate">
<button id="search" class="search-button"><span class="search-span">Search</span></button>
</div>
@@ -94,8 +94,8 @@
<th id="sla_table_ee">Expected End</th>
<th id="sla_table_ae">Actual End</th>
<th>End Missed By</th>
- <th>Expected Duration (in mins)</th>
- <th>Actual Duration (in mins)</th>
+ <th>Expected Duration</th>
+ <th>Actual Duration</th>
<th>Duration Missed By</th>
<th>SLA Misses</th>
<th>Job Status</th>
@@ -121,4 +121,4 @@
</div>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: oozie/trunk/webapp/src/main/webapp/oozie-console.js
URL: http://svn.apache.org/viewvc/oozie/trunk/webapp/src/main/webapp/oozie-console.js?rev=1496515&r1=1496514&r2=1496515&view=diff
==============================================================================
--- oozie/trunk/webapp/src/main/webapp/oozie-console.js (original)
+++ oozie/trunk/webapp/src/main/webapp/oozie-console.js Tue Jun 25 15:14:18 2013
@@ -551,6 +551,8 @@ function jobDetailsPopup(response, reque
frame : true,
labelAlign : 'right',
labelWidth : 70,
+ height: 350,
+ width: 540,
items : urlUnit
};
if (actionStatus.type == "pig" || actionStatus.type == "hive" || actionStatus.type == "map-reduce") {