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

128 lines
3.8 KiB
XML
Raw Normal View History

2015-03-06 23:33:54 +00:00
<vn>
<div id="title">
<h1><t>VisitsManagement</t></h1>
</div>
2015-09-16 16:11:15 +00:00
<div id="actions">
<htk-button
image="image/dark/refresh.svg"
tip="_Refresh"
on-click="onRefreshClick"
showText="true"/>
<htk-button
image="image/dark/user-info.svg"
tip="_ActiveSessions"
on-click="onSessionsClick"
showText="true"/>
<htk-button
image="image/dark/graph.svg"
tip="_VisitsQuery"
on-click="onVisitsClick"
showText="true"/>
</div>
2015-03-06 23:33:54 +00:00
<div id="form" class="visits">
<div class="box">
<div class="step" id="sessions-step">
2015-12-02 17:26:58 +00:00
<div class="conns-form">
<htk-text>
<db-calc-sum
property="param"
model="sessions"
id="num-sessions"/>
</htk-text>
<t>active sessions</t>
</div>
2015-03-06 23:33:54 +00:00
<div>
<htk-grid>
2015-12-02 17:26:58 +00:00
<db-model property="model" id="sessions">
<custom>
SELECT s.id, c.Cliente, e.date_time login, is_new,
s.date_time last_activity, a.platform, a.browser, a.version
FROM user_session s
JOIN visit_user e ON s.visit_user_id = e.id
JOIN visit_access c ON e.access_id = c.id
JOIN visit_agent a ON c.agent_id = a.id
JOIN visit v ON a.visit_id = v.id
JOIN account.user u ON e.user_id = u.id
JOIN vn2008.Clientes c ON e.user_id = c.Id_cliente
ORDER BY last_activity DESC
</custom>
2015-03-06 23:33:54 +00:00
</db-model>
<htk-column-text title="_User" column="Cliente"/>
<htk-column-date title="_Login" column="login" format="%a, %T"/>
2015-12-02 17:26:58 +00:00
<htk-column-date title="_LastActivity" column="last_activity" format="%T"/>
2015-03-06 23:33:54 +00:00
<htk-column-text title="_SO" column="platform"/>
<htk-column-text title="_Browser" column="browser"/>
<htk-column-text title="_Version" column="version"/>
</htk-grid>
</div>
</div>
<div class="step" id="visits-step">
2015-12-02 17:26:58 +00:00
<div class="form">
<div class="form-group">
<label><t>FromDate:</t></label>
<htk-date-chooser>
<vn-param property="param" id="date-from"/>
</htk-date-chooser>
</div>
<div class="form-group">
<label><t>ToDate:</t></label>
<htk-date-chooser>
<vn-param property="param" id="date-to"/>
</htk-date-chooser>
</div>
<div class="form-group">
<t>VisitsTotal:</t>
<htk-text>
<db-calc-sum
property="param"
model="visits"
column-name="visits"/>
</htk-text>
</div>
<div class="form-group">
<t>NewVisitsTotal:</t>
<htk-text>
<db-calc-sum
property="param"
model="visits"
column-name="new_visits"/>
</htk-text>
</div>
</div>
2015-03-06 23:33:54 +00:00
<div>
<htk-grid empty-message="SelectDateInterval">
2015-12-02 17:26:58 +00:00
<db-model property="model" id="visits">
<custom>
SELECT browser
,MIN(CAST(version AS DECIMAL(4,1))) min_version
,MAX(CAST(version AS DECIMAL(4,1))) max_version
,MAX(e.date_time) last_visit
,COUNT(DISTINCT c.id) visits
,SUM(is_new) new_visits
FROM visit_user e
JOIN visit_access c ON e.access_id = c.id
JOIN visit_agent a ON c.agent_id = a.id
JOIN visit v ON a.visit_id = v.id
WHERE e.date_time BETWEEN TIMESTAMP(#from,'00:00:00') AND TIMESTAMP(#to,'23:59:59')
GROUP BY browser ORDER BY visits DESC
</custom>
2015-03-06 23:33:54 +00:00
<sql-batch property="batch">
2015-12-02 17:26:58 +00:00
<custom>
<item name="from" param="date-from"/>
<item name="to" param="date-to"/>
</custom>
2015-03-06 23:33:54 +00:00
</sql-batch>
</db-model>
<htk-column-text title="_Browser" column="browser"/>
<htk-column-spin title="_MinVersion" column="min_version" digits="1"/>
<htk-column-spin title="_MaxVersion" column="max_version" digits="1"/>
2015-03-09 08:36:54 +00:00
<htk-column-date title="_LastVisit" column="last_visit" format="_%a, %e %b %Y at %T"/>
2015-03-06 23:33:54 +00:00
<htk-column-spin title="_Visits" column="visits"/>
<htk-column-spin title="_NewVisits" column="new_visits"/>
</htk-grid>
</div>
</div>
</div>
</div>
</vn>