=e-1){var s=u[n];return s.x0=i,s.y0=o,s.x1=a,void(s.y1=c)}var l=f[n],h=r/2+l,d=n+1,p=e-1;for(;d>>1;f[g]c-o){var _=r?(i*v+a*y)/r:a;t(n,d,y,i,o,_,c),t(d,e,v,_,o,a,c)}else{var b=r?(o*v+c*y)/r:c;t(n,d,y,i,o,a,b),t(d,e,v,i,b,a,c)}}(0,c,t.value,n,e,r,i)},t.treemapDice=rp,t.treemapResquarify=xp,t.treemapSlice=vp,t.treemapSliceDice=function(t,n,e,r,i){(1&t.depth?vp:rp)(t,n,e,r,i)},t.treemapSquarify=mp,t.tsv=ac,t.tsvFormat=Vu,t.tsvFormatBody=Wu,t.tsvFormatRow=Ku,t.tsvFormatRows=Zu,t.tsvFormatValue=Qu,t.tsvParse=Xu,t.tsvParseRows=Gu,t.union=function(...t){const n=new InternSet;for(const e of t)for(const t of e)n.add(t);return n},t.unixDay=Kg,t.unixDays=Qg,t.utcDay=Wg,t.utcDays=Zg,t.utcFriday=my,t.utcFridays=Ey,t.utcHour=Hg,t.utcHours=Xg,t.utcMillisecond=kg,t.utcMilliseconds=Ng,t.utcMinute=Bg,t.utcMinutes=Yg,t.utcMonday=yy,t.utcMondays=My,t.utcMonth=Py,t.utcMonths=zy,t.utcSaturday=xy,t.utcSaturdays=ky,t.utcSecond=qg,t.utcSeconds=Ug,t.utcSunday=gy,t.utcSundays=wy,t.utcThursday=by,t.utcThursdays=Sy,t.utcTickInterval=Iy,t.utcTicks=Uy,t.utcTuesday=vy,t.utcTuesdays=Ty,t.utcWednesday=_y,t.utcWednesdays=Ay,t.utcWeek=gy,t.utcWeeks=wy,t.utcYear=Ry,t.utcYears=Fy,t.variance=w,t.version="7.8.0",t.window=hn,t.xml=fc,t.zip=function(){return gt(arguments)},t.zoom=function(){var t,n,e,r=uw,i=cw,o=hw,a=sw,u=lw,c=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],s=250,l=ni,h=Nt("start","zoom","end"),d=500,p=0,g=10;function y(t){t.property("__zoom",fw).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",A).filter(u).on("touchstart.zoom",S).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,n){return(n=Math.max(c[0],Math.min(c[1],n)))===t.k?t:new ew(n,t.x,t.y)}function _(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new ew(t.k,r,i)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function m(t,n,e,r){t.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,o=arguments,a=x(t,o).event(r),u=i.apply(t,o),c=null==e?b(u):"function"==typeof e?e.apply(t,o):e,f=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),s=t.__zoom,h="function"==typeof n?n.apply(t,o):n,d=l(s.invert(c).concat(f/s.k),h.invert(c).concat(f/h.k));return function(t){if(1===t)t=h;else{var n=d(t),e=f/n[2];t=new ew(e,c[0]-n[0]*e,c[1]-n[1]*e)}a.zoom(null,t)}}))}function x(t,n,e){return!e&&t.__zooming||new w(t,n)}function w(t,n){this.that=t,this.args=n,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,n),this.taps=0}function M(t,...n){if(r.apply(this,arguments)){var e=x(this,n).event(t),i=this.__zoom,u=Math.max(c[0],Math.min(c[1],i.k*Math.pow(2,a.apply(this,arguments)))),s=te(t);if(e.wheel)e.mouse[0][0]===s[0]&&e.mouse[0][1]===s[1]||(e.mouse[1]=i.invert(e.mouse[0]=s)),clearTimeout(e.wheel);else{if(i.k===u)return;e.mouse=[s,i.invert(s)],qi(this),e.start()}aw(t),e.wheel=setTimeout(l,150),e.zoom("mouse",o(_(v(i,u),e.mouse[0],e.mouse[1]),e.extent,f))}function l(){e.wheel=null,e.end()}}function T(t,...n){if(!e&&r.apply(this,arguments)){var i=t.currentTarget,a=x(this,n,!0).event(t),u=Wn(t.view).on("mousemove.zoom",h,!0).on("mouseup.zoom",d,!0),c=te(t,i),s=t.clientX,l=t.clientY;oe(t.view),ow(t),a.mouse=[c,this.__zoom.invert(c)],qi(this),a.start()}function h(t){if(aw(t),!a.moved){var n=t.clientX-s,e=t.clientY-l;a.moved=n*n+e*e>p}a.event(t).zoom("mouse",o(_(a.that.__zoom,a.mouse[0]=te(t,i),a.mouse[1]),a.extent,f))}function d(t){u.on("mousemove.zoom mouseup.zoom",null),ae(t.view,a.moved),aw(t),a.event(t).end()}}function A(t,...n){if(r.apply(this,arguments)){var e=this.__zoom,a=te(t.changedTouches?t.changedTouches[0]:t,this),u=e.invert(a),c=e.k*(t.shiftKey?.5:2),l=o(_(v(e,c),a,u),i.apply(this,n),f);aw(t),s>0?Wn(this).transition().duration(s).call(m,l,a,t):Wn(this).call(y.transform,l,a,t)}}function S(e,...i){if(r.apply(this,arguments)){var o,a,u,c,f=e.touches,s=f.length,l=x(this,i,e.changedTouches.length===s).event(e);for(ow(e),a=0;a 1024 ) r = 1024;
- break;
- };
- case 50:{
- var r = Math.round( 512.0 / 98 * Math.sqrt( x*x + y*y ) );
- if( r > 512 ) r = 512;
- break;
- };
- case 25:{
- var r = Math.round( 256.0 / 98 * Math.sqrt( x*x + y*y ) );
- if( r > 256 ) r = 256;
- break;
- };
- case 12:{
- var r = Math.round( 128.0 / 98 * Math.sqrt( x*x + y*y ) );
- if( r > 128 ) r = 128;
- break;
+ var csvg = document.getElementById( 'draw_svg_' + id );
+ if( csvg!= undefined ){
+ var roi = csvg.getElementById( "roi" );
+ if( roi != null ) csvg.removeChild( roi );
+ var bBox = csvg.getBBox();
+ var x = ( bBox.width / csvg.clientWidth ) * event.offsetX;
+ var y = ( bBox.height / csvg.clientHeight ) * event.offsetY;
+
+ var dx=x-( bBox.width/ 2.0 );
+ var dy=y-( bBox.height/ 2.0 );
+ var hr = Math.sqrt( dx*dx + dy*dy );//
+ if( hr > ( bBox.width/ 2.0 ) ) hr = bBox.width/ 2.0;
+ // Normalization
+ var zat = -1.0 * Math.atan2( dy, dx );
+ if( zat < 0.0 ) zat += Math.PI * 2.0;
+ x = ( bBox.width / 2.0 ) + hr * Math.cos( zat );
+ y = ( bBox.width / 2.0 ) - hr * Math.sin( zat );
+ var cc = document.createElementNS('http://www.w3.org/2000/svg', "circle");
+ //
+ var rk = bBox.width / csvg.clientWidth;
+ cc.setAttributeNS(null, "cx", x );
+ cc.setAttributeNS(null, "cy", y );
+ cc.setAttributeNS(null, "r", ""+(6*rk)+"" );
+ cc.setAttributeNS(null, "stroke", "#FFFF00" );
+ cc.setAttributeNS(null, "stroke-width", ""+(2*rk)+"" );
+ cc.setAttributeNS(null, "fill", "#0000FF" );
+ //cc.setAttributeNS(null, "fill-opacity", "0.4");
+ cc.setAttributeNS(null, "id", "roi");
+ csvg.appendChild( cc );
+
+ var lts = -1;
+ if( targets_lts_2d[ id ] != undefined ) lts = targets_lts_2d[ id ];
+ switch( drawZoomLevels[ id ] ){
+ case 100:{
+ var r = Math.round( hr * ( 1024.0 / ( bBox.width/ 2.0 ) ) );
+ if( r > 1024 ) r = 1024;
+ roi_2d[id]={ range: r, az: zat, ts: lts };
+ break;
+ };
+ case 50:{
+ var r = Math.round( hr * ( 512.0 / ( bBox.width/ 2.0 ) ) );
+ if( r > 512 ) r = 512;
+ roi_2d[id]={ range: r, az: zat, ts: lts };
+ break;
+ };
+ case 25:{
+ var r = Math.round( hr * ( 256.0 / ( bBox.width/ 2.0 ) ) );
+ if( r > 256 ) r = 256;
+ roi_2d[id]={ range: r, az: zat, ts: lts };
+ break;
+ };
+ case 12:{
+ var r = Math.round( hr * ( 128.0 / ( bBox.width/ 2.0 ) ) );
+ if( r > 128 ) r = 128;
+ roi_2d[id]={ range: r, az: zat, ts: lts };
+ break;
+ };
+ default:{
+ var r = -1;
+ roi_2d[id]={ range: r, az: zat, ts: lts };
+ break;
+ };
};
- default:{
- var r = -1;
- break;
+ if( r > -1 ){
+ var z = Math.round( zat * 3000 / Math.PI );
+ if( z < 0 ) z += 6000 ;
+ doDeviceOperation( id, 42, r+':'+z, true );
};
};
- if( r > -1 ){
- var z = Math.round( -1.0 * Math.atan2(y, x) * 3000 / Math.PI );
- if( z < 0 ) z += 6000 ;
- doDeviceOperation( id, 42, r+':'+z, true );
- };
};
function Draw3DTargets( k, b ){
@@ -474,26 +512,233 @@ function updateDashBoardItemLayout( id, x, y ){
});
};
-var drawZoomLevels = Array();
+var drawZoomLevels = [];
+var targets_2d=[];
+var targets_lts_2d=[];
+var targets_2d_el=[];
+var roi_2d=[];
+var draws_2d=[];
+
+function cleanup2DTargets( a ){
+ targets_2d_el[a] = [];
+};
function cleanup2DDraw( a ){
- var canvas = document.getElementById('targ_canvas_'+a );
- var img = document.getElementById('draw_img_'+a );
- if( canvas != 'undefined' ){
- canvas.style='display: block; cursor: crosshair;'; //cursor: auto;
- img.style='display: none;';
- var ctx = canvas.getContext('2d');
- ctx.drawImage( img, 0, 0 );
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg!= undefined ){
+ if( targets_2d_el[a] != undefined ){
+ if( targets_2d_el[a].length > 0 ){
+ for( idx = 0; idx < targets_2d_el[a].length; idx++ ) csvg.remove( targets_2d_el[a][idx] );
+ };
+ };
+ var roi = csvg.getElementById( "roi" );
+ if( roi != null ) csvg.removeChild( roi );
+ };
+ targets_2d_el[a] = [];
+};
+
+function draw2DTargets( a ){
+ cleanup2DDraw( a );
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg!= undefined ){
+ var bBox = csvg.getBBox();
+ var max = 1024;
+ switch( drawZoomLevels[a] ){
+ case 50: max = 512; break;
+ case 25: max = 256; break;
+ case 12: max = 128; break;
+ };
+ var rk = bBox.width / ( max * 2 );
+ var cpx = bBox.width / 2.0;
+ var cpy = bBox.height / 2.0;
+
+ if( targets_2d[a] != undefined ){
+ if( targets_2d[a].length > 0 ) {
+ var ak = 2.0*Math.PI/draws_2d[a].length;
+ for( idx = 0; idx < targets_2d[a].length; idx++ ){
+ if( 1 ){
+ targets_2d_el[a][idx] = document.createElementNS('http://www.w3.org/2000/svg', "circle");
+ csvg.appendChild( targets_2d_el[a][idx] );
+ };
+ };
+ };
+ };
+ if( roi_2d[a]!= undefined ){
+ if( roi_2d[a].range > -1 ){
+ if( roi_2d[a].range < max ){
+ x = cpx + rk * roi_2d[a].range * Math.cos( roi_2d[a].az );
+ y = cpy - rk * roi_2d[a].range * Math.sin( roi_2d[a].az );
+ var cc = document.createElementNS('http://www.w3.org/2000/svg', "circle");
+ //
+ var rz = bBox.width / csvg.clientWidth;
+ cc.setAttributeNS(null, "cx", x );
+ cc.setAttributeNS(null, "cy", y );
+ cc.setAttributeNS(null, "r", ""+(6*rz)+"" );
+ cc.setAttributeNS(null, "stroke", "#FFFF00" );
+ cc.setAttributeNS(null, "stroke-width", ""+(2*rz)+"" );
+ cc.setAttributeNS(null, "fill", "#0000FF" );
+ //cc.setAttributeNS(null, "fill-opacity", "0.4");
+ cc.setAttributeNS(null, "id", "roi");
+ csvg.appendChild( cc );
+ };
+ };
+ };
+ };
+};
+
+function remove2DDraw( a ){
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ){
+ var draw = csvg.getElementById( "draw" );
+ if( draw != null ) csvg.removeChild( draw );
+ var roi = csvg.getElementById( "roi" );
+ if( roi != null ) csvg.removeChild( roi );
+ };
+};
+
+function draw2DDraw( a ){
+ var p2 = 2.0*Math.PI;
+ var so = -10 * p2 / 360.0;
+ cleanup2DDraw( a );
+ remove2DDraw( a );
+ if( draws_2d[a] != undefined ){
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ){
+ var bBox = csvg.getBBox();
+ var newpath = document.createElementNS('http://www.w3.org/2000/svg', "polygon");
+ var ak = 2.0*Math.PI/draws_2d[a].length;
+ var cpx = bBox.width / 2.0;
+ var cpy = bBox.height / 2.0;
+ var max = 1024;
+ switch( drawZoomLevels[a] ){
+ case 50: max = 512; break;
+ case 25: max = 256; break;
+ case 12: max = 128; break;
+ };
+ var rk = bBox.width / ( max * 2 );
+ var pp = '';
+ var jj = '';
+ for( i=0;i,
+ SID: '=$Session;?>',
+ NID: a
+ },
+ success: function( response, opts ){
+ var data = Ext.decode(response.responseText);
+ if( data.count > 0 ){
+ draws_2d[a] = data.data;
+ draw2DDraw( a );
+ };
+ },
+ failure: failureAJAXFunction
+ });
+};
+
+function set2DZoomLevel( a, zl ){
+ drawZoomLevels[a] = zl;
+ cleanup2DDraw( a );
+ switch( drawZoomLevels[a] ){
+ case 100:{
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ){
+ document.getElementById( '12_txt_'+a ).setAttribute( 'fill', '#FFF212');
+ document.getElementById( '12_txt_'+a ).textContent = '12.5';
+ document.getElementById( 'r12_'+a ).setAttribute( 'stroke', '#FFF212');
+ document.getElementById( '25_txt_'+a ).setAttribute( 'fill', '#FFF212');
+ document.getElementById( '25_txt_'+a ).textContent = '25';
+ document.getElementById( 'r25_'+a ).setAttribute( 'stroke', '#FFF212');
+ document.getElementById( '50_txt_'+a ).setAttribute( 'fill', '#FFF212');
+ document.getElementById( '50_txt_'+a ).textContent = '50';
+ document.getElementById( 'r50_'+a ).setAttribute( 'stroke', '#FFF212');
+ document.getElementById( 'g_txt_'+a ).textContent = '100 m.';
+ draw2DDraw( a );
+ };
+ break;
+ };
+ case 50:{
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ){
+ document.getElementById( '12_txt_'+a ).setAttribute( 'fill', '#00A859');
+ document.getElementById( 'r12_'+a ).setAttribute( 'stroke', '#00A859');
+ document.getElementById( '25_txt_'+a ).setAttribute( 'fill', '#FFF212');
+ document.getElementById( '25_txt_'+a ).textContent = '12.5';
+ document.getElementById( 'r25_'+a ).setAttribute( 'stroke', '#FFF212');
+ document.getElementById( '50_txt_'+a ).setAttribute( 'fill', '#FFF212');
+ document.getElementById( '50_txt_'+a ).textContent = '25';
+ document.getElementById( 'r50_'+a ).setAttribute( 'stroke', '#FFF212');
+ document.getElementById( 'g_txt_'+a ).textContent = '50 m.';
+ draw2DDraw( a );
+ };
+ break;
+ };
+ case 25:{
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ){
+ document.getElementById( '12_txt_'+a ).setAttribute( 'fill', '#00A859');
+ document.getElementById( 'r12_'+a ).setAttribute( 'stroke', '#00A859');
+ document.getElementById( '25_txt_'+a ).setAttribute( 'fill', '#00A859');
+ document.getElementById( 'r25_'+a ).setAttribute( 'stroke', '#00A859');
+ document.getElementById( '50_txt_'+a ).setAttribute( 'fill', '#FFF212');
+ document.getElementById( '50_txt_'+a ).textContent = '12.5';
+ document.getElementById( 'r50_'+a ).setAttribute( 'stroke', '#FFF212');
+ document.getElementById( 'g_txt_'+a ).textContent = '25 m.';
+ draw2DDraw( a )
+ };
+ break;
+ };
+ case 12:{
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ){
+ document.getElementById( '12_txt_'+a ).setAttribute( 'fill', '#00A859');
+ document.getElementById( 'r12_'+a ).setAttribute( 'stroke', '#00A859');
+ document.getElementById( '25_txt_'+a ).setAttribute( 'fill', '#00A859');
+ document.getElementById( 'r25_'+a ).setAttribute( 'stroke', '#00A859');
+ document.getElementById( '50_txt_'+a ).setAttribute( 'fill', '#00A859');
+ document.getElementById( 'r50_'+a ).setAttribute( 'stroke', '#00A859');
+ document.getElementById( 'g_txt_'+a ).textContent = '12.5 m.';
+ draw2DDraw( a );
+ };
+ break;
+ };
+ };
+ draw2DTargets( a );
+};
+
+function Drawss2DTargets( k, b ){
+ var csvg = document.getElementById( 'draw_svg_' + k );
for( var i=0; i< b.length; i++ ){
switch( drawZoomLevels[k] ){
case 12:{
@@ -591,6 +836,74 @@ function setDonatStatus( node_id, param_id, value ){
val3D.style.strokeDashoffset = 100-(per1+per2)+offset;
};
+function setStatus2D( a, status ){
+ switch( status ){
+ case 0:{
+ Ext.getCmp('cp_draw_btn_'+a ).disable();
+ Ext.getCmp('cp_study_btn_'+a ).disable();
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ) csvg.setAttribute( 'opacity', '0.3');
+ var stat = Ext.getCmp('status_'+a );
+ stat.update('Offline
');
+ break;
+ };
+ case 1:{
+ Ext.getCmp('cp_draw_btn_'+a ).enable();
+ Ext.getCmp('cp_study_btn_'+a ).enable();
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ) csvg.setAttribute( 'opacity', '1.0');
+ var stat = Ext.getCmp('status_'+a );
+ stat.update('Disconnected
');
+ break;
+ };
+ case 2:{
+ Ext.getCmp('cp_draw_btn_'+a ).enable();
+ Ext.getCmp('cp_study_btn_'+a ).enable();
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ) csvg.setAttribute( 'opacity', '1.0');
+ var stat = Ext.getCmp('status_'+a );
+ stat.update('Connected ... Geting Info
');
+ break;
+ };
+ case 3:{
+ Ext.getCmp('cp_draw_btn_'+a ).enable();
+ Ext.getCmp('cp_study_btn_'+a ).enable();
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ) csvg.setAttribute( 'opacity', '1.0');
+ var stat = Ext.getCmp('status_'+a );
+ stat.update('Studing
');
+ break;
+ };
+ case 4:{
+ Ext.getCmp('cp_draw_btn_'+a ).enable();
+ Ext.getCmp('cp_study_btn_'+a ).enable();
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ) csvg.setAttribute( 'opacity', '1.0');
+ var stat = Ext.getCmp('status_'+a );
+ stat.update('Ready
');
+ break;
+ };
+ case 5:{
+ Ext.getCmp('cp_draw_btn_'+a ).enable();
+ Ext.getCmp('cp_study_btn_'+a ).enable();
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ) csvg.setAttribute( 'opacity', '1.0');
+ var stat = Ext.getCmp('status_'+a );
+ stat.update('Alarmed
');
+ break;
+ };
+ case 6:{
+ Ext.getCmp('cp_draw_btn_'+a ).enable();
+ Ext.getCmp('cp_study_btn_'+a ).enable();
+ var csvg = document.getElementById( 'draw_svg_' + a );
+ if( csvg != undefined ) csvg.setAttribute( 'opacity', '1.0');
+ var stat = Ext.getCmp('status_'+a );
+ stat.update('Busy
');
+ break;
+ };
+ };
+};
+
function fetchSiteStatus(){
Ext.Ajax.request({
url: '/lib/controller/getStatus.php',
@@ -607,48 +920,50 @@ function fetchSiteStatus(){
StatusTS = data.CTS;
if( data.nodes.length > 0 ){
for( i=0; i < data.nodes.length; i++ ){
- if( data.nodes[i].type == 0 ){
- //Handle Server Status
- /*if ( data.nodes[i].status ){
- setDonatStatus( data.nodes[i].id, 0, data.nodes[i].cpu5 );
- setDonatStatus( data.nodes[i].id, 1, data.nodes[i].mem );
- setDonatStatus( data.nodes[i].id, 2, data.nodes[i].disk );
- document.getElementById('status_'+data.nodes[i].id+'_txt').innerHTML="Server is Online";
- document.getElementById('status_'+data.nodes[i].id+'_img').src = "/style/icons/icons/accept.png";
- } else {
- setDonatStatus( data.nodes[i].id, 0, -1 );
- setDonatStatus( data.nodes[i].id, 1, -1 );
- setDonatStatus( data.nodes[i].id, 2, -1 );
- document.getElementById('status_'+data.nodes[i].id+'_txt').innerHTML="Server is Offline";
- document.getElementById('status_'+data.nodes[i].id+'_img').src = "/style/icons/icons/stop.png";
- };*/
- };
- // Sesors
- if( data.nodes[i].type > 0 && data.nodes[i].type < 7 ){
- if( data.nodes[i].reload_draw ){
- reload3dTexture( data.nodes[i].id );
- LoadTS = StatusTS;
+ switch( data.nodes[i].type ){
+ case 1:
+ case 2:
+ case 3:
+ case 4:{ // 2D
+ if( data.nodes[i].status ){
+ if( data.nodes[i].reload_draw ) {
+ load2DDraw( data.nodes[i].id );
+ LoadTS = StatusTS;
+ };
+ };
+ setStatus2D( data.nodes[i].id, data.nodes[i].status );
+ break;
};
- };
- // Cameras
- if( data.nodes[i].type > 9 && data.nodes[i].type < 14 ){
- var iel = document.getElementById('img-'+data.nodes[i].id );
- if( iel != null ){
- if( !data.nodes[i].valid ){
- if( iel.src != "/style/assets/no-signal.png" ) iel.src = "/style/assets/no-signal.png";
- } else {
- if( data.nodes[i].src != iel.src ) iel.src = data.nodes[i].src;
+ case 5:{ // 3d
+ if( data.nodes[i].reload_draw ){
+ reload3dTexture( data.nodes[i].id );
};
-
+ break;
+ };
+ case 10:
+ case 11:
+ case 12:
+ case 13:{// Cameras
+ var iel = document.getElementById('img-img-'+data.nodes[i].id );
+ if( iel != null ){
+ if( data.nodes[i].status == 0 ){
+ if( iel.src != "/style/assets/no-signal.png" ) iel.src = "/style/assets/no-signal.png";
+ } else {
+ if( data.nodes[i].src != iel.src ) iel.src = data.nodes[i].src;
+ };
+ };
+ break;
};
};
+
+ /*
var tt = Ext.getCmp('status_'+data.nodes[i].id );
if( tt != undefined ){
if( data.nodes[i].type < 5 && data.nodes[i].type > 0 ){
if( data.nodes[i].status == 4 ){
- Draw2DTargets( data.nodes[i].id, data.nodes[i].targets );
+ //Draw2DTargets( data.nodes[i].id, data.nodes[i].targets );
} else {
- cleanup2DDraw( data.nodes[i].id );
+ //cleanup2DDraw( data.nodes[i].id );
};
};
if( data.nodes[i].type == 5 ){//addl3dTarget( id, radius, az, el, color = 0xff0000 )
@@ -796,27 +1111,27 @@ function fetchSiteStatus(){
nodeDashboardStatuses[i] = data.nodes[i].status;
switch( data.nodes[i].status ){
case 0:{
- if( data.nodes[i].type == 3 ) cleanup2DDraw( data.nodes[i].id );
+ //if( data.nodes[i].type == 3 ) cleanup2DDraw( data.nodes[i].id );
tt.update('| Offline |  |
');
break;
};
case 1:{
- if( data.nodes[i].type == 3 ) cleanup2DDraw( data.nodes[i].id );
+ //if( data.nodes[i].type == 3 ) cleanup2DDraw( data.nodes[i].id );
tt.update('| Online |  |
');
break;
};
case 2:{
- if( data.nodes[i].type == 3 ) cleanup2DDraw( data.nodes[i].id );
+ //if( data.nodes[i].type == 3 ) cleanup2DDraw( data.nodes[i].id );
tt.update('| Initializing |  |
');
break;
};
case 3:{
- if( data.nodes[i].type == 3 ) cleanup2DDraw( data.nodes[i].id );
+ //if( data.nodes[i].type == 3 ) cleanup2DDraw( data.nodes[i].id );
tt.update('| Trouble |  |
');
break;
};
case 4:{
- if( data.nodes[i].type == 3 ) cleanup2DDraw( data.nodes[i].id, data.nodes[i].targets );
+ //if( data.nodes[i].type == 3 ) cleanup2DDraw( data.nodes[i].id, data.nodes[i].targets );
tt.update('| Alarm |  |
');
break;
};
@@ -824,8 +1139,10 @@ function fetchSiteStatus(){
};
};
};
+ */
};
};
+
if( data.notifications.length > 0 ){
sndExcl.play();
for( i=0; i < data.notifications.length; i++ ){
diff --git a/lib/javascript/jsapi_dynamic/mojo_main.js b/lib/javascript/jsapi_dynamic/mojo_main.js
new file mode 100644
index 0000000..4b2d7f2
--- /dev/null
+++ b/lib/javascript/jsapi_dynamic/mojo_main.js
@@ -0,0 +1,498 @@
+//
+
+function ssShowSS() {
+ ssStopTimer();
+ document.removeEventListener( "mousemove", ssResetTimer );
+ document.removeEventListener( "mousedown", ssResetTimer );
+ document.removeEventListener( "keypress", ssResetTimer );
+ document.removeEventListener( "touchmove", ssResetTimer );
+
+ document.addEventListener( "mousemove", ssHideSS, false );
+ document.addEventListener( "mousedown", ssHideSS, false );
+ document.addEventListener( "keypress", ssHideSS, false );
+ document.addEventListener( "touchmove", ssHideSS, false );
+ document.getElementById('ss_bg').className='ss_bg_overlay';
+ document.getElementById('ss_content').className='ss_overlay';
+ ssShowTime();
+ if( ssInterval == null ){
+ ssInterval = window.setInterval( ssShowTime, 333 );
+ };
+ ssIsActive = true;
+};
+function ssShowTime(){
+ document.getElementById('ss_content').style.fontSize = '240px';
+ var currentdate = new Date();
+ var cTime = (( currentdate.getHours()<10 )? '0'+currentdate.getHours(): currentdate.getHours() ) + ":" + (( currentdate.getMinutes()<10 )? '0'+currentdate.getMinutes(): currentdate.getMinutes() ) + ":" + (( currentdate.getSeconds()<10 )? '0'+currentdate.getSeconds(): currentdate.getSeconds() );
+ document.getElementById('ss_content').innerHTML= cTime;
+};
+function ssResetTimer() {
+ ssStopTimer();
+ ssStartTimer();
+};
+
+function ssStartTimer() {
+ if( ssTimer == null ){
+ ssTimer = window.setTimeout( ssShowSS, ssTimeOut );
+ };
+};
+function ssStopTimer() {
+ if( ssTimer ){
+ window.clearTimeout( ssTimer );
+ ssTimer = null;
+ };
+};
+
+function ssSetupTimer() {
+ document.addEventListener( "mousemove", ssResetTimer, false);
+ document.addEventListener( "mousedown", ssResetTimer, false);
+ document.addEventListener( "keypress", ssResetTimer, false);
+ document.addEventListener( "touchmove", ssResetTimer, false);
+ ssStartTimer();
+};
+
+function ssHideSS(){
+ document.getElementById('ss_bg').className='ss_hidden';
+ document.getElementById('ss_content').className='ss_hidden';
+ document.removeEventListener( "mousemove", ssHideSS );
+ document.removeEventListener( "mousedown", ssHideSS );
+ document.removeEventListener( "keypress", ssHideSS );
+ document.removeEventListener( "touchmove", ssHideSS );
+ if( ssInterval != null ){
+ window.clearInterval( ssInterval );
+ ssInterval = null;
+ };
+ ssSetupTimer();
+ ssIsActive = false;
+};
+
+
+
+var sndBeep = new Howl({
+ src: [
+ '/style/assets/audio/beep-07a.mp3',
+ '/style/assets/audio/beep-07a.wav'
+ ],
+ loop: false,
+ volume: 0.99,
+ onend: function() {
+ //console.log('Finished!');
+ }
+});
+var sndExcl = new Howl({
+ src: [
+ '/style/assets/audio/button-42.mp3',
+ '/style/assets/audio/button-42.wav'
+ ],
+ loop: false,
+ volume: 0.99
+});
+
+function playSound( t ){
+ if( SoundEnable ){
+ switch( t ){
+ case 1:{
+ sndBeep.play();
+ break;
+ };
+ default:{
+ sndExcl.play();
+ };
+ };
+ };
+};
+
+function doRefresh(){
+ window.location="/?t="+123;
+};
+
+function doLogout(){
+ window.location = '/login.php?UID=1';
+};
+
+function stopStatusUpdater(){
+ if( tlInterval!= null ){
+ window.clearInterval( tlInterval );
+ tlInterval = null;
+ };
+};
+
+function failureAJAXFunction( responce, opts ){
+ if( tlInterval!= null ){
+ window.clearInterval( tlInterval );
+ tlInterval = null;
+ };
+ playSound();
+ Ext.Msg.show({
+ title:'=$Labels->GetLabel('_REQ_FAILURE_');?>',
+ msg: '=$Labels->GetLabel('_AJX_REQFAILURE_');?>',
+ buttons: Ext.Msg.OK,
+ icon: Ext.MessageBox.INFO
+ });
+ doLogout();
+};
+
+function updateUserScreenResolution( x, y ){
+ Ext.Ajax.request({
+ url: '/lib/controller/updateUserSettings.php',
+ params: {
+ UID: =$UserID;?>,
+ SID: '=$Session;?>',
+ SSS: 15,
+ WID: x,
+ HEI: y
+ },
+ success: function( response, opts ){
+ doRefresh();
+ },
+ failure: failureAJAXFunction
+ });
+};
+
+function setUserContent( c_id ){
+ initView = c_id;
+ Ext.Ajax.request({
+ url: '/lib/controller/updateUserSettings.php',
+ params: {
+ UID: =$UserID;?>,
+ SID: '=$Session;?>',
+ SSS: 26,
+ CID: initView
+ },
+ success: function(){
+ content_lvl0 = Math.floor( initView / 1000 );
+ content_lvl1 = Math.floor( ( initView % 1000 )/ 100 );
+ content_lvl2 = Math.floor( ( initView % 100 )/ 10 );
+ content_lvl3 = initView % 10;
+ },
+ failure: failureAJAXFunction
+ });
+};
+
+function updateUserContent(){
+ cid = content_lvl3 + content_lvl2 * 10 + content_lvl1*100 + content_lvl0*1000;
+ if( initView != cid ) {
+ setUserContent( cid );
+ return true;
+ };
+ return false;
+};
+
+var gSessionValidatorInterval = null;
+
+function sessionValidator(){
+ Ext.Ajax.request({
+ url: '/lib/controller/validateUserSession.php',
+ params: {
+ UID: =$UserID;?>,
+ SID: '=$Session;?>'
+ },
+ success: function( response, opts ){
+ var data = Ext.decode(response.responseText);
+ if( !data.sessionIsValid ){
+ playSound();
+ Ext.Msg.show({
+ title:'=$Labels->GetLabel('_REQ_FAILURE_');?>',
+ msg: '=$Labels->GetLabel('_AJX_REQFAILURE_');?>',
+ buttons: Ext.Msg.OK,
+ icon: Ext.MessageBox.INFO
+ });
+ doLogout();
+ };
+ },
+ failure: failureAJAXFunction
+ });
+};
+
+function doCheckWindowSize(){
+ if (parseInt(navigator.appVersion)>3) {
+ if (navigator.appName=="Netscape") {
+ winW2 = window.innerWidth;
+ winH2 = window.innerHeight;
+ if ( winH2<700 ) winH2=700;
+ };
+ if (navigator.appName.indexOf("Microsoft")!=-1) {
+ winW2 = document.body.offsetWidth;
+ winH2 = document.body.offsetHeight;
+ if ( winH2<700 ) winH2=700;
+ };
+ };
+ if ( winW2 != winW || winH2!=winH ){
+ updateUserScreenResolution( winW2, winH2 );
+ };
+};
+
+
+
+var NotificationStack = null;
+
+function tryKeepScreenAlive(minutes) {
+ navigator.wakeLock.request("screen").then(lock => {
+ setTimeout(() => lock.release(), minutes * 60 * 1000);
+ });
+}
+
+function showContent( cid ){
+ var lvl0 = Math.floor( cid / 1000 );
+ var lvl1 = Math.floor( ( cid % 1000 )/ 100 );
+ var lvl2 = Math.floor( ( cid % 100 )/ 10 );
+ var lvl3 = cid % 10;
+ var refresh = ( lvl0 != content_lvl0 );
+ if( lvl3 != content_lvl3 ){ content_lvl3 = lvl3; };
+ if( lvl2 != content_lvl2 ){ content_lvl2 = lvl2; };
+ if( lvl1 != content_lvl1 ){ content_lvl1 = lvl1; };
+ if( lvl0 != content_lvl0 ){ content_lvl0 = lvl0; };
+ updateUserContent();
+ if( refresh ){
+ switch( content_lvl0 ){
+ case 0:{
+ var tt = Ext.getCmp('tbtn_0');
+ tt.toggle( true, true );
+ tt = Ext.getCmp('tbtn_1');
+ tt.toggle( false, true );
+ tt = Ext.getCmp('tbtn_2');
+ tt.toggle( false, true );
+ var tP = Ext.getCmp('left_side_menu');
+ tP.setVisible( false );
+ var tZ = Ext.getCmp('right_side_menu');
+ tZ.setVisible( false );
+ initMonitoring();
+ Ext.getCmp('main_viewport').doLayout();
+ break;
+ };
+ case 1:{
+ var tt = Ext.getCmp('tbtn_0');
+ tt.toggle( false, true );
+ tt = Ext.getCmp('tbtn_1');
+ tt.toggle( true, true );
+ tt = Ext.getCmp('tbtn_2');
+ tt.toggle( false, true );
+ var tP = Ext.getCmp('left_side_menu');
+ tP.setVisible( true );
+ var tZ = Ext.getCmp('right_side_menu');
+ tZ.setVisible( false );
+ initReportsView();
+ Ext.getCmp('main_viewport').doLayout();
+ break;
+ };
+ case 2:{
+ var tt = Ext.getCmp('tbtn_0');
+ tt.toggle( false, true );
+ tt = Ext.getCmp('tbtn_1');
+ tt.toggle( false, true );
+ tt = Ext.getCmp('tbtn_2');
+ tt.toggle( true, true );
+ var tP = Ext.getCmp('left_side_menu');
+ tP.setVisible( true );
+ var tZ = Ext.getCmp('right_side_menu');
+ tZ.setVisible( false );
+ initSettingsView();
+ Ext.getCmp('main_viewport').doLayout();
+ break;
+ };
+ };
+ };
+};
+
+Ext.onReady(function(){
+ if ('wakeLock' in navigator) {
+ // Screen Wake Lock API supported
+ tryKeepScreenAlive(10);
+ };
+
+
+ doCheckWindowSize();
+ gSessionValidatorInterval = window.setInterval( sessionValidator, 1000 );
+ NotificationStack = new PNotify.Stack({dir1: 'down', firstpos1: 25});
+ //window.onresize = doCheckWindowSize;
+ Ext.QuickTips.init();
+
+ if( ssEnabled ){
+ ssSetupTimer();
+ $(window).focus(function() {
+ ssResetTimer();
+ });
+ $(window).blur(function() {
+ ssStopTimer();
+ });
+ };
+
+
+ var viewport = new Ext.Viewport({
+ id: 'main_viewport',
+ layout:'border',
+ frame: false,
+ border: false,
+ items: [{
+ xtype: 'panel',
+ region: 'north',
+ baseCls: 'x-plain',
+ height: 60,
+ //layout: 'fit',
+ layout: 'hbox',
+ frame: false,
+ border: false,
+ items:[{
+ xtype: 'panel',
+ width: '100%',
+ layout: 'table',
+ baseCls: 'x-plain',
+ layoutConfig: {
+ columns: 11
+ },
+ frame: false,
+ border: true,
+ margins: {top:10, right:10, bottom:10, left:10},
+ items:[{
+ xtype: 'panel',
+ baseCls: 'x-plain',
+ frame: false,
+ border: false,
+ margins: {top:5, right:20, bottom:0, left:20},
+ html: '
'
+ },{
+ xtype: 'spacer',
+ width: 10
+ },{
+ xtype: 'button',
+ text: '=$Labels->GetLabel('_MONITORING_');?>',
+ id: 'tbtn_0',
+ iconCls: 'mon',
+ scale: 'large',
+ enableToggle: true,
+ //pressed: (Math.floor(initView/100)==0),
+ allowDepress: false,
+ toggleGroup: 'gopa_gopa',
+ toggleHandler: function( bt, state ){
+ if( state ) showContent( 0 );
+ }
+ },{
+ xtype: 'spacer',
+ width: 10
+ },{
+ xtype: 'button',
+ text: '=$Labels->GetLabel('_REPO_HISTORY_');?>',
+ id: 'tbtn_1',
+ iconCls: 'rep',
+ scale: 'large',
+ enableToggle: true,
+ //pressed: (Math.floor(initView/100)==1),
+ allowDepress: false,
+ toggleGroup: 'gopa_gopa',
+ toggleHandler: function( bt, state ){
+ if( state ) showContent( 1000 );
+ }
+ },{
+ xtype: 'spacer',
+ width: 10
+ },{
+ xtype: 'button',
+ text: '=$Labels->GetLabel('_SETTINGS_');?>',
+ id: 'tbtn_2',
+ iconCls: 'cog',
+ scale: 'large',
+ enableToggle: true,
+ allowDepress: false,
+ toggleGroup: 'gopa_gopa',
+ toggleHandler: function( bt, state ){
+ if( state ) showContent( 2000 );
+ }
+ },{
+ xtype: 'spacer',
+ width: 10
+ },{
+ xtype: 'panel',
+ baseCls: 'x-plain',
+ frame: false,
+ border: false,
+ margins: {top:5, right:0, bottom:0, left:0},
+ width: PanelW-700,
+ html: ''+ap_title+'
'
+ },{
+ xtype: 'spacer',
+ width: 10
+ },{
+ xtype: 'button',
+ id: 'logout_btn',
+ text: 'Logout',
+ iconCls: 'lout',
+ scale: 'large',
+ style:'text-align: right;',
+ handler: doLogout
+ }{
+ xtype: 'button',
+ id: 'snd_mode_btn',
+ text: 'Sound',
+ iconCls: 'snd'+SoundMode,
+ scale: 'large',
+ style:'text-align: right;',
+ handler: function(){
+ if( SoundMode == 0 ){
+ SoundMode = 3;
+ } else {
+ SoundMode --;
+ };
+ Ext.getCmp('snd_mode_btn').setIconClass( 'snd'+SoundMode );
+ }
+ }
+ ]
+ }]
+ },{
+ xtype: 'panel',
+ id:'left_side_menu',
+ region:'west',
+ bsaseCls:'x-plain',
+ layout: 'fit',
+ collapsible: true,
+ split: true,
+ width: 180,
+ minWidth: 180,
+ maxWidth: 180,
+ hidden: (Math.floor(initView/100)==0),
+ margins: '5 0 5 5',
+ cmargins:'5 5 5 5',
+ items: []
+ },{
+ xtype: 'panel',
+ region:'center',
+ margins: '5 5 5 0',
+ id: 'main_content',
+ //title: '=$Labels->GetLabel('_SYS_DASHBOARD_');?>',
+ items:[{
+ xtype: 'portal',
+ id: 'main_portal',
+ frame: false,
+ border: false,
+ items:{
+ html: ''
+ }//,
+ //listeners:{
+ // drop: function( a ){
+ // updateDashBoardItemLayout( a.panel.id, a.columnIndex, a.position );
+ // }
+ //}
+ }]
+ },{
+ xtype: 'panel',
+ region:'east',
+ id:'right_side_menu',
+ //title: '',
+ margins: '5 5 5 0',
+ //id: 'help_content',
+ frame: false,
+ border: false,
+ collapsible: false,
+ split:true,
+ width:200,
+ minWidth: 150,
+ maxWidth: 200,
+ items:[]
+ }]
+ });
+ showContent( initView );
+});
\ No newline at end of file
diff --git a/lib/javascript/jsapi_dynamic/mojo_reports.js b/lib/javascript/jsapi_dynamic/mojo_reports.js
new file mode 100644
index 0000000..d46d192
--- /dev/null
+++ b/lib/javascript/jsapi_dynamic/mojo_reports.js
@@ -0,0 +1,1363 @@
+//
+
+
+var map = null;
+var selectedMarker = null;
+var timelineObj = null;
+var tlGroups = new vis.DataSet();
+var tlItems = new vis.DataSet();
+
+var selecredActiveSourceFilter = 0;
+var ActiveZones = null;
+
+var selectedMarkerIcon = L.icon({
+ iconUrl: '/style/assets/cursor.png',
+ iconSize: [32, 32],
+ iconAnchor: [16, 16]//,
+ //popupAnchor: [-3, -76],
+ //shadowUrl: 'my-icon-shadow.png',
+ //shadowSize: [68, 95],
+ //shadowAnchor: [22, 94]
+});
+
+selectedMarker = L.marker([SiteLat, SiteLon], { draggable: false, icon: selectedMarkerIcon } );
+
+var tlOptions = {
+ groupOrder: 'content', // groupOrder can be a property name or a sorting function
+ stack: true,
+ showCurrentTime: true,
+ //verticalScroll: true,
+ //zoomKey: 'ctrlKey',
+ minHeight: 308,
+ maxHeight: 308
+};
+var tlLoadLocker = false;
+var tlLastTS = 0;
+var tlInterval = null;
+var tlMonitoring = false;
+
+
+
+
+// Calendar
+
+var CurrentDate=(new Date())/1000;
+
+var today=new Date();
+var SY=1900+today.getYear();
+var SMO=today.getMonth()+1;
+var SD=today.getDate();
+var SelectedDay = SD;
+var Dates = new Array();
+function CheckDate(D){
+ for(j_index=0;j_index GetMonthLength(CurrentDate) ) SD = GetMonthLength(CurrentDate);
+ loadCalendarDates();
+};
+function ShiftFWD(){
+ CurrentDate=CurrentDate+24*3600*GetMonthLength(CurrentDate);
+ BuildCalendar();
+ SMO = GetMonthNum(CurrentDate);
+ SY = GetYear(CurrentDate);
+ if( SD > GetMonthLength(CurrentDate) ) SD = GetMonthLength(CurrentDate);
+ loadCalendarDates();
+};
+
+function GetMonthName(UTS){ // Unix Time Stamp
+ var MoNames= new Array();
+ MoNames[0]='January';
+ MoNames[1]='February';
+ MoNames[2]='March';
+ MoNames[3]='April';
+ MoNames[4]='May';
+ MoNames[5]='June';
+ MoNames[6]='July';
+ MoNames[7]='August';
+ MoNames[8]='September';
+ MoNames[9]='October';
+ MoNames[10]='November';
+ MoNames[11]='December';
+ CDate=new Date();
+ CDate.setTime(UTS*1000);
+ CMo=CDate.getMonth();
+ return MoNames[CMo];
+};
+
+function GetMonthShift(UTS){ // Unix Time Stamp
+ CDate=new Date();
+ CDate.setTime(UTS*1000);
+ CDate.setTime((UTS-(CDate.getDate()-1)*86400)*1000);
+ return CDate.getDay();
+};
+
+function GetMonthLength(UTS){ // Unix Time Stamp
+ CDate=new Date();
+ CDate.setTime(UTS*1000);
+ CD=CDate.getDate();
+ RetVal=31;
+ CDate.setTime((UTS+(31-CD)*86400)*1000);
+ if ( CDate.getDate()==31) return RetVal;
+ RetVal=30;
+ CDate.setTime((UTS+(30-CD)*86400)*1000);
+ if ( CDate.getDate()==30) return RetVal;
+ RetVal=29;
+ CDate.setTime((UTS+(29-CD)*86400)*1000);
+ if ( CDate.getDate()==29) return RetVal;
+ RetVal=28;
+ CDate.setTime((UTS+(28-CD)*86400)*1000);
+ if ( CDate.getDate()==28) return RetVal;
+ return -1;
+};
+
+function GetMonthNum(UTS){ // Unix Time Stamp
+ CDate=new Date();
+ CDate.setTime(UTS*1000);
+ return CDate.getMonth()+1;
+};
+
+function GetYear(UTS){ // Unix Time Stamp
+ CDate=new Date();
+ CDate.setTime(UTS*1000);
+ y=CDate.getYear();
+ if (y<100)y+=2000;
+ if (y<200)y+=1900;
+ return y;
+};
+function GetDay(UTS){ // Unix Time Stamp
+ CDate=new Date();
+ CDate.setTime(UTS*1000);
+ y=CDate.getDate();
+ return y;
+};
+
+function selectDate( m, d ){
+ SY = GetYear(CurrentDate);
+ SMO = m;
+ SD = d;
+ SelectedDay = SD;
+ getData( 'arch' );
+};
+
+function BuildCalendar( ){
+ Msh=GetMonthShift(CurrentDate);
+ Mnm=GetMonthName(CurrentDate);
+ Mln=GetMonthLength(CurrentDate);
+ Mid=GetMonthNum(CurrentDate);
+ Mye=GetYear(CurrentDate);
+ InDTA=' | '+Mnm+' '+Mye+' |  |
';
+ InDTA+='| Su | Mo | Tu | We | Th | Fr | Sa |
';
+ InDTA+='';
+ for(index=0;index
';
+ };
+ for(;index<(Mln+Msh);index++){
+ if( CheckDate(index-Msh+1) ){
+ //InDTA+=''+(index-Msh+1).toString()+' | ';
+ if( SD == index ){
+ InDTA+=''+(index-Msh+1).toString()+' | ';
+ } else {
+ InDTA+=''+(index-Msh+1).toString()+' | ';
+ };
+ } else {
+ if( SD == index ){
+ InDTA+=''+(index-Msh+1).toString()+' | ';
+ } else {
+ InDTA+=''+(index-Msh+1).toString()+' | ';
+ };
+ };
+ if ((index+1)%7==0){
+ InDTA+='
';
+ };
+ };
+ for(;(index)%7!=0;index++){
+ InDTA+=' | ';
+ };
+ InDTA+='
';
+ tab=document.getElementById('calendar_TD');
+ tab.innerHTML=InDTA;
+};
+
+
+function loadCalendarDates(){
+ Ext.MessageBox.wait("=$Labels->GetLabel('_Loading_Calo_');?>","=$Labels->GetLabel('_Please_Wait_');?>",{
+ width: '100%',
+ hidden: true,
+ progress: true,
+ closable: false
+ });
+ Ext.Ajax.request({
+ url: '/lib/controller/getEventDates.php',
+ params: {
+ NID: selecredActiveSourceFilter,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>',
+ SYE: SY,
+ SMO: SMO
+ },
+ success: function( response, opts ){
+ Ext.MessageBox.hide();
+ var data = Ext.decode( response.responseText );
+ if( data.status == 'ok' ){
+ Dates = data.days;
+ BuildCalendar();
+ //for( var i = 0; i < data.days.length; i++ ){
+ //
+ //};
+ };
+ },
+ failure: function( response, opts ) {
+ Ext.MessageBox.hide();
+ }
+ });
+};
+
+
+
+
+
+
+
+
+var eventsListStore = new Ext.data.JsonStore({
+ root: 'log',
+ totalProperty: 'totalCount',
+ idProperty: 'id',
+ remoteSort: true,
+ fields: [{
+ name: 'id',
+ type: 'int'
+ },{
+ name: 'date',
+ type: 'string'
+ },{
+ name: 'time',
+ type: 'string'
+ },{
+ name: 'device',
+ type: 'string'
+ },{
+ name: 'event',
+ type: 'int'
+ },{
+ name: 'data',
+ type: 'string',
+ },{
+ name: 'has_target',
+ type: 'boolean'
+ },{
+ name: 'has_geo',
+ type: 'boolean'
+ },{
+ name: 'has_images',
+ type: 'boolean'
+ },{
+ name: 'images',
+ type: 'Array'
+ },{
+ name: 'dev_type',
+ type: 'int'
+ },{
+ name: 'geo',
+ type: 'object'
+ }] /*,
+ proxy : new Ext.data.HttpProxy({
+ method: 'POST',
+ prettyUrls: false,
+ url: '/lib/controller/getEventRecords.php',
+ headers: {
+ UID: =$UserID;?>,
+ SID: '=$Session;?>',
+ NID: 1
+ }
+ })*/
+});
+
+var SelectedEvent = 0;
+var EventPanelWindow = null;
+function showEventPanel(){
+ if( EventPanelWindow == null ){
+ EventPanelWindow = new Ext.Window({
+ modal: true,
+ title: '=$Labels->GetLabel("_EVENT_VIEWER_");?>',
+ width: winW*0.66,
+ height: winH*0.66,
+ layout: 'fit',
+ closeAction: 'hide',
+ items:[{
+ title: 'Cameras',
+ html:'koko',
+ autoScroll: true,
+ height: 320
+ },{
+ html: 'koko22',
+ height: 320
+ }]
+ });
+ };
+ EventPanelWindow .show();
+};
+
+function ModeRenderer(val){
+ var p1, p2, p3;
+ if( ( val & 1 ) == 1 ){
+ p1 = '
';
+ } else {
+ p1 = '
';
+ };
+ if( ( val & 2 ) == 2 ){
+ p2 = '
';
+ } else {
+ p2 = '
';
+ };
+ if( ( val & 4 ) == 4 ){
+ p3 = '
';
+ } else {
+ p3 = '
';
+ };
+ return p1+p2+p3;
+};
+
+function LocRenderer( val ){
+ if( val ){
+ return '
';
+ };
+ return '
';
+};
+function PicRenderer( val ){
+ if( val ){
+ return '
';
+ };
+ return '
';
+};
+
+function EvtTypeRenderer( val ){
+ switch( val ){
+ case 6: return 'Device Enters Into Study Mode';
+ case 7: return 'Device Is BUSY';
+ case 8: return 'Flip Complete';
+ case 9: return 'Scan Complete';
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14: return 'Target';
+ case 36: return 'Region Of Interest';
+ default: return 'Event ['+val+']';
+ };
+};
+
+var eventsListColModel_ops = {
+ columns: [
+ {header: "ID", width: 100, sortable: false, menuDisabled: true, align: 'center', fixed: true, css: 'vertical-align: middle;', dataIndex: 'id' },
+ {header: "Date",width: 100, sortable: false, fixed: true, menuDisabled: true, /*renderer: camCapRenderer,*/ dataIndex: 'date' },
+ {header: "Time", width: 80, sortable: false, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'time' },
+ {header: "Device", width: 80, sortable: false, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'device' },
+ {header: "Event", width: 120, sortable: false, dataIndex: 'event', renderer: EvtTypeRenderer },
+ {header: "Info", width: 200, sortable: false, dataindex: 'data' },
+ {header: "", width: 25, sortable: false, dataIndex: 'has_geo', renderer: LocRenderer },
+ {header: "", width: 25, sortable: false, dataIndex: 'has_images', renderer: PicRenderer }
+ ],
+ defaults: {
+ sortable: true,
+ menuDisabled: true,
+ width: 100
+ },
+ listeners: {
+ hiddenchange: function(cm, colIndex, hidden) {
+ //saveConfig(colIndex, hidden);
+ }
+ }
+};
+var SelectedRow = -1;
+
+var eventsListSelModel_ops = {
+ singleSelect: true,
+ listeners: {
+ rowselect: function(sm, row, rec ) {
+ loadEventProperties( rec.data );
+ SelectedEvent = rec.data.id;
+ SelectedRow = row;
+ //alert( SelectedEvent );
+ //var CB = Ext.getCmp('con_to_src');
+ //CB.enable();
+ }
+ }
+};
+
+function loadTimeLineGroups( NID ){
+ Ext.Ajax.request({
+ url: '/lib/controller/getTimeLineGroups.php',
+ params: {
+ NID: NID,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>'
+ },
+ success: function( response, opts ){
+ // If the response is JSON, you have to decode it
+ var data = Ext.decode(response.responseText);
+ //for(var i = 0; i < data.length; i++) {
+ //tlGroups.add(data[i]);
+ //};
+ tlGroups.update( data );
+ loadTimeLineItems( SelectedSite );
+ tlInterval = window.setInterval( loadTimeLineItems, 333, SelectedSite );
+ },
+ failure: function( response, opts ) {
+ //Ext.fly('some_div').update('Fail!');
+ }/*,
+ callback: function(options,success,response){
+ // use this if you need to perform your own success/failure checking
+ }*/
+ });
+};
+
+function clickDeviceSelector( id ){
+ var rr = document.getElementById(id+'_div');
+ if( selecredActiveSourceFilter != id ){
+ if( selecredActiveSourceFilter > 0 ){
+ var oo = document.getElementById( selecredActiveSourceFilter + '_div');
+ oo.classList.remove( "cardDeviceSourceSelected" );
+ oo.classList.add( "cardDeviceSource" );
+ };
+ rr.classList.remove( "cardDeviceSource" );
+ rr.classList.add( "cardDeviceSourceSelected" );
+ selecredActiveSourceFilter = id;
+ turnOffAllGzButThis( selecredActiveSourceFilter );
+ } else {
+ selecredActiveSourceFilter = 0;
+ rr.classList.remove( "cardDeviceSourceSelected" );
+ rr.classList.add( "cardDeviceSource" );
+ turnAllGzOn();
+ var tPanel = Ext.getCmp('prop_content');
+ tPanel.remove(0);
+ tPanel.add( {
+ title: 'Event Information',
+ border: false,
+ frame: false,
+ collapsible: false,
+ draggable: false,
+ html: 'Select an Event from TimeLine to See Information
'
+ } );
+ tPanel.doLayout();
+
+ };
+};
+function getZoneByNode( nid ){
+ var rVal = -1;
+ for( var i=0; i < ActiveZones.totalCount; i++ ){
+ if( ActiveZones.zones[i].dev_id == nid ){
+ rVal = i;
+ break;
+ };
+ };
+ return rVal;
+};
+
+function turnOffAllGzButThis( nid ){
+ var chocho = -1;
+ for( var i=0; i < ActiveZones.totalCount; i++ ){
+ if( ActiveZones.zones[i].dev_id == nid ) chocho = i;
+ map.removeLayer( ActiveZones.fig[i] );
+ map.removeLayer( ActiveZones.zang[i] );
+ map.removeLayer( ActiveZones.center[i] );
+ };
+ if( chocho > -1 ){
+ map.addLayer( ActiveZones.fig[chocho] );
+ map.addLayer( ActiveZones.zang[chocho] );
+ map.addLayer( ActiveZones.center[chocho] );
+ var cVisible = L.featureGroup( Array( ActiveZones.fig[chocho], ActiveZones.zang[chocho], ActiveZones.center[chocho] ) );
+ map.flyToBounds( cVisible.getBounds() );
+ };
+};
+
+function turnAllGzOn(){
+ var tall = Array();
+ for( var i=0; i < ActiveZones.totalCount; i++ ){
+ tall[i*3] = ActiveZones.fig[i];
+ tall[i*3+1] = ActiveZones.zang[i];
+ tall[i*3+2] = ActiveZones.center[i];
+ if(!map.hasLayer(ActiveZones.fig[i])) map.addLayer( ActiveZones.fig[i] );
+ if(!map.hasLayer(ActiveZones.zang[i])) map.addLayer( ActiveZones.zang[i] );
+ if(!map.hasLayer(ActiveZones.center[i])) map.addLayer( ActiveZones.center[i] );
+ };
+ var cVisible = L.featureGroup( tall );
+ map.flyToBounds( cVisible.getBounds() );
+};
+
+function loadMapZones( SID ){
+ Ext.Ajax.request({
+ url: '/lib/controller/getGeoZones.php',
+ params: {
+ SITE: SID,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>'
+ },
+ success: function( response, opts ){
+ // If the response is JSON, you have to decode it
+ var data = Ext.decode(response.responseText);
+ var pp = Ext.getCmp('sources_panel');
+ if( typeof pp !== 'undefined' ) pp.removeAll();
+ ActiveZones = data;
+ ActiveZones.fig = new Array();
+ ActiveZones.zang = new Array();
+ ActiveZones.center = new Array();
+ for(var i = 0; i < data.totalCount; i++ ) {
+ switch( data.zones[i].type ){
+ case 'circle':{
+ //L.circle( data.zones[i].center, {radius: data.zones[i].radius, color: data.zones[i].color, weight: 1, opacity: 0.8 } ).addTo( map );
+ ActiveZones.fig[i] = new L.circle( data.zones[i].center, {radius: data.zones[i].radius, color: data.zones[i].color, weight: 1, opacity: 0.8 } );
+ //map.addLayer( ActiveZones.fig[i] );
+ break;
+ };
+ case 'poly':{
+ ActiveZones.fig[i] = new L.polygon( data.zones[i].points, {color: data.zones[i].color, dashArray: "4 1 2 3", weight: 1, opacity: 0.8, clickable: false, interactive: false, bubblingMouseEvents: false });//.addTo(map);
+ //map.addLayer( ActiveZones.fig[i] );
+ break;
+ };
+ case 'image':{
+ ActiveZones.fig[i] = L.imageOverlay( data.zones[i].url, data.zones[i].bounds, { opacity: 1.0 });//.addTo( map );
+ //map.addLayer( ActiveZones.fig[i] );
+ break;
+ };
+ case 'image_rot':{
+ ActiveZones.fig[i] = L.imageOverlay.rotated( data.zones[i].url, data.zones[i].topleft, data.zones[i].topright, data.zones[i].bottomleft, {
+ opacity: 0.8 //,
+ //interactive: true,
+ //attribution: "Historical building plan © Instituto Geográfico Nacional de España"
+ });//.addTo( map );
+ //map.addLayer( ActiveZones.fig[i] );
+ break;
+ };
+ };
+ if( data.zones[i].dev_is_source ){
+ if( typeof pp !== 'undefined' ) {
+ var sty = '';
+ if( selecredActiveSourceFilter == data.zones[i].dev_id ){
+ sty = 'cardDeviceSourceSelected';
+ } else {
+ sty = 'cardDeviceSource';
+ };
+ pp.add( {
+ id: data.zones[i].dev_id+'_container',
+ frame: false,
+ border: false,
+ width: 130,
+ height: 130,
+ html: '

'+data.zones[i].dev_name+'
'
+ });
+ };
+ };
+ if( data.zones[i].zang != undefined ){
+ //L.polygon( data.zones[i].zang, {color: '#ffff00', weight: 1, opacity: 1.0, clickable: false, interactive: false, bubblingMouseEvents: false }).addTo(map);
+ ActiveZones.zang[i] = L.circle( data.zones[i].zang, {radius: 0.3, color: '#ffff00', weight: 1, opacity: 1.0, fillOpacity: 1.0 } );//.addTo( map );
+ };
+ if( data.zones[i].center != undefined ){
+ //L.polygon( data.zones[i].zmark, {color: '#ffff00', weight: 1, opacity: 1.0, clickable: false, interactive: false, bubblingMouseEvents: false }).addTo(map);
+ ActiveZones.center[i] = L.circle( data.zones[i].center, {radius: 0.3, color: '#ffff00', weight: 1, opacity: 1.0, fillOpacity: 1.0 } ).addTo( map );
+ };
+ };
+ if( selecredActiveSourceFilter == 0 ){
+ turnAllGzOn();
+ } else {
+ turnOffAllGzButThis( selecredActiveSourceFilter );
+ };
+ if( typeof pp !== 'undefined' ) pp.doLayout();
+ //LoadMapEvents( SelectedSite );
+ //tlInterval = window.setInterval( LoadMapEvents, 333, SelectedSite );
+ },
+ failure: function( response, opts ) {
+ //Ext.fly('some_div').update('Fail!');
+ }
+ });
+};
+
+var cevt = Array();
+var coz = Array();
+
+function showEventsOnMap( data, removeCursor = true ){
+ if( removeCursor ) map.removeLayer( selectedMarker );
+ if( cevt.length ){
+ for( i=0; i< cevt.length; i++ ){
+ if( cevt[i]!= null ){
+ cevt[i].remove();
+ delete( cevt[i] );
+ cevt[i] = null;
+ };
+ };
+ };
+ if( coz.length ){
+ for( i=0; i< coz.length; i++ ){
+ if( coz[i]!= null ){
+ coz[i].remove();
+ delete( coz[i] );
+ coz[i]=null;
+ };
+ };
+ };
+ var zz = ( 1.0 / ( data.log.length + 0 ) );
+ var idx = 0;
+ for( i=0; i < data.log.length; i++ ){
+ if( data.log[i].has_geo ){
+ var cp_color='#FF0000';
+ switch( data.log[i].event ){
+ case 36: cp_color='#0000FF'; break;
+ };
+ cevt[idx] = L.circleMarker( [data.log[i].geo.lat, data.log[i].geo.lon], {id:data.log[i].id, color: cp_color, radius: 5, stroke: false, fillOpacity: ( 1.0 - i * zz ) } ).on('click', function( e, a ){
+ loadEventPropertiesByID( this.options.id );
+ } );
+ cevt[idx].addTo(map);
+ idx++;
+ };
+ };
+};
+
+function LoadMapEventsZ( Mode ){
+ if( tlLoadLocker ) return;
+ tlLoadLocker = true;
+ Ext.Ajax.request({
+ url: '/lib/controller/getGeoAlerts.php',
+ params: {
+ SITE: =$SiteID;?>,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>',
+ MODE: Mode
+ },
+ success: function( response, opts ){
+ if( cevt.length ){
+ for( i=0; i< cevt.length; i++ ){
+ if( cevt[i]!= null ){
+ cevt[i].remove();
+ delete( cevt[i] );
+ cevt[i] = null;
+ };
+ };
+ };
+ if( coz.length ){
+ for( i=0; i< coz.length; i++ ){
+ if( coz[i]!= null ){
+ coz[i].remove();
+ delete( coz[i] );
+ coz[i]=null;
+ };
+ };
+ };
+ var data = Ext.decode( response.responseText );
+ var zz = ( 1.0 / ( data.evt.length + 0 ) );
+ for( i=0; i < data.evt.length; i++ ){
+ cevt[i] = L.circleMarker( [data.evt[i].lat,data.evt[i].lon], {id:data.evt[i].id, color: '#FF0000', radius: 5, stroke: false, fillOpacity: ( 1.0 - i * zz ) } ).on('click', function( e, a ){
+ loadEventProperties( this.options.id );
+ } );
+ cevt[i].addTo(map);
+ };
+ for( i=0; i < data.other.length; i++ ){
+ switch( data.other[i].type ){
+ case 'circle':{
+ coz[i] = L.circleMarker( data.other[i].loc, {id:data.other[i].id, color: data.other[i].color, radius: 5, stroke: false, fillOpacity: 1.0 } );
+ coz[i].addTo(map);
+ break;
+ };
+ };
+ };
+
+ //eventsListStore.reload();
+ tlLoadLocker = false;
+ },
+ failure: function( response, opts ) {
+ //Ext.fly('some_div').update('Fail!');
+ tlLoadLocker = false;
+ }
+ });
+};
+
+function loadEventPropertiesByID( id ){
+ var d = eventsListStore.findExact( 'id', id );
+ if( d > -1 ) {
+ var EventRec = eventsListStore.getAt( d );
+ loadEventProperties( EventRec.data );
+ };
+};
+
+function loadEventProperties( EventRec ){
+ var tPanel = Ext.getCmp('prop_content');
+ tPanel.removeAll();// remove( 0 );
+ var tt = '';
+ if( selectedMarker!= null ){
+ selectedMarker.remove();
+ //map.removeLayer( selectedMarker );
+ if( EventRec.has_geo ){
+ tt = ''+EventRec.geo.lat+' '+EventRec.geo.lon;
+ selectedMarker.setLatLng([EventRec.geo.lat, EventRec.geo.lon]);
+ selectedMarker.addTo( map );
+ };
+ };
+ tPanel.add( {
+ title: 'Event Details',
+ html: '
' + EventRec.device+'
'+tt+''
+ } );
+ if( EventRec.has_images ){
+ for( var i=0; i < EventRec.images.length; i++ ){
+ tPanel.add( {
+ frame: false,
+ html: '
'
+ });
+ };
+ };
+ tPanel.doLayout();
+};
+
+function getData( Mode, ST = 0, ET = 0, SR = 0, DR = 0 ){
+ if( tlLoadLocker ) return;
+ tlLoadLocker = true;
+ if( Mode == 'arch' ){
+ Ext.MessageBox.wait("Loading Data","Please Wait",{
+ width: '100%',
+ hidden: true,
+ animate: true,
+ progress: true,
+ closable: false
+ });
+ };
+ Ext.Ajax.request({
+ url: '/lib/controller/getEventRecords.php',
+ params: {
+ SITE: =$SiteID;?>,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>',
+ MODE: Mode,
+ FIL: selecredActiveSourceFilter,
+ SDA: SD,
+ SMO: SMO,
+ SYE: SY,
+ STM: ST,
+ ETM: ET,
+ STR: SR,
+ DIR: DR
+ },
+ success: function( response, opts ){
+ tlLoadLocker = false;
+ var data = Ext.decode(response.responseText);
+ if( data.updateFROMTO ){
+ Ext.getCmp('STimeFROM').setValue( data.STT );
+ Ext.getCmp('STimeTO').setValue( data.ENT );
+ if( data.SLD > 0 ){
+ SMO = GetMonthNum(data.SLD);
+ SY = GetYear(data.SLD);
+ SD = GetDay(data.SLD);
+ BuildCalendar();
+ };
+ };
+ eventsListStore.loadData( data, false );
+
+ if( Mode == 'arch' ){
+ showEventsOnMap( data, true );
+ Ext.MessageBox.hide();
+ if( DR > 0 ){
+ Ext.getCmp('evtArchLog').getView().focusRow( eventsListStore.getCount() - 1 );
+ Ext.getCmp('evtArchLog').getSelectionModel().selectLastRow();
+ };
+ if( DR < 0 ){
+ Ext.getCmp('evtArchLog').getView().focusRow( 0 );
+ Ext.getCmp('evtArchLog').getSelectionModel().selectFirstRow();
+ };
+ } else {
+ showEventsOnMap( data, false );
+ //LoadMapEventsZ( Mode );
+ };
+ },
+ failure: failureAJAXFunction
+ });
+
+};
+
+function loadArchive(){
+ if( tlInterval!= null ){
+ window.clearInterval( tlInterval );
+ tlInterval = null;
+ timelineObj = null;
+ };
+ setUserContent( 2 );
+ var tPanel = Ext.getCmp('main_portal');
+ tPanel.removeAll( true );
+ Ext.getCmp('main_content').setTitle( 'Events Archive' );
+ tPanel.add({
+ columnWidth: 0.83,
+ frame: false,
+ border: false,
+ items: [{
+ title: 'Site Map',
+ frame: false,
+ border: false,
+ layout: 'vbox',
+ layoutConfig: {
+ align : 'stretch',
+ pack : 'start',
+ },
+ height: PanelH-300,
+ items:[{
+ height: PanelH-325,
+ flex: 1,
+ frame: false,
+ border: false,
+ layout: 'fit',
+ items:{
+ id: 'event_map',
+ html: ' '
+ }
+ }]
+ },{
+ frame: false,
+ border: false,
+ collapsible: false,
+ draggable: false,
+ layout: 'hbox',
+ items:[{
+ layout: 'form',
+ title: 'Date/Time',
+ width: 200,
+ frame: true,
+ border: false,
+ labelAlign: 'right',
+ labelWidth: 50,
+ defaults: { width: 80},
+ items: [{
+ xtype: 'combo',
+ id: 'STimeFROM',
+ fieldLabel: 'From',
+ editable: false,
+ typeAhead: true,
+ triggerAction: 'all',
+ width: 120,
+ lazyRender:true,
+ mode: 'local',
+ store: new Ext.data.ArrayStore({
+ id: 0,
+ fields: ['ss', 'displayText' ],
+ data: []
+ }),
+ valueField: 'ss',
+ displayField: 'displayText'
+ },{
+ xtype: 'combo',
+ id: 'STimeTO',
+ fieldLabel: 'Till',
+ editable: false,
+ typeAhead: true,
+ triggerAction: 'all',
+ width: 120,
+ lazyRender:true,
+ mode: 'local',
+ store: new Ext.data.ArrayStore({
+ id: 0,
+ fields: ['ss', 'displayText' ],
+ data: []
+ }),
+ valueField: 'ss',
+ displayField: 'displayText'
+ }],
+ html: '',
+ buttons: [{
+ xtype: 'button',
+ text: 'Display History',
+ handler: function(){
+ var STU = Ext.getCmp('STimeFROM').getValue();
+ var ETU = Ext.getCmp('STimeTO').getValue();
+ getData( 'arch', STU, ETU );
+ }
+ }]
+ },{
+ title: 'Event Log',
+ frame: false,
+ height: 303,
+ id: 'evtArchLog',
+ xtype: 'grid',
+ ds: eventsListStore,
+ cm: new Ext.grid.ColumnModel( eventsListColModel_ops ),
+ sm: new Ext.grid.RowSelectionModel( eventsListSelModel_ops ),
+ listeners:{
+ keydown: function( e ) {
+ if( e.getKey() == e.UP ){
+ if( SelectedRow == 0 ){
+ var id = eventsListStore.getAt( 0 ).id;
+ getData( 'arch', 0, 0, id, 1 );
+
+ };
+ };
+ if( e.getKey() == e.DOWN ){
+ if( SelectedRow == ( eventsListStore.getCount() - 1 ) ){
+ var id = eventsListStore.getAt( SelectedRow ).id;
+ getData( 'arch', 0, 0, id, -1 );
+ Ext.getCmp('evtArchLog').getSelectionModel().selectFirstRow();
+ Ext.getCmp('evtArchLog').focus( false, true );
+ };
+ };
+ }
+ }
+ }]
+ }]
+ });
+ tPanel.add({
+ columnWidth: 0.17,
+ frame: true,
+ title: 'Event Information',
+ id: 'prop_content',
+ border: false,
+ items: [{
+ html:'=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?>
'
+ }]
+ });
+
+ tPanel.doLayout();
+ /*
+ Ext.getCmp('evtLog').getEl().set({tabindex: "0"});
+ Ext.getCmp('evtLog').getEl().addKeyMap({
+ eventName: "keyup",
+ binding: [{
+ key: Ext.EventObject.SPACE,
+ fn: function(){ alert("Space key pressed"); }
+ },{
+ key: [Ext.EventObject.LEFT, Ext.EventObject.RIGHT],
+ shift: true,
+ fn: function(){ alert("Left or right pressed while pressing shift"); }
+ }]
+ });
+ */
+ //BuildCalendar();
+ loadCalendarDates();
+
+ map = L.map('event_map',{
+ attributionControl: true,
+ //preferCanvas: true,
+ zoomControl: true,
+ center: [SiteLat, SiteLon],
+ /*zoomControl: false,
+ zoom: 17,
+ minZoom: 17,
+ maxZoom: 17,*/
+ keyboard: false
+ }).setView([SiteLat, SiteLon], 17);
+ //L.marker([SiteLat, SiteLon], { draggable: false, icon: SITEZ_Icon } ).addTo(map).on('click', LoadNodesList ).bindPopup("=$Labels->GetLabel('_SYS_ANCHORT_LBL_');?>");
+
+ var mapLayers = [];
+
+ /*mapLayers["Bing"] = new BingLayer('https://t{s}.ssl.ak.dynamic.tiles.virtualearth.net/comp/ch/{q}?it=A,G,L&shading=hill', {
+ subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
+ attribution: '© Bing Maps',
+ detectRetina: true
+ });*/
+ mapLayers["MyMap"] = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
+ attribution: '© OpenStreetMap contributors',
+ maxNativeZoom: 18,
+ maxZoom: 24,
+ })
+ // https://leaflet-extras.github.io/leaflet-providers/preview/
+ mapLayers["EsriStreet"] = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', {
+ attribution: 'Tiles © Esri — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012',
+ maxZoom: 19
+ });
+
+ mapLayers["EsriSat"] = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
+ attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community',
+ maxZoom: 19
+ });
+
+ mapLayers["EsriTopo"] = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}', {
+ attribution: 'Tiles © Esri — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community',
+ maxZoom: 24
+ });
+
+ mapLayers["OpenStreetMap"] = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { //de/tiles/osmde
+ attribution: 'Map data © OpenStreetMap contributors',
+ maxZoom: 19
+ });
+
+ mapLayers["OpenTopoMap"] = L.tileLayer("https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png", {
+ attribution: 'Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA) ',
+ maxZoom: 19
+ });
+ /*
+ mapLayers["Cycle"] = L.tileLayer('https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=' + _PHP['API_KEY_THUNDERFOREST_1'], {
+ attribution: 'Maps © Thunderforest, Data © OpenStreetMap contributors',
+ maxZoom: 22
+ });
+ mapLayers["Landscape"] = L.tileLayer('https://tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey=' + _PHP['API_KEY_THUNDERFOREST_1'], {
+ attribution: 'Maps © Thunderforest, Data © OpenStreetMap contributors',
+ maxZoom: 22
+ });
+ mapLayers["Outdoor"] = L.tileLayer('https://tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey=' + _PHP['API_KEY_THUNDERFOREST_1'], {
+ attribution: 'Maps © Thunderforest, Data © OpenStreetMap contributors',
+ maxZoom: 22
+ });
+ */
+
+ var baseMaps = {
+ "MyMap": mapLayers["MyMap"],
+ "OpenStreetMap": mapLayers["OpenStreetMap"],
+ "OpenTopoMap": mapLayers["OpenTopoMap"],
+ "EsriSat": mapLayers["EsriSat"],
+ "EsriStreet": mapLayers["EsriStreet"],
+ "EsriTopo": mapLayers["EsriTopo"],
+ //"Bing": mapLayers["Bing"],
+ //"OSM-Cycle": mapLayers["Cycle"],
+ //"Landscape": mapLayers["Landscape"],
+ //"Outdoor": mapLayers["Outdoor"],
+ };
+ L.control.layers( baseMaps ).addTo(map);
+
+ mapLayers["MyMap"].addTo(map);
+
+ /*L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
+ attribution: '© OpenStreetMap contributors',
+ maxNativeZoom: 18,
+ maxZoom: 24,
+ }).addTo(map); */
+ //loadTimeLineGroups( selectedSite );
+ loadMapZones( SelectedSite );
+ getData( 'arch' );
+ //eventsListStore.load({params:{start:0, limit:50, src: 'arch', fil: selecredActiveSourceFilter }});
+};
+
+function loadMonitoring(){
+ if( tlInterval!= null ){
+ window.clearInterval( tlInterval );
+ tlInterval = null;
+ timelineObj = null;
+ };
+ setUserContent( 1 );
+ var tPanel = Ext.getCmp('main_portal');
+ tPanel.removeAll( true );
+ Ext.getCmp('main_content').setTitle( 'Events Monitoring' );
+ tPanel.add({
+ columnWidth: 0.83,
+ frame: false,
+ border: false,
+ items: [{
+ title: '=$Labels->getLabel('_MAP_MONITORING_');?>',
+ frame: false,
+ border: false,
+ collapsible: false,
+ draggable: false,
+ layout: 'vbox',
+ layoutConfig: {
+ align : 'stretch',
+ pack : 'start',
+ },
+ height: PanelH-300,
+ items:[{
+ height: PanelH-325,
+ flex: 1,
+ frame: false,
+ border: false,
+ layout: 'fit',
+ items:{
+ id: 'event_map',
+ html: ' '
+ }
+ }]
+ },{
+ frame: false,
+ border: true,
+ collapsible: false,
+ draggable: false,
+ layout: 'hbox',
+ items:[{
+ title: 'Alarm Sources',
+ xtype: 'panel',
+ border: false,
+ frame: false,
+ collapsible: false,
+ draggable: false,
+ id: 'sources_panel',
+ width: 160,
+ autoScroll: 'auto',
+ height: 303
+ },{
+ title: 'Event Log',
+ height: 303,
+ xtype: 'grid',
+ border: false,
+ frame: false,
+ collapsible: false,
+ draggable: false,
+ ds: eventsListStore,
+ cm: new Ext.grid.ColumnModel( eventsListColModel_ops ),
+ sm: new Ext.grid.RowSelectionModel( eventsListSelModel_ops ),
+ bbar: [{
+ text: 'Clear',
+ handler: function(){
+ Ext.Ajax.request({
+ url: '/lib/controller/clearEventCloud.php',
+ params: {
+ UID: =$UserID;?>,
+ SID: '=$Session;?>'
+ },
+ success: function( response, opts ){
+ },
+ failure: function( response, opts ) {
+ }
+ });
+ }
+ }]
+ }]
+ }]
+ });
+ tPanel.add({
+ columnWidth: 0.17,
+ title: 'Event Information',
+ frame: true,
+ id: 'prop_content',
+ border: false,
+ items: [{
+ html:'=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?>
'
+ }]
+ });
+
+ tPanel.doLayout();
+ map = L.map('event_map',{
+ attributionControl: true,
+ //preferCanvas: true,
+ zoomControl: true,
+ center: [SiteLat, SiteLon],
+ /*zoomControl: false,
+ zoom: 17,
+ minZoom: 17,
+ maxZoom: 17,*/
+ keyboard: false
+ }).setView([SiteLat, SiteLon], 17);
+ //L.marker([SiteLat, SiteLon], { draggable: false, icon: SITEZ_Icon } ).addTo(map).on('click', LoadNodesList ).bindPopup("=$Labels->GetLabel('_SYS_ANCHORT_LBL_');?>");
+
+ var mapLayers = [];
+
+ /*mapLayers["Bing"] = new BingLayer('https://t{s}.ssl.ak.dynamic.tiles.virtualearth.net/comp/ch/{q}?it=A,G,L&shading=hill', {
+ subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
+ attribution: '© Bing Maps',
+ detectRetina: true
+ });*/
+ mapLayers["MyMap"] = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
+ attribution: '© OpenStreetMap contributors',
+ maxNativeZoom: 18,
+ maxZoom: 24,
+ })
+ // https://leaflet-extras.github.io/leaflet-providers/preview/
+ mapLayers["EsriStreet"] = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', {
+ attribution: 'Tiles © Esri — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012',
+ maxZoom: 19
+ });
+
+ mapLayers["EsriSat"] = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
+ attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community',
+ maxZoom: 19
+ });
+
+ mapLayers["EsriTopo"] = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}', {
+ attribution: 'Tiles © Esri — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community',
+ maxZoom: 24
+ });
+
+ mapLayers["OpenStreetMap"] = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { //de/tiles/osmde
+ attribution: 'Map data © OpenStreetMap contributors',
+ maxZoom: 19
+ });
+
+ mapLayers["OpenTopoMap"] = L.tileLayer("https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png", {
+ attribution: 'Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA) ',
+ maxZoom: 19
+ });
+ /*
+ mapLayers["Cycle"] = L.tileLayer('https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=' + _PHP['API_KEY_THUNDERFOREST_1'], {
+ attribution: 'Maps © Thunderforest, Data © OpenStreetMap contributors',
+ maxZoom: 22
+ });
+ mapLayers["Landscape"] = L.tileLayer('https://tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey=' + _PHP['API_KEY_THUNDERFOREST_1'], {
+ attribution: 'Maps © Thunderforest, Data © OpenStreetMap contributors',
+ maxZoom: 22
+ });
+ mapLayers["Outdoor"] = L.tileLayer('https://tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey=' + _PHP['API_KEY_THUNDERFOREST_1'], {
+ attribution: 'Maps © Thunderforest, Data © OpenStreetMap contributors',
+ maxZoom: 22
+ });
+ */
+
+ var baseMaps = {
+ "MyMap": mapLayers["MyMap"],
+ "OpenStreetMap": mapLayers["OpenStreetMap"],
+ "OpenTopoMap": mapLayers["OpenTopoMap"],
+ "EsriSat": mapLayers["EsriSat"],
+ "EsriStreet": mapLayers["EsriStreet"],
+ "EsriTopo": mapLayers["EsriTopo"],
+ //"Bing": mapLayers["Bing"],
+ //"OSM-Cycle": mapLayers["Cycle"],
+ //"Landscape": mapLayers["Landscape"],
+ //"Outdoor": mapLayers["Outdoor"],
+ };
+ L.control.layers( baseMaps ).addTo(map);
+
+ mapLayers["MyMap"].addTo(map);
+
+ /*L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
+ attribution: '© OpenStreetMap contributors',
+ maxNativeZoom: 18,
+ maxZoom: 24,
+ }).addTo(map); */
+
+ loadMapZones( SelectedSite );
+ tlInterval = window.setInterval( getData, 333, 'live' );
+};
+
+
+function loadOnlineMonitoring(devID){
+ if( tlInterval!= null ){
+ window.clearInterval( tlInterval );
+ tlInterval = null;
+ timelineObj = null;
+ };
+ var tPanel = Ext.getCmp('main_content');
+ tPanel.removeAll( true );
+ tPanel.add({
+ html: 'Device Monitoring '+devID
+ });
+ tPanel.doLayout();
+};
+
+var ReportMask = null;
+function loadReportSegment( juja ){
+ ReportMask = new Ext.LoadMask(Ext.getCmp('main_content').getEl(), {msg:"Please wait..."});
+ ReportMask.show();
+ var tPanel = Ext.getCmp('main_content');
+ tPanel.removeAll( true );
+ tPanel.doLayout();
+ ReportMask.hide();
+};
+
+function loadReportDayTree( ts ){
+ ReportMask = new Ext.LoadMask(Ext.getCmp('left_side_menu').getEl(), {msg:"Please wait..."});
+ ReportMask.show();
+ Ext.Ajax.request({
+ url: '/lib/controller/getHistoryDay.php',
+ params: {
+ UID: =$UserID;?>,
+ SID: '=$Session;?>',
+ DTS: ts
+ },
+ success: function(response, opts ){
+ var data = Ext.decode( response.responseText );
+ var sPanel = Ext.getCmp('left_side_menu');
+ sPanel.removeAll( true );
+ sPanel.add({
+ xtype: 'panel',
+ layout: 'vbox',
+ frame: true,
+ border: false,
+ items:[{
+ xtype: 'button',
+ text: 'Choose Another Date',
+ width: '100%',
+ handler: function(){
+ initReportsView();
+ }
+ },{
+ xtype: 'spacer',
+ height: 10
+ },{
+ html: 'Zuza'+ts,
+ frame: true,
+ width: '100%',
+ border: false
+ },{
+ xtype: 'treepanel',
+ autoScroll: true,
+ width: '100%',
+ border: true,
+ frame: true,
+ loader: new Ext.tree.TreeLoader(),
+ rootVisible: false,
+ root: new Ext.tree.AsyncTreeNode( data ),
+ listeners: {
+ click: function(n) {
+ if( n.attributes.leaf ){
+ loadReportSegment( 22 );
+ //Ext.Msg.alert('Navigation Tree Click', 'You clicked: "' + n.attributes.text + '"');
+ };
+ }
+ }
+ }]
+ });
+ sPanel.doLayout();
+ ReportMask.hide();
+ }
+ });
+};
+
+function initReportsView(){
+ if( tlInterval!= null ){
+ window.clearInterval( tlInterval );
+ tlInterval = null;
+ timelineObj = null;
+ };
+ var tPanel = Ext.getCmp('main_content');
+ var sPanel = Ext.getCmp('left_side_menu');
+ tPanel.removeAll( true );
+ sPanel.removeAll( true );
+ tPanel.add({
+ xtype: 'panel',
+ height: PanelH+15,
+ html: '',
+ listeners:{
+ afterrender: function(){
+ ReportMask = new Ext.LoadMask(Ext.getCmp('main_content').getEl(), {msg:"Please wait..."});
+ ReportMask.show();
+ var jj = (PanelW - 230)/55;
+ changeStyleSheet('amap-empty-day','{width: '+jj+'px; height: '+jj+'px;}');
+ changeStyleSheet('amap-week-day','{width: '+jj+'px; height: '+jj+'px;}');
+ changeStyleSheet('amap-week-name','{width: '+jj+'px; height: '+jj+'px;}');
+ Ext.Ajax.request({
+ url: '/lib/controller/getHistoryDates.php',
+ params: {
+ UID: =$UserID;?>,
+ SID: '=$Session;?>'
+ },
+ success: function(response, opts ){
+ var data = Ext.decode( response.responseText );
+ var activityMap = new ActivityMap( data, {
+ id: "dji-volume-map",
+ parent: '#activity_ph',
+ showTitle: false,
+ showYears: true,
+ width: 100,
+ hue: 1,
+ fit: true,
+ compact: true,
+ timeColumn: "t",
+ valueColumn: "v"
+ });
+ activityMap.render();
+ ReportMask.hide();
+ }
+ });
+ }
+ }
+ });
+ tPanel.doLayout();
+ sPanel.add({
+ xtype: 'panel',
+ frame: true,
+ border: false,
+ html: 'Zuza'
+ });
+ sPanel.doLayout();
+};
diff --git a/lib/javascript/jsapi_dynamic/mojo_settings.js b/lib/javascript/jsapi_dynamic/mojo_settings.js
index 3c6a0d0..394dbcf 100644
--- a/lib/javascript/jsapi_dynamic/mojo_settings.js
+++ b/lib/javascript/jsapi_dynamic/mojo_settings.js
@@ -284,7 +284,7 @@ function disableModule( ID ){
}
});
};
-
+//cursor: url('data:image/svg+xml;utf8,') 24 24, auto;
function doCamOperation( cid, op, param, reload = false ){
Ext.Ajax.request({
@@ -303,6 +303,54 @@ function doCamOperation( cid, op, param, reload = false ){
}
});
};
+function doApplicationOperation( op, param, reload = false ){
+ Ext.Ajax.request({
+ url: '/lib/controller/doApplicationOperation.php',
+ params: {
+ OPID: op,
+ OPCODE: param,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>'
+ },
+ success: function(){
+ //if( reload ) loadDetectedCameras();
+ //if( reload ) loadAssignedCameras();
+ }
+ });
+};
+function doSensorOperation( sensorid, op, param, reload = false ){
+ Ext.Ajax.request({
+ url: '/lib/controller/doSensorOperation.php',
+ params: {
+ SNID: sensorid,
+ CMD: op,
+ OPID: op,
+ OPCODE: param,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>'
+ },
+ success: function(){
+ if( reload ) loadAttachedSensors();
+ }
+ });
+};
+
+function doResourceOperation( resourceid, op, param, value, reload = false ){
+ Ext.Ajax.request({
+ url: '/lib/controller/doResourceOperation.php',
+ params: {
+ RID: resourceid,
+ OPID: op,
+ OPCODE: param,
+ OPVAL: value,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>'
+ },
+ success: function(){
+ if( reload ) loadAttachedSensors();
+ }
+ });
+};
function removeModule( ID ){
Ext.Msg.show({
@@ -471,7 +519,7 @@ function addEthernet2Uart(){
frame: false,
border: false,
html: '
'
- },{
+ },/*{
fieldLabel: 'Name',
id: 'ued_name'
},{
@@ -502,7 +550,7 @@ function addEthernet2Uart(){
value: =$SSID;?>,
valueField: 'sid',
displayField: 'snam'
- },{
+ },*/{
xtype: 'combo',
fieldLabel: '=$Labels->GetLabel('UART_COM_SPEED');?>',
id: 'ued_speed',
@@ -613,44 +661,43 @@ function addEthernet2Uart(){
var IP = Ext.getCmp('ued_ip').getValue();
var PORT= Ext.getCmp('ued_port').getValue();
var MAC = '';//Ext.getCmp('ued_mac').getValue();
- var NAME= Ext.getCmp('ued_name').getValue();
- var SRV = Ext.getCmp('ued_servid').getValue();
+ //var NAME= Ext.getCmp('ued_name').getValue();
+ //var SRV = Ext.getCmp('ued_servid').getValue();
Ext.Ajax.request({
- url: '/lib/controller/addNetworkNode.php',
- params: {
- SITEID: =$SiteID;?>,
- TYPE: 20,
- UART_SPEED: SPD,
- UART_BITS: BIT,
- UART_STOP: STP,
- UART_PAR: PAR,
- UART_MODE: MOD,
- UART_IP: IP,
- UART_PORT: PORT,
- UART_MAC: MAC,
- UART_NAME: NAME,
- UID: =$UserID;?>,
- SRVID: SRV,
- SID: '=$Session;?>'
- },
- success: function( response, opts ){
- var data = Ext.decode(response.responseText);
- if( data.sucess == false ){
- Ext.Msg.show({
- title:'Request Failure!',
- msg: data.error,
- buttons: Ext.Msg.OK,
- icon: Ext.MessageBox.INFO
- });
- } else {
- loadSystemEditor();
- };
- addE2UDialog.hide();
- },
- failure: function( response, opts ) {
- failureAJAXFunction( response, opts );
- addE2UDialog.hide();
- }
+ url: '/lib/controller/addNode.php',
+ params: {
+ TYPE: 20,
+ UART_SPEED: SPD,
+ UART_BITS: BIT,
+ UART_STOP: STP,
+ UART_PAR: PAR,
+ UART_MODE: MOD,
+ UART_IP: IP,
+ UART_PORT: PORT,
+ UART_MAC: MAC,
+ //UART_NAME: NAME,
+ UID: =$UserID;?>,
+ //SRVID: SRV,
+ SID: '=$Session;?>'
+ },
+ success: function( response, opts ){
+ var data = Ext.decode(response.responseText);
+ if( data.sucess == false ){
+ Ext.Msg.show({
+ title:'Request Failure!',
+ msg: data.error,
+ buttons: Ext.Msg.OK,
+ icon: Ext.MessageBox.INFO
+ });
+ } else {
+ loadRessources();
+ };
+ addE2UDialog.hide();
+ },
+ failure: function( response, opts ) {
+ failureAJAXFunction( response, opts );
+ addE2UDialog.hide();
+ }
});
}
}]
@@ -935,7 +982,7 @@ function showSettingsGeneral(){
content_lvl1 = 1;
content_lvl2 = 0;
var tPanel = Ext.getCmp('main_content');
- tPanel.removeAll( true );
+ tPanel.removeAll( true );
Query( $QS );
@@ -1541,6 +1588,7 @@ function showSettingsVideo(){
updateUserContent();
updateServerStatus();
};
+
function showSettingsApplication(){
stopStatusUpdater();
content_lvl1 = 1;
@@ -1561,6 +1609,18 @@ function showSettingsApplication(){
items:[{
xtype: 'spacer',
height: 10
+ },{
+ xtype: 'panel',
+ frame: false,
+ border: true,
+ bodyStyle: 'background-color: white;',
+
',";
+ ?>
+ height: 130
+ },{
+ xtype: 'spacer',
+ height: 10
},{
xtype: 'combo',
fieldLabel: '=$Labels->GetLabel('_DEBUGGING_MODE_');?>',
@@ -1576,14 +1636,19 @@ function showSettingsApplication(){
}),
value: =0;?>,
valueField: 'sid',
- displayField: 'snam'
+ displayField: 'snam',
+ listeners:{
+ select: function(t,r,i){
+ doApplicationOperation( 1, i );
+ }
+ }
}]
},{
- title: '_MONIT_LAYOUT_',
+ title: '=$Labels->GetLabel('_MONIT_LAYOUT_');?>',
layout:'table',
defaults: {
// applied to each contained panel
- bodyStyle:'padding:20px'
+ bodyStyle:'padding:5px'
},
layoutConfig: {
// The total column count must be specified here
@@ -1600,11 +1665,16 @@ function showSettingsApplication(){
width: '100%',
name: 'layo_apa',
id: 'db_layout_0',
- checked: true
+ checked: ( =$AP_DATA['app_layout'];?> == 0 ),
+ listeners:{
+ check: function( t, state ){
+ if( state ) doApplicationOperation( 2, 0 );
+ }
+ }
},{
frame: false,
border: false,
- html: '
'
+ html: '
'
},{
xtype: 'spacer',
width: 100
@@ -1613,11 +1683,16 @@ function showSettingsApplication(){
width: '100%',
name: 'layo_apa',
id: 'db_layout_1',
- checked: true
+ checked: ( =$AP_DATA['app_layout'];?> == 1 ),
+ listeners:{
+ check: function( t, state ){
+ if( state ) doApplicationOperation( 2, 1 );
+ }
+ }
},{
frame: false,
border: false,
- html: '
'
+ html: '
'
},{
xtype: 'spacer',
width: 100
@@ -1625,11 +1700,16 @@ function showSettingsApplication(){
xtype: 'radio',
name: 'layo_apa',
id: 'db_layout_2',
- checked: true
+ checked: ( =$AP_DATA['app_layout'];?> == 2 ),
+ listeners:{
+ check: function( t, state ){
+ if( state ) doApplicationOperation( 2, 2 );
+ }
+ }
},{
frame: false,
border: false,
- html: '
'
+ html: '
'
},{
xtype: 'spacer',
width: 100
@@ -1638,11 +1718,52 @@ function showSettingsApplication(){
width: '100%',
name: 'layo_apa',
id: 'db_layout_3',
- checked: true
+ checked: ( =$AP_DATA['app_layout'];?> == 3 ),
+ listeners:{
+ check: function( t, state ){
+ if( state ) doApplicationOperation( 2, 3 );
+ }
+ }
+ },{
+ frame: false,
+ border: false,
+ html: '
'
+ },{
+ xtype: 'spacer',
+ width: 100
+ },{
+ xtype: 'radio',
+ width: '100%',
+ name: 'layo_apa',
+ id: 'db_layout_4',
+ checked: ( =$AP_DATA['app_layout'];?> == 4 ),
+ listeners:{
+ check: function( t, state ){
+ if( state ) doApplicationOperation( 2, 4 );
+ }
+ }
+ },{
+ frame: false,
+ border: false,
+ html: '
'
+ },{
+ xtype: 'spacer',
+ width: 100
+ },{
+ xtype: 'radio',
+ width: '100%',
+ name: 'layo_apa',
+ id: 'db_layout_5',
+ checked: ( =$AP_DATA['app_layout'];?> == 5 ),
+ listeners:{
+ check: function( t, state ){
+ if( state ) doApplicationOperation( 2, 5 );
+ }
+ }
},{
frame: false,
border: false,
- html: '
'
+ html: '
'
}]
}]
});
@@ -1667,16 +1788,89 @@ function initSettingsView(){
timelineObj = null;
};
var tP = Ext.getCmp('left_side_menu');
- tP.doLayout();
- tP.setVisible( false );
+ //tP.doLayout();
+ //tP.setVisible( false );
tP.removeAll( true );
tP.add({
- title: '=$Labels->GetLabel('_DET_SETTINGS_');?>',
+ id: 'sme_inner',
+ layout:'accordion',
+ //height: PanelH,
+ frame: false,
+ border: false,
+ layoutConfig:{
+ animate: true//,
+ //activeOnTop: true
+ },
+ items:[]
+ });
+ tP.doLayout();
+ tP = Ext.getCmp('sme_inner');
+ tP.add({
+ title: '=$Labels->GetLabel('_SYS_SETTINGS_');?>',
layout: 'vbox',
height: 120,
pack: 'center',
align : 'strech',
collapsed: ( content_lvl1 != 0 ),
+ items:[{
+ xtype: 'button',
+ width: '100%',
+ id:'sys_edit',
+ text: '=$Labels->GetLabel('_SYS_GENERAL_');?>',
+ enableToggle: true,
+ pressed: ( content_lvl2 == 0 && content_lvl1 == 0 ),
+ allowDepress: false,
+ toggleGroup: 'sys_settings',
+ handler: showSettingsGeneral
+ },{
+ xtype: 'button',
+ width: '100%',
+ id:'map_edit',
+ text: '=$Labels->GetLabel('_SENSOR_CONNECTION_');?>',
+ enableToggle: true,
+ pressed: ( content_lvl2 == 1 && content_lvl1 == 0 ),
+ allowDepress: false,
+ toggleGroup: 'sys_settings',
+ handler: showSettingsSensors
+ },{
+ xtype: 'button',
+ width: '100%',
+ id:'video_set',
+ text: '=$Labels->GetLabel('_CAMERA_MNGMNT_');?>',
+ enableToggle: true,
+ pressed: ( content_lvl2 == 2 && content_lvl1 == 0 ),
+ allowDepress: false,
+ toggleGroup: 'sys_settings',
+ handler: showSettingsVideo
+ },{
+ xtype: 'button',
+ width: '100%',
+ id:'app_set',
+ text: '=$Labels->GetLabel('_APPLICA_MNGMNT_');?>',
+ enableToggle: true,
+ pressed: ( content_lvl2 == 3 && content_lvl1 == 0 ),
+ allowDepress: false,
+ toggleGroup: 'sys_settings',
+ handler: showSettingsApplication
+ },{
+ xtype: 'button',
+ width: '100%',
+ id:'soft_update',
+ text: '=$Labels->GetLabel('_UPGRADE_MNGMNT_');?>',
+ enableToggle: true,
+ pressed: ( content_lvl2 == 4 && content_lvl1 == 0 ),
+ allowDepress: false,
+ toggleGroup: 'sys_settings',
+ handler: showSettingsUpgrade
+ }]
+ });
+ tP.add({
+ title: '=$Labels->GetLabel('_DET_SETTINGS_');?>',
+ layout: 'vbox',
+ height: 120,
+ pack: 'center',
+ align : 'strech',
+ collapsed: ( content_lvl1 != 1 ),
items:[
@@ -1686,7 +1880,7 @@ function initSettingsView(){
id:'go_home',
text: '=$Labels->GetLabel('_UPPER_SENSOR_');?>',
enableToggle: true,
- pressed: ( content_lvl2 == 0 && content_lvl1 == 0 ),
+ pressed: ( content_lvl2 == 0 && content_lvl1 == 1 ),
allowDepress: false,
toggleGroup: 'det_settings',
handler: loadDashBoard
@@ -1696,7 +1890,7 @@ function initSettingsView(){
id:'go_monitor',
text: '=$Labels->GetLabel('_BOTTOM_SENSOR_');?>',
enableToggle: true,
- pressed: ( content_lvl2 == 1 && content_lvl1 == 0 ),
+ pressed: ( content_lvl2 == 1 && content_lvl1 == 1 ),
allowDepress: false,
toggleGroup: 'det_settings',
handler: loadMonitoring
@@ -1706,7 +1900,7 @@ function initSettingsView(){
id:'go_archive',
text: '=$Labels->GetLabel('_FUSION_ENGINE_');?>',
enableToggle: true,
- pressed: ( content_lvl2 == 2 && content_lvl1 == 0 ),
+ pressed: ( content_lvl2 == 2 && content_lvl1 == 1 ),
allowDepress: false,
toggleGroup: 'det_settings',
handler: loadArchive
@@ -1721,7 +1915,7 @@ function initSettingsView(){
id:'go_singleIpi',
text: '=$Labels->GetLabel('_EVT_MONITOR_IPI_');?>',
enableToggle: true,
- pressed: ( content_lvl2 == 3 && content_lvl1 == 0 ),
+ pressed: ( content_lvl2 == 0 && content_lvl1 == 1 ),
allowDepress: false,
toggleGroup: 'det_settings',
handler: loadSingleIPI
@@ -1739,65 +1933,6 @@ function initSettingsView(){
};
?>]
});
- tP.add({
- title: '=$Labels->GetLabel('_SYS_SETTINGS_');?>',
- layout: 'vbox',
- height: 120,
- pack: 'center',
- align : 'strech',
- collapsed: ( content_lvl1 != 1 ),
- items:[{
- xtype: 'button',
- width: '100%',
- id:'sys_edit',
- text: '=$Labels->GetLabel('_SYS_GENERAL_');?>',
- enableToggle: true,
- pressed: ( content_lvl2 == 0 && content_lvl1 == 1 ),
- allowDepress: false,
- toggleGroup: 'sys_settings',
- handler: showSettingsGeneral
- },{
- xtype: 'button',
- width: '100%',
- id:'map_edit',
- text: '=$Labels->GetLabel('_SENSOR_CONNECTION_');?>',
- enableToggle: true,
- pressed: ( content_lvl2 == 1 && content_lvl1 == 1 ),
- allowDepress: false,
- toggleGroup: 'sys_settings',
- handler: showSettingsSensors
- },{
- xtype: 'button',
- width: '100%',
- id:'video_set',
- text: '=$Labels->GetLabel('_CAMERA_MNGMNT_');?>',
- enableToggle: true,
- pressed: ( content_lvl2 == 2 && content_lvl1 == 1 ),
- allowDepress: false,
- toggleGroup: 'sys_settings',
- handler: showSettingsVideo
- },{
- xtype: 'button',
- width: '100%',
- id:'app_set',
- text: '=$Labels->GetLabel('_APPLICA_MNGMNT_');?>',
- enableToggle: true,
- pressed: ( content_lvl2 == 3 && content_lvl1 == 1 ),
- allowDepress: false,
- toggleGroup: 'sys_settings',
- handler: showSettingsApplication
- },{
- xtype: 'button',
- width: '100%',
- id:'soft_update',
- text: '=$Labels->GetLabel('_UPGRADE_MNGMNT_');?>',
- enableToggle: true,
- pressed: ( content_lvl2 == 4 && content_lvl1 == 1 ),
- allowDepress: false,
- toggleGroup: 'sys_settings',
- handler: showSettingsUpgrade
- }]
- });
tP.add({
title: '=$Labels->GetLabel('_NET_SETTINGS_');?>',
collapsed: ( content_lvl1 != 2 ),
@@ -1842,7 +1977,7 @@ function initSettingsView(){
id:'adm_acc',
text: '=$Labels->GetLabel('_USERS_MNGMT_');?>',
enableToggle: true,
- pressed: ( content_lvl2 == 11 ),
+ pressed: ( content_lvl2 == 0 && content_lvl1 == 3 ),
allowDepress: false,
handler: function( b, e ){
loadUserEditor();
@@ -1853,7 +1988,7 @@ function initSettingsView(){
id:'adm_acclog',
text: '=$Labels->GetLabel('_ACC_LOG_');?>',
enableToggle: true,
- pressed: ( content_lvl2 == 12 ),
+ pressed: ( content_lvl2 == 1 && content_lvl1 == 3 ),
allowDepress: false,
handler: function( b, e ){
loadAccessLog();
@@ -1864,7 +1999,7 @@ function initSettingsView(){
id:'adm_servlog',
text: '=$Labels->GetLabel('_SERV_LOG_');?>',
enableToggle: true,
- pressed: ( content_lvl2 == 13 ),
+ pressed: ( content_lvl2 == 2 && content_lvl1 == 3 ),
allowDepress: false,
handler: function( b, e ){
loadServerLog();
@@ -1875,15 +2010,9 @@ function initSettingsView(){
};
?>
tP.setVisible( true );
- tP.doLayout();
+ tP.doLayout();
switch( content_lvl1 ){
case 0:{
- switch( content_lvl2 ){
- case 0: break;
- };
- break;
- };
- case 1:{
switch( content_lvl2 ){
case 0: showSettingsGeneral(); break;
case 1: showSettingsSensors(); break;
@@ -1892,5 +2021,11 @@ function initSettingsView(){
case 4: showSettingsUpgrade(); break;
};
};
+ case 1:{
+ switch( content_lvl2 ){
+ case 0: break;
+ };
+ break;
+ };
};
};
\ No newline at end of file
diff --git a/lib/javascript/jsapi_dynamic/rgoose_global_vars.js b/lib/javascript/jsapi_dynamic/rgoose_global_vars.js
index 9ae65fe..bd99343 100644
--- a/lib/javascript/jsapi_dynamic/rgoose_global_vars.js
+++ b/lib/javascript/jsapi_dynamic/rgoose_global_vars.js
@@ -19,8 +19,8 @@ var PanelH = winH-90;
var SelectedSite = =$SiteID;?>;
var SettingsLidar3D = null;
var SelectedNodeID = 0;
-var StatusTS = -1;
-var LoadTS = =time();?>;
+var StatusTS = 0;
+var LoadTS = 0;
var SoundEnable = =intval($CUser->Data['sound_enable']);?>;
var nodeDashboardStatuses = new Array();
var nodeTHREEviewers = new Array();
diff --git a/lib/javascript/jsapi_static/rgoose_general.js b/lib/javascript/jsapi_static/mojo_general.js
similarity index 94%
rename from lib/javascript/jsapi_static/rgoose_general.js
rename to lib/javascript/jsapi_static/mojo_general.js
index 032b2ac..2a12ff3 100644
--- a/lib/javascript/jsapi_static/rgoose_general.js
+++ b/lib/javascript/jsapi_static/mojo_general.js
@@ -266,3 +266,18 @@ function loadLinkProperties( EdgeID, From, To ){
//alert( 'Edge: ' + EdgeID );
};
+function changeStyleSheet( id, new_css ) {
+ for(var i=0; iQuery( $QS );
diff --git a/lib/php/argus/mojo.php b/lib/php/argus/mojo.php
index 157067d..e325ad4 100644
--- a/lib/php/argus/mojo.php
+++ b/lib/php/argus/mojo.php
@@ -54,7 +54,7 @@
function createResource( $NodeID, $AuxID, $Type, $DeviceDesc ){
global $DATABASE;
$MD5 = md5( $NodeID.':'.$Type.':'.$DeviceDesc );
- $QS = "INSERT INTO `resources` SET `node_id`={$NodeID}, `used`=0, `type`={$Type}, `md5`='{$MD5}', `aux_id`={$AuxID}, `device`='{$DeviceDesc}', `active`=1 ON DUPLICATE KEY UPDATE `used`=0, `active`=1, `aux_id`={$AuxID}";
+ $QS = "INSERT INTO `resources`(`node_id`,`used`,`type`,`md5`,`aux_id`,`device`,`active`) VALUES ({$NodeID},0,{$Type},'{$MD5}',{$AuxID},'{$DeviceDesc}', 0 ) ON CONFLICT(`md5`) DO UPDATE SET `used`=0, `active`=1, `aux_id`={$AuxID}";
$DATABASE->Query( $QS, false );
$RID = $DATABASE->getLastInsertID();
if( $RID == 0 ){
@@ -419,7 +419,7 @@
return false;
};
- function addEthernet2Serial( $SiteID, $ServerNODE, $Name, $Mac, $Ip, $Port, $Mode, $Speed, $Bits, $Stop, $Parity, $User='admin', $Pass='admin' ){
+ function addEthernet2Serial( $Mac, $Ip, $Port, $Mode, $Speed, $Bits, $Stop, $Parity, $User='admin', $Pass='admin' ){
global $DATABASE;
$SPD = intval( $Speed );
$BITS = intval( $Bits );
@@ -430,27 +430,32 @@
$PORT = intval( $Port );
$EUSER = $DATABASE->escape( $User );
$EPASS = $DATABASE->escape( $Pass );
- //Add Node
- $QS = "INSERT INTO nodes SET `type`=20, `aux_id`=0, `site_id`={$SiteID}, `name`='{$Name}'";
- $DATABASE->Query( $QS, false );
- $NODEID = $DATABASE->getLastInsertID();
//Add UART
- $QS = "INSERT INTO `uart_settings` SET `type`=129, `node_id`={$NODEID}, `mode`={$MODE}, `bit`={$BITS}, `parity`='{$PAR}', `stop_bit`={$STOP}, `port`={$PORT}, `path`='{$IP}', `username`='{$EUSER}', `password`='{$EPASS}'";
+ $QS = "INSERT INTO `uart_settings`(`type`,`node_id`, `mode`,`bit`,`parity`,`stop_bit`,`port`,`path`,`username`,`password`) VALUES( 129, 0,{$MODE},{$BITS},'{$PAR}',{$STOP},{$PORT},'{$IP}','{$EUSER}','{$EPASS}')";
$DATABASE->Query( $QS, false );
$UARTID = $DATABASE->getLastInsertID();
$DevICE = $IP .':'.$PORT;
+ //Add Node
+ $Name = 'Ethernet2Uart_'.$UARTID;
+ $QS = "INSERT INTO `nodes`(`type`,`aux_id`,`name`, `enable`) VALUES (20,{$UARTID},'{$Name}',1)";
+ $DATABASE->Query( $QS, false );
+ $NODEID = $DATABASE->getLastInsertID();
+
+ $QS = "UPDATE `uart_settings` SET `node_id`={$NODEID} WHERE `id`={$UARTID}";
+ $DATABASE->Query( $QS );
+
$UARTRESID = createResource( $NODEID, $UARTID, ARGUS_NODE_RES_TYPE_SERIAL_PORT, $DevICE );
- $QS = "UPDATE `nodes` SET `aux_id`={$UARTID}, `aux_parameter`={$UARTRESID} WHERE `id`={$NODEID}";
+ $QS = "UPDATE `nodes` SET `aux_parameter`={$UARTRESID} WHERE `id`={$NODEID}";
$DATABASE->Query( $QS, false );
//Add Network
- $NETID = createNIF( $NODEID . ':eth0' );
- $NETRESID = createResource( $NODEID, $NETID, ARGUS_NODE_RES_TYPE_NETWORK, $DevICE );
+ //$NETID = createNIF( $NODEID . ':eth0' );
+ //$NETRESID = createResource( $NODEID, $NETID, ARGUS_NODE_RES_TYPE_NETWORK, $DevICE );
//Connection Server <-> E2S
- $II = getResourceIDS( $ServerNODE, ARGUS_NODE_RES_TYPE_NETWORK );
- $SNETRESID = $II[0]['id'];
- createConnection( $SiteID, $ServerNODE, $SNETRESID[0], $NODEID, $NETRESID, CON_TYPE_TCP );
+ //$II = getResourceIDS( $ServerNODE, ARGUS_NODE_RES_TYPE_NETWORK );
+ //$SNETRESID = $II[0]['id'];
+ //createConnection( $SiteID, $ServerNODE, $SNETRESID[0], $NODEID, $NETRESID, CON_TYPE_TCP );
return true;
};
diff --git a/lib/php/ui/UI_functions.php b/lib/php/ui/UI_functions.php
index d92b09a..8498899 100644
--- a/lib/php/ui/UI_functions.php
+++ b/lib/php/ui/UI_functions.php
@@ -185,12 +185,35 @@ function UI_PageHeaderExt($Static_Scoop = '', $Dynamic_Scoop = ''){
-
-
-
-
-
+ Data['ui_theme'] ){
+ case 0:
+?>
+
+
+
+
+
+
+
+
+
+
+
+
@@ -249,6 +272,11 @@ function UI_PageHeaderExt($Static_Scoop = '', $Dynamic_Scoop = ''){
+
+
+
+
+
diff --git a/style/assets/16-9-nocam.png b/style/assets/16-9-nocam.png
new file mode 100644
index 0000000..66860f4
Binary files /dev/null and b/style/assets/16-9-nocam.png differ
diff --git a/style/assets/20f21b4f01f1b7587f728b05dfc9f4ea.png b/style/assets/20f21b4f01f1b7587f728b05dfc9f4ea.png
new file mode 100644
index 0000000..d110398
Binary files /dev/null and b/style/assets/20f21b4f01f1b7587f728b05dfc9f4ea.png differ
diff --git a/style/assets/278-2785296_la-metro-logo-png-png-download-metro-logo.png b/style/assets/278-2785296_la-metro-logo-png-png-download-metro-logo.png
new file mode 100644
index 0000000..78a19b5
Binary files /dev/null and b/style/assets/278-2785296_la-metro-logo-png-png-download-metro-logo.png differ
diff --git a/style/assets/draw100 - Copy.svg b/style/assets/draw100 - Copy.svg
new file mode 100644
index 0000000..b87f166
--- /dev/null
+++ b/style/assets/draw100 - Copy.svg
@@ -0,0 +1,22 @@
+
+
+
+
+
diff --git a/style/assets/draw100.css b/style/assets/draw100.css
new file mode 100644
index 0000000..2b439d5
--- /dev/null
+++ b/style/assets/draw100.css
@@ -0,0 +1,7 @@
+@charset "UTF-8";
+.str3 {stroke:#FFF212;stroke-width:1.47993}
+.str0 {stroke:#373435;stroke-width:5.92139}
+.str1 {stroke:#FFF212;stroke-width:3.94741}
+.str2 {stroke:#FFF212;stroke-width:2.96042}
+.fil1 {fill:none}
+.fil0 {fill:#00A859}
diff --git a/style/assets/draw100.svg b/style/assets/draw100.svg
new file mode 100644
index 0000000..8d177d0
--- /dev/null
+++ b/style/assets/draw100.svg
@@ -0,0 +1,11 @@
+
diff --git a/style/assets/ed-2.png b/style/assets/ed-2.png
index 21ca292..4d57d2c 100644
Binary files a/style/assets/ed-2.png and b/style/assets/ed-2.png differ
diff --git a/style/assets/ed-4.png b/style/assets/ed-4.png
new file mode 100644
index 0000000..21ca292
Binary files /dev/null and b/style/assets/ed-4.png differ
diff --git a/style/assets/ed-5.png b/style/assets/ed-5.png
new file mode 100644
index 0000000..58afffd
Binary files /dev/null and b/style/assets/ed-5.png differ
diff --git a/style/assets/logo2.png b/style/assets/logo2.png
new file mode 100644
index 0000000..e431ee1
Binary files /dev/null and b/style/assets/logo2.png differ
diff --git a/style/assets/mer-big-1.png b/style/assets/mer-big-1.png
new file mode 100644
index 0000000..fdcbd1d
Binary files /dev/null and b/style/assets/mer-big-1.png differ
diff --git a/style/assets/mer.svg b/style/assets/mer.svg
new file mode 100644
index 0000000..5dc2c93
--- /dev/null
+++ b/style/assets/mer.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/style/assets/og.png b/style/assets/og.png
new file mode 100644
index 0000000..556e1d9
Binary files /dev/null and b/style/assets/og.png differ
diff --git a/style/assets/unnamed (1).png b/style/assets/unnamed_n.png
similarity index 100%
rename from style/assets/unnamed (1).png
rename to style/assets/unnamed_n.png
diff --git a/style/style.css b/style/style.css
index bd02f22..fbe6aa0 100644
--- a/style/style.css
+++ b/style/style.css
@@ -107,6 +107,10 @@
background-color: silver;
background-image: url("icons/icons/monitor_link.png");
}
+.sideInfo_item#VIDEO_N:hover{
+ color: yelow;
+ background-color: darkgray;
+}
.sideInfo_item#NET_O{
color: yelow;
@@ -126,7 +130,7 @@
}
.sideInfo_item#NET_N:hover{
color: black;
- background-color: silver;
+ background-color: darkgray;
}
.sideInfo_item#MEDIA_O{
@@ -449,6 +453,8 @@ object:hover {
.ptz_ctrl_btn{
width: 24px;
height: 24px;
+ filter: invert(1);
+ mix-blend-mode: difference;
border: 2px solid black;
}
.ptz_ctrl_btn:hover{
@@ -456,7 +462,7 @@ object:hover {
cursor: pointer;
}
.ptz_ctrl_btn:active{
- border: 2px solid red;
+ border: 2px solid red;
cursor: pointer;
}
/* Correct Style */
@@ -663,13 +669,25 @@ A.CalendarDS:hover {
padding: 5px;
margin-top: 1px;
margin-bottom: 1px;
- color: black;
+ color: black;
background-color: orange;
}
.setEd_infoPanel#UART{
color: yellow;
background-color: green;
}
+.setEd_infoPanel#GRABBER{
+ color: black;
+ background-color: violet;
+}
+.setEd_infoPanel#WARN{
+ color: yellow;
+ background-color: red;
+}
+.setEd_infoPanel#NETWORK{
+ color: yellow;
+ background-color: green;
+}
.setEd_infoPanel#ONVIF{
color: black;
background-color: #8ecdf6;
@@ -684,15 +702,27 @@ A.CalendarDS:hover {
}
.setEd_infoPanel#NUNU{
color: yellow;
+ height: 100%;
background-color: #3f4757;
background-image: url('assets/vg.png');
background-repeat: no-repeat;
background-position: center 30px;
+ padding-top: 200px;
text-align: center;
- height: 200px;
+ /*height: 200px;*/
background-size: 150px 150px;
}
+.setEd_infoPanel#SENSOR_N{
+ color: black;
+ background-color: silver;
+}
+
+.setEd_infoPanel#SENSOR_A{
+ color: yellow;
+ background-color: green;
+}
+
.server_img_set{
display: block;
border-radius: 128px;
@@ -704,6 +734,7 @@ A.CalendarDS:hover {
background-position: 25px 15px;
background-size: 220px 220px;
}
+
.node_1_img_set{
display: block;
border-radius: 128px;
@@ -748,6 +779,52 @@ A.CalendarDS:hover {
background-position: 17px 15px;
background-size: 220px 220px;
}
+.node_1_img_sset{
+ display: block;
+ border-radius: 64px;
+ width: 128px;
+ height: 128px;
+ background-color: #fff343;
+ background-image: url('assets/!cid_ii_jvmzuzrm9.png');
+ background-repeat: no-repeat;
+ background-position: 10px 10px;
+ background-size: 110px 110px;
+}
+.node_2_img_sset{
+ display: block;
+ border-radius: 64px;
+ width: 128px;
+ height: 128px;
+ background-color: #fff343;
+ background-image: url('assets/!cid_ii_jvmzuzqb2.png');
+ background-repeat: no-repeat;
+ background-position: 10px 10px;
+ background-size: 110px 110px;
+}
+.node_3_img_sset{
+ display: block;
+ border-radius: 64px;
+ width: 128px;
+ height: 128px;
+ background-color: #fff343;
+ background-image: url('assets/!cid_ii_jvmzuzqh3.png');
+ background-repeat: no-repeat;
+ background-position: 10px 10px;
+ background-size: 110px 110px;
+}
+.node_4_img_sset{
+ display: block;
+ border-radius: 64px;
+ width: 128px;
+ height: 128px;
+ background-color: #fff343;
+ background-image: url('assets/!cid_ii_jvmzuzqx6.png');
+ background-repeat: no-repeat;
+ background-position: 10px 10px;
+ background-size: 110px 110px;
+}
+
+
.camera_hikvision_set{
display: block;
border-radius: 128px;
@@ -1040,11 +1117,67 @@ A.CalendarDS:hover {
display: block;
border-radius: 4px;
- padding: 5px;
+ padding: 5px;
margin-top: 1px;
margin-bottom: 1px;
background-repeat: no-repeat;
background-position: 5px 5px;
padding-left: 42px !important;
background-size: 32px 32px;
-}
\ No newline at end of file
+}
+.status_2d_div{
+ display: block;
+ height: 28px;
+ padding-top: 6px;
+ padding-left: 30px;
+ font-weight: bold!important;
+}
+.status_2d_div#OFFLINE{
+ color: black;
+ background-color: gray;
+ background-image: url(assets/offline.png);
+ background-repeat: no-repeat;
+ background-position: 6px 6px;
+}
+.status_2d_div#NOCONECT{
+ color: black;
+ background-color: green;
+ background-image: url(assets/offline.png);
+ background-repeat: no-repeat;
+ background-position: 6px 6px;
+}
+.status_2d_div#CONNECT{
+ color: gray;
+ background-color: green;
+ background-image: url(assets/green_1.gif);
+ background-repeat: no-repeat;
+ background-position: 6px 6px;
+}
+.status_2d_div#STUDY{
+ color: yellow;
+ background-color: green;
+ background-image: url(assets/green_1.gif);
+ background-repeat: no-repeat;
+ background-position: 6px 6px;
+}
+.status_2d_div#READY{
+ color: yellow;
+ background-color: green;
+ background-image: url(assets/green_2.gif);
+ background-repeat: no-repeat;
+ background-position: 6px 6px;
+}
+.status_2d_div#DETECTIONS{
+ color: yellow;
+ background-color: red;
+ background-image: url(assets/red_2.gif);
+ background-repeat: no-repeat;
+ background-position: 6px 6px;
+}
+.status_2d_div#BUSY{
+ color: white;
+ background-color: blue;
+ background-image: url(assets/red_1.gif);
+ background-repeat: no-repeat;
+ background-position: 6px 6px;
+}
diff --git a/style/wicons/020.png b/style/wicons/020.png
new file mode 100644
index 0000000..3238302
Binary files /dev/null and b/style/wicons/020.png differ