use of org.eclipse.scout.rt.server.admin.html.AbstractHtmlAction 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.html.AbstractHtmlAction in project scout.rt by eclipse.
the class MessagesView method renderMessages.
private void renderMessages(HtmlComponent p) {
AbstractHtmlAction a = p.getInvokedAction();
if (a != null) {
if (a.getException() != null) {
StringWriter sw = new StringWriter();
a.getException().printStackTrace(new PrintWriter(sw, true));
p.raw("<pre>");
p.print(sw.toString());
p.raw("</pre>");
p.br();
}
if (a.getPlainText() != null) {
p.raw("<pre>");
p.print(a.getPlainText());
p.raw("</pre>");
p.br();
}
}
}
use of org.eclipse.scout.rt.server.admin.html.AbstractHtmlAction in project scout.rt by eclipse.
the class SessionsView method renderSessionDetailsCell.
protected void renderSessionDetailsCell(HtmlComponent p, final SessionInspector session) {
p.startTableCell();
p.startLinkAction(new AbstractHtmlAction("showServicesOf" + session.getInfo().getSessionId()) {
@Override
public void run() {
m_selectedSession = session;
getAdminSession().getTopView().showServices();
}
});
p.print("Services");
p.endLinkAction();
p.raw(" ");
p.startLinkAction(new AbstractHtmlAction("showCallsOf" + session.getInfo().getSessionId()) {
@Override
public void run() {
m_selectedSession = session;
getAdminSession().getTopView().showCalls();
}
});
p.print("Calls");
p.endLinkAction();
p.endTableCell();
}
use of org.eclipse.scout.rt.server.admin.html.AbstractHtmlAction in project scout.rt by eclipse.
the class SessionsView method produceBody.
@Override
public void produceBody(HtmlComponent p) {
p.linkAction("Clear sessions", new AbstractHtmlAction("clearSessions") {
@Override
public void run() {
ProcessInspector.instance().clearSessionInspectors();
}
});
p.p();
//
renderSessionTable(p);
}
use of org.eclipse.scout.rt.server.admin.html.AbstractHtmlAction in project scout.rt by eclipse.
the class CallsView method renderCallRow.
private void renderCallRow(HtmlComponent p, int index, final CallInspector call) {
boolean selected = m_selectedCall != null && (m_selectedCall == call);
SimpleDateFormat startFmt = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
String serviceShortName = call.getInfo().getService();
int i = Math.max(serviceShortName.lastIndexOf('.'), serviceShortName.lastIndexOf('$'));
if (i >= 0) {
serviceShortName = serviceShortName.substring(i + 1);
}
CallInfo info = call.getInfo();
//
p.startTableRow();
p.tableCell("" + index);
p.startTableCell();
String callId = serviceShortName + "." + info.getOperation();
String callKey = serviceShortName + "." + info.getOperation() + "." + info.getStartTime();
if (selected) {
p.focusAnchor();
}
p.startLinkAction(new AbstractHtmlAction("selectCall." + callKey) {
@Override
public void run() {
m_selectedCall = call;
}
});
if (selected) {
p.bold(callId);
} else {
p.print(callId);
}
p.endLinkAction();
p.endTableCell();
p.startTableCell();
p.printNoBreak(startFmt.format(new Date(info.getStartTime())));
p.endTableCell();
p.startTableCell();
p.printNoBreak("" + info.getDuration() + " ms");
p.endTableCell();
p.startTableCell();
if (info.isActive()) {
p.printNoBreak("RUNNING");
} else {
if (info.getReturnException() == null) {
p.raw("<font color='008800'>");
p.printNoBreak("COMPLETED OK");
p.raw("</font>");
} else {
p.raw("<font color='880000'>");
p.printNoBreak("COMPLETED WITH ERROR");
p.raw("</font>");
}
}
p.endTableCell();
p.endTableRow();
}
Aggregations