functionICATClient(){this.server="https://icat.esrf.fr",this.sessionId=null,this.connection={plugin:"db",credentials:[{username:"reader",password:"reader"}]}}ICATClient.prototype.connect=function(e){vars=this;this.sessionId||$.ajax({url:this.server+"/icat/session",data:{json:JSON.stringify(this.connection)},type:"post",dataType:"json",success:function(n){s.sessionId=n.sessionId,s.getByDOI(e)},error:function(){alert("Sorry, there was a problem!")}})},ICATClient.prototype.getByDOI=function(e){vars="select inv from Investigation inv where inv.name='"+e+"' INCLUDE inv.investigationInstruments invInstruments, inv.investigationUsers invUser, invUser.user, invInstruments.instrument";$.ajax({url:this.server+"/icat/entityManager",data:{sessionId:this.sessionId,server:this.server,query:s},type:"GET",dataType:"json",success:function(e){console.log(e),dust.render("esrf-landing-page",{investigation:e[0].Investigation,investigationUsers:e[0].Investigation.investigationUsers},function(e,s){$("#main").html(s)})},error:function(){alert("Sorry, error while processing the DOI request !")}})};
\ No newline at end of file
functionICATClient(){this.server="https://linfalcon.esrf.fr:8181",this.sessionId=null,this.connection={plugin:"simple",credentials:[{username:"root",password:"root"}]}}ICATClient.prototype.connect=function(s){varn=this;this.sessionId||$.ajax({url:this.server+"/icat/session",data:{json:JSON.stringify(this.connection)},type:"post",dataType:"json",success:function(e){n.sessionId=e.sessionId,n.getByDOI(s)},error:function(){alert("Sorry, there was a problem!")}})},ICATClient.prototype.getByDOI=function(s){varn="select inv from Investigation inv where inv.doi='"+s+"' INCLUDE inv.investigationInstruments invInstruments, inv.investigationUsers invUser, invUser.user, invInstruments.instrument";$.ajax({url:this.server+"/icat/entityManager",data:{sessionId:this.sessionId,server:this.server,query:n},type:"GET",dataType:"json",success:function(s){console.log(s),dust.render("esrf-landing-page",{investigation:s[0].Investigation,investigationUsers:s[0].Investigation.investigationUsers},function(s,n){$("#main").html(n)})},error:function(){alert("Sorry, error while processing the DOI request !")}})};
varquery="select inv from Investigation inv where inv.name='"+doi+"' INCLUDE inv.investigationInstruments invInstruments, inv.investigationUsers invUser, invUser.user, invInstruments.instrument";
varquery="select inv from Investigation inv where inv.doi='"+doi+"' INCLUDE inv.investigationInstruments invInstruments, inv.investigationUsers invUser, invUser.user, invInstruments.instrument";