use of org.eclipse.scout.rt.server.admin.inspector.SessionInspector in project scout.rt by eclipse.
the class CallsView method produceBody.
@Override
public void produceBody(HtmlComponent p) {
final SessionInspector session = getAdminSession().getTopView().getSessionsView().getSelectedSession();
p.linkAction("Clear calls", new AbstractHtmlAction("clearCalls") {
@Override
public void run() {
session.clearCallInspectors();
}
});
p.p();
//
p.startTable(0, 5, 5);
p.startTableRow();
p.startTableCell();
renderCallTable(p, session);
p.startTableCell();
// selected call
if (m_selectedCall != null) {
renderCallDetail(p, m_selectedCall);
}
p.endTableCell();
p.endTableRow();
p.endTable();
}
use of org.eclipse.scout.rt.server.admin.inspector.SessionInspector in project scout.rt by eclipse.
the class SessionsView method renderSessionTable.
protected void renderSessionTable(HtmlComponent p) {
HtmlTable table1 = new HtmlTable(p, "table1", m_table1SortInfo);
table1.startTable(1, 0, 3);
renderSessionTableHeader(table1);
SessionInspector validSelection = null;
SessionInspector[] sorted = getSortedSessions();
for (int i = sorted.length - 1; i >= 0; i--) {
if (sorted[i] == m_selectedSession) {
validSelection = m_selectedSession;
}
VirtualRow vrow = table1.addVirtualRow();
renderSessionRow(vrow, i + 1, sorted[i]);
}
table1.appendVirtualRows();
m_selectedSession = validSelection;
table1.endTable();
p.append(table1);
}
use of org.eclipse.scout.rt.server.admin.inspector.SessionInspector in project scout.rt by eclipse.
the class CallsView method produceTitle.
@Override
public void produceTitle(HtmlComponent p) {
final SessionInspector session = getAdminSession().getTopView().getSessionsView().getSelectedSession();
p.print("Calls of " + (session != null ? session.getInfo().getUserId() + "/" + session.getInfo().getSessionId() : "?"));
}
use of org.eclipse.scout.rt.server.admin.inspector.SessionInspector in project scout.rt by eclipse.
the class SessionsView method getSortedSessions.
protected SessionInspector[] getSortedSessions() {
SessionInspector[] sessionInspectors = ProcessInspector.instance().getSessionInspectors();
TreeMap<CompositeObject, SessionInspector> userAndTimeToSessions = new TreeMap<CompositeObject, SessionInspector>();
for (int i = 0; i < sessionInspectors.length; i++) {
String user = sessionInspectors[i].getInfo().getUserId();
long lastAccess = NumberUtility.nvl(sessionInspectors[i].getInfo().getLastAccessedTime(), 0L);
userAndTimeToSessions.put(new CompositeObject(lastAccess, user, i), sessionInspectors[i]);
}
return userAndTimeToSessions.values().toArray(new SessionInspector[userAndTimeToSessions.size()]);
}
Aggregations