📄 stats.zul
字号:
<?xml version="1.0" encoding="UTF-8"?><?page title="ZK Statistics"?><!--stats.zul{{IS_NOTE Purpose: Description: History: Wed Mar 15 14:15:26 2006, Created by tomyeh}}IS_NOTECopyright (C) 2006 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><zk xmlns:h="http://www.w3.org/1999/xhtml"> <zscript> monitor = desktop.webApp.configuration.monitor; </zscript><h:h1>Server Statistics</h:h1><label style="font-weight:bold;color:#404010" value="No monitor installed." if="${empty monitor}"/><vbox unless="${empty monitor}"><label>Version: ${desktop.webApp.version}</label><label>Build: ${desktop.webApp.build}</label><grid width="500px"> <columns> <column width="180px" label="What"/> <column width="100px" align="right" label="Total"/> <column width="120px" align="right" label="Hourly Average"/> <column align="right" label="Active"/> </columns> <rows> <row> Number of Sessions <label id="totalSession"/> <label id="averageSession"/> <label id="activeSession"/> </row> <row> Number of Desktops <label id="totalDesktop"/> <label id="averageDesktop"/> <label id="activeDesktop"/> </row> <row> Number of Updates <label id="totalUpdate"/> <label id="averageUpdate"/> <label id="activeUpdate"/> </row> </rows></grid> <hbox>Serving since <label id="startTime"/></hbox> <hbox>Now is <label id="now"/></hbox> <hbox>Time escaped <label id="totalTime"/></hbox> <button label="Reload" onClick="monitor()"/> <zscript> ifmt = new java.text.DecimalFormat("#,##0"); dfmt = new java.text.DecimalFormat("#,##0.00"); void monitor() { totalSession.setValue(ifmt.format(monitor.totalSessionCount)); averageSession.setValue(dfmt.format(monitor.averageSessionCount)); activeSession.setValue(ifmt.format(monitor.activeSessionCount)); totalDesktop.setValue(ifmt.format(monitor.totalDesktopCount)); averageDesktop.setValue(dfmt.format(monitor.averageDesktopCount)); activeDesktop.setValue(ifmt.format(monitor.activeDesktopCount)); totalUpdate.setValue(ifmt.format(monitor.totalUpdateCount)); averageUpdate.setValue(dfmt.format(monitor.averageUpdateCount)); activeUpdate.setValue(ifmt.format(monitor.activeUpdateCount)); int v = (System.currentTimeMillis() - monitor.startTime) / 60000; totalTime.value = "" + (v / 60) + " hours " + (v % 60) + " mins"; now.value = new Date().toString(); } monitor(); startTime.value = new Date(monitor.startTime).toString(); </zscript></vbox></zk>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -