Add two files of GraphExplorer component in Master (#365)

This commit is contained in:
Chris-MS-896 2021-01-08 21:14:53 -06:00 committed by GitHub
parent 76d7f00a90
commit 983c9201bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 8 deletions

View File

@ -413,13 +413,13 @@ export class GraphData<V extends GremlinVertex, E extends GremlinEdge> {
* @param node
* @param prop
*/
public static getNodePropValue(node: D3Node, prop: string): string | number | boolean {
public static getNodePropValue(node: D3Node, prop: string): undefined | string | number | boolean {
if (node.hasOwnProperty(prop)) {
return (node as any)[prop];
}
// This is DocDB specific
if (node.hasOwnProperty("properties") && node.properties.hasOwnProperty(prop)) {
if (node.properties && node.properties.hasOwnProperty(prop)) {
return node.properties[prop][0]["value"];
}
@ -496,7 +496,7 @@ export class GraphData<V extends GremlinVertex, E extends GremlinEdge> {
* Get list of children ids of a given vertex
* @param vertex
*/
private static getChildrenId(vertex: GremlinVertex): string[] {
public static getChildrenId(vertex: GremlinVertex): string[] {
const ids = <any>{}; // HashSet
if (vertex.hasOwnProperty("outE")) {
let outE = vertex.outE;

View File

@ -1,14 +1,14 @@
import { Observable, of } from "rxjs";
import { AjaxResponse } from "rxjs/ajax";
import { ServerConfig } from "rx-jupyter";
import { AjaxRequest, AjaxResponse } from "rxjs/ajax";
import { ServerConfig } from "@nteract/types";
let fakeAjaxResponse: AjaxResponse = {
originalEvent: undefined,
originalEvent: <Event>(<unknown>undefined),
xhr: new XMLHttpRequest(),
request: null,
request: <AjaxRequest>(<unknown>null),
status: 200,
response: {},
responseText: null,
responseText: "",
responseType: "json"
};
export const sessions = {

View File

@ -47,6 +47,9 @@
"./src/Explorer/Controls/InputTypeahead/InputTypeahead.ts",
"./src/Explorer/Controls/SmartUi/InputUtils.ts",
"./src/Explorer/Graph/GraphExplorerComponent/__mocks__/GremlinClient.ts",
"./src/Explorer/Graph/GraphExplorerComponent/EdgeInfoCache.ts",
"./src/Explorer/Graph/GraphExplorerComponent/GraphData.ts",
"./src/Explorer/Notebook/NotebookComponent/__mocks__/rx-jupyter.ts",
"./src/Explorer/Notebook/FileSystemUtil.ts",
"./src/Explorer/Notebook/NTeractUtil.ts",
"./src/Explorer/Notebook/NotebookComponent/actions.ts",