Correction date des logs au format Y-m-dTH:i:s
This commit is contained in:
parent
e209697017
commit
955161ba26
18
automate.php
18
automate.php
|
@ -89,14 +89,18 @@
|
|||
|
||||
/* [4] Test download via AJAX
|
||||
=========================================================*/
|
||||
$req = new ModuleRequest('subject/search', array( 'name' => 'a' ));
|
||||
// $req = new ModuleRequest('subject/search', array( 'name' => 'a' ));
|
||||
//
|
||||
// $res = $req->dispatch();
|
||||
//
|
||||
// if( $res->error != ManagerError::Success )
|
||||
// var_dump( ManagerError::explicit($res->error) );
|
||||
//
|
||||
// var_dump($res);
|
||||
|
||||
$res = $req->dispatch();
|
||||
|
||||
if( $res->error != ManagerError::Success )
|
||||
var_dump( ManagerError::explicit($res->error) );
|
||||
|
||||
var_dump($res);
|
||||
$db = new lightdb('phone_db', __ROOT__.'/src/dynamic/');
|
||||
$db->delete(284);
|
||||
$db->close();
|
||||
|
||||
|
||||
// $start = microtime(true);
|
||||
|
|
|
@ -4,8 +4,8 @@ city:c.city,quartier:c.quartier,cp:c.cp,loc:c.loc,duration:c.duration,context:c.
|
|||
inputPhoneFiche.prototype.add=function(a){console.log("FICHE: ADD");if(null==a.uid||isNaN(a.uid)||null==a.contact||isNaN(a.contact))return!1;a.city=null!=a.city?a.city:this.defaultData.city;a.quartier=null!=a.quartier?a.quartier:this.defaultData.quartier;a.cp=null!=a.cp?a.cp:this.defaultData.cp;a.duration[0]=null!=a.duration[0]?a.duration[0]:this.defaultData.duration[0];a.duration[1]=null!=a.duration[1]?a.duration[1]:this.defaultData.duration[1];a.reltypeSpecial=null!=a.reltypeSpecial?a.reltypeSpecial:
|
||||
this.defaultData.reltypeSpecial;a.contextSpecial[0]=null!=a.contextSpecial[0]?a.contextSpecial[0]:this.defaultData.contextSpecial[0];a.contextSpecial[1]=null!=a.contextSpecial[1]?a.contextSpecial[1]:this.defaultData.contextSpecial[1];a.contextSpecial[2]=null!=a.contextSpecial[2]?a.contextSpecial[2]:this.defaultData.contextSpecial[2];a.connectSpecial[0]=null!=a.connectSpecial[0]?a.connectSpecial[0]:this.defaultData.connectSpecial[0];a.connectSpecial[1]=null!=a.connectSpecial[1]?a.connectSpecial[1]:
|
||||
this.defaultData.connectSpecial[1];a.job=null!=a.job?a.job:this.defaultData.job;a.studies=null!=a.studies?a.studies:this.defaultData.studies;a.age=null!=a.age?a.age:this.defaultData.age;a.sexe=null!=a.sexe?a.sexe:this.defaultData.sexe;a.famsit=null!=a.famsit?a.famsit:this.defaultData.famsit;a.reltype=null!=a.reltype?a.reltype:this.defaultData.reltype;a.loc=null!=a.loc?a.loc:this.defaultData.loc;a.context=null!=a.context?a.context:this.defaultData.context;a.freq=null!=a.freq?a.freq:this.defaultData.freq;
|
||||
a.connect=null!=a.connect?a.connect:this.defaultData.connect;var b=lsi.get("p_contacts",a.contact);if(!1===b)return!1;if(!isNaN(b.existing)){var c=lsi.get("p_friends",b.existing);b.username=c.name;a.age=c.age;a.sexe=c.sexe;a.loc=c.dist;isNaN(c.reltype)?(a.reltype=10,a.reltypeSpecial=c.reltype):(a.reltype=c.reltype,a.reltypeSpecial="");null!=c.studies2&&(a.job=c.job,a.famsit=c.famsit,a.city=c.city,a.cp=c.cp,a.quartier=c.quartier,a.duration[0]=c.duration[0],a.duration[1]=c.duration[1],a.context=c.context,
|
||||
a.contextSpecial=c.contextExtra,a.connect=c.connect,a.connectSpecial=c.connectExtra,a.freq=c.freq,a.studies=c.studies2)}this.container.innerHTML+=pFicheBuilder.build({name:b.username,countcall:b.countcall,countsms:b.countsms,uid:a.uid,contact:a.contact,city:a.city,quartier:a.quartier,cp:a.cp,duration0:a.duration[0],duration1:a.duration[1],reltypespecial:a.reltypeSpecial,contextspecial0:a.contextSpecial[0],contextspecial1:a.contextSpecial[1],contextspecial2:a.contextSpecial[2],connectspecial0:a.connectSpecial[0],
|
||||
a.connect=null!=a.connect?a.connect:this.defaultData.connect;var b=lsi.get("p_contacts",a.contact);if(!1===b)return!1;if(!isNaN(b.existing)){var c=lsi.get("p_friends",b.existing);b.username=c.name;a.age=c.age;a.sexe=c.sexe;a.loc=c.dist;isNaN(c.reltype)?(a.reltype=10,a.reltypeSpecial=c.reltype):(a.reltype=c.reltype,a.reltypeSpecial="");null!=c.studies2&&(a.studies=c.studies2,a.job=c.job,a.famsit=c.famsit,a.city=c.city,a.cp=c.cp,a.quartier=c.quartier,a.duration[0]=c.duration[0],a.duration[1]=c.duration[1],
|
||||
a.context=c.context,a.contextSpecial=c.contextExtra,a.connect=c.connect,a.connectSpecial=c.connectExtra,a.freq=c.freq)}this.container.innerHTML+=pFicheBuilder.build({name:b.username,countcall:b.countcall,countsms:b.countsms,uid:a.uid,contact:a.contact,city:a.city,quartier:a.quartier,cp:a.cp,duration0:a.duration[0],duration1:a.duration[1],reltypespecial:a.reltypeSpecial,contextspecial0:a.contextSpecial[0],contextspecial1:a.contextSpecial[1],contextspecial2:a.contextSpecial[2],connectspecial0:a.connectSpecial[0],
|
||||
connectspecial1:a.connectSpecial[1]});b=$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="job"]>option[value="'+a.job+'"]');null!=b&&b.setAttribute("selected","selected");b=$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="studies"]>option[value="'+a.studies+'"]');null!=b&&b.setAttribute("selected","selected");b=$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+
|
||||
a.uid+'"] ~ h5>span>select[data-name="age"]>option[value="'+a.age+'"]');null!=b&&b.setAttribute("selected","selected");c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="sexe"]');for(b=0;b<c.length;b++)c[b].value==a.sexe?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="famsit"]');
|
||||
for(b=0;b<c.length;b++)c[b].value==a.famsit?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="reltype"]');for(b=0;b<c.length;b++)c[b].value==a.reltype?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="phone"] article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="loc"]');
|
||||
|
|
|
@ -191,6 +191,7 @@ inputPhoneFiche.prototype.add = function(objectData){
|
|||
|
||||
// On met à jour les études uniquement si 'studies2' est défini //
|
||||
if( existingData.studies2 != null ){
|
||||
objectData.studies = existingData.studies2;
|
||||
objectData.job = existingData.job;
|
||||
objectData.famsit = existingData.famsit;
|
||||
objectData.city = existingData.city;
|
||||
|
@ -199,12 +200,10 @@ inputPhoneFiche.prototype.add = function(objectData){
|
|||
objectData.duration[0] = existingData.duration[0];
|
||||
objectData.duration[1] = existingData.duration[1];
|
||||
objectData.context = existingData.context;
|
||||
objectData.contextSpecial = existingData.contextExtra;
|
||||
objectData.contextSpecial = existingData.contextExtra;
|
||||
objectData.connect = existingData.connect;
|
||||
objectData.connectSpecial = existingData.connectExtra;
|
||||
objectData.connectSpecial = existingData.connectExtra;
|
||||
objectData.freq = existingData.freq;
|
||||
|
||||
objectData.studies = existingData.studies2;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
'id' => $cur_id,
|
||||
'direction' => dParse($dict, 'logs:direction', $log['Direction']),
|
||||
'type' => dParse($dict, 'logs:type', strtoupper($log['Type'])),
|
||||
'date' => strtotime($log['Date']),
|
||||
'date' => strtotime( str_replace('T', ' ', $log['Date']) ),
|
||||
'duration' => (int) $log['Duration']
|
||||
);
|
||||
array_push($call_logs, $call_log);
|
||||
|
|
|
@ -1 +1 @@
|
|||
377
|
||||
378
|
|
@ -1,4 +1,4 @@
|
|||
var subPhone=$('section[data-sublink="phone"]');subPhone.style.display="flex";subPhone.style.flexWrap="wrap";subPhone.style.justifyContent="space-around";subject=273;var charts="sexe direction type ages relations weekdays duration timeofday".split(" "),canvas=[],instances=[];Highcharts.dateFormats={X:function(a){return(new Date(1E3*a)).toLocaleTimeString()}};
|
||||
var subPhone=$('section[data-sublink="phone"]');subPhone.style.display="flex";subPhone.style.flexWrap="wrap";subPhone.style.justifyContent="space-around";subject=1;var charts="sexe direction type ages relations weekdays duration timeofday".split(" "),canvas=[],instances=[];Highcharts.dateFormats={X:function(a){return(new Date(1E3*a)).toLocaleTimeString()}};
|
||||
var plotOptions={pie:{pie:{showInLegend:!0,innerSize:"50%",allowPointSelect:!0,cursor:"pointer",startAngle:-90,endAngle:90,dataLabels:{enabled:!1,distance:10,format:"<b>{point.name}</b>: {point.percentage:.1f} %",style:{color:"black",textShadow:"0 0 2px white"}}}},column:{column:{shadow:!1,borderWidth:0,stacking:null}},weekdays:{column:{shadow:!1,borderWidth:0,stacking:"normal",dataLabels:{enabled:!0}}},bar:{bar:{allowPointSelect:!0,cursor:"pointer"}},spline:{spline:{pointInterval:1E3}}},c;
|
||||
for(c in charts)canvas[c]=document.createElement("div"),canvas[c].id=charts[c],canvas[c].style.width=canvas[c].style.height="30em",canvas[c].style.margin="2em",subPhone.appendChild(canvas[c]);
|
||||
for(c=0;c<charts.length;c++){var request={path:"chart/"+charts[c],subject:subject};api.send(request,function(a,e){console.log(api.buffer);var d=e[0];if(0!=a.ModuleError)return!1;var b={chart:{renderTo:canvas[d],type:a.type},series:a.series,xAxis:{},yAxis:{},tooltip:{}};"pie"==a.type?canvas[d].style.width=canvas[d].style.height="20em":b.tooltip.headerFormat="<b>{point.x}</b><br>";null!=plotOptions[charts[d]]?b.plotOptions=plotOptions[charts[d]]:null!=plotOptions[a.type]&&(b.plotOptions=plotOptions[a.type]);
|
||||
|
|
|
@ -6,7 +6,7 @@ subPhone.style.justifyContent = 'space-around';
|
|||
|
||||
/* [0] Paramètres globaux
|
||||
=========================================================*/
|
||||
subject = 273;
|
||||
subject = 1;
|
||||
|
||||
var charts = ['sexe', 'direction', 'type', 'ages', 'relations', 'weekdays', 'duration', 'timeofday'];
|
||||
var canvas = []; // Contiendra les canvas
|
||||
|
|
Loading…
Reference in New Issue