in src/Explorer/Graph/GraphExplorerComponent/GraphExplorer.tsx [231:305]
public constructor(props: GraphExplorerProps) {
super(props);
this.state = {
isFilterGraphEmptyResult: false,
selectedRootId: null,
hasMoreRoots: false,
isTabsContentExpanded: false,
isBackendExecuting: false,
isPropertiesCollapsed: false,
highlightedNode: null,
possibleEdgeLabels: [],
nodePropertiesViewMode: NodeProperties.Mode.READONLY_PROP,
rootMap: {},
latestPartialQueries: [],
isNewVertexDisabled: false,
resultDisplay: ResultDisplay.None,
filterQueryError: null,
filterQueryWarning: null,
filterQueryStatus: FilterQueryStatus.NoResult,
change: null,
igraphConfigUiData: this.props.igraphConfigUiData,
igraphConfig: this.props.igraphConfig,
};
// Not part of React state
this.originalGraphData = new GraphData.GraphData();
this.outECache = new ArraysByKeyCache<EdgeVertexPair>(GraphExplorer.EDGE_VERTEX_CACHE_MAX_SIZE);
this.inECache = new ArraysByKeyCache<EdgeVertexPair>(GraphExplorer.EDGE_VERTEX_CACHE_MAX_SIZE);
this.edgeInfoCache = new EdgeInfoCache(GraphExplorer.VERTEX_CACHE_SIZE);
this.executeCounter = 0;
this.queryResultTabs = [
{
title: "JSON",
content: {
className: "graphJsonEditor graphTabContent",
render: () => this.renderResultAsJson(),
},
isVisible: () => true,
},
{
title: "Graph",
content: {
className: "graphTabContent",
render: () => this.renderResultAsGraph(),
},
isVisible: () => this.state.filterQueryStatus === FilterQueryStatus.GraphResult,
},
{
title: GraphExplorer.QUERY_STATS_BUTTON_LABEL,
content: {
className: "graphTabContent",
render: () => this.renderResultStats(),
},
isVisible: () => true,
},
];
this.queryRawData = null;
this.queryTotalRequestCharge = GraphExplorer.REQUEST_CHARGE_UNKNOWN_MSG;
this.isGraphAutoVizDisabled = LocalStorageUtility.hasItem(StorageKey.IsGraphAutoVizDisabled)
? LocalStorageUtility.getEntryBoolean(StorageKey.IsGraphAutoVizDisabled)
: false;
this.gremlinClient = new GremlinClient.GremlinClient();
if (this.props.graphBackendEndpoint) {
this.setGremlinParams();
}
props.onGraphAccessorCreated({
applyFilter: this.submitQuery.bind(this),
addVertex: this.addVertex.bind(this),
shareIGraphConfig: this.shareIGraphConfig.bind(this),
});
} // constructor