From d3346e297e2bf8b396aac5b9e85acd43f61557b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Wed, 22 Aug 2012 08:30:46 +0000 Subject: [PATCH] Include specific jobb type states in HTML and text output Include User Tags in HTML and text output --- org.glite.lb.server/src/lb_html.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/org.glite.lb.server/src/lb_html.c b/org.glite.lb.server/src/lb_html.c index 802d898..5e6777a 100644 --- a/org.glite.lb.server/src/lb_html.c +++ b/org.glite.lb.server/src/lb_html.c @@ -494,6 +494,24 @@ int edg_wll_GeneralJobStatusToHTML(edg_wll_Context ctx UNUSED_VAR, edg_wll_JobSt add_row(&out, "Status", "Status", (chtemp = edg_wll_StatToString(stat.state)), NULL, text); free(chtemp); add_row(&out, "job_type", "Type", edg_wll_StatusJobtypeNames[stat.jobtype], NULL, text); + + switch (stat.jobtype) { + case EDG_WLL_STAT_CREAM: + chtemp = edg_wll_CreamStatToString(stat.cream_state); + add_row(&out, "CREAM_Status", "CREAM Status", chtemp, NULL, text); + free(chtemp); + break; + case EDG_WLL_STAT_VIRTUAL_MACHINE: + chtemp = edg_wll_VMStatToString(stat.vm_state); + add_row(&out, "VM_Status", "VM Status", chtemp, NULL, text); + free(chtemp); + break; + case EDG_WLL_STAT_PBS: + break; +// case EDG_WLL_STAT_FILE_TRANSFER: +// case EDG_WLL_STAT_FILE_TRANSFER_COLLECTION: + } + add_row(&out, "owner", "Owner", stat.owner, NULL, text); add_row(&out, "payload_owner", "Payload Owner", stat.payload_owner, NULL, text); add_row(&out, "condorId", "Condor Id", stat.condorId, NULL, text); @@ -534,6 +552,23 @@ int edg_wll_GeneralJobStatusToHTML(edg_wll_Context ctx UNUSED_VAR, edg_wll_JobSt add_row(&out, "output_sandbox", "Output sandbox", chtemp, chtemp, text); free(chtemp); add_row(&out, "acl", "ACL", stat.acl, NULL, text); + if (stat.user_tags) { + chtemp = NULL; + for (i=0; stat.user_tags[i].tag; i++) { + asprintf(&out_tmp, "%s%s%s%s=%s%s", + chtemp ? chtemp : "", + i > 0 ? (text ? "," : "
") : "", + text ? "\"" : "", + stat.user_tags[i].tag, + stat.user_tags[i].value, + text ? "\"" : ""); + free(chtemp); + chtemp = out_tmp; + } + add_row(&out, "user_tags", "User Tags", chtemp, NULL, text); + free(chtemp); + } + if (!text) { asprintf(&out_tmp, "%s\n\n", out); -- 1.8.2.3