info
Locale locale
String date_column
String fromDate
String toDate
String defaultDataSize
de.sep.sesam.util.RendererUtils rendererUtils
}
@returnIf(items == null)
@*Queries:
* [
* {
* "paramName" : "clients",
* "condition" : [
* "@returnIf(client_id == null)"
* ],
* "query" : [
* "SELECT",
* "clients.name as name, locations.name as location, clients.os as os, clients.sesam_version as version",
* "FROM",
* "clients, locations",
* "WHERE",
* "clients.client_id = @(client_id)",
* "AND",
* "locations.id = clients.location"
* ]
* },
* {
* "paramName" : "items",
* "condition" : [
* "@returnIf(client_id == null)"
* ],
* "query" : [
* "SELECT",
* "task,media_pool,data_size",
* "FROM",
* "results",
* "WHERE",
* "@(dateRange:sesam_date)",
* "AND",
* "client = (select name from clients where client_id = @(client_id))",
* "ORDER BY",
* "task, media_pool"
* ]
* }
* ]
*@
@include("../commons/tags.html")
@include("../commons/functions.html")
@sepReportHeader("SEP Report")
@sepTitleBox("Title", sepFnGetToday(locale))
@sepDateRangeLabel(sepFnGetDate(sepFnStringToDate(fromDate), locale), sepFnGetDate(sepFnStringToDate(toDate), locale), date_column)
@{
String client_name = String.valueOf(clients.get(0).get("name"));
String client_location = String.valueOf(clients.get(0).get("location"));
String client_os = String.valueOf(clients.get(0).get("os"));
String client_version = String.valueOf(clients.get(0).get("version"));
}
@sepInfoLabel("Client.Info.Name", client_name)
@sepInfoLabel("Client.Info.Location", client_location)
@sepInfoLabel("Client.Info.OS", client_os)
@sepInfoLabel("Client.Info.Version", client_version)
@{
long total = 0;
long all_total = 0;
String task = null;
String pool = null;
}
@i18n("Column.Task") |
@i18n("Column.Pool") |
@i18n("Column.Size") |
@for (Map item : items) {
@{
boolean doRenderRow = false;
String currentTask = String.valueOf(item.get("task"));
String currentPool = String.valueOf(item.get("media_pool"));
Object currentDataSize = item.get("data_size");
if (task == null || (currentTask != null && currentTask.equals(task))) {
task = currentTask;
if (currentDataSize != null) {
total += Long.valueOf(String.valueOf(currentDataSize));
}
pool = currentPool;
} else{
doRenderRow = true;
}
}
@if(doRenderRow) {
@(task) |
@(pool) |
@sepFnFormatBytes(rendererUtils, total, defaultDataSize) |
@{
all_total += total;
task = currentTask;
if (currentDataSize != null) {
total += Long.valueOf(String.valueOf(currentDataSize));
}
pool = currentPool;
}
}
}
@if(task) {
@(task) |
@(pool) |
@sepFnFormatBytes(rendererUtils, total, defaultDataSize) |
@{
all_total += total;
}
}
|
|
@i18n("Summary.Total"): |
@sepFnFormatBytes(rendererUtils, all_total, defaultDataSize) |