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 !")}})};
\ 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(n){vars=this;this.sessionId||$.ajax({url:this.server+"/icat/session",data:{json:JSON.stringify(this.connection)},type:"post",dataType:"json",success:function(e){s.sessionId=e.sessionId,s.getByDOI(n)},error:function(){alert("Sorry, there was a problem!")}})},ICATClient.prototype.getByDOI=function(n){vars="select inv from Investigation inv where inv.doi='"+n+"' 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(s){console.log(s),void0!==s[0]?dust.render("esrf-landing-page",{investigation:s[0].Investigation,investigationUsers:s[0].Investigation.investigationUsers},function(n,s){$("#main").html(s)}):alert("The DOI number "+n+" was not found !")},error:function(){alert("Sorry, error while processing the DOI request !")}})};