diff --git a/ChangeLog.md b/ChangeLog.md index 26823d30..9e54a90f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -3,8 +3,11 @@ Starting with v1.31.6, this file will contain a record of major features and updates made in each release of graph-notebook. ## Upcoming +- Improved the `%stream_viewer` magic to show the commit timestamp and `isLastOp` information, + if available. Also added additional hover (help) text to the stream viewer. ([Link to PR](https://github.com/aws/graph-notebook/pull/311)) - Added `--max-content-length` option to `%%gremlin` ([Link to PR](https://github.com/aws/graph-notebook/pull/305)) + ## Release 3.4.1 (June 7, 2022) - Identity Graph - ETL notebook ([Link to PR](https://github.com/aws/graph-notebook/pull/288)) - Path: 03-Identity-Graphs>03-Jumpstart-Identity-Graphs-Using-Canonical-Model-and-ETL diff --git a/src/graph_notebook/magics/streams.py b/src/graph_notebook/magics/streams.py index 2fc395c5..67739c86 100644 --- a/src/graph_notebook/magics/streams.py +++ b/src/graph_notebook/magics/streams.py @@ -2,9 +2,11 @@ import json import ipywidgets as widgets import queue +from datetime import datetime from IPython.display import display, HTML from graph_notebook.neptune.client import STREAM_AT, STREAM_AFTER, STREAM_TRIM, STREAM_EXCEPTION_NOT_FOUND,\ - STREAM_EXCEPTION_NOT_ENABLED, STREAM_PG, STREAM_RDF, STREAM_ENDPOINTS + STREAM_EXCEPTION_NOT_ENABLED, STREAM_PG, STREAM_RDF, STREAM_ENDPOINTS,\ + STREAM_COMMIT_TIMESTAMP, STREAM_IS_LASTOP class EventId: @@ -176,30 +178,48 @@ def show_records(self, records): html = '''
Tx/Op# | -Operation | -Data | +Tx/Op# | +Operation | +LastOp | +Data |
---|---|---|---|---|---|---|
{} | '.format(commit_num) + html += '||||||
{}'.format(commit_num) + if timestamp != None: + html += ' Timestamp = {}'.format(timestamp) + html += ' ( {} UTC )'.format(utc_text) + html += ' | ' html += '||||||
{} | -{} | -{} | ||||
{} | +{} | +{} | +{} |