Skip to content

Commit da3fe1a

Browse files
authored
Revert Gremlin console tab to single results column (#330)
* Revert Gremlin console tab to single results column * Remove test code * Update Changelog Co-authored-by: Michael Chin <chnmch@amazon.com>
1 parent d3fa7a5 commit da3fe1a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Starting with v1.31.6, this file will contain a record of major features and updates made in each release of graph-notebook.
44

55
## Upcoming
6+
- Reverted Gremlin console tab to single results column ([Link to PR](https://github.com/aws/graph-notebook/pull/330))
7+
- Bumped jquery-ui from 1.13.1 to 1.13.2 (([Link to PR](https://github.com/aws/graph-notebook/pull/328))
68

79
## Release 3.5.1 (July 12, 2022)
810
- Improved the `%stream_viewer` magic to show the commit timestamp and `isLastOp` information,

src/graph_notebook/magics/graph_magic.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
DEFAULT_PAGINATION_OPTIONS = [10, 25, 50, 100, -1]
7171
DEFAULT_PAGINATION_MENU = [10, 25, 50, 100, "All"]
7272
opt.order = []
73+
opt.maxBytes = 0
7374

7475
logging.basicConfig()
7576
root_logger = logging.getLogger()
@@ -700,6 +701,7 @@ def gremlin(self, line, cell, local_ns: dict = None):
700701
gremlin_metadata = build_gremlin_metadata_from_query(query_type='query', results=query_res,
701702
query_time=query_time)
702703
titles.append('Console')
704+
703705
try:
704706
logger.debug(f'groupby: {args.group_by}')
705707
logger.debug(f'display_property: {args.display_property}')
@@ -738,10 +740,11 @@ def gremlin(self, line, cell, local_ns: dict = None):
738740
# If not, then render our own HTML template.
739741
results_df = pd.DataFrame(query_res)
740742
if not results_df.empty:
741-
if (isinstance(query_res[0], dict) and len(results_df.columns) > len(query_res[0])) or \
742-
isinstance(query_res[0], list):
743-
query_res = [[result] for result in query_res]
744-
results_df = pd.DataFrame(query_res)
743+
query_res = [[result] for result in query_res]
744+
query_res.append([{'__DUMMY_KEY__': ['DUMMY_VALUE']}])
745+
results_df = pd.DataFrame(query_res)
746+
results_df.drop(results_df.index[-1], inplace=True)
747+
query_res.pop()
745748
results_df.insert(0, "#", range(1, len(results_df) + 1))
746749
if len(results_df.columns) == 2 and int(results_df.columns[1]) == 0:
747750
results_df.rename({results_df.columns[1]: 'Result'}, axis='columns', inplace=True)

0 commit comments

Comments
 (0)