Browse Source

Before ATP of MER Group (preluminary)

master
Evgeny Gagua 3 years ago
parent
commit
341b6e7997
  1. 18
      lib/controller/getHistoryEvents.php
  2. 117
      lib/controller/getReportLayout.php
  3. 12
      lib/controller/getStatus.php
  4. 29
      lib/controller/report/node_1.js
  5. 2
      lib/controller/report/node_13.js
  6. 29
      lib/controller/report/node_3.js
  7. 2
      lib/javascript/jsapi_dynamic/mojo_dashboard.js
  8. 76
      lib/javascript/jsapi_dynamic/mojo_map.js
  9. 68
      lib/javascript/jsapi_dynamic/mojo_reports.js

18
lib/controller/getHistoryEvents.php

@ -5,6 +5,10 @@
$EID = intval( $_POST['EID'] );
$DTS = intval( $_POST['TS'] );
if( $BID ){
$QS = "SELECT * FROM `system_props` LIMIT 1";
$SPD = $DATABASE->Query( $QS );
$SP = $SPD[0];
$QS = "SELECT * FROM nodes";
$result = $DATABASE->Query( $QS, false );
$NodeNames = array();
@ -29,6 +33,20 @@
$CR['r'] = intval( $REC['range_digital'] );
$CR['width'] = intval( $REC['area'] );
$CR['video_id'] = intval( $REC['video_id'] );
if( $REC['lat'] != 0 && $REC['lon'] != 0 ){
$CR['geo'] = true;
if( $SP['local_binding'] != 0 ){
$CR['lon'] = floatval( $SP['anchor_lon'] ) + floatval( $REC['lon'] );
$CR['lat'] = floatval( $SP['anchor_lat'] ) + floatval( $REC['lat'] );
} else {
$CR['lon'] = floatval( $REC['lon'] );
$CR['lat'] = floatval( $REC['lat'] );
};
} else {
$CR['geo'] = false;
if( isset( $CR['lon'] ) ) unset( $CR['lon'] );
if( isset( $CR['lat'] ) ) unset( $CR['lat'] );
};
$Data['log'][] = $CR;
};
echo json_encode( $Data );

117
lib/controller/getReportLayout.php

@ -9,7 +9,7 @@
$SP = $SPD[0];
$DUMMY = array();
if( $CUser->Data['access'] > 5 ){
$TABA =<<<jodjhowierewt
$TABA =<<<_DATA_BOUNDARY
{
xtype: 'panel',
html: '<table id="tbl_ph_ccc_%%ID%%" style="color: black; background-image: url(\'/style/assets/16-9-nocam.png\');" width="100%" border=0><tr><td colspan=3>&nbsp;</td></tr><tr><td>&nbsp;</td><td align="center"><div id="btn_ph_ccc_%%ID%%"></div></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></table>',
@ -52,9 +52,9 @@
}
}
}
jodjhowierewt;
_DATA_BOUNDARY;
$LOGIO=<<<kahkjahskfgkgkh
$LOGIO=<<<_DATA_BOUNDARY
{
xtype: 'grid',
id: 'rep_grid',
@ -91,8 +91,28 @@ $LOGIO=<<<kahkjahskfgkgkh
}
}
}
kahkjahskfgkgkh;
_DATA_BOUNDARY;
$MAPIO=<<<_DATA_BOUNDARY
{
id: 'report_map',
height: 200,
title: 'Map',
frame: true,
draggable: false,
collapsible: false,
html: '&nbsp;',
listeners:{
afterrender : function( t ){
var papa = Ext.getCmp('segment_portal');
var jj = 9 * papa.getWidth() / 32;//getComponent( 0 ).getHeight();
//alert( jj );
t.setHeight( jj + 30 );
geoMapIsPresent = true;
initMapReporting();
}
}
}
_DATA_BOUNDARY;
$DUMMY['camera']="{xtype:'panel', id:'pan_ph_ccc_%%ID%%', title: 'Camera Placeholder', frame: true, border: true, draggable: false, layouit: 'fit', items:{$TABA}}";
$DUMMY['sensor']="{xtype:'panel', title: 'Sensor Placeholder', frame: true, border: true, draggable: false, html:'NO SENSOR', listeners:{ afterrender: function(p){ var W=p.getWidth(); p.setHeight( 66+W );}}}";
$DUMMY['map']="{xtype:'panel', title: 'Map Placeholder', frame: true, height: 200, border: true, draggable: false, html:'NO MAP'}";
@ -106,7 +126,8 @@ kahkjahskfgkgkh;
$STA = array();
$END="]}";
$OUT = array();
{
if( $SP['type'] == 1 ) {
//Metro
$STA[0]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
$STA[2]="{ columnWidth: .50, stylse:'padding:10px 0 10px 10px', items:[";
@ -183,18 +204,82 @@ kahkjahskfgkgkh;
$OUT[]= $STA[2+$idx] . $T . $END;
};
};
switch( 1 ){
case 0:{
//Togo
$OUT[]= $STA[3] . $DUMMY['map'] . $END;
break;
$OUT[]= $STA[3] . $DUMMY['log'] . $END;
} else {
$STA[0]="{ columnWidth: .5, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: .5, stylse:'padding:10px 0 10px 10px', items:[";
$STA[2]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";
$STA[3]="{ columnWidth: .67, stylse:'padding:10px 0 10px 10px', items:[";
$OUT[]= $STA[0] . $MAPIO . $END;
$QS = "SELECT * FROM `nodes` WHERE `type`>9 AND `type`< 14 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
if( $idx < 1 ){
$TFN = 'report/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode($DD['name']) , $TPL );
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}";
$Z=$DATABASE->Query( $QS );
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
$S=$DATABASE->Query( $QS );
$MODULE_DATA = $S[0];
$TPL = str_replace( '%%%NODENAME%%%', urldecode( $Z[0]['name'] ) , $TPL );
//$FU = 'http://' . $_SERVER['SERVER_ADDR'].':' . $MODULE_DATA['web_port'] .'/stream?id='. $Z[0]['aux_parameter'];
$FU = '/video_feed/stream?id='. $Z[0]['aux_parameter'];
$CS[] = '[' . $Z[0]['aux_parameter'] . ',\'[ 120x120] Video\',\''. $FU .'\']';
$TPL = str_replace( '%%%URLS%%%', '[' . implode( ',', $CS ) . ']' , $TPL );
$TPL = str_replace( '%%%SELID%%%', 'value: '. $Z[0]['aux_parameter'] .',', $TPL );
$TPL = str_replace( '%%%SELURL%%%', $FU, $TPL );
$TPL = str_replace( '%%%STREAMID%%%', $DD['aux_parameter'], $TPL );
$FK = $MODULE_DATA['height'] /$MODULE_DATA['width'];
$W = 244;
$H = $W * $FK;
$TPL = str_replace( '%%%WIDTH%%%', $W, $TPL );
$TPL = str_replace( '%%%HEIGHT%%%', $H, $TPL );
$OUT[]= $STA[1+$idx] . $TPL . $END;
} else break;
$idx++;
};
if( $idx < 1 ){
for( ;$idx<1;$idx++ ){
$T = str_replace( '%%ID%%', 2+$idx , $DUMMY['camera'] );
$OUT[]= $STA[1+$idx] . $T . $END;
};
};
} else {
for( ;$idx<1;$idx++ ){
$T = str_replace( '%%ID%%', 4+$idx , $DUMMY['camera'] );
$OUT[]= $STA[1+$idx] . $T . $END;
};
};
$QS = "SELECT * FROM `nodes` WHERE `type`>0 AND `type`< 10 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
if( $idx < 2 ){
$TFN = 'report/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $TPL );
$OUT[]= $STA[2+$idx] . $TPL . $END;
} else break;
$idx++;
};
case 1:{
// LA Metro
$OUT[]= $STA[3] . $DUMMY['log'] . $END;
break;
} else {
for( ;$idx<1;$idx++ ){
$OUT[]= $STA[2+$idx] . $DUMMY['sensor'] . $END;
};
}
};
$OUT[]= $STA[3] . $DUMMY['log'] . $END;
};
$Data = '[' . implode( ',' , $OUT ) . ']';
} else {

12
lib/controller/getStatus.php

@ -14,6 +14,9 @@
$Data['CTS'] = time();
$Data['nodes'] = array();
$Data['log'] = array();
$QS = "SELECT * FROM `system_props` LIMIT 1";
$SD = $DATABASE->Query( $QS );
$SYS = $SD[0];
$STATS = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/stat.db');
$QS = "SELECT `year`, `month`, `day` FROM `days` ORDER BY `year` DESC, `month` DESC, `day` DESC LIMIT 1";
$STR = $STATS->Query( $QS );
@ -129,8 +132,13 @@
//if( !( $TT == 10 || $TT == 11 ||$TT == 12 ||$TT == 13 || $TT == 14 || $TT == 36 ) ) continue;
//$CT['type'] = $TT;
$CT['digital'] = intval( $Z['range_digital']);
$CT['lat'] = floatval( $Z['lon'] );
$CT['lon'] = floatval( $Z['lat'] );
if( $SYS['local_binding'] == 0 ){
$CT['lat'] = floatval( $Z['lat'] );
$CT['lon'] = floatval( $Z['lon'] );
} else {
$CT['lat'] = floatval( $SYS['anchor_lat'] ) + floatval( $Z['lat'] );
$CT['lon'] = floatval( $SYS['anchor_lon'] ) + floatval( $Z['lon'] );
};
$CT['az'] = floatval( $Z['azimuth'] );
$CN['targets'][] = $CT;
};

29
lib/controller/report/node_1.js

@ -19,12 +19,27 @@
masks_statuses[%%%NODEID%%%] = 0;
masks_exist[%%%NODEID%%%] = 0;
var W=p.getWidth();
var H=9*(W/8);
p.setHeight( H + 32 );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 18 );
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", H-45 );
set2DZoomLevel( %%%NODEID%%%, 100 );
var W = p.getWidth();
//var H=9*(W/16) - 28;
//var H = PanelH - p.ownerCt.ownerCt.getHeight() + 64;
var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
//var W = 16*(H/9);
//p.ownerCt.setWidth( W );
p.setHeight( H );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 70 );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setWidth( H - 70 );
//alert( W+" "+H );
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).setWidth( W - H + 50 );
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).doLayout( false, true );
//if( H > W ){
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", "100%" );
//} else {
document.getElementById('draw_svgr_%%%NODEID%%%').setAttribute("width", H-80 );
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("height", H-80 );//"100%" );
//if( W > ( H+130 ) ) Ext.getCmp( 'toolbox_%%%NODEID%%%' ).expand( false );
//};
//alert( W +' '+ ( H+130 ) );
//set2DZoomLevel( %%%NODEID%%%, 100 );
var el = document.getElementById('div_radar_%%%NODEID%%%');
el.addEventListener( "fullscreenchange", ( evt )=>{
if( document.fullscreenElement ){
@ -32,7 +47,7 @@
if( fsDrawID ){
var el = document.getElementById('draw_svgr_'+fsDrawID );
el.removeAttribute("width");
el.setAttribute( "width", '100%' );
el.setAttribute( "width", H-80 );//'86%' );
fsDrawID = 0;
};
};

2
lib/controller/report/node_13.js

@ -66,7 +66,7 @@
};
},
afterrender: function( p ){
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%;
var xx = p.getWidth() * ( %%%HEIGHT%%% / %%%WIDTH%%% );
p.setHeight( xx + 32 );
VideoLinks[%%%NODEID%%%] = '';
/*

29
lib/controller/report/node_3.js

@ -19,12 +19,27 @@
masks_statuses[%%%NODEID%%%] = 0;
masks_exist[%%%NODEID%%%] = 0;
var W=p.getWidth();
var H=9*(W/8);
p.setHeight( H + 32 );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 18 );
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", H-45 );
set2DZoomLevel( %%%NODEID%%%, 100 );
var W = p.getWidth();
//var H=9*(W/16) - 28;
//var H = PanelH - p.ownerCt.ownerCt.getHeight() + 64;
var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
//var W = 16*(H/9);
//p.ownerCt.setWidth( W );
p.setHeight( H );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 70 );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setWidth( H - 70 );
//alert( W+" "+H );
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).setWidth( W - H + 50 );
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).doLayout( false, true );
//if( H > W ){
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", "100%" );
//} else {
document.getElementById('draw_svgr_%%%NODEID%%%').setAttribute("width", H-80 );
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("height", H-80 );//"100%" );
//if( W > ( H+130 ) ) Ext.getCmp( 'toolbox_%%%NODEID%%%' ).expand( false );
//};
//alert( W +' '+ ( H+130 ) );
//set2DZoomLevel( %%%NODEID%%%, 100 );
var el = document.getElementById('div_radar_%%%NODEID%%%');
el.addEventListener( "fullscreenchange", ( evt )=>{
if( document.fullscreenElement ){
@ -32,7 +47,7 @@
if( fsDrawID ){
var el = document.getElementById('draw_svgr_'+fsDrawID );
el.removeAttribute("width");
el.setAttribute( "width", '100%' );
el.setAttribute( "width", H-80 );//'86%' );
fsDrawID = 0;
};
};

2
lib/javascript/jsapi_dynamic/mojo_dashboard.js

@ -1652,7 +1652,7 @@ function fetchSiteStatus(){
};
if( data.notifications.length > 0 ){
sndExcl.play();
playSound();
for( i=0; i < data.notifications.length; i++ ){
/*const not = PNotify.alert({
title: 'You Will Receive a Side',

76
lib/javascript/jsapi_dynamic/mojo_map.js

@ -87,11 +87,11 @@ function turnAllGzOn(){
map.flyToBounds( cVisible.getBounds() );
};
function loadMapZones( SID ){
function loadMapZones( SiteID ){
Ext.Ajax.request({
url: '/lib/controller/getGeoZones.php',
params: {
SITE: SID,
SITE: SiteID,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
@ -207,8 +207,8 @@ function showEventsOnMap( data, removeCursor ){
//switch( data.log[i].event ){
// case 36: cp_color='#0000FF'; break;
//};
cLon = data[i].targets[j].lat;
cLat = data[i].targets[j].lon;
cLon = data[i].targets[j].lon;
cLat = data[i].targets[j].lat;
cevt[idx] = L.circleMarker( [cLat, cLon], {id:data[i].id, color: cp_color, radius: 5, stroke: false, fillOpacity: ( 1.0 - i * zz ) } );//.on('click', function( e, a ){
// loadEventPropertiesByID( this.options.id );
//} );
@ -280,11 +280,12 @@ function LoadMapEventsZ( Mode ){
function initMapMonitoring(){
var aK = true;
if( MAP_SET.attribution == '' ) aK = false;
var mapLayers = [];
var mapLayers = [];
if( map != null ){
//ToDo: must be moved to Upper Menu changer
map.off();
map.remove();
map = null;
};
if( MAP_SET.type == 1 ){
map = L.map( 'event_map',{
@ -311,6 +312,7 @@ function initMapMonitoring(){
minZoom: 0,
maxZoom: MAP_SET.maxZoom
}).addTo( map );
//map.setView([SiteLat, SiteLon], 17 );
} else {
map = L.map( 'event_map',{
crs: L.CRS.Simple,
@ -326,8 +328,66 @@ function initMapMonitoring(){
});
var bounds = [[MAP_SET.bounds_lx,MAP_SET.bounds_ly], [MAP_SET.bounds_rx,MAP_SET.bounds_ry]];
var image = L.imageOverlay( '/lib/controller/data/assets/images/'+MAP_SET.layer_url, bounds ).addTo( map );
}
map.setView([SiteLat, SiteLon], 17 );
//map.setView([SiteLat, SiteLon], -1 );
};
//ToDo: Fix Initial Zoom level -> May be saving into a user profile
loadMapZones( 0 );
};
function initMapReporting(){
var aK = true;
if( MAP_SET.attribution == '' ) aK = false;
var mapLayers = [];
if( map != null ){
//ToDo: must be moved to Upper Menu changer
map.off();
map.remove();
map = null;
};
if( MAP_SET.type == 1 ){
map = L.map( 'report_map',{
//attributionControl: aK,
attributionControl: false,
preferCanvas: true,
zoomControl: true,
center: [SiteLat, SiteLon],
/*zoomControl: false,
zoom: 17,
minZoom: 17,
maxZoom: 17,*/
keyboard: false
});
//mapLayers[ MAP_SET.name ] = L.tileLayer( MAP_SET.layer_url, {
// attribution: MAP_SET.attribution,
// maxNativeZoom: MAP_SET.maxNativeZoom,
// maxZoom: MAP_SET.maxZoom
//});
L.tileLayer( MAP_SET.layer_url, {
attribution: MAP_SET.attribution,
attributionControl: false,
maxNativeZoom: MAP_SET.maxNativeZoom,
minZoom: 0,
maxZoom: MAP_SET.maxZoom
}).addTo( map );
//map.setView([SiteLat, SiteLon], 17 );
} else {
map = L.map( 'report_map',{
crs: L.CRS.Simple,
attributionControl: false,
preferCanvas: true,
zoomControl: true,
center: [SiteLat, SiteLon],
/*zoomControl: false,*/
zoom: 0,
minZoom: -1,
maxZoom: 4,
keyboard: false
});
var bounds = [[MAP_SET.bounds_lx,MAP_SET.bounds_ly], [MAP_SET.bounds_rx,MAP_SET.bounds_ry]];
var image = L.imageOverlay( '/lib/controller/data/assets/images/'+MAP_SET.layer_url, bounds ).addTo( map );
//map.setView([SiteLat, SiteLon], -1 );
};
//ToDo: Fix Initial Zoom level -> May be saving into a user profile
loadMapZones( 0 );
};

68
lib/javascript/jsapi_dynamic/mojo_reports.js

@ -20,6 +20,7 @@ var rep_store = new Ext.data.JsonStore({
fields: [
{name: 'id', type: 'int' },
{name: 'node_id', type: 'int' },
{name: 'geo', type: 'bool' },
{name: 'node_name', type: 'string' },
{name: 'dts', type: 'string'},
{name: 'ts', type: 'int'},
@ -30,9 +31,9 @@ var rep_store = new Ext.data.JsonStore({
{name: 'el', type: 'string'},
{name: 'r', type: 'int'},
{name: 'width', type: 'int'},
{name: 'video_id',type: 'int'}
//{name: 'lat', type: 'float'},
//{name: 'lon', type: 'float'},
{name: 'video_id',type: 'int'},
{name: 'lat', type: 'float'},
{name: 'lon', type: 'float'}
//{name: 'alt', type: 'float'},
//{name: 'area', type: 'float'},
//{name: 'video', type: 'string'},
@ -100,6 +101,16 @@ var rep_SelModel_ops = {
listeners: {
rowselect: function(sm, row, rec ) {
cRowSelected = row;
if( selectedMarker!= null ){
selectedMarker.remove();
if( rec.data.geo ){
//alert( 'Geo!' );
//map.removeLayer( selectedMarker );
//tt = ''+EventRec.geo.lat+' '+EventRec.geo.lon;
selectedMarker.setLatLng([rec.data.lat, rec.data.lon]);
selectedMarker.addTo( map );
};
};
loadEventData( rec.data );
//alert( rec.data.id );
//loadEventProperties( rec.data );
@ -117,6 +128,47 @@ var rep_SelModel_ops = {
}
};
var cevt = Array();
var coz = Array();
function showHistoryOnMap( 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;
};
};
};
if( data.log.length ){
var zz = 1.0 / ( data.log.length + 1 );
var idx = 0;
for( i=0; i < data.log.length; i++ ){
if( data.log[i].geo ){
var cp_color='#FF0000';
var opa = ( 1.0 - i * zz );
switch( data.log[i].type ){
case 36: cp_color='#0000FF'; opa = 1.0; break;
};
cevt[idx] = L.circleMarker( [data.log[i].lat, data.log[i].lon], {id:data.log[i].id, color: cp_color, radius: 5, stroke: false, fillOpacity: opa } );//.on('click', function( e, a ){ loadEventPropertiesByID( this.options.id ); } );
cevt[idx].addTo(map);
idx++;
};
};
};
};
var selectedMarkerIcon = L.icon({
iconUrl: '/style/assets/cursor.png',
iconSize: [32, 32],
@ -723,8 +775,8 @@ function loadEventData( record ){
//VideoPlayer.dispose();
//VideoPlayer = null;
VideoPlayer.pause();
VideoPlayer.poster('/style/assets/no-signal.png');
VideoPlayer.posterImage.show();
//VideoPlayer.poster('/style/assets/no-signal.png');
//VideoPlayer.posterImage.show();
};
};
};
@ -821,7 +873,7 @@ function getData( Mode, ST = 0, ET = 0, SR = 0, DR = 0 ){
eventsListStore.loadData( data, false );
if( Mode == 'arch' ){
showEventsOnMap( data, true );
showHistoryOnMap( data, true );
Ext.MessageBox.hide();
if( DR > 0 ){
Ext.getCmp('evtArchLog').getView().focusRow( eventsListStore.getCount() - 1 );
@ -832,7 +884,7 @@ function getData( Mode, ST = 0, ET = 0, SR = 0, DR = 0 ){
Ext.getCmp('evtArchLog').getSelectionModel().selectFirstRow();
};
} else {
showEventsOnMap( data, false );
showHistoryOnMap( data, false );
//LoadMapEventsZ( Mode );
};
},
@ -1370,6 +1422,7 @@ function loadReportData( ts, bid, eid ){
hideVideo();
var data = Ext.decode( response.responseText );
if( data.log != undefined ){
showHistoryOnMap( data, true );
if( data.log.length ){
rep_store_id = data.log[0].id;
rep_array = data.log;//.concat( rep_array );
@ -1379,6 +1432,7 @@ function loadReportData( ts, bid, eid ){
rep_store.removeAll();
rep_store.loadData( rep_array );
};
} else {
alert('No Log');
// clear the log

Loading…
Cancel
Save