diff --git a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Comptages/AllTime/WebHome.xml b/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Comptages/AllTime/WebHome.xml deleted file mode 100644 index 3da9259d..00000000 --- a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Comptages/AllTime/WebHome.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - Avis.Admin.Statistiques.Comptages.AllTime - WebHome - - - 0 - xwiki:XWiki.Admin - 1581097686000 - Avis.Admin.Statistiques.Comptages.WebHome - xwiki:XWiki.Admin - xwiki:XWiki.Admin - 1581097769000 - 1581097769000 - 1.1 - Comptages (toute période) - - false - xwiki/2.1 - false - == Votes depuis le début == - -{{awmchart chart="1" table="1" category="doc.creationDate" className="Avis.Code.AvisClass" type="line" title="Par mois" function="year(doc.creationDate)*100+month(doc.creationDate)" aggregate="doc.fullName" aggregateFunction="count" orderColumn="doc.creationDate" orderDirection="asc" fromHQL="" whereHQL="and doc.creationDate>'2019-06-01'" /}} - -{{awmchart chart="1" table="1" category="doc.creationDate" className="Avis.Code.AvisClass" type="line" title="Par semaine" function="year(doc.creationDate)*100+week(doc.creationDate)" aggregate="doc.fullName" aggregateFunction="count" orderColumn="doc.creationDate" orderDirection="asc" fromHQL="" whereHQL="and doc.creationDate>'2019-06-01'" /}} - -{{velocity}} -#if($request.all) -{{awmchart category="doc.creationDate" className="Avis.Code.AvisClass" type="line" title="Par jour" function="year(doc.creationDate)*10000+month(doc.creationDate)*100+day(doc.creationDate)" aggregate="doc.fullName" aggregateFunction="count" orderColumn="doc.creationDate" orderDirection="asc"/}} -#else -[[Voir les comptages par jour>>||queryString="all=1"]] -#end -{{/velocity}} - diff --git a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Comptages/ParType/WebHome.xml b/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Comptages/ParType/WebHome.xml deleted file mode 100644 index 3228ae61..00000000 --- a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Comptages/ParType/WebHome.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - Avis.Admin.Statistiques.Comptages.ParType - WebHome - - - 0 - xwiki:XWiki.Admin - 1581097459000 - Avis.Admin.Statistiques.Comptages.WebHome - xwiki:XWiki.Admin - xwiki:XWiki.Admin - 1581099265000 - 1581099265000 - 1.1 - Votes par Type - - false - xwiki/2.1 - false - {{velocity}} -#if($request.date) - #set($date = $request.date) -#else - #set($x = $datetool.calendar) - ## Subtract 1 month (year=int code 2 - see list below) - #set($ok = $x.add(10, -72)) - #set($date = $datetool.format("yyyy-MM-dd", $x.time)) -#end - -{{html clean="false"}} -<form action=""> -Date: <input type="date" name="date" value="${date}" /> -<input type="submit" value="Go" /> -</form> -{{/html}} - -== Votes par type depuis $date == - -{{awmchart className="Avis.Code.AvisClass" category="modalite" type="pie" title="Par modalité" width="500" height="500" table="1" fromHQL="" whereHQL="" aggregate="doc.fullName" aggregateFunction="count" whereHQL="and doc.creationDate>'$date'" /}} - -{{awmchart className="Avis.Code.AvisClass" category="score" type="pie" title="Par score" width="500" height="500" table="1" fromHQL="" whereHQL="" aggregate="doc.fullName" aggregateFunction="count" whereHQL="and doc.creationDate>'$date'" /}} - -{{awmchart className="Avis.Code.AvisClass" category="facile" type="pie" title="Par facilité" width="500" height="500" table="1" fromHQL="" whereHQL="" aggregate="doc.fullName" aggregateFunction="count" whereHQL="and doc.creationDate>'$date'" /}} - -{{awmchart className="Avis.Code.AvisClass" category="comprehensible" type="pie" title="Par comprehensible" width="500" height="500" table="1" fromHQL="" whereHQL="" aggregate="doc.fullName" aggregateFunction="count" whereHQL="and doc.creationDate>'$date'" /}} - -{{awmchart className="Avis.Code.AvisClass" category="difficultes" type="pie" title="Par difficulté" width="500" height="500" table="1" fromHQL="" whereHQL="" aggregate="doc.fullName" aggregateFunction="count" whereHQL="and doc.creationDate>'$date'" /}} - -{{awmchart className="Avis.Code.AvisClass" category="aide" type="pie" title="Par aide" width="500" height="500" table="1" fromHQL="" whereHQL="" aggregate="doc.fullName" aggregateFunction="count" whereHQL="and doc.creationDate>'$date'" /}} - -{{awmchart className="Avis.Code.AvisClass" category="vote" type="pie" title="Par vote" width="500" height="500" table="1" fromHQL="" whereHQL="" aggregate="doc.fullName" aggregateFunction="count" whereHQL="and doc.creationDate>'$date'" /}} -{{/velocity}} - diff --git a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Comptages/WebHome.xml b/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Comptages/WebHome.xml deleted file mode 100644 index 7b94f11e..00000000 --- a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Comptages/WebHome.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - Avis.Admin.Statistiques.Comptages - WebHome - - - 0 - xwiki:XWiki.Admin - 1530808065000 - Avis.Admin.Statistiques.WebHome - xwiki:XWiki.Admin - xwiki:XWiki.Admin - 1530808095000 - 1530808095000 - 1.1 - Comptages - - false - xwiki/2.1 - false - {{velocity}} -#if($request.date) - #set($date = $request.date) -#else - #set($x = $datetool.calendar) - ## Subtract 1 month (year=int code 2 - see list below) - #set($ok = $x.add(10, -72)) - #set($date = $datetool.format("yyyy-MM-dd", $x.time)) -#end - -== Votes par jour depuis $date == - -{{html clean="false"}} -<form action=""> -Date: <input type="date" name="date" value="${date}" /> -<input type="submit" value="Go" /> -</form> -{{/html}} - -{{awmchart category="doc.creationDate" className="Avis.Code.AvisClass" type="line" title="Par jour" function="year(doc.creationDate)*10000+month(doc.creationDate)*100+day(doc.creationDate)" aggregate="doc.fullName" aggregateFunction="count" orderColumn="doc.creationDate" orderDirection="asc" whereHQL="and doc.creationDate>'$date'"/}} - -== Votes par heure depuis $date == - -{{awmchart category="doc.creationDate" className="Avis.Code.AvisClass" type="line" title="Par heure" function="year(doc.creationDate)*1000000+month(doc.creationDate)*10000+100*day(doc.creationDate)+hour(doc.creationDate)" aggregate="doc.fullName" aggregateFunction="count" orderColumn="doc.creationDate" orderDirection="asc" whereHQL="and doc.creationDate>'$date'"/}} - -{{/velocity}} - - diff --git a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Ministeres/WebHome.xml b/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Ministeres/WebHome.xml deleted file mode 100644 index 982ad37d..00000000 --- a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Ministeres/WebHome.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - Avis.Admin.Statistiques.Ministeres - WebHome - - - 0 - xwiki:XWiki.Admin - 1531577617000 - Avis.Admin.Statistiques.WebHome - xwiki:XWiki.Admin - xwiki:XWiki.Admin - 1581099155000 - 1581099155000 - 1.1 - Statistiques par Ministère - - false - xwiki/2.1 - false - {{velocity}} -#if($request.date && $request.date!="") - #set($date = $request.date) -#else - #set($date = $datetool.get("yyyy-MM-dd")) -#end - -{{html clean="false"}} -<form action=""> -Date: <input type="date" name="date" value="${date}" /><input type="submit" value="Go" /> -</form> -{{/html}} - -== Avis par Ministère == - -{{awmchart className="Avis.Code.AvisClass" category="demarche_ministeres" type="pie" title="Chart" width="500" height="500" table="1" fromHQL="" whereHQL="and doc.creationDate >= '${date}'" aggregate="doc.fullName" "count" /}} - -== Score par Ministère == - -{{awmchart className="Avis.Code.AvisClass" category="demarche_ministeres" type="bar3D" title="Chart" width="500" height="500" table="1" fromHQL="" whereHQL="and doc.creationDate >= '${date}'" aggregate="score" aggregateFunction="avg" /}} - -{{/velocity}} - diff --git a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Scores.xml b/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Scores.xml deleted file mode 100644 index 2d0cd4c6..00000000 --- a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/Scores.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - Avis.Admin.Statistiques - Scores - - - 0 - xwiki:XWiki.Admin - 1530808200000 - Avis.Admin.Statistiques.WebHome - xwiki:XWiki.Admin - xwiki:XWiki.Admin - 1530808310000 - 1530808310000 - 1.1 - Scores - - false - xwiki/2.1 - false - -{{awmchart className="Avis.Code.AvisClass" category="demarche" type="pie" title="Par demarche" width="500" height="500" chart="0" table="1" fromHQL="" whereHQL="" aggregate="doc.fullName" aggregateFunction="count" /}} - -{{awmchart className="Avis.Code.AvisClass" category="demarche" type="bar" title="Par demarche" width="500" height="500" table="1" fromHQL="" whereHQL="" aggregate="score" aggregateFunction="avg" /}} - -{{query query="select propdemarche.value,count(doc.fullName),avg(propscore.value),min(doc.creationDate) from XWikiDocument as doc, BaseObject as obj, StringProperty as propdemarche, IntegerProperty as propscore where doc.fullName=obj.name and obj.className='Avis.Code.AvisClass' and doc.fullName not like '%Template' and obj.id=propdemarche.id.id and propdemarche.id.name='demarche' and obj.id=propscore.id.id and propscore.id.name='score' group by propdemarche.value order by 2 desc" type="hql" class="Avis.Code.AvisClass" columns="demarche,AGG_COUNT,AGG_AVG_score,AGG_MIN_creationDate" headers="1" links="0" actions="0"/}} - - diff --git a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/ScoresByDate.xml b/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/ScoresByDate.xml deleted file mode 100644 index 376414b8..00000000 --- a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/ScoresByDate.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - Avis.Admin.Statistiques - ScoresByDate - - - 0 - xwiki:XWiki.Admin - 1570556667000 - Avis.Admin.Statistiques.WebHome - xwiki:XWiki.Admin - xwiki:XWiki.Admin - 1581098997000 - 1581098997000 - 1.1 - Démarches et scores par date de premier vote - - false - xwiki/2.1 - false - {{velocity}} -#if($request.date && $request.date!="") - #set($date = $request.date) -#else - #set($date = $datetool.get("yyyy-MM-dd")) -#end - -{{html clean="false"}} -<form action=""> -Date: <input type="date" name="date" value="${date}" /><input type="submit" value="Go" /> -</form> -{{/html}} - -== Scores triés par dates de premier vote == -#set($topCount = 0) -#set($list = $xwiki.search("select propdemarche.value,count(doc.fullName),avg(propscore.value),min(doc.creationDate) from XWikiDocument as doc, BaseObject as obj, StringProperty as propdemarche, IntegerProperty as propscore where doc.fullName=obj.name and obj.className='Avis.Code.AvisClass' and doc.fullName not like '%Template' and obj.id=propdemarche.id.id and propdemarche.id.name='demarche' and obj.id=propscore.id.id and propscore.id.name='score' and doc.creationDate>='${date}' group by propdemarche.value having count(doc.fullName)>5 order by 4 desc")) -|= Démarche |= Top |= Votes |= Score |= Date |= Graphe -#foreach($item in $list) - #set($top = 0) - #set($demarche = $item.get(0)) - #set($demDoc = $xwiki.getDocument($demarche)) - #set($demTitle = $demDoc.getDisplayTitle()) - #set($top = $demDoc.getValue("top")) - #if($top) - #set($topCount = $topCount + 1) - #end -| [[${demTitle}>>VotesByDate||queryString="demarche=${item.get(0)}"]] | $!top | $item.get(1) | $item.get(2) | $item.get(3) | [[Voir graphe>>VotesByDate||queryString="demarche=${demarche}"]] -#end - -Top demarches: $topCount - -#if($request.all) -== Scores triés par nombre de votes == - -{{query query="select propdemarche.value,count(doc.fullName),avg(propscore.value),min(doc.creationDate) from XWikiDocument as doc, BaseObject as obj, StringProperty as propdemarche, IntegerProperty as propscore where doc.fullName=obj.name and obj.className='Avis.Code.AvisClass' and doc.fullName not like '%Template' and obj.id=propdemarche.id.id and propdemarche.id.name='demarche' and obj.id=propscore.id.id and propscore.id.name='score' and doc.creationDate>='${date}' group by propdemarche.value order by 2 desc" type="hql" class="Avis.Code.AvisClass" columns="demarche,AGG_COUNT,AGG_AVG_score,AGG_MIN_creationDate" headers="1" links="0" actions="0"/}} - -#* -## There is an issue with this macro which seems to miss a where restriction -== Score moyen == - -{{awmchart className="Avis.Code.AvisClass" category="demarche" type="bar" title="Par demarche" width="500" height="500" chart="0" table="1" fromHQL="" whereHQL="and doc.creationDate >= '${date}'" aggregate="score" aggregateFunction="avg"/}} - -== Nombres de votes == - -{{awmchart className="Avis.Code.AvisClass" category="demarche" type="pie" title="Par demarche" width="500" height="500" chart="0" table="1" fromHQL="" whereHQL="and doc.creationDate >= '${date}'" aggregate="doc.fullName" aggregateFunction="count"/}} -*# -#else -[[Voir plus>>||queryString="all=1&date=$!{request.date}"]] -#end - - - -{{/velocity}} - - diff --git a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/VotesByDate.xml b/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/VotesByDate.xml deleted file mode 100644 index 44d079d1..00000000 --- a/wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/VotesByDate.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Avis.Admin.Statistiques - VotesByDate - - - 0 - xwiki:XWiki.Admin - 1544396400000 - Avis.Admin.Statistiques.WebHome - xwiki:XWiki.Admin - xwiki:XWiki.Admin - 1544396400000 - 1544396400000 - 1.1 - Votes par date - - false - xwiki/2.1 - false - {{velocity}} -#if($request.date) - #set($date = $request.date) -#else - #set($date = $datetool.get("yyyy-MM-dd")) -#end - -{{html clean="false"}} -<form action=""> -Date: <input type="date" name="date" value="${date}" /> -<input type="hidden" name="demarche" value="$!request.demarche" /> -#if($request.demarche) -<select name="type"> -<option value="tous" #if($request.type=="tous")SELECTED#end>Tous</option> -<option value="jour" #if($request.type=="jour" ||!$request.type)SELECTED#end>par jour</option> -<option value="semaine" #if($request.type=="semaine")SELECTED#end>par semaine</option> -<option value="score" #if($request.type=="score")SELECTED#end>score</option> -</select> -#end -<input type="submit" value="Go" /> -</form> -{{/html}} -#if($request.demarche && $request.demarche!="") -== Demarche: $xwiki.getDocument($request.demarche).getDisplayTitle() == - -#if($request.type=="semaine" || $request.type=="tous") -{{awmchart chart="1" table="1" category="doc.creationDate" className="Avis.Code.AvisClass" type="line" title="Par semaine" function="year(doc.creationDate)*100+week(doc.creationDate)" aggregate="doc.fullName" aggregateFunction="count" orderColumn="doc.creationDate" orderDirection="asc" fromHQL=", StringProperty propdem" whereHQL="and obj.id=propdem.id.id and propdem.id.name='demarche' and propdem.value = '${request.demarche}' and doc.creationDate>'${date}'" /}} - -(% class="col-md-12" %) -((( -))) -#end - -#if($request.type=="jour" || !$request.type || $request.type=="tous") -{{awmchart chart="1" table="1" category="doc.creationDate" className="Avis.Code.AvisClass" type="line" title="Par jour" function="year(doc.creationDate)*10000+month(doc.creationDate)*100+day(doc.creationDate)" aggregate="doc.fullName" aggregateFunction="count" orderColumn="doc.creationDate" orderDirection="asc" fromHQL=", StringProperty propdem" whereHQL="and obj.id=propdem.id.id and propdem.id.name='demarche' and propdem.value = '${request.demarche}' and doc.creationDate>='${date}'" /}} - -(% class="col-md-12" %) -((( -))) -#end - -#if($request.type=="score" || $request.type=="tous") -{{awmchart chart="1" table="1" category="doc.creationDate" className="Avis.Code.AvisClass" type="line" title="Score par semaine" function="year(doc.creationDate)*100+week(doc.creationDate)" aggregate="score" aggregateFunction="avg" orderColumn="doc.creationDate" orderDirection="asc" fromHQL=", StringProperty propdem" whereHQL="and obj.id=propdem.id.id and propdem.id.name='demarche' and propdem.value = '${request.demarche}' and doc.creationDate>'${date}'" /}} -#end - -#else -#set($query = "select propdemarche.value,count(doc.fullName), avg(propscore.value), min(doc.creationDate), max(doc.creationDate) from XWikiDocument as doc, BaseObject as obj, StringProperty as propdemarche, IntegerProperty as propscore where doc.fullName=obj.name and obj.className='Avis.Code.AvisClass' and obj.id=propdemarche.id.id and propdemarche.id.name='demarche' and obj.id=propscore.id.id and propscore.id.name='score' and doc.creationDate>='${date}' group by propdemarche.value order by 2 desc") -#set($topCount = 0) -|=(% style="width: 50%;" %) Demarche |= Votes |= Top |= Score |= Nb Demat Annuel |= Ratio |= Graph -#foreach($item in $services.query.hql($query).setLimit(100).execute()) -#set($demarche = $item.get(0)) -#set($count = $item.get(1)) -#set($score = $item.get(2)) -#set($date1 = $item.get(3)) -#set($date2 = $item.get(4)) -#set($diff = $date2.time - $date1.time) -#set($diff = $mathtool.toDouble($diff)) -#set($diffdays = $diff / 1000 / 3600 / 24) -#if($diffdays == 0) - #set($diffdays = 1) -#end -#set($demDoc = $xwiki.getDocument($demarche)) -#set($demname = $demDoc.getTitle()) -#set($top = $demDoc.getValue("top")) -#if($top) - #set($topCount = $topCount + 1) -#end -#set($nbdemat = $demDoc.getValue("volumetrieDemat")) -#set($nbdematmonth = $nbdemat / 10 / 30) -#set($ratio1 = ($count * 10000) / $diffdays) -#set($ratio2 = $nbdematmonth) -#set($ratio1 = $mathtool.toDouble($ratio1)) -#set($ratio3 = $ratio1 / $ratio2 / 100) -#set($ratio3 = $mathtool.roundTo(2, $ratio3)) -| [[${demname}>>${demarche}]] | $count | $!top | $score | $!nbdemat | $!{ratio3}% | [[Voir graphe>>||queryString="demarche=${demarche}"]] -#end - -Top demarches: $topCount -#end -{{/velocity}} - -