info
Locale locale
String date_column
String fromDate
String toDate
String Server
String Port
}
@// set sesam server DNS name for link to dashboard
@{
Server = ((info.get("name")).toString());
Port = ((info.get("restPort")).toString());
}
@*Queries:
* [
* {
* "paramName" : "xitems",
* "dateRangeSourceTable" : "r",
* "query" : [
* "SELECT",
* "r.task,",
* "r.saveset,",
* "r.fdi_type,",
* "r.start_time,",
* "r.state,",
* "r.msg,",
* "r.media_pool as pool",
* "FROM",
* "results r",
* "WHERE",
* "r.state not in ('0','1','a','6','q')",
* "AND",
* "@(dateRange:@(date_column))",
* "AND",
* "r.fdi_type not in ('F','D','C','I','X')",
* "AND",
* "r.fdi_type not like 'G%'",
* "ORDER BY",
* "pool, r.start_time"
* ]
* },
* {
* "paramName" : "ritems",
* "dateRangeSourceTable" : "r",
* "query" : [
* "SELECT",
* "r.task,",
* "r.migration_task,",
* "r.migration_id,",
* "r.saveset,",
* "r.start_time,",
* "r.stop_time,",
* "r.state,",
* "r.msg,",
* "r.target_pool as pool,",
* "CASE",
* "WHEN",
* "r.parent_task IS NULL",
* "THEN",
* "r.migration_id",
* "ELSE",
* "r.parent_task",
* "END",
* "AS",
* "sortorder",
* "FROM",
* "migration_results r",
* "WHERE",
* "r.state not in ('0','1','a','6','q')",
* "AND",
* "(",
* "@(dateRange:@(date_column))",
* "OR",
* "( r.stop_time > '@(fromDate)' AND r.stop_time < '@(toDate)' AND r.start_time < '@(fromDate)' )",
* ")",
* "AND",
* "r.replication_type in ('SEP Si3 Replication','Catalyst Replication')",
* "ORDER BY",
* "pool,sortorder,r.parent_task DESC"
* ]
* },
* {
* "paramName" : "bitems",
* "dateRangeSourceTable" : "r",
* "query" : [
* "SELECT",
* "r.task,",
* "r.saveset,",
* "r.fdi_type,",
* "r.start_time,",
* "r.stop_time,",
* "r.state,",
* "r.session_id,",
* "r.client_id,",
* "r.client,",
* "r.msg,",
* "r.media_pool as pool,",
* "rl.saveset_count",
* "FROM",
* "results r",
* "LEFT OUTER JOIN (",
* "select backup_id, saveset_count, num, segment from result_lbls where num=1 and segment<>'-1'",
* ") AS rl ON r.saveset=rl.backup_id",
* "WHERE",
* "r.state not in ('0','1','a','6','q')",
* "AND",
* "(r.fdi_type in ('F','D','C','I','X') OR r.fdi_type like 'G%')",
* "AND",
* "(",
* "@(dateRange:@(date_column))",
* "OR",
* "( r.stop_time > '@(fromDate)' AND r.stop_time < '@(toDate)' AND r.start_time < '@(fromDate)' )",
* ")",
* "AND",
* "(",
* "r.saveset not in",
* "(",
* "SELECT",
* "x.session_id",
* "FROM",
* "results as x",
* "WHERE EXISTS",
* "(",
* "SELECT",
* "y.saveset",
* "FROM",
* "results as y",
* "WHERE",
* "(",
* "y.saveset=x.session_id",
* "AND",
* "r.fdi_type not like 'G%'",
* ")",
* ")",
* ")",
* ")",
* "AND",
* "( rl.saveset_count='0' OR rl.saveset_count IS NULL )",
* "AND",
* "r.original_saveset is NULL",
* "ORDER BY",
* "r.session_id,",
* "COALESCE (r.client_id , -1) ASC,",
* "pool,",
* "r.start_time"
* ]
* },
* {
* "paramName" : "mitems",
* "dateRangeSourceTable" : "r",
* "query" : [
* "SELECT",
* "r.task,",
* "r.migration_task,",
* "r.migration_id,",
* "r.saveset,",
* "r.start_time,",
* "r.stop_time,",
* "r.state,",
* "r.msg,",
* "r.target_pool as pool,",
* "CASE",
* "WHEN",
* "r.parent_task IS NULL",
* "THEN",
* "r.migration_id",
* "ELSE",
* "r.parent_task",
* "END",
* "AS",
* "sortorder",
* "FROM",
* "migration_results r",
* "WHERE",
* "r.state not in ('0','1','a','6','q')",
* "AND",
* "(",
* "@(dateRange:@(date_column))",
* "OR",
* "( r.stop_time > '@(fromDate)' AND r.stop_time < '@(toDate)' AND r.start_time < '@(fromDate)' )",
* ")",
* "AND",
* "r.replication_type='SEP Migration'",
* "ORDER BY",
* "pool,sortorder,r.parent_task DESC"
* ]
* }
* ]
*@
@include("../commons/tags.html")
@include("../commons/functions.html")
@sepReportHeader("Report")
@sepTitleBox("Title", sepFnGetToday(locale), (String) info.get("name"))
@if (date_column == "sesam_date") {
@sepDateRangeLabel(sepFnGetDate(sepFnStringToDate(fromDate), locale), sepFnGetDate(sepFnStringToDate(toDate), locale), date_column)
} else {
@sepDateRangeLabel(sepFnGetDateLong(sepFnStringToDate(fromDate), locale), sepFnGetDateLong(sepFnStringToDate(toDate), locale), date_column)
}
@i18n("FailedBackups")
@if (!bitems.isEmpty()) {
@{
String previousPool = null;
}
@{
String previousSession = null;
boolean isFirstRow2 = true;
}
@for (Map
item : bitems) {
@{
String pool = (String) item.get("pool");
boolean isNewPool = previousPool == null || !previousPool.equals(pool);
boolean closePreviousTable = previousPool != null;
if (pools != null && !pools.isEmpty() && !pools.contains(pool)) {
continue;
}
}
@if (isNewPool) {
@{
previousPool = pool;
}
@if (closePreviousTable) {
}
@i18n("MediaPool") @(pool)
| @i18n("Group") |
@i18n("Task") |
@i18n("BackupState") |
@i18n("Client") |
@i18n("SavesetId") |
@i18n("Message") |
}
@{
String btask = (String) item.get("task");
String session = (String) item.get("session_id");
boolean isNewTask = previousSession == null || !previousSession.equals(session) || "single".equals(session);
String bState = "other";
String bStyle = "";
String bText = "State.";
String backupState = (String) item.get("state");
if ("0".equals(backupState)) {
bState = "check";
bStyle = "svg-ok";
}
if ("a".equals(backupState)) {
bState = "run";
bStyle = "svg-run";
}
if ("1".equals(backupState)) {
bState = "warning";
bStyle = "svg-warning";
}
if ("2".equals(backupState) || "e".equals(backupState) || "X".equals(backupState) || "3".equals(backupState) || "c".equals(backupState)) {
bState = "bad";
bStyle = "svg-error";
}
bText = bText + bState;
}
|
@if (isNewTask) {
@{
previousSession = session;
}
@(btask)
}
|
@(btask)
|
@if(!"other".equals(bState)) {
}
|
@(item.get("client"))
|
@(item.get("saveset"))
|
@(item.get("msg"))
|
@{
isFirstRow2 = false;
}
}
} else {
@i18n("NoBackupErrors")
}
@i18n("FailedMigrations")
@if (!mitems.isEmpty()) {
@{
String previousPool = null;
}
@{
String previousTask = null;
boolean isFirstRow = true;
}
@for (Map
item : mitems) {
@{
String pool = (String) item.get("pool");
boolean isNewPool = previousPool == null || !previousPool.equals(pool);
boolean closePreviousTable = previousPool != null;
if (pools != null && !pools.isEmpty() && !pools.contains(pool)) {
continue;
}
}
@if (isNewPool) {
@{
previousPool = pool;
}
@if (closePreviousTable) {
}
@i18n("MediaPool") @(pool)
| @i18n("MigTask") |
@i18n("Task") |
@i18n("BackupState") |
@i18n("SavesetId") |
@i18n("Message") |
}
@{
String mtask = (String) item.get("sortorder");
String task = (String) item.get("task");
String migtask = (String) item.get("migration_task");
boolean isNewTask = previousTask == null || !previousTask.equals(mtask);
String bState = "other";
String bStyle = "";
String bText = "State.";
String backupState = (String) item.get("state");
if ("0".equals(backupState)) {
bState = "check";
bStyle = "svg-ok";
}
if ("a".equals(backupState)) {
bState = "run";
bStyle = "svg-run";
}
if ("1".equals(backupState)) {
bState = "warning";
bStyle = "svg-warning";
}
if ("2".equals(backupState) || "e".equals(backupState) || "X".equals(backupState) || "3".equals(backupState) || "c".equals(backupState)) {
bState = "bad";
bStyle = "svg-error";
}
bText = bText + bState;
}
|
@if (isNewTask) {
@{
previousTask = mtask;
}
@(migtask)
}
|
@(task)
|
@if(!"other".equals(bState)) {
}
|
@(item.get("saveset"))
|
@(item.get("msg"))
|
@{
isFirstRow = false;
}
}
} else {
@i18n("NoMigrationErrors")
}
@i18n("FailedReplications")
@if (!ritems.isEmpty()) {
@{
String previousPool = null;
}
@{
String previousRepTask = null;
boolean isFirstRow3 = true;
}
@for (Map
item : ritems) {
@{
String pool = (String) item.get("pool");
boolean isNewPool = previousPool == null || !previousPool.equals(pool);
boolean closePreviousTable = previousPool != null;
if (pools != null && !pools.isEmpty() && !pools.contains(pool)) {
continue;
}
}
@if (isNewPool) {
@{
previousPool = pool;
}
@if (closePreviousTable) {
}
@i18n("MediaPool") @(pool)
| @i18n("RepTask") |
@i18n("Task") |
@i18n("BackupState") |
@i18n("SavesetId") |
@i18n("Message") |
}
@{
String rtask = (String) item.get("sortorder");
String task = (String) item.get("task");
String reptask = (String) item.get("migration_task");
boolean isNewTask = previousRepTask == null || !previousRepTask.equals(rtask);
String bState = "other";
String bStyle = "";
String bText = "State.";
String backupState = (String) item.get("state");
if ("0".equals(backupState)) {
bState = "check";
bStyle = "svg-ok";
}
if ("a".equals(backupState)) {
bState = "run";
bStyle = "svg-run";
}
if ("1".equals(backupState)) {
bState = "warning";
bStyle = "svg-warning";
}
if ("2".equals(backupState) || "e".equals(backupState) || "X".equals(backupState) || "3".equals(backupState) || "c".equals(backupState)) {
bState = "bad";
bStyle = "svg-error";
}
bText = bText + bState;
}
|
@if (isNewTask) {
@{
previousRepTask = rtask;
}
@(reptask)
}
|
@(task)
|
@if(!"other".equals(bState)) {
}
|
@(item.get("saveset"))
|
@(item.get("msg"))
|
@{
isFirstRow3 = false;
}
}
} else {
@i18n("NoReplicationErrors")
}
@i18n("FailedOther")
@if (!xitems.isEmpty()) {
| @i18n("Task") |
@i18n("BackupState") |
@i18n("SavesetId") |
@i18n("Message") |
@for (Map item : xitems) {
@{
String task = (String) item.get("task");
String bState = "other";
String bStyle = "";
String bText = "State.";
String backupState = (String) item.get("state");
if ("0".equals(backupState)) {
bState = "check";
bStyle = "svg-ok";
}
if ("a".equals(backupState)) {
bState = "run";
bStyle = "svg-run";
}
if ("1".equals(backupState)) {
bState = "warning";
bStyle = "svg-warning";
}
if ("2".equals(backupState) || "e".equals(backupState) || "X".equals(backupState) || "3".equals(backupState) || "c".equals(backupState)) {
bState = "bad";
bStyle = "svg-error";
}
bText = bText + bState;
}
|
@(task)
|
@if(!"other".equals(bState)) {
}
|
@(item.get("saveset"))
|
@(item.get("msg"))
|
}
} else {
@i18n("NoOtherErrors")
}