hedera-web/forms/admin/visits/ui.xml

83 lines
2.0 KiB
XML
Raw Normal View History

2015-03-06 23:33:54 +00:00
<vn>
2017-03-17 12:42:10 +00:00
<h1 id="title">
<t>Visits</t>
</h1>
2015-09-16 16:11:15 +00:00
<div id="actions">
2016-09-19 06:40:18 +00:00
<htk-bar-button
icon="refresh"
2015-09-16 16:11:15 +00:00
tip="_Refresh"
2016-09-19 06:40:18 +00:00
on-click="onRefreshClick"/>
<htk-bar-button
icon="user-info"
2015-12-10 23:24:14 +00:00
tip="_Connections"
2016-09-19 06:40:18 +00:00
on-click="onSessionsClick"/>
</div>
2017-03-23 16:20:51 +00:00
<div id="main" class="visits">
2016-12-23 08:57:49 +00:00
<div class="card form">
<div>
<label><t>From</t></label>
2017-04-07 11:00:33 +00:00
<htk-date-chooser lot="hash" name="from"/>
2016-12-23 08:57:49 +00:00
</div>
<div>
<label><t>To</t></label>
2017-04-07 11:00:33 +00:00
<htk-date-chooser lot="hash" name="to"/>
2015-03-06 23:33:54 +00:00
</div>
2015-12-10 23:24:14 +00:00
</div>
2016-12-23 08:57:49 +00:00
<div class="summary card form">
2015-12-10 23:24:14 +00:00
<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"/>
2015-12-10 23:24:14 +00:00
</htk-text>
<t>news</t>
</p>
</div>
2016-12-23 08:57:49 +00:00
<div class="card list ">
2015-12-10 23:24:14 +00:00
<htk-repeater form-id="iter" empty-message="_Select date interval">
2017-04-07 11:00:33 +00:00
<db-model property="model" id="visits" lot="hash">
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
2017-04-07 11:00:33 +00:00
WHERE c.stamp BETWEEN TIMESTAMP(#from,'00:00:00') AND TIMESTAMP(#to,'23:59:59')
GROUP BY browser
ORDER BY visits DESC
2015-12-10 23:24:14 +00:00
</db-model>
<custom>
2016-12-23 08:57:49 +00:00
<div class="list-row">
2015-12-10 23:24:14 +00:00
<p class="important">
2017-04-05 14:06:07 +00:00
<htk-text lot="iter" name="browser"/>
<htk-text lot="iter" name="minVersion"/> -
<htk-text lot="iter" name="maxVersion"/>
2015-12-10 23:24:14 +00:00
</p>
<p>
2017-04-05 14:06:07 +00:00
<htk-text lot="iter" name="visits"/>
2015-12-10 23:24:14 +00:00
<t>visits</t>,
2017-04-05 14:06:07 +00:00
<htk-text lot="iter" name="newVisits"/>
2015-12-10 23:24:14 +00:00
<t>news</t>
</p>
<p>
2017-04-05 14:06:07 +00:00
<htk-text lot="iter" name="lastVisit" format="_%a, %e %b %Y at %T"/>
2015-12-10 23:24:14 +00:00
</p>
</div>
2015-12-10 23:24:14 +00:00
</custom>
</htk-repeater>
2015-03-06 23:33:54 +00:00
</div>
</div>
</vn>