Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
7c340d4
ZEPPELIN-704 Display elapse time for long running paragraph
sagarkulkarni3592 Apr 28, 2016
4f64ada
ZEPPELIN-704 Display elapse time for long running paragraph - Right a…
sagarkulkarni3592 May 3, 2016
a991b07
ZEPPELIN-704 Aligned elapsed time message with took xx seconds message
sagarkulkarni3592 May 9, 2016
6248eac
Merge branch 'master' of https://github.com/sagarkulkarni3592/incubat…
sagarkulkarni3592 May 9, 2016
566da6a
ZEPPELIN-819 - Fixed the username from 'undefined' to 'anonymous'. Re…
sagarkulkarni3592 May 10, 2016
cb76ed5
Fixed "Text floats outside paragraph" issue in both "default" and "si…
sagarkulkarni3592 May 10, 2016
93dd602
Merge remote-tracking branch 'origin/master' into ZEPPELIN-704
sagarkulkarni3592 May 23, 2016
b18811f
Fixed the timezone difference using standard ISO time format. Added e…
sagarkulkarni3592 May 23, 2016
913515a
Corrected the compilation error.
sagarkulkarni3592 May 23, 2016
0d8a68a
Merge branch 'master' into ZEPPELIN-704
sagarkulkarni3592 May 24, 2016
52f2fed
Fixing build issue - Selenium test fail fixed.
sagarkulkarni3592 May 24, 2016
536835a
Fixed other build issues - Selenium test failures fixed.
sagarkulkarni3592 May 24, 2016
5a1cee9
Selenium test failure fixing.
sagarkulkarni3592 May 25, 2016
6e1a395
Removed function dateToString and made Moment.js call directly.
sagarkulkarni3592 May 25, 2016
192f3f7
Changed the elapsed time string to "Started xx seconds/minutes/hours …
sagarkulkarni3592 May 25, 2016
f912504
Corrected the mistake.
sagarkulkarni3592 May 25, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import com.google.common.base.Strings;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;

import org.apache.zeppelin.conf.ZeppelinConfiguration;
Expand Down Expand Up @@ -60,7 +61,8 @@ public class NotebookServer extends WebSocketServlet implements
NotebookSocketListener, JobListenerFactory, AngularObjectRegistryListener,
RemoteInterpreterProcessListener {
private static final Logger LOG = LoggerFactory.getLogger(NotebookServer.class);
Gson gson = new Gson();
Gson gson = new GsonBuilder()
.setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").create();
final Map<String, List<NotebookSocket>> noteSocketMap = new HashMap<>();
final Queue<NotebookSocket> connectedSockets = new ConcurrentLinkedQueue<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public void testSparkInterpreterDependencyLoading() throws Exception {
MAX_BROWSER_TIMEOUT_SEC);
String artifact = "org.apache.commons:commons-csv:1.1";
depArtifact.sendKeys(artifact);
driver.findElement(By.xpath("//div[contains(@class,'box')][contains(.,'spark')]//form//button[1]")).click();
driver.findElement(By.xpath("//div[contains(@class,'box')][contains(.,'%spark')]//form//button[1]")).click();
driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to update this interpreter and restart with new settings?')]" +
"//div[@class='modal-footer']//button[contains(.,'OK')]")).click();

Expand Down Expand Up @@ -240,7 +240,7 @@ public void testSparkInterpreterDependencyLoading() throws Exception {
WebElement testDepRemoveBtn = pollingWait(By.xpath("//tr[descendant::text()[contains(.,'" +
artifact + "')]]/td[3]/div"), MAX_IMPLICIT_WAIT);
testDepRemoveBtn.click();
driver.findElement(By.xpath("//div[contains(@class,'box')][contains(.,'spark')]//form//button[1]")).click();
driver.findElement(By.xpath("//div[contains(@class,'box')][contains(.,'%spark')]//form//button[1]")).click();
driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to update this interpreter and restart with new settings?')]" +
"//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
} catch (Exception e) {
Expand Down
3 changes: 2 additions & 1 deletion zeppelin-web/.jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"ace": false,
"d3": false,
"BootstrapDialog": false,
"Handsontable": false
"Handsontable": false,
"moment": false
}
}
12 changes: 8 additions & 4 deletions zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -971,18 +971,22 @@ angular.module('zeppelinWebApp')
return '';
}
var user = 'anonymous';
var authInfo = pdata.authenticationInfo;
if (authInfo && authInfo.user) {
if (pdata.authenticationInfo !== null && !isEmpty(pdata.authenticationInfo.user)) {
user = pdata.authenticationInfo.user;
}
var dateUpdated = (pdata.dateUpdated === null) ? 'unknown' : pdata.dateUpdated;
var desc = 'Took ' + (timeMs/1000) + ' seconds. Last updated by ' + user + ' at time ' + dateUpdated + '.';
var desc = 'Took ' +
moment.duration(moment(pdata.dateFinished).diff(moment(pdata.dateStarted))).humanize() +
'. Last updated by ' + user + ' at ' + moment(pdata.dateUpdated).format('MMMM DD YYYY, h:mm:ss A') + '.';
if ($scope.isResultOutdated()){
desc += ' (outdated)';
}
return desc;
};

$scope.getElapsedTime = function() {
return 'Started ' + moment($scope.paragraph.dateStarted).fromNow() + '.';
};

$scope.isResultOutdated = function() {
var pdata = $scope.paragraph;
if (pdata.dateUpdated !==undefined && Date.parse(pdata.dateUpdated) > Date.parse(pdata.dateStarted)){
Expand Down
8 changes: 5 additions & 3 deletions zeppelin-web/src/app/notebook/paragraph/paragraph.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ table.dataTable.table-condensed .sorting_desc:after {
border: 3px solid #DDDDDD;
}

.paragraph .paragraphFooter {
height: 9px;
.paragraph .executionTime {
color: #999;
font-size: 10px;
font-family: 'Roboto', sans-serif;
}

.paragraph .executionTime {
.paragraph .elapsedTime {
color: #999;
font-size: 10px;
font-family: 'Roboto', sans-serif;
Expand Down
6 changes: 6 additions & 0 deletions zeppelin-web/src/app/notebook/paragraph/paragraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,11 @@
id="{{paragraph.id}}_executionTime"
class="executionTime" ng-bind-html="getExecutionTime()">
</div>
<div ng-if = "paragraph.status === 'RUNNING'" class = "paragraphFooterElapsed">
<div
id="{{paragraph.id}}_elapsedTime"
class="elapsedTime" ng-bind-html="getElapsedTime()">
</div>
</div>
</div>
</div>
15 changes: 13 additions & 2 deletions zeppelin-web/src/assets/styles/looknfeel/simple.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ body {

.paragraph .paragraphFooter {
visibility: hidden;
height: 0;
position: relative;
top : -13px;
top : -9px;
z-index: 99;
}

.paragraph .paragraphFooterElapsed {
height: 0px;
float: right;
z-index: 99;
}

Expand All @@ -67,6 +72,12 @@ body {
margin-right: 5px;
}

.paragraph .elapsedTime {
font-size: 8px;
text-align: right;
margin-right: 5px;
}

.paragraph:hover .paragraphFooter {
visibility: visible;
}
Expand Down