parent
0a075a8511
commit
3ed770fe54
|
@ -252,7 +252,8 @@ export default class Login extends Component {
|
|||
driver.close();
|
||||
global.driver = neo4j.driver(
|
||||
this.state.url,
|
||||
neo4j.auth.basic(this.state.user, this.state.password)
|
||||
neo4j.auth.basic(this.state.user, this.state.password),
|
||||
{disableLosslessIntegers: true}
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -744,7 +744,7 @@ export default class GraphContainer extends Component {
|
|||
field,
|
||||
function(_, value) {
|
||||
if (value !== null) {
|
||||
let id = value.identity.low;
|
||||
let id = value.identity;
|
||||
if (value.end && !edges.id) {
|
||||
edges[
|
||||
id
|
||||
|
@ -763,7 +763,7 @@ export default class GraphContainer extends Component {
|
|||
}.bind(this)
|
||||
);
|
||||
} else {
|
||||
let id = field.identity.low;
|
||||
let id = field.identity;
|
||||
if (field.end && !edges.id) {
|
||||
edges[id] = this.createEdgeFromRow(
|
||||
field
|
||||
|
@ -813,10 +813,10 @@ export default class GraphContainer extends Component {
|
|||
}
|
||||
|
||||
createEdgeFromRow(data) {
|
||||
var id = data.identity.low;
|
||||
var id = data.identity;
|
||||
var type = data.type;
|
||||
var source = data.start.low;
|
||||
var target = data.end.low;
|
||||
var source = data.start;
|
||||
var target = data.end;
|
||||
|
||||
var edge = {
|
||||
id: id,
|
||||
|
@ -837,12 +837,12 @@ export default class GraphContainer extends Component {
|
|||
}
|
||||
|
||||
createNodeFromRow(data, params) {
|
||||
var id = data.identity.low;
|
||||
var id = data.identity;
|
||||
var type = data.labels[0];
|
||||
var label = data.properties.name;
|
||||
var guid = data.properties.guid;
|
||||
|
||||
if (label == null) {
|
||||
if (label === null) {
|
||||
label = guid;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,14 +67,14 @@ export default class DatabaseDataDisplay extends Component {
|
|||
"MATCH (n:User) WHERE NOT n.name ENDS WITH '$' RETURN count(n)"
|
||||
).then(
|
||||
result => {
|
||||
this.setState({ num_users: result.records[0]._fields[0].low });
|
||||
this.setState({ num_users: result.records[0]._fields[0] });
|
||||
s1.close();
|
||||
}
|
||||
);
|
||||
|
||||
s2.run("MATCH (n:Group) RETURN count(n)").then(
|
||||
result => {
|
||||
this.setState({ num_groups: result.records[0]._fields[0].low });
|
||||
this.setState({ num_groups: result.records[0]._fields[0] });
|
||||
s2.close();
|
||||
}
|
||||
);
|
||||
|
@ -82,7 +82,7 @@ export default class DatabaseDataDisplay extends Component {
|
|||
s3.run("MATCH (n:Computer) RETURN count(n)").then(
|
||||
result => {
|
||||
this.setState({
|
||||
num_computers: result.records[0]._fields[0].low
|
||||
num_computers: result.records[0]._fields[0]
|
||||
});
|
||||
s3.close();
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ export default class DatabaseDataDisplay extends Component {
|
|||
s4.run("MATCH ()-[r:HasSession]->() RETURN count(r)").then(
|
||||
result => {
|
||||
this.setState({
|
||||
num_sessions: result.records[0]._fields[0].low
|
||||
num_sessions: result.records[0]._fields[0]
|
||||
});
|
||||
s4.close();
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ export default class DatabaseDataDisplay extends Component {
|
|||
|
||||
s6.run("MATCH ()-[r {isacl: true}]->() RETURN count(r)").then(
|
||||
result => {
|
||||
this.setState({ num_acls: result.records[0]._fields[0].low });
|
||||
this.setState({ num_acls: result.records[0]._fields[0] });
|
||||
s6.close();
|
||||
}
|
||||
);
|
||||
|
@ -107,7 +107,7 @@ export default class DatabaseDataDisplay extends Component {
|
|||
s5.run("MATCH ()-[r]->() RETURN count(r)").then(
|
||||
result => {
|
||||
this.setState({
|
||||
num_relationships: result.records[0]._fields[0].low
|
||||
num_relationships: result.records[0]._fields[0]
|
||||
});
|
||||
s5.close();
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ export default class DomainNodeData extends Component {
|
|||
name: payload
|
||||
}).then(
|
||||
function(result) {
|
||||
this.setState({ users: result.records[0]._fields[0].low });
|
||||
this.setState({ users: result.records[0]._fields[0] });
|
||||
s1.close();
|
||||
}.bind(this)
|
||||
);
|
||||
|
@ -109,7 +109,7 @@ export default class DomainNodeData extends Component {
|
|||
name: payload
|
||||
}).then(
|
||||
function(result) {
|
||||
this.setState({ groups: result.records[0]._fields[0].low });
|
||||
this.setState({ groups: result.records[0]._fields[0] });
|
||||
s2.close();
|
||||
}.bind(this)
|
||||
);
|
||||
|
@ -118,7 +118,7 @@ export default class DomainNodeData extends Component {
|
|||
name: payload
|
||||
}).then(
|
||||
function(result) {
|
||||
this.setState({ computers: result.records[0]._fields[0].low });
|
||||
this.setState({ computers: result.records[0]._fields[0] });
|
||||
s3.close();
|
||||
}.bind(this)
|
||||
);
|
||||
|
@ -127,7 +127,7 @@ export default class DomainNodeData extends Component {
|
|||
name: payload
|
||||
}).then(
|
||||
function(result) {
|
||||
this.setState({ ous: result.records[0]._fields[0].low });
|
||||
this.setState({ ous: result.records[0]._fields[0] });
|
||||
s4.close();
|
||||
}.bind(this)
|
||||
);
|
||||
|
@ -136,7 +136,7 @@ export default class DomainNodeData extends Component {
|
|||
name: payload
|
||||
}).then(
|
||||
function(result) {
|
||||
this.setState({ gpos: result.records[0]._fields[0].low });
|
||||
this.setState({ gpos: result.records[0]._fields[0] });
|
||||
s5.close();
|
||||
}.bind(this)
|
||||
);
|
||||
|
|
|
@ -36,7 +36,7 @@ export default class NodeCypherLink extends Component {
|
|||
session.run(query, { name: newProps.target, domain: domain }).then(
|
||||
function(result) {
|
||||
this.setState({
|
||||
value: result.records[0]._fields[0].low,
|
||||
value: result.records[0]._fields[0],
|
||||
ready: true
|
||||
});
|
||||
}.bind(this)
|
||||
|
|
|
@ -30,7 +30,7 @@ export default class NodeCypherLinkComplex extends Component {
|
|||
session.run(query, { name: newProps.target, domain: domain }).then(
|
||||
function(result) {
|
||||
this.setState({
|
||||
value: result.records[0]._fields[0].low,
|
||||
value: result.records[0]._fields[0],
|
||||
ready: true
|
||||
});
|
||||
}.bind(this)
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
import React, { Component } from "react";
|
||||
|
||||
export default class NodePropItem extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
isArray(object) {
|
||||
return (
|
||||
object && typeof object === "object" && object.constructor === Array
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
var val;
|
||||
var obj = this.props.keyValue;
|
||||
if (obj.hasOwnProperty("low")) {
|
||||
return [<dt>{this.props.keyName}</dt>, <dd>{obj.low}</dd>];
|
||||
} else if (this.isArray(obj)) {
|
||||
console.log(obj);
|
||||
if (obj.length === 0) {
|
||||
return [<dt>{this.props.keyName}</dt>, <dd>None</dd>];
|
||||
} else {
|
||||
var elements = [];
|
||||
$.each(obj, function(_, prop) {
|
||||
elements.push(<dt />);
|
||||
elements.push(<dd>{prop}</dd>);
|
||||
});
|
||||
elements[0] = <dt>Service Principal Names</dt>;
|
||||
}
|
||||
|
||||
return elements;
|
||||
} else if (typeof obj === "boolean") {
|
||||
return [
|
||||
<dt>{this.props.keyName}</dt>,
|
||||
<dd>{this.props.keyValue.toString().toTitleCase()}</dd>
|
||||
];
|
||||
} else {
|
||||
return [
|
||||
<dt>{this.props.keyName}</dt>,
|
||||
<dd>{this.props.keyValue.toString()}</dd>
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
|
@ -131,7 +131,7 @@ function deleteSessions() {
|
|||
.then(function(results) {
|
||||
session.close();
|
||||
emitter.emit("refreshDBData");
|
||||
var count = results.records[0]._fields[0].low;
|
||||
var count = results.records[0]._fields[0];
|
||||
if (count === 0) {
|
||||
emitter.emit("hideDBClearModal");
|
||||
} else {
|
||||
|
@ -152,7 +152,7 @@ function deleteEdges() {
|
|||
.then(function(results) {
|
||||
emitter.emit("refreshDBData");
|
||||
session.close();
|
||||
var count = results.records[0]._fields[0].low;
|
||||
var count = results.records[0]._fields[0];
|
||||
if (count === 0) {
|
||||
deleteNodes();
|
||||
} else {
|
||||
|
@ -168,7 +168,7 @@ function deleteNodes() {
|
|||
.then(function(results) {
|
||||
emitter.emit("refreshDBData");
|
||||
session.close();
|
||||
var count = results.records[0]._fields[0].low;
|
||||
var count = results.records[0]._fields[0];
|
||||
if (count === 0) {
|
||||
grabConstraints();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue