Exemple #1
0
 @Override
 protected void content(final HTMLElement body) throws IOException {
   if (sessionInfos.isEmpty()) {
     body.p().text(MSG_NO_SESSIONS);
   } else {
     body.p().text(MSG_SESSIONS);
     sessionTable(body);
   }
   if (executionData.isEmpty()) {
     body.p().text(MSG_NO_EXECDATA);
   } else {
     body.p().text(MSG_EXECDATA);
     executionDataTable(body);
   }
 }
Exemple #2
0
 private void sessionTable(final HTMLElement body) throws IOException {
   final HTMLElement table = body.table(Styles.COVERAGETABLE);
   {
     final HTMLElement tr = table.thead().tr();
     tr.td().text("Session");
     tr.td().text("Start Time");
     tr.td().text("Dump Time");
   }
   final HTMLElement tbody = table.tbody();
   for (final SessionInfo i : sessionInfos) {
     final HTMLElement tr = tbody.tr();
     tr.td().span(Styles.EL_SESSION).text(i.getId());
     tr.td().text(dateFormat.format(new Date(i.getStartTimeStamp())));
     tr.td().text(dateFormat.format(new Date(i.getDumpTimeStamp())));
   }
 }
Exemple #3
0
 private void executionDataTable(final HTMLElement body) throws IOException {
   final HTMLElement table = body.table(Styles.COVERAGETABLE);
   {
     final HTMLElement tr = table.thead().tr();
     tr.td().text("Class");
     tr.td().text("Id");
   }
   final HTMLElement tbody = table.tbody();
   final ILanguageNames names = context.getLanguageNames();
   for (final ExecutionData e : executionData) {
     final HTMLElement tr = tbody.tr();
     final String link = index.getLinkToClass(e.getId());
     final String qualifiedName = names.getQualifiedClassName(e.getName());
     if (link == null) {
       tr.td().span(Styles.EL_CLASS).text(qualifiedName);
     } else {
       tr.td().a(link, Styles.EL_CLASS).text(qualifiedName);
     }
     final String id = String.format("%016x", Long.valueOf(e.getId()));
     tr.td().code().text(id);
   }
 }
Exemple #4
0
 @Override
 protected void infoLinks(final HTMLElement span) throws IOException {
   final String link = packagePage.getLink(folder);
   span.a(link, Styles.EL_CLASS).text("Classes");
   super.infoLinks(span);
 }