Skip to content

Commit

Permalink
Merge pull request #132 from BloodHoundAD/UI-Update
Browse files Browse the repository at this point in the history
Object Properties Update
  • Loading branch information
rvazarkar authored Oct 10, 2017
2 parents 5b95a05 + 29e3e04 commit 60a68c4
Show file tree
Hide file tree
Showing 20 changed files with 2,940 additions and 2,683 deletions.
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<script src="node_modules/linkurious/dist/plugins.js" type="text/javascript"></script>
<script src="node_modules/dagre/dist/dagre.min.js" type="text/javascript"></script>
<script src="node_modules/bootstrap-3-typeahead/bootstrap3-typeahead.min.js" type="text/javascript"></script>
<script src="src/js/papaparse.min.js" type="text/javascript"></script>
<script src="src/js/simple-slider.min.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="src/css/simple-slider.css">
<link type="text/css" rel="stylesheet" href="src/css/simple-slider-volume.css">
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"babel": {
"presets": [
"es2015",
"env",
"stage-0",
"react"
]
Expand All @@ -38,7 +38,7 @@
"babel-core": "^6.22.1",
"babel-loader": "^7.0.0",
"babel-polyfill": "^6.22.0",
"babel-preset-es2015": "^6.22.0",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.22.0",
"babel-preset-stage-0": "^6.22.0",
"concurrently": "^3.1.0",
Expand All @@ -56,15 +56,16 @@
"configstore": "^3.1.0",
"dagre": "^0.7.4",
"eventemitter2": "^4.1.0",
"fast-csv": "^2.4.1",
"jquery": "^3.2.1",
"linkurious": "^1.5.1",
"mustache": "^2.2.1",
"neo4j-driver": "^1.3.0",
"prop-types": "^15.5.10",
"neo4j-driver": "^1.4.1",
"react": "^15.4.2",
"react-bootstrap": "^0.31.0",
"react-dom": "^15.4.2",
"react-if": "^2.1.0",
"react-transition-group": "^1.1.3"
"react-transition-group": "^1.1.3",
"unzipper": "^0.8.9"
}
}
74 changes: 37 additions & 37 deletions src/components/Float/Alert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,46 @@ import React, { Component } from 'react';
import { Alert } from 'react-bootstrap';

export default class GenericAlert extends Component {
constructor(){
super()
this.state = {
visible: false,
text: "No data returned from query",
timeout: null
}
constructor(){
super();
this.state = {
visible: false,
text: "No data returned from query",
timeout: null
};

emitter.on('showAlert', this._show.bind(this))
emitter.on('hideAlert', this._dismiss.bind(this))
}
emitter.on('showAlert', this._show.bind(this));
emitter.on('hideAlert', this._dismiss.bind(this));
}

_dismiss(){
this.setState({visible: false});
}
_dismiss(){
this.setState({visible: false});
}

_show(val){
clearTimeout(this.state.timeout)
var t = setTimeout(function(){
this._dismiss()
}.bind(this), 2500)

this.setState({
visible: true,
text: val,
timeout: t
})
_show(val){
clearTimeout(this.state.timeout);
var t = setTimeout(function(){
this._dismiss();
}.bind(this), 2500);

}
this.setState({
visible: true,
text: val,
timeout: t
});

}

render() {
if (this.state.visible){
return (
<Alert className="alertdiv" bsStyle="danger" onDismiss={this._dismiss.bind(this)}>
{this.state.text}
</Alert>
)
}else{
return null
}
}
render() {
if (this.state.visible){
return (
<Alert className="alertdiv" bsStyle="danger" onDismiss={this._dismiss.bind(this)}>
{this.state.text}
</Alert>
);
}else{
return null;
}
}
}
Loading

0 comments on commit 60a68c4

Please sign in to comment.