Commit 35090e17 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸
Browse files

login fix

parent 9cd76db2
......@@ -22059,7 +22059,7 @@ var Heatmap = (function () {
type: 'json',
method: 'get',
success: function (userlangdomain) {
if (!userlangdomain.user.admin) {
if (!userlangdomain.user || !userlangdomain.user.admin) {
window.location.href = "../";
}
var filter = {
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -219,7 +219,7 @@ var Heatmap = (function () {
type: 'json',
method: 'get',
success: function (userlangdomain) {
if (!userlangdomain.user.admin) {
if (!userlangdomain.user || !userlangdomain.user.admin) {
window.location.href = "../";
}
var filter = {
......
{"version":3,"sources":["statistic.js"],"names":["Heatmap","parent","options","self","this","url","domain","lang","langdata","langData","container","document","getElementById","classList","add","mainArticle","L","DomUtil","create","textContent","mainArticleMeta","form","onsubmit","e","preventDefault","stopPropagation","fieldset","datetimeFormat","dateFormat","timeFormat","periodRowDiv","fromDiv","fromDateInput","type","placeholder","value","moment","utc","startOf","subtract","format","fromTimeInput","splitDiv","style","left","toDiv","toDateInput","toTimeInput","mapDiv","createElement","id","width","height","appendChild","pos","map","setView","tileLayer","maxZoom","attribution","addTo","cfg","radius","maxOpacity","scaleRadius","useLocalExtrema","latField","lngField","valueField","layer","HeatmapOverlay","onchange","evt","show","padmwsTableDiv","padmwsTableElement","createDataTable","padmwstotal","padmwsparams","scrollY","scrollCollapse","columnDefs","className","targets","columns","data","class","select","info","paging","ordering","searching","footerCallback","row","start","end","display","api","column","reduce","a","b","parseInt","$","footer","html","padmwsTable","DataTable","stwTableDiv","stwTableElement","stwtotal","stwparams","stwTable","UIkit","ready","datepicker","timepicker","prototype","jsonToQueryString","json","keys","Object","query","i","length","key","j","push","join","setData","max","reqwest","method","success","userlangdomain","user","admin","window","location","href","filter","from","to","name","ajax","load","table","thead","thh","tfoot","thf","addth","txt","th","createTextNode","Toplist"],"mappings":";;AAKA,GAAIA,SAAW,WACX,QAASA,GAAQC,EAAQC,GACrB,GAA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ClBJ,EAAM7F,YAAY8F,GAClBD,EAAM7F,YAAYgG,GAClBH,EAAMhE,UAAY,UACXgE,GAEJlJ,KAGP2J,QAAW,WACX,QAASA,MAET,MAAOA","file":"statistic.min.js"}
\ No newline at end of file
{"version":3,"sources":["statistic.js"],"names":["Heatmap","parent","options","self","this","url","domain","lang","langdata","langData","container","document","getElementById","classList","add","mainArticle","L","DomUtil","create","textContent","mainArticleMeta","form","onsubmit","e","preventDefault","stopPropagation","fieldset","datetimeFormat","dateFormat","timeFormat","periodRowDiv","fromDiv","fromDateInput","type","placeholder","value","moment","utc","startOf","subtract","format","fromTimeInput","splitDiv","style","left","toDiv","toDateInput","toTimeInput","mapDiv","createElement","id","width","height","appendChild","pos","map","setView","tileLayer","maxZoom","attribution","addTo","cfg","radius","maxOpacity","scaleRadius","useLocalExtrema","latField","lngField","valueField","layer","HeatmapOverlay","onchange","evt","show","padmwsTableDiv","padmwsTableElement","createDataTable","padmwstotal","padmwsparams","scrollY","scrollCollapse","columnDefs","className","targets","columns","data","class","select","info","paging","ordering","searching","footerCallback","row","start","end","display","api","column","reduce","a","b","parseInt","$","footer","html","padmwsTable","DataTable","stwTableDiv","stwTableElement","stwtotal","stwparams","stwTable","UIkit","ready","datepicker","timepicker","prototype","jsonToQueryString","json","keys","Object","query","i","length","key","j","push","join","setData","max","reqwest","method","success","userlangdomain","user","admin","window","location","href","filter","from","to","name","ajax","load","table","thead","thh","tfoot","thf","addth","txt","th","createTextNode","Toplist"],"mappings":";;AAKA,GAAIA,SAAW,WACX,QAASA,GAAQC,EAAQC,GACrB,GAAIC,GAAOC,IACXD,GAAKE,IAAM,QACPH,IACIA,EAAQG,MACRD,KAAKC,IAAMH,EAAQG,KAEnBH,EAAQI,SACRF,KAAKE,OAASJ,EAAQI,QAE1BF,KAAKG,KAAO,KACRL,EAAQK,OACRH,KAAKG,KAAOL,EAAQK,MAEpBL,EAAQM,WACRJ,KAAKK,SAAWP,EAAQM,UAGhC,IAAIE,GAAYC,SA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,gBAAgBa,OAAO,KAClGlC,OAAQgI,EAAehI,OAAOyI,MAE9BrB,EAAQvH,EAAKmH,kBAAkBsB,EACnCT,UACI9H,IAAKF,EAAKE,IAAM,qBAAuBqH,EACvCzF,KAAM,OACNmG,OAAQ,MACRC,QAAS,SAAUhD,GACflF,EAAKkE,MAAM4D,QAAQ5C,GACnBlF,EAAK6G,SAASgC,KAAK3I,IAAIF,EAAKE,IAAM,yBAA2BqH,GAAOuB,OACpE9I,EAAKuG,YAAYsC,KAAK3I,IAAIF,EAAKE,IAAM,4BAA8BqH,GAAOuB,cAM9FjJ,EAAQqH,UAAUzC,gBAAkB,SAAU3E,GAC1C,GACIiJ,GAAQlI,EAAEC,QAAQC,OAAO,QAAS,GAAIjB,GACtCkJ,EAAQnI,EAAEC,QAAQC,OAAO,QAAS,IAClCkI,EAAMpI,EAAEC,QAAQC,OAAO,KAAM,IAC7BmI,EAAQrI,EAAEC,QAAQC,OAAO,QAAS,IAClCoI,EAAMtI,EAAEC,QAAQC,OAAO,KAAM,IAC7BqI,EAAQ,SAAUC,GAClB,GAAIC,GAAKzI,EAAEC,QAAQC,OAAO,KAAM,GAEhC,OADAuI,GAAGpG,YAAY1C,SAAS+I,eAAeF,IAChCC,EAaX,OAXAH,GAAIjG,YAAYkG,EAAM,UACtBH,EAAI/F,YAAYkG,EAAM,SACtBJ,EAAM9F,YAAY+F,GAClBC,EAAMhG,YAAYiG,GAClBA,EAAIjG,YAAYkG,EAAM,iBACtBH,EAAI/F,YAAYkG,EAAM,iBACtBJ,EAAM9F,YAAY+F,GAClBC,EAAMhG,YAAYiG,GAClBJ,EAAM7F,YAAY8F,GAClBD,EAAM7F,YAAYgG,GAClBH,EAAMhE,UAAY,UACXgE,GAEJlJ,KAGP2J,QAAW,WACX,QAASA,MAET,MAAOA","file":"statistic.min.js"}
\ No newline at end of file
/*! statistic 2017-09-05 */
/*! statistic 2017-10-25 */
var Heatmap=function(){function a(a,b){var c=this;c.url="/demo",b&&(b.url&&(this.url=b.url),b.domain&&(this.domain=b.domain),this.lang="en",b.lang&&(this.lang=b.lang),b.langdata&&(this.langData=b.langdata));var d=document.getElementById(a);d.classList.add("statistic"),d.classList.add("uk-container"),d.classList.add("uk-container-center"),d.classList.add("uk-margin-top");var e=L.DomUtil.create("article","uk-article",d);L.DomUtil.create("h1","uk-article",e).textContent="SeaTrackWeb Statistic";var f=L.DomUtil.create("p","uk-article-meta",e);f.textContent="Showing statistics from the PADM web service as well as the SeaTrackWeb client. ",f.textContent+="The heatmap represents simulation center points registered by the PADM web service within the given period. ",f.textContent+="Note that all statistics are affected by the selected period.",L.DomUtil.create("p","uk-article-lead",e).textContent="Selected period (UTC)";var g=L.DomUtil.create("form","uk-form uk-form-stacked",d);g.onsubmit=function(a){return a.preventDefault(),a.stopPropagation(),!1};var h=L.DomUtil.create("fieldset","",g);c.datetimeFormat="YYYY-MM-DD HH:mm",c.dateFormat="YYYY-MM-DD",c.timeFormat="HH:mm";var i=L.DomUtil.create("div","uk-form-row",h),j=L.DomUtil.create("div","uk-form-controls uk-form-icon",i);L.DomUtil.create("span","uk-icon-calendar",j);c.fromDateInput=L.DomUtil.create("input","uk-width-1-2",j),c.fromDateInput.type="text",c.fromDateInput.placeholder=c.dateFormat,c.fromDateInput.value=moment.utc().startOf("day").subtract(24,"hours").format(c.dateFormat),c.fromTimeInput=L.DomUtil.create("input","uk-width-1-2",j),c.fromTimeInput.type="text",c.fromTimeInput.value=moment.utc().format(c.timeFormat);var k=L.DomUtil.create("div","uk-form-controls uk-form-icon",i);k.textContent="-",k.style.left="-55px";var l=L.DomUtil.create("div","uk-form-controls uk-form-icon",i);L.DomUtil.create("span","uk-icon-calendar",l);c.toDateInput=L.DomUtil.create("input","uk-width-1-2",l),c.toDateInput.type="text",c.toDateInput.placeholder=c.dateFormat,c.toDateInput.value=moment.utc().startOf("day").format(c.dateFormat),c.toTimeInput=L.DomUtil.create("input","uk-width-1-2",l),c.toTimeInput.type="text",c.toTimeInput.value=moment.utc().format(c.timeFormat);var m=document.createElement("div");m.classList.add("uk-margin-top"),m.id="heatmap",m.style.width="100%",m.style.height="450px",d.appendChild(m);var n=[59,13],o=L.map("heatmap").setView(n,4);L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:18,attribution:'&copy; <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors</a>'}).addTo(o),this.map=o;var p={radius:10,maxOpacity:.8,scaleRadius:!1,useLocalExtrema:!1,latField:"lat",lngField:"lng",valueField:"count"};this.layer=new HeatmapOverlay(p),this.layer.addTo(o),c.fromDateInput.onchange=function(a){c.show()},c.fromTimeInput.onchange=function(a){c.show()},c.toDateInput.onchange=function(a){c.show()},c.toTimeInput.onchange=function(a){c.show()};var q=L.DomUtil.create("div","statistic-table uk-width-1-2",d);L.DomUtil.create("p","uk-article-lead",q).textContent="PADM web service",c.padmwsTableElement=c.createDataTable(q);var r,s={scrollY:"100px",scrollCollapse:!0,columnDefs:[{className:"dt-center",targets:[0,1]}],columns:[{data:"1",class:"alignRight"},{data:"2",class:"alignRight"}],select:{style:"single",info:!1},paging:!1,info:!0,ordering:!1,searching:!0,footerCallback:function(a,b,c,d,e){var f=this.api();r=f.column(1).data().reduce(function(a,b){return parseInt(a)+parseInt(b)},0),$(f.column(1).footer()).html(r)}};c.padmwsTable=$(c.padmwsTableElement).DataTable(s);var t=L.DomUtil.create("div","statistic-table uk-width-1-2",d);L.DomUtil.create("p","uk-article-lead",t).textContent="SeaTrackWeb client",c.stwTableElement=c.createDataTable(t);var u,v={scrollY:"100px",scrollCollapse:!0,columnDefs:[{className:"dt-center",targets:[0,1]}],columns:[{data:"1",class:"alignRight"},{data:"2",class:"alignRight"}],select:{style:"single",info:!1},paging:!1,info:!0,ordering:!1,searching:!0,footerCallback:function(a,b,c,d,e){var f=this.api();u=f.column(1).data().reduce(function(a,b){return parseInt(a)+parseInt(b)},0),$(f.column(1).footer()).html(u)}};c.stwTable=$(c.stwTableElement).DataTable(v),UIkit.ready(function(){UIkit.datepicker(c.fromDateInput,{format:c.dateFormat}),UIkit.timepicker(c.fromTimeInput,{}),UIkit.datepicker(c.toDateInput,{format:c.dateFormat}),UIkit.timepicker(c.toTimeInput,{})})}return a.prototype.jsonToQueryString=function(a){for(var b=Object.keys(a),c=[],d=0;d<b.length;d++){var e=b[d],f=a[e];"string"==typeof f&&(f=[f]);for(var g=0;g<f.length;g++)c.push(e+"="+f[g])}return"?"+c.join("&")},a.prototype.show=function(){var a=this;a.layer.setData({max:0,data:[]}),reqwest({url:a.url+"/userlangdomain",type:"json",method:"get",success:function(b){b.user.admin||(window.location.href="../");var c={from:moment.utc(a.fromDateInput.value+" "+a.fromTimeInput.value,a.datetimeFormat).format("X"),to:moment.utc(a.toDateInput.value+" "+a.toTimeInput.value,a.datetimeFormat).format("X"),domain:b.domain.name},d=a.jsonToQueryString(c);reqwest({url:a.url+"/statistic/heatmap"+d,type:"json",method:"get",success:function(b){a.layer.setData(b),a.stwTable.ajax.url(a.url+"/statistic/toplist/stw"+d).load(),a.padmwsTable.ajax.url(a.url+"/statistic/toplist/padmws"+d).load()}})}})},a.prototype.createDataTable=function(a){var b=L.DomUtil.create("table","",a),c=L.DomUtil.create("thead",""),d=L.DomUtil.create("tr",""),e=L.DomUtil.create("tfoot",""),f=L.DomUtil.create("tr",""),g=function(a){var b=L.DomUtil.create("th","");return b.appendChild(document.createTextNode(a)),b};return f.appendChild(g("Total")),d.appendChild(g("user")),c.appendChild(d),e.appendChild(f),f.appendChild(g("#simulations")),d.appendChild(g("#simulations")),c.appendChild(d),e.appendChild(f),b.appendChild(c),b.appendChild(e),b.className="display",b},a}(),Toplist=function(){function a(){}return a}();
var Heatmap=function(){function a(a,b){var c=this;c.url="/demo",b&&(b.url&&(this.url=b.url),b.domain&&(this.domain=b.domain),this.lang="en",b.lang&&(this.lang=b.lang),b.langdata&&(this.langData=b.langdata));var d=document.getElementById(a);d.classList.add("statistic"),d.classList.add("uk-container"),d.classList.add("uk-container-center"),d.classList.add("uk-margin-top");var e=L.DomUtil.create("article","uk-article",d);L.DomUtil.create("h1","uk-article",e).textContent="SeaTrackWeb Statistic";var f=L.DomUtil.create("p","uk-article-meta",e);f.textContent="Showing statistics from the PADM web service as well as the SeaTrackWeb client. ",f.textContent+="The heatmap represents simulation center points registered by the PADM web service within the given period. ",f.textContent+="Note that all statistics are affected by the selected period.",L.DomUtil.create("p","uk-article-lead",e).textContent="Selected period (UTC)";var g=L.DomUtil.create("form","uk-form uk-form-stacked",d);g.onsubmit=function(a){return a.preventDefault(),a.stopPropagation(),!1};var h=L.DomUtil.create("fieldset","",g);c.datetimeFormat="YYYY-MM-DD HH:mm",c.dateFormat="YYYY-MM-DD",c.timeFormat="HH:mm";var i=L.DomUtil.create("div","uk-form-row",h),j=L.DomUtil.create("div","uk-form-controls uk-form-icon",i);L.DomUtil.create("span","uk-icon-calendar",j);c.fromDateInput=L.DomUtil.create("input","uk-width-1-2",j),c.fromDateInput.type="text",c.fromDateInput.placeholder=c.dateFormat,c.fromDateInput.value=moment.utc().startOf("day").subtract(24,"hours").format(c.dateFormat),c.fromTimeInput=L.DomUtil.create("input","uk-width-1-2",j),c.fromTimeInput.type="text",c.fromTimeInput.value=moment.utc().format(c.timeFormat);var k=L.DomUtil.create("div","uk-form-controls uk-form-icon",i);k.textContent="-",k.style.left="-55px";var l=L.DomUtil.create("div","uk-form-controls uk-form-icon",i);L.DomUtil.create("span","uk-icon-calendar",l);c.toDateInput=L.DomUtil.create("input","uk-width-1-2",l),c.toDateInput.type="text",c.toDateInput.placeholder=c.dateFormat,c.toDateInput.value=moment.utc().startOf("day").format(c.dateFormat),c.toTimeInput=L.DomUtil.create("input","uk-width-1-2",l),c.toTimeInput.type="text",c.toTimeInput.value=moment.utc().format(c.timeFormat);var m=document.createElement("div");m.classList.add("uk-margin-top"),m.id="heatmap",m.style.width="100%",m.style.height="450px",d.appendChild(m);var n=[59,13],o=L.map("heatmap").setView(n,4);L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:18,attribution:'&copy; <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors</a>'}).addTo(o),this.map=o;var p={radius:10,maxOpacity:.8,scaleRadius:!1,useLocalExtrema:!1,latField:"lat",lngField:"lng",valueField:"count"};this.layer=new HeatmapOverlay(p),this.layer.addTo(o),c.fromDateInput.onchange=function(a){c.show()},c.fromTimeInput.onchange=function(a){c.show()},c.toDateInput.onchange=function(a){c.show()},c.toTimeInput.onchange=function(a){c.show()};var q=L.DomUtil.create("div","statistic-table uk-width-1-2",d);L.DomUtil.create("p","uk-article-lead",q).textContent="PADM web service",c.padmwsTableElement=c.createDataTable(q);var r,s={scrollY:"100px",scrollCollapse:!0,columnDefs:[{className:"dt-center",targets:[0,1]}],columns:[{data:"1",class:"alignRight"},{data:"2",class:"alignRight"}],select:{style:"single",info:!1},paging:!1,info:!0,ordering:!1,searching:!0,footerCallback:function(a,b,c,d,e){var f=this.api();r=f.column(1).data().reduce(function(a,b){return parseInt(a)+parseInt(b)},0),$(f.column(1).footer()).html(r)}};c.padmwsTable=$(c.padmwsTableElement).DataTable(s);var t=L.DomUtil.create("div","statistic-table uk-width-1-2",d);L.DomUtil.create("p","uk-article-lead",t).textContent="SeaTrackWeb client",c.stwTableElement=c.createDataTable(t);var u,v={scrollY:"100px",scrollCollapse:!0,columnDefs:[{className:"dt-center",targets:[0,1]}],columns:[{data:"1",class:"alignRight"},{data:"2",class:"alignRight"}],select:{style:"single",info:!1},paging:!1,info:!0,ordering:!1,searching:!0,footerCallback:function(a,b,c,d,e){var f=this.api();u=f.column(1).data().reduce(function(a,b){return parseInt(a)+parseInt(b)},0),$(f.column(1).footer()).html(u)}};c.stwTable=$(c.stwTableElement).DataTable(v),UIkit.ready(function(){UIkit.datepicker(c.fromDateInput,{format:c.dateFormat}),UIkit.timepicker(c.fromTimeInput,{}),UIkit.datepicker(c.toDateInput,{format:c.dateFormat}),UIkit.timepicker(c.toTimeInput,{})})}return a.prototype.jsonToQueryString=function(a){for(var b=Object.keys(a),c=[],d=0;d<b.length;d++){var e=b[d],f=a[e];"string"==typeof f&&(f=[f]);for(var g=0;g<f.length;g++)c.push(e+"="+f[g])}return"?"+c.join("&")},a.prototype.show=function(){var a=this;a.layer.setData({max:0,data:[]}),reqwest({url:a.url+"/userlangdomain",type:"json",method:"get",success:function(b){b.user&&b.user.admin||(window.location.href="../");var c={from:moment.utc(a.fromDateInput.value+" "+a.fromTimeInput.value,a.datetimeFormat).format("X"),to:moment.utc(a.toDateInput.value+" "+a.toTimeInput.value,a.datetimeFormat).format("X"),domain:b.domain.name},d=a.jsonToQueryString(c);reqwest({url:a.url+"/statistic/heatmap"+d,type:"json",method:"get",success:function(b){a.layer.setData(b),a.stwTable.ajax.url(a.url+"/statistic/toplist/stw"+d).load(),a.padmwsTable.ajax.url(a.url+"/statistic/toplist/padmws"+d).load()}})}})},a.prototype.createDataTable=function(a){var b=L.DomUtil.create("table","",a),c=L.DomUtil.create("thead",""),d=L.DomUtil.create("tr",""),e=L.DomUtil.create("tfoot",""),f=L.DomUtil.create("tr",""),g=function(a){var b=L.DomUtil.create("th","");return b.appendChild(document.createTextNode(a)),b};return f.appendChild(g("Total")),d.appendChild(g("user")),c.appendChild(d),e.appendChild(f),f.appendChild(g("#simulations")),d.appendChild(g("#simulations")),c.appendChild(d),e.appendChild(f),b.appendChild(c),b.appendChild(e),b.className="display",b},a}(),Toplist=function(){function a(){}return a}();
//# sourceMappingURL=statistic.map
\ No newline at end of file
......@@ -219,7 +219,7 @@ var Heatmap = (function () {
type: 'json',
method: 'get',
success: function (userlangdomain) {
if (!userlangdomain.user.admin) {
if (!userlangdomain.user || !userlangdomain.user.admin) {
window.location.href = "../";
}
var filter = {
......
This diff is collapsed.
......@@ -257,7 +257,7 @@ class Heatmap {
type: 'json',
method: 'get',
success: function (userlangdomain) {
if (!userlangdomain.user.admin) {
if (!userlangdomain.user || !userlangdomain.user.admin) {
window.location.href = "../";
}
var filter = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment