Close transactions when leaving your current tab

master
Rohan Vazarkar 2017-05-16 15:10:59 -04:00
parent 72eb03b3c7
commit 186fb416c2
3 changed files with 23 additions and 4 deletions

View File

@ -17,13 +17,17 @@ export default class DomainNodeData extends Component {
firstDegreeOutboundTrusts: -1,
effectiveOutboundTrusts: -1,
firstDegreeInboundTrusts: -1,
effectiveInboundTrusts: -1
effectiveInboundTrusts: -1,
driversessions: []
}
emitter.on('domainNodeClicked', this.getNodeData.bind(this));
}
getNodeData(payload){
$.each(this.state.driversessions, function(index, record){
record.close();
})
this.setState({
label: payload,
users: -1,
@ -100,6 +104,8 @@ export default class DomainNodeData extends Component {
this.setState({'effectiveOutboundTrusts':result.records[0]._fields[0].low})
s9.close()
}.bind(this))
this.setState({'driversessions': [s1,s2,s3,s4,s5,s6,s7,s8,s9]})
}
render() {

View File

@ -23,13 +23,18 @@ export default class GroupNodeData extends Component {
transitiveControl: -1,
firstDegreeControllers: -1,
unrolledControllers: -1,
transitiveControllers: -1
transitiveControllers: -1,
driversessions: []
}
emitter.on('groupNodeClicked', this.getNodeData.bind(this));
}
getNodeData(payload){
$.each(this.state.driversessions, function(index, record){
record.close();
})
this.setState({
label: payload,
directMembers: -1,
@ -163,7 +168,8 @@ export default class GroupNodeData extends Component {
this.setState({'transitiveControllers':result.records[0]._fields[0].low})
s7.close()
}.bind(this))
this.setState({'driversessions': [s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16]})
}
render() {

View File

@ -23,13 +23,18 @@ export default class UserNodeData extends Component {
transitiveControllers: -1,
firstdegreeControl: -1,
unrolledControl: -1,
transitiveControl: -1
transitiveControl: -1,
driversessions : []
}
emitter.on('userNodeClicked', this.getNodeData.bind(this));
}
getNodeData(payload){
$.each(this.state.driversessions,function(index, record){
record.close();
})
this.setState({
label: payload,
samAccountName: "None",
@ -143,6 +148,8 @@ export default class UserNodeData extends Component {
this.setState({'transitiveControl':result.records[0]._fields[0].low})
s13.close()
}.bind(this))
this.setState({'driversessions': [s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13]})
}
render() {