Fixed a big performance issue
parent
ffec7edf96
commit
c5068c507e
|
@ -6,7 +6,8 @@
|
|||
"scripts": {
|
||||
"start": "set ENV=development & electron .",
|
||||
"server": "babel-node server.js",
|
||||
"build": "webpack --config webpack.config.production.js && electron-packager . Bloodhound --platform=all --arch=all --overwrite --prune"
|
||||
"build": "webpack --config webpack.config.production.js && electron-packager . Bloodhound --platform=all --arch=all --overwrite --prune",
|
||||
"winbuild": "webpack --config webpack.config.production.js && electron-packager . Bloodhound --platform=win32 --arch=all --overwrite --prune"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
|
|
|
@ -170,7 +170,7 @@ export default class GroupNodeData extends Component {
|
|||
value={this.state.sessions}
|
||||
click={function(){
|
||||
emitter.emit('query', "MATCH (n:User), (m:Group {name: '{}'}), p=allShortestPaths((n)-[r:MemberOf*1..]->(m)) WITH n,m,r MATCH (n)-[s:HasSession]-(o:Computer) RETURN m,n,r,o,s".format(this.state.label),
|
||||
this.state.label)
|
||||
"",this.state.label)
|
||||
}.bind(this)} />
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
|
@ -123,7 +123,7 @@ body {
|
|||
top: 1em;
|
||||
left: 1em;
|
||||
overflow: visible;
|
||||
width: 45%;
|
||||
width: 52%;
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 358 KiB |
|
@ -42,26 +42,32 @@ export function setNodeData(sigmaInstance, startLabel, endLabel){
|
|||
|
||||
if (node.neo4j_data.name === startLabel){
|
||||
appStore.startNode = node;
|
||||
node.glyphs.push({
|
||||
'position': 'bottom-right',
|
||||
'font': 'FontAwesome',
|
||||
'content': '\uF21D',
|
||||
'fillColor': '#3399FF',
|
||||
'fontScale': 1.5
|
||||
})
|
||||
}
|
||||
|
||||
if (node.neo4j_data.name === endLabel){
|
||||
appStore.endNode = node;
|
||||
node.glyphs.push({
|
||||
'position': 'bottom-right',
|
||||
'font': 'FontAwesome',
|
||||
'fillColor': '#990000',
|
||||
'content': '\uF05B',
|
||||
'fontScale': 1.5
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
if (appStore.startNode !== null){
|
||||
appStore.startNode.glyphs.push({
|
||||
'position': 'bottom-right',
|
||||
'font': 'FontAwesome',
|
||||
'content': '\uF21D',
|
||||
'fillColor': '#3399FF',
|
||||
'fontScale': 1.5
|
||||
})
|
||||
}
|
||||
|
||||
if (appStore.endNode !== null){
|
||||
appStore.endNode.glyphs.push({
|
||||
'position': 'bottom-right',
|
||||
'font': 'FontAwesome',
|
||||
'fillColor': '#990000',
|
||||
'content': '\uF05B',
|
||||
'fontScale': 1.5
|
||||
})
|
||||
}
|
||||
return sigmaInstance
|
||||
}
|
||||
|
||||
|
@ -102,12 +108,12 @@ export function collapseEdgeNodes(sigmaInstance){
|
|||
node.folded.edges.push(edge)
|
||||
appStore.spotlightData[anode.id] = [anode.neo4j_data.name, node.id, node.neo4j_data.name];
|
||||
sigmaInstance.graph.dropNode(anode.id);
|
||||
node.glyphs.push({
|
||||
'position': 'bottom-left',
|
||||
'content': node.folded.nodes.length
|
||||
})
|
||||
}
|
||||
});
|
||||
node.glyphs.push({
|
||||
'position': 'bottom-left',
|
||||
'content': node.folded.nodes.length
|
||||
})
|
||||
})
|
||||
|
||||
return sigmaInstance
|
||||
|
|
Loading…
Reference in New Issue