94 lines
2.2 KiB
XML
Executable File
94 lines
2.2 KiB
XML
Executable File
<vn>
|
|
<h1 id="title">
|
|
<t>Visits</t>
|
|
</h1>
|
|
<div id="actions">
|
|
<htk-bar-button
|
|
icon="refresh"
|
|
tip="_Refresh"
|
|
on-click="onRefreshClick"/>
|
|
<htk-bar-button
|
|
icon="user-info"
|
|
tip="_Connections"
|
|
on-click="onSessionsClick"/>
|
|
</div>
|
|
<div id="main" class="visits">
|
|
<div class="card form">
|
|
<div>
|
|
<label><t>From</t></label>
|
|
<htk-date-chooser>
|
|
<vn-param property="param" id="from"/>
|
|
</htk-date-chooser>
|
|
</div>
|
|
<div>
|
|
<label><t>To</t></label>
|
|
<htk-date-chooser>
|
|
<vn-param property="param" id="to"/>
|
|
</htk-date-chooser>
|
|
</div>
|
|
</div>
|
|
<div class="summary card form">
|
|
<p>
|
|
<htk-text>
|
|
<db-calc-sum
|
|
property="param"
|
|
model="visits"
|
|
column-name="visits"/>
|
|
</htk-text>
|
|
<t>visits</t>,
|
|
<htk-text>
|
|
<db-calc-sum
|
|
property="param"
|
|
model="visits"
|
|
column-name="newVisits"/>
|
|
</htk-text>
|
|
<t>news</t>
|
|
</p>
|
|
</div>
|
|
<div class="card list ">
|
|
<htk-repeater form-id="iter" empty-message="_Select date interval">
|
|
<db-model property="model" id="visits">
|
|
<custom>
|
|
SELECT browser
|
|
,MIN(CAST(version AS DECIMAL(4,1))) minVersion
|
|
,MAX(CAST(version AS DECIMAL(4,1))) maxVersion
|
|
,MAX(c.stamp) lastVisit
|
|
,COUNT(DISTINCT c.id) visits
|
|
,SUM(a.firstAccess = c.id AND v.firstAgent = a.id) newVisits
|
|
FROM visitUser e
|
|
JOIN visitAccess c ON e.access = c.id
|
|
JOIN visitAgent a ON c.agent = a.id
|
|
JOIN visit v ON a.visit = v.id
|
|
WHERE c.stamp BETWEEN TIMESTAMP(#from,'00:00:00') AND TIMESTAMP(#to,'23:59:59')
|
|
GROUP BY browser ORDER BY visits DESC
|
|
</custom>
|
|
<sql-batch property="batch">
|
|
<custom>
|
|
<item name="from" param="from"/>
|
|
<item name="to" param="to"/>
|
|
</custom>
|
|
</sql-batch>
|
|
</db-model>
|
|
<custom>
|
|
<div class="list-row">
|
|
<p class="important">
|
|
<htk-text lot="iter" name="browser"/>
|
|
<htk-text lot="iter" name="minVersion"/> -
|
|
<htk-text lot="iter" name="maxVersion"/>
|
|
</p>
|
|
<p>
|
|
<htk-text lot="iter" name="visits"/>
|
|
<t>visits</t>,
|
|
<htk-text lot="iter" name="newVisits"/>
|
|
<t>news</t>
|
|
</p>
|
|
<p>
|
|
<htk-text lot="iter" name="lastVisit" format="_%a, %e %b %Y at %T"/>
|
|
</p>
|
|
</div>
|
|
</custom>
|
|
</htk-repeater>
|
|
</div>
|
|
</div>
|
|
</vn>
|