diff --git a/package.json b/package.json index 1e5f9de..cb3315c 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/src/components/SearchContainer/Tabs/GroupNodeData.jsx b/src/components/SearchContainer/Tabs/GroupNodeData.jsx index 9905768..d8150b7 100644 --- a/src/components/SearchContainer/Tabs/GroupNodeData.jsx +++ b/src/components/SearchContainer/Tabs/GroupNodeData.jsx @@ -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)} /> diff --git a/src/css/styles.css b/src/css/styles.css index 3bf9e20..db364f2 100644 --- a/src/css/styles.css +++ b/src/css/styles.css @@ -123,7 +123,7 @@ body { top: 1em; left: 1em; overflow: visible; - width: 45%; + width: 52%; background-color: white; } } diff --git a/src/img/loading.gif b/src/img/loading.gif new file mode 100644 index 0000000..fe89ab2 Binary files /dev/null and b/src/img/loading.gif differ diff --git a/src/js/utils.js b/src/js/utils.js index 945f56f..b87f8b3 100644 --- a/src/js/utils.js +++ b/src/js/utils.js @@ -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