hedera-web/forms/admin/access-log/ui.xml

69 lines
1.5 KiB
XML

<vn>
<vn-group>
<vn-param id="user"/>
<vn-hash-param key="user" param="user"/>
<db-form id="userForm">
<db-model property="model">
<custom>
SELECT u.id, u.nickname, u.email, c.phone
FROM account.user u
LEFT JOIN vn.client c ON c.id = u.id
WHERE u.id = #user
</custom>
<sql-batch property="batch">
<custom>
<item name="user" param="user"/>
</custom>
</sql-batch>
</db-model>
</db-form>
</vn-group>
<div id="title">
<h1><t>AccessLog</t></h1>
</div>
<div id="form" class="access-log">
<div class="box">
<div class="form">
<p>#{{$.userForm.id}}</p>
<p>{{$.userForm.nickname}}</p>
<p>{{$.userForm.email}}</p>
<p>{{$.userForm.phone}}</p>
</div>
</div>
<div class="list box">
<div>
<htk-repeater form-id="iter">
<db-model property="model">
<custom>
SELECT u.stamp, a.platform, a.browser, a.version, a.javascript, a.cookies
FROM visitUser u
JOIN visitAccess c ON c.id = u.accessFk
JOIN visitAgent a ON a.id = c.agentFk
WHERE u.userFk = #user
ORDER BY u.stamp DESC
LIMIT 8
</custom>
<sql-batch property="batch">
<custom>
<item name="user" param="user"/>
</custom>
</sql-batch>
</db-model>
<custom>
<div class="item">
<p>
{{Vn.Value.format(iter.stamp, _('%a, %e %b %Y at %T'))}}
</p>
<p>
{{iter.platform}} -
{{iter.browser}}
{{iter.version}}
</p>
</div>
</custom>
</htk-repeater>
</div>
</div>
</div>
</vn>