@include("../commons/styles.html") @include("../commons/images.html") @args() { List> bitems List> resitems List> mitems List> ditems List> citems List> litems List> dritems List> locitems List> tcitems List client_ids List location_ids List loader_ids List Tasks List DataStores List Migrations List Replications Map info Locale locale String fromDate String toDate String displayMode String timeShift } @if (false) {
========== ARGUMENTS ===========
=== locale: ==@(locale)==
=== fromDate: ==@(fromDate)==
=== toDate: ==@(toDate)==
=== displayMode: ==@(displayMode)==
=== timeShift: ==@(timeShift)==
=== location_ids: ==@(location_ids)==
=== client_ids: ==@(client_ids)==
=== Tasks: ==@(Tasks)==
=== DataStores: ==@(DataStores)==
=== loader_ids: ==@(loader_ids)==
=== Migrations: ==@(Migrations)==
=== Replications: ==@(Replications)==
================================

} @{ // ------------------------ // Define args // ------------------------ boolean fixed; // flag how to display the task sections boolean show_all=false; // flag to show all task sections boolean exclude=false; // flag for exclude mode if ( "dynamic".equals(displayMode) ) { fixed = false; } else { fixed = true; } // check location_ids for -1, which means exclude mode if ( location_ids != null && !location_ids.isEmpty() ) { if ( location_ids.contains(-1L) ) { show_all = true; exclude = true; } } // for debug output only String debugoutput = ""; Integer item_cnt = 0; // get current time in milliseconds Date today = new Date(); long milli = today.getTime(); java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd"); // if timeshift is true then adapt start and stop date boolean timeshift2 = false; long days = 0; long days1 = 0; String start2s = ""; String end2s = ""; String oldfrom = ""; String oldto = ""; if ("yes".equals(timeShift)) { timeshift2 = true; long milliseconds, start2, end2; String[] parts; // date format is "yyyy-MM-dd" parts = fromDate.split(" "); Date from = de.sep.sesam.common.date.HumanDate.toDate(parts[0] + " 00:00:00"); parts = toDate.split(" "); Date to = de.sep.sesam.common.date.HumanDate.toDate(parts[0] + " 23:59:59"); // how many days is the time period milliseconds = to.getTime() - from.getTime(); days = (long) (milliseconds / (1000*60*60*24)); days1 = days + 1; // for report output end2 = today.getTime(); start2 = end2 - (days * (1000*60*60*24)); Date start2d = new java.util.Date(start2); start2s = df.format(start2d); Date end2d = new java.util.Date(end2); end2s = df.format(end2d); // change the report period fromDate = start2s; toDate = end2s; } // Define lists of RDS List SRV_rds = new ArrayList<>(); // Define lists of clients List SRV_clients = new ArrayList<>(); // Define lists of datastores List SRV_datastores = new ArrayList<>(); // Define lists of tape loaders List SRV_loaders = new ArrayList<>(); // Define lists of tasks List SRV_tasks = new ArrayList<>(); List PATH_tasks = new ArrayList<>(); List DB_tasks = new ArrayList<>(); List HYP_tasks = new ArrayList<>(); List OTHER_tasks = new ArrayList<>(); List MIG_tasks = new ArrayList<>(); List REP_tasks = new ArrayList<>(); List CLOUD_tasks = new ArrayList<>(); List SNAP_tasks = new ArrayList<>(); // Define a black list to make sure the same entry will be counted only once. // It keeps the item and if it is already in the BLACK_list it will be skipped. // As the items are sorted by date (the newest one first), only this one will be considered List BLACK_list = new ArrayList<>(); // set sesam server DNS name for link to dashboard String Server = ((info.get("name")).toString()); // initialize global counters Integer errors = 0; Integer warnings = 0; Integer successfull = 0; Integer expand = 1; // initialize task_type categories String path_types = "PATH, NDMP, NSS FILE SYSTEM"; String hyp_types = "CITRIX XENSERVER, HYPER-V, KVM-QEMU, NUTANIX-AHV, OPENNEBULA, ORACLE-VM, PROXMOX-VE, RHEV, VMWARE VSPHERE, VCB_FILE, VCB_IMAGE, VCB_PROXY"; String db_types = "DB2_UDB, EXCHANGE SERVER, GROUPWISE, KOPANO, LOTUS NOTES, MS SQL SERVER, MYSQL, ZARAFA, POSTGRES, SAP/R3, SAP HANA, SAP ASE, ORACLE, COURIER IMAP, CYRUS IMAP, DOVECOT IMAP, EXCHANGE SERVER DAG, JIRA, MAXDB, SHAREPOINT SERVER, SHAREPOINT SITES"; String snap_types = "NETAPP"; // poor mans check to find cloud replications: // just check target pool for these key words String[] cloud_types = {"Cloud","S3","AWS","Azure","GoogleCloud", "GCP", "Blob", "Pure", "Object","Swarm", "Ionos","Wasabi", "Clyso","minio", "ceph","Lucky", "Leitz"}; // Counter for details menĂ¼ at the sections Integer det_counter = 1; // define return object for ParseItem function Map retobj = new HashMap<>(); // define return object for Measure function Map measure = new HashMap<>(); } @*Queries: * [ * { * "paramName" : "bitems", * "dateRangeSourceTable" : "r", * "query" : [ * "SELECT", * "r.task,", * "r.saveset,", * "r.location,", * "r.start_time,", * "r.state,", * "r.client_id,", * "r.client,", * "r.backup_type", * "FROM", * "results r", * "WHERE", * "(", * "( r.start_time >= '@(fromDate)' )", * "AND", * "(r.fdi_type in ('C', 'F', 'D', 'I', 'N') and r.subtask_flag = '0')", * ")", * "ORDER BY", * "r.start_time DESC" * ] * }, * { * "paramName" : "citems", * "dateRangeSourceTable" : "r", * "query" : [ * "SELECT", * "r.client_id,", * "r.name,", * "r.location,", * "r.os,", * "r.access_state,", * "r.accessmode,", * "r.vm_server_type", * "FROM", * "clients r" * ] * }, * { * "paramName" : "resitems", * "dateRangeSourceTable" : "r", * "query" : [ * "SELECT", * "r.task,", * "r.saveset,", * "r.restore_id,", * "r.start_time,", * "r.state,", * "r.client", * "FROM", * "restore_results r", * "WHERE", * "(", * "( r.start_time >= '@(fromDate)' )", * "AND", * "(r.parent_task IS NULL OR r.parent_task = '')", * ")", * "ORDER BY", * "r.start_time DESC" * ] * }, * { * "paramName" : "mitems", * "dateRangeSourceTable" : "r", * "query" : [ * "SELECT", * "r.task,", * "r.migration_task,", * "r.migration_id,", * "r.replication_type,", * "r.saveset,", * "r.parent_task,", * "r.start_time,", * "r.state,", * "r.target_pool", * "FROM", * "migration_results r", * "WHERE", * "(", * "( r.start_time >= '@(fromDate)' )", * "AND", * "(r.parent_task IS NULL OR r.parent_task = '')", * ")", * "ORDER BY", * "r.start_time DESC" * ] * }, * { * "paramName" : "litems", * "dateRangeSourceTable" : "l", * "condition" : [ * "@// @(exist:loader_ids,list)" * ], * "query" : [ * "SELECT", * "l.loader_num,", * "l.name,", * "l.loader_type,", * "l.slots,", * "l.drives", * "FROM", * "hw_loaders l", * "WHERE", * "l.name is not NULL", * "@if(loader_ids != null && !loader_ids.isEmpty()) {", * "AND", * "l.loader_num in @(sqlList:@(loader_ids))", * "}" * ] * }, * { * "paramName" : "dritems", * "dateRangeSourceTable" : "dr", * "condition" : [ * "@// @(exist:loader_ids,list)" * ], * "query" : [ * "SELECT", * "dr.loader_num,", * "dr.name,", * "dr.client_id,", * "dr.drive_type,", * "dr.drive_num,", * "dr.sts", * "FROM", * "hw_drives dr", * "@if(loader_ids != null && !loader_ids.isEmpty()) {", * "WHERE", * "dr.loader_num in @(sqlList:@(loader_ids))", * "}" * ] * }, * { * "paramName" : "locitems", * "dateRangeSourceTable" : "loc", * "condition" : [ * "@// @(exist:location_ids,list)" * ], * "query" : [ * "SELECT", * "loc.id,", * "loc.name,", * "loc.parent", * "FROM", * "locations loc" * ] * }, * { * "paramName" : "tcitems", * "dateRangeSourceTable" : "tc", * "query" : [ * "SELECT", * "tc.tasks_client_id,", * "tc.client_id,", * "tc.name,", * "tc.task,", * "tc.location", * "FROM", * "tasks_clients tc", * "WHERE", * "(tc.tasks_client_id <> tc.client_id)" * ] * }, * { * "paramName" : "ditems", * "dateRangeSourceTable" : "r", * "condition" : [ * "@// @(exist:DataStores,list)" * ], * "query" : [ * "SELECT", * "r.name,", * "r.data_store_type,", * "r.status", * "FROM", * "data_stores r", * "WHERE", * "r.data_store_type <> 'Meta-Server-Data'", * "@if(DataStores != null && !DataStores.isEmpty()) {", * "AND", * "r.name in @(sqlList:@(DataStores))", * "}", * "ORDER BY", * "r.name" * ] * } * ] *@ @include("../commons/tags.html") @include("../commons/functions.html") @// =========================================================== @// Function to recursively find the right location @// =========================================================== @def String CheckLocation(Long id, Map locMap, List location_ids) { if (location_ids.contains(id)) { // Found the location return "FOUND: id: " + id; } else { Long parent = locMap.get(id); if ( parent == null ) { // Reached Root: Location of client not found return "END ROOT: id: " + id + " parent: " + parent; } else { // Try parent location return CheckLocation(parent, locMap, location_ids); } } } @// =========================================================== @// Function to transform date object into a string @// =========================================================== @def String CheckDate(Object start_time) { java.text.DateFormat dateFormat = new java.text.SimpleDateFormat("MMM d, YYYY"); String strDate = dateFormat.format(sepFnStringToDate(String.valueOf(start_time))); return strDate; } @// =========================================================== @// Function to transform date object into another string @// =========================================================== @def String CheckDate2(Object start_time) { java.text.DateFormat dateFormat = new java.text.SimpleDateFormat("YYYY-MM-dd"); String strDate = dateFormat.format(sepFnStringToDate(String.valueOf(start_time))); return strDate; } @// =========================================================== @// Function to transform an object into a string (catch NULL pointer objects) @// =========================================================== @def String CheckValue(Object obj) { if (obj == null) { return ""; } else { String str = String.valueOf(obj); // str = str.trim(); return str; } } @// ========================================================================= @// Use the correct compare to check the date range with or without timeshift @// ========================================================================= @def Boolean CheckDateRange(boolean timeshift2, String fromDate, String toDate, String start_time) { Integer res = 0; // check for timeshift if (timeshift2) { // if 'yes' then adapt startdate = today - days res = fromDate.compareTo(start_time); if ( res <= 0 ) { // all tasks > fromDate are ok return true; } else { // continue; // go to next item return false; } } else { // if 'no' then use toDate res = toDate.compareTo(start_time); if ( res >= 0 ) { // all tasks < toDate are ok return true; } else { // continue; // go to next item return false; } } } @// =========================================================== @// Main Function to parse a single item of a database @// 1. Init the state @// 2. Set the mark according state @// 3. Set the html table row @// 4. Set global counters @// =========================================================== @def Map ParseItem(String itype, Map item, String table, String mark, String color, Integer count, Integer errors, Integer warnings, Integer successfull) { // set sesam server DNS name for link to dashboard String Server = ((info.get("name")).toString()); String Port = ((info.get("restPort")).toString()); String errmark = ""; String warnmark = ""; String okmark = ""; String resState = "other"; String resStyle = ""; String resText = "State."; String backupState; switch (itype) { case "RDS": backupState = (String) item.get("access_state"); break; case "DataStore": backupState = (String) item.get("status"); break; case "Client": backupState = (String) item.get("access_state"); break; case "Backup": backupState = (String) item.get("state"); break; case "Restore": backupState = (String) item.get("state"); break; case "Copy": backupState = (String) item.get("state"); break; case "Library": backupState = (String) item.get("state"); break; default: backupState = (String) item.get("state"); break; } if (backupState == null) { backupState = "0"; } // Categories of states // Ok: 0 // Warning: 1, I // Error: 2, e, x, X, 3, 4, 6, 8, 9, c, C, d if ("0".equals(backupState)) { resState = "check"; resStyle = "svg-ok"; } if ("aq".contains(backupState)) { resState = "run"; resStyle = "svg-run"; } if ("1I".contains(backupState)) { resState = "warning"; resStyle = "svg-warning"; } if ("2exX348cCd".contains(backupState)) { resState = "bad"; resStyle = "svg-error"; } resText = resText + resState; // start a row with a status icon table = table + " "; if(!"other".equals(resState)) { // define state icon only if state is known table = table + "" + resText + ""; } // create content of tables according to item type String virtualization, clienttype; switch (itype) { case "RDS": if ( CheckValue(item.get("client_id")).equals("0") ) { clienttype = "Backup Server"; } else { clienttype = "RDS"; } table = table + "" + CheckValue(item.get("name")) + "" + CheckValue(item.get("os")) + "" + clienttype + "" + CheckValue(item.get("access_state")) + ""; break; case "DataStore": table = table + "" + CheckValue(item.get("name")) + "" + CheckValue(item.get("data_store_type")) + "" + CheckValue(item.get("status")) + ""; break; case "Client": virtualization = CheckValue(item.get("vm_server_type")); clienttype = CheckValue(item.get("accessmode")); if ( virtualization.equals("") && clienttype.equals("VIRTUAL") ) { virtualization = clienttype; } table = table + "" + CheckValue(item.get("name")) + "" + CheckValue(item.get("os")) + "" + virtualization + "" + CheckValue(item.get("access_state")) + ""; break; case "Library": break; case "Backup": table = table + "" + CheckDate(item.get("start_time")) + "" + CheckValue(item.get("task")) + "" + CheckValue(item.get("state")) + "" + CheckValue(item.get("backup_type")) + "" + CheckValue(item.get("client")) + ""; break; case "Restore": table = table + "" + CheckDate(item.get("start_time")) + "" + CheckValue(item.get("task")) + "" + CheckValue(item.get("state")) + "" + CheckValue(item.get("client")) + ""; break; case "Copy": table = table + "" + CheckDate(item.get("start_time")) + "" + CheckValue(item.get("migration_task")) + "" + CheckValue(item.get("state")) + "" + CheckValue(item.get("target_pool")) + " "; break; } // set resState for group if ("warning".equals(resState) && "green".equals(color)) { color = "orange"; mark = warnmark; } if ("bad".equals(resState)) { color = "red"; mark = errmark; } count = count + 1; // count values for mail subject if ("warning".equals(resState)) { warnings = warnings + 1; } else { if ("bad".equals(resState)) { errors = errors + 1; } else { successfull = successfull + 1; } } // create return object for variables Map globalvars = new HashMap<>(); globalvars.put("table", table); globalvars.put("mark", mark); globalvars.put("color", color); globalvars.put("count", String.valueOf(count)); globalvars.put("successfull", String.valueOf(successfull)); globalvars.put("warnings", String.valueOf(warnings)); globalvars.put("errors", String.valueOf(errors)); return globalvars; } @// ------------------------------------------- @// scan through locations @// ------------------------------------------- @{ // create HashMap for locations Map locMap = new HashMap<>(); // check if there are locations if (locitems != null && !locitems.isEmpty()){ for (Map item : locitems) { Long id, parent; id = (Long) item.get("id"); parent = (Long) item.get("parent"); locMap.put(id, parent); // debugoutput = debugoutput + "
=== " + CheckValue(item.get("name")) + " === id:" + id + "=== parent:" + parent + "=="; } } } @// ------------------------------------------- @// default values for task tables @// ------------------------------------------- @{ String helpmark = ""; String errmark = ""; String okmark = ""; String warnmark = ""; String titlemark = ""; String total_color = "green"; String restore_table = "

" + "" + "" + "" + "" + "" + "" + "" + ""; String backup_table = "

" + "
" + __i18n("State") + "" + __i18n("Date") + "" + __i18n("Task") + "" + __i18n("Error") + "" + __i18n("Client") + "
" + "" + "" + "" + "" + "" + "" + "" + ""; String copy_table = "

" + "
" + __i18n("State") + "" + __i18n("Date") + "" + __i18n("Task") + "" + __i18n("Error") + "" + __i18n("BackupType") + "" + __i18n("Client") + "
" + "" + "" + "" + "" + "" + "" + ""; String datastores_table = "

" + "
" + __i18n("State") + "" + __i18n("Date") + "" + __i18n("Task") + "" + __i18n("Error") + "" + __i18n("TargetPool") + "
" + "" + "" + "" + "" + "" + ""; String rds_table = "

" + "
" + __i18n("State") + "" + __i18n("Name") + "" + __i18n("Type") + "" + __i18n("Error") + "
" + "" + "" + "" + "" + "" + "" + ""; String clients_table = "

" + "
" + __i18n("State") + "" + __i18n("Name") + "" + __i18n("OS") + "" + __i18n("RDSType") + "" + __i18n("Error") + "
" + "" + "" + "" + "" + "" + "" + ""; String library_table = "

" + "
" + __i18n("State") + "" + __i18n("Name") + "" + __i18n("OS") + "" + __i18n("VMServerType") + "" + __i18n("Error") + "
" + "" + "" + "" + "" + "" + "" + ""; } @// ------------------------------------------- @// SERVER: Iterate through and create tables @// ------------------------------------------- @{ // initial values String srv_rds_color = "green"; String srv_rds_table = rds_table; String srv_rds_mark = okmark; Integer srv_rds_count = 0; String srv_clients_color = "green"; String srv_clients_table = clients_table; String srv_clients_mark = okmark; Integer srv_clients_count = 0; String srv_datastores_color = "green"; String srv_datastores_table = datastores_table; String srv_datastores_mark = okmark; Integer srv_datastores_count = 0; String srv_loaders_color = "green"; String srv_loaders_table = library_table; String srv_loaders_mark = okmark; Integer srv_loaders_count = 0; String srv_drives_color = "green"; String srv_drives_table = ""; String srv_drives_mark = okmark; Integer srv_drives_count = 0; Boolean intersect = false; // set to true if backup server is visible/selected // then section for DataStores, Loaders, Migrations and Replications will showw all Boolean bserver = false; // walk through drives if there are any if (dritems != null && !dritems.isEmpty()){ for (Map dritem : dritems) { String cid = CheckValue(dritem.get("client_id")); if ( !SRV_rds.contains(cid) ) { // keep the RDS if not already in list SRV_rds.add(cid); } } } // remove previous entries from black list BLACK_list.clear(); // walk through clients if there are any if (citems != null && !citems.isEmpty()){ for (Map item : citems) { // check if filter have intersections when both filters are set if ( !(location_ids == null || location_ids.isEmpty()) && !(client_ids == null || client_ids.isEmpty()) ) { // both filters are set if ( !intersect ) { if (client_ids.contains(item.get("client_id"))) { Long loc = Long.parseLong(item.get("location").toString()); String str1 = CheckLocation(loc, locMap, location_ids); if ( !str1.contains("END") ) { // client found in location trees intersect = true; // debugoutput = debugoutput + "
intersect = " + intersect + " ==== loc = " + loc + " ==== name = " + item.get("name"); } } } } else { // if not both filters are set no warning should be displayed intersect = true; } // NEW: location and client filter are both empty if ( (location_ids == null || location_ids.isEmpty()) && (client_ids == null || client_ids.isEmpty()) ) { // debugoutput = debugoutput + "
=== L0+C0: "; continue; } // NEW: apply LOCATION filter if (location_ids != null && !location_ids.isEmpty()) { // debugoutput = debugoutput + "
=== L1: " + item.get("name") + " === " + item.get("location"); // location filter is NOT empty Long loc = (Long) item.get("location"); String str1 = CheckLocation(loc, locMap, location_ids); if ( str1.contains("END") ) { // client is NOT in the location list if (exclude) { // ok, show client } else { // skip client continue; } } else { // debugoutput = debugoutput + "
=== L2 ==="; // client is in the location list if (exclude) { // debugoutput = debugoutput + "
=== L3 ==="; // skip client continue; } else { // debugoutput = debugoutput + "
=== L4 ==="; // ok, show client } } } // NEW: apply CLIENT filter if ( client_ids != null && !client_ids.isEmpty()) { // debugoutput = debugoutput + "
=== C1: " + item.get("name") + " === " + item.get("client_id"); // client filter is NOT empty if ( !client_ids.contains((Long) item.get("client_id")) ) { // debugoutput = debugoutput + "
=== C2 ==="; // client is NOT in the client list if (exclude) { // ok, show client } else { // skip client continue; } } else { // debugoutput = debugoutput + "
=== C3 ==="; // client is in the client list if (exclude) { // skip client continue; } else { // ok, show client } } } // get backup server and RDS to show them independent from the client filter if (SRV_rds.contains(CheckValue(item.get("client_id"))) && !BLACK_list.contains(CheckValue(item.get("name")))) { BLACK_list.add(CheckValue(item.get("name"))); retobj = ParseItem("RDS", item, srv_rds_table, srv_rds_mark, srv_rds_color, srv_rds_count, errors, warnings, successfull); srv_rds_table = retobj.get("table"); srv_rds_mark = retobj.get("mark"); srv_rds_color = retobj.get("color"); srv_rds_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); if ( (Long)item.get("client_id") == 0L ) { bserver = true; } } // keep this useless list to still be able to define a fixed list in this code SRV_clients.add(CheckValue(item.get("name"))); if (SRV_clients.contains(CheckValue(item.get("name"))) && !BLACK_list.contains(CheckValue(item.get("name")))) { BLACK_list.add(CheckValue(item.get("name"))); retobj = ParseItem("Client", item, srv_clients_table, srv_clients_mark, srv_clients_color, srv_clients_count, errors, warnings, successfull); srv_clients_table = retobj.get("table"); srv_clients_mark = retobj.get("mark"); srv_clients_color = retobj.get("color"); srv_clients_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } } } // close the table srv_clients_table = srv_clients_table + "
" + __i18n("State") + "" + __i18n("Number") + "" + __i18n("Name") + "" + __i18n("Type") + "" + __i18n("Slots") + "

"; srv_rds_table = srv_rds_table + "

"; // remove previous entries from black list BLACK_list.clear(); // walk through datastores if there are any if (ditems != null && !ditems.isEmpty()){ for (Map item : ditems) { if ( DataStores.contains(CheckValue(item.get("name"))) || bserver ) { // save ditem if datastore is in the list SRV_datastores.add(CheckValue(item.get("name"))); } if (SRV_datastores.contains(CheckValue(item.get("name"))) && !BLACK_list.contains(CheckValue(item.get("name")))) { BLACK_list.add(CheckValue(item.get("name"))); retobj = ParseItem("DataStore", item, srv_datastores_table, srv_datastores_mark, srv_datastores_color, srv_datastores_count, errors, warnings, successfull); srv_datastores_table = retobj.get("table"); srv_datastores_mark = retobj.get("mark"); srv_datastores_color = retobj.get("color"); srv_datastores_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } } } // close the table srv_datastores_table = srv_datastores_table + "

"; // remove previous entries from black list BLACK_list.clear(); // walk through loaders if there are any if (litems != null && !litems.isEmpty()){ for (Map item : litems) { Long loader_num = (Long) item.get("loader_num"); if ( loader_ids.contains(loader_num) ) { // save litem if num is in the list SRV_loaders.add(CheckValue(item.get("name"))); } if (SRV_loaders.contains(CheckValue(item.get("name"))) && !BLACK_list.contains(CheckValue(item.get("name"))) || bserver ) { BLACK_list.add(CheckValue(item.get("name"))); srv_loaders_count = srv_loaders_count + 1; srv_loaders_table = srv_loaders_table + "" + " " + "" + CheckValue(item.get("loader_num")) + "" + CheckValue(item.get("name")) + "" + CheckValue(item.get("loader_type")) + "" + CheckValue(item.get("slots")) + ""; successfull = successfull + 1; // a loader does not have a state and is always successfull // walk through drives if there are any if (dritems != null && !dritems.isEmpty()){ for (Map dritem : dritems) { if (loader_num == (Long) dritem.get("loader_num")) { srv_drives_count = srv_drives_count + 1; srv_loaders_table = srv_loaders_table + "" + CheckValue(dritem.get("sts")) + "" + CheckValue(dritem.get("drive_num")) + "" + CheckValue(dritem.get("name")) + "" + CheckValue(dritem.get("drive_type")) + "" + " " + ""; } } } } } } // close the table srv_loaders_table = srv_loaders_table + "

"; } @// ------------------------------------------- @// BACKUPS: Iterate through and create tables @// ------------------------------------------- @{ // initial values String bck_path_color = "green"; String bck_path_table = backup_table; String bck_path_mark = okmark; Integer bck_path_count = 0; String bck_hyp_color = "green"; String bck_hyp_table = backup_table; String bck_hyp_mark = okmark; Integer bck_hyp_count = 0; String bck_db_color = "green"; String bck_db_table = backup_table; String bck_db_mark = okmark; Integer bck_db_count = 0; String bck_other_color = "green"; String bck_other_table = backup_table; String bck_other_mark = okmark; Integer bck_other_count = 0; String bck_snap_color = "green"; String bck_snap_table = backup_table; String bck_snap_mark = okmark; Integer bck_snap_count = 0; String ttask = ""; // task name String btype = ""; // task type // remove previous entries from black list BLACK_list.clear(); // create list of clients with virtual clients List virtuals = new ArrayList<>(); // List of clients with virtual clients for (Map tcitem : tcitems) { Long cl_id; cl_id = (Long) tcitem.get("tasks_client_id"); if ( !virtuals.contains(cl_id) ) { virtuals.add(cl_id); } } // search for virtual clients in the backup tasks List> templist = new ArrayList<>(); for (Map bitem : bitems) { Long cl_id; cl_id = (Long) bitem.get("client_id"); if (virtuals.contains(cl_id)) { // if it is a client with virtual clients check if there are associated tasks for (Map tcitem : tcitems) { if ( CheckValue(bitem.get("task")).equals(CheckValue(tcitem.get("task"))) ) { // task found in 'tasks_clients' if ( cl_id == (Long) tcitem.get("tasks_client_id") ) { // Client of this job is a virtual client because there is a different 'tasks_client_id' in 'tasks_clients' // Now copy most of the task dataset and adapt 'client_id', 'location' and 'client' fields to the virtual client // This applies to backup and restore jobs in 'results' // At the end append this new dataset to a templist which will be appended to the job list 'bitems' // debugoutput = debugoutput + "
Found task for virtual client: " + tcitem.get("name") + " -- " + bitem.get("task"); Map tempelement = new HashMap<>(); tempelement.put("client_id", tcitem.get("client_id")); tempelement.put("client", tcitem.get("name")); tempelement.put("location", tcitem.get("location")); tempelement.put("task", bitem.get("task")); tempelement.put("saveset", bitem.get("saveset")); tempelement.put("start_time", bitem.get("start_time")); tempelement.put("state", bitem.get("state")); tempelement.put("backup_type", bitem.get("backup_type")); templist.add(tempelement); } } } } } bitems.addAll(templist); // nothing to do when no item list if (bitems != null && !bitems.isEmpty()) { // iterate through backup tasks for (Map item : bitems) { ttask = CheckValue(item.get("task")); btype = CheckValue(item.get("backup_type")).toUpperCase(); boolean srv_task = false; Long loc, client_id; // apply DATE filter if ( !CheckDateRange(timeshift2, fromDate, toDate, CheckDate2(item.get("start_time"))) ) { // item not in date range continue; } // NEW: location, client and task filter are all three empty if ( (location_ids == null || location_ids.isEmpty()) && (client_ids == null || client_ids.isEmpty()) && (Tasks == null || Tasks.isEmpty()) ) { // debugoutput = debugoutput + "
=== L0+C0+T0: all filter empty"; continue; } // NEW: apply LOCATION filter if (location_ids != null && !location_ids.isEmpty()) { // location filter is NOT empty if (item.get("location") == null) { if (ttask.equals("sm_newday")) { // sm_newday has loc==null loc = 0L; srv_task = true; } else { // debugoutput = debugoutput + "
=== Skip: L5: Strange task with loc = null === " + item.get("task") + " === " + item.get("location"); continue; } } else { loc = Long.parseLong(item.get("location").toString()); } String str1 = CheckLocation(loc, locMap, location_ids); if ( str1.contains("END") ) { // client is NOT in the location list if (exclude) { // debugoutput = debugoutput + "
=== Show: L1: NOT in list, exclude === " + ttask + " === " + item.get("location"); // ok, show client } else { // debugoutput = debugoutput + "
=== Skip: L2: NOT in list, include === " + ttask + " === " + item.get("location"); // skip client continue; } } else { // client is in the location list if (exclude) { // debugoutput = debugoutput + "
=== Skip: L3: in list, exclude === " + ttask + " === " + item.get("location"); // skip client continue; } else { // debugoutput = debugoutput + "
=== Show: L4: in list, include === " + ttask + " === " + item.get("location"); // ok, show client } } } // NEW: apply CLIENT filter if ( client_ids != null && !client_ids.isEmpty()) { // client filter is NOT empty if (item.get("client_id") == null) { // sm_newday has client_id==null client_id = 0L; srv_task = true; } else { client_id = (Long) item.get("client_id"); } if ( !client_ids.contains(client_id) ) { // client is NOT in the client list if (exclude) { // debugoutput = debugoutput + "
=== Show: C1: NOT in list, exclude === " + ttask + " === " + item.get("client_id"); // ok, show client } else { // debugoutput = debugoutput + "
=== Skip: C2: NOT in list, include === " + ttask + " === " + item.get("client_id"); // skip client continue; } } else { // client is in the client list if (exclude) { // debugoutput = debugoutput + "
=== Skip: C3: in list, exclude === " + ttask + " === " + item.get("client_id"); // skip client continue; } else { // debugoutput = debugoutput + "
=== Show: C4: in list, include === " + ttask + " === " + item.get("client_id"); // ok, show client } } } // apply TASK filter if (Tasks != null && !Tasks.isEmpty()) { // task filter is NOT empty if ( !Tasks.contains(ttask) ) { // item is NOT in Task list if (exclude) { // debugoutput = debugoutput + "
=== Show: T1: NOT in list, exclude" + " === " + ttask; // ok, show client } else { // debugoutput = debugoutput + "
=== Skip: T2: NOT in list, include" + " === " + ttask; // skip client continue; } } else { // item is in Task list if (exclude) { // debugoutput = debugoutput + "
=== Skip: T3: in list, exclude" + " === " + ttask; // skip client continue; } else { // debugoutput = debugoutput + "
=== Show: T4: in list, include" + " === " + ttask; // ok, show client } } } // put the task in the right list if ("sm_newday".equals(ttask) ) { // Special task with no backup_type OTHER_tasks.add(ttask); } else { if (hyp_types.contains(btype)) { // All hypervisor tasks HYP_tasks.add(ttask); } else { if (db_types.contains(btype)) { // All application/DB tasks DB_tasks.add(ttask); } else { if (path_types.contains(btype)) { // All path tasks PATH_tasks.add(ttask); } else { if (snap_types.contains(btype)) { // All storage snapshot tasks (currently only NetApp) SNAP_tasks.add(ttask); } else { // All other tasks OTHER_tasks.add(ttask); } } } } } if (PATH_tasks.contains(ttask) && !BLACK_list.contains(ttask)) { BLACK_list.add(ttask); retobj = ParseItem("Backup", item, bck_path_table, bck_path_mark, bck_path_color, bck_path_count, errors, warnings, successfull); bck_path_table = retobj.get("table"); bck_path_mark = retobj.get("mark"); bck_path_color = retobj.get("color"); bck_path_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } if (HYP_tasks.contains(ttask) && !BLACK_list.contains(ttask)) { BLACK_list.add(ttask); retobj = ParseItem("Backup", item, bck_hyp_table, bck_hyp_mark, bck_hyp_color, bck_hyp_count, errors, warnings, successfull); bck_hyp_table = retobj.get("table"); bck_hyp_mark = retobj.get("mark"); bck_hyp_color = retobj.get("color"); bck_hyp_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } if (DB_tasks.contains(ttask) && !BLACK_list.contains(ttask)) { BLACK_list.add(ttask); retobj = ParseItem("Backup", item, bck_db_table, bck_db_mark, bck_db_color, bck_db_count, errors, warnings, successfull); bck_db_table = retobj.get("table"); bck_db_mark = retobj.get("mark"); bck_db_color = retobj.get("color"); bck_db_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } if (OTHER_tasks.contains(ttask) && !BLACK_list.contains(ttask)) { BLACK_list.add(ttask); retobj = ParseItem("Backup", item, bck_other_table, bck_other_mark, bck_other_color, bck_other_count, errors, warnings, successfull); bck_other_table = retobj.get("table"); bck_other_mark = retobj.get("mark"); bck_other_color = retobj.get("color"); bck_other_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } if (SNAP_tasks.contains(ttask) && !BLACK_list.contains(ttask)) { BLACK_list.add(ttask); retobj = ParseItem("Backup", item, bck_snap_table, bck_snap_mark, bck_snap_color, bck_snap_count, errors, warnings, successfull); bck_snap_table = retobj.get("table"); bck_snap_mark = retobj.get("mark"); bck_snap_color = retobj.get("color"); bck_snap_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } } } // close the tables bck_path_table = bck_path_table + "

"; bck_hyp_table = bck_hyp_table + "

"; bck_db_table = bck_db_table + "

"; bck_other_table = bck_other_table + "

"; bck_snap_table = bck_snap_table + "

"; } @// ------------------------------------------- @// MIGRATIONS: Iterate through copies and create tables @// ------------------------------------------- @{ String cop_mig_color = "green"; String cop_mig_table = copy_table; String cop_mig_mark = okmark; Integer cop_mig_count = 0; String cop_rep_color = "green"; String cop_rep_table = copy_table; String cop_rep_mark = okmark; Integer cop_rep_count = 0; String cop_cloud_color = "green"; String cop_cloud_table = copy_table; String cop_cloud_mark = okmark; Integer cop_cloud_count = 0; // remove previous entries from black list BLACK_list.clear(); if (mitems != null && !mitems.isEmpty()){ // small temporary variable String temptask,temptask2; String rtype; Boolean taken; for (Map item : mitems) { taken = false; if ( !CheckDateRange(timeshift2, fromDate, toDate, CheckDate2(item.get("start_time"))) ) { // item not in date range continue; } //debugoutput = debugoutput + "
==" + CheckValue(item.get("migration_task")) + " == " + CheckValue(item.get("state")); // search for a cloud keyword in the target pool for(String s : cloud_types){ temptask = CheckValue(item.get("migration_task")); temptask2 = temptask.toUpperCase(); if (temptask2.contains(s.toUpperCase())) { if ( Replications != null && !Replications.isEmpty() ) { if (Replications.contains(CheckValue(item.get("migration_task")))) { CLOUD_tasks.add(temptask); taken = true; //debugoutput = debugoutput + "
==" + CheckValue(item.get("migration_task")) + " CLOUD put in list"; } } else { if ( bserver ) { CLOUD_tasks.add(temptask); taken = true; } } } } rtype = CheckValue(item.get("replication_type")); if (Migrations != null && !Migrations.isEmpty() && !taken ) { if ("SEP Migration".equals(rtype) ) { if (Migrations.contains(CheckValue(item.get("migration_task"))) ) { //debugoutput = debugoutput + "
==" + CheckValue(item.get("migration_task")) + " MIG put in list"; MIG_tasks.add(CheckValue(item.get("migration_task"))); taken = true; } else { //debugoutput = debugoutput + "
==" + CheckValue(item.get("migration_task")) + " MIG not in list"; // item not in Task list if ( !taken ) { continue; } } } } else { if ( bserver && "SEP Migration".equals(rtype) && !taken ) { MIG_tasks.add(CheckValue(item.get("migration_task"))); taken = true; } } if (Replications != null && !Replications.isEmpty() && !taken ) { if ("SEP Si3 Replication".equals(rtype) || "Catalyst Replication".equals(rtype) ) { if (Replications.contains(CheckValue(item.get("migration_task")))) { //debugoutput = debugoutput + "
==" + CheckValue(item.get("migration_task")) + " REP put in list"; REP_tasks.add(CheckValue(item.get("migration_task"))); taken = true; } else { //debugoutput = debugoutput + "
==" + CheckValue(item.get("migration_task")) + " REP not in list"; // item not in Task list if ( !taken ) { continue; } } } } else { if ( bserver && "SEP Si3 Replication".equals(rtype) && !taken ) { REP_tasks.add(CheckValue(item.get("migration_task"))); taken = true; } } if (MIG_tasks.contains(CheckValue(item.get("migration_task"))) && !BLACK_list.contains(CheckValue(item.get("migration_task")))) { BLACK_list.add(CheckValue(item.get("migration_task"))); retobj = ParseItem("Copy", item, cop_mig_table, cop_mig_mark, cop_mig_color, cop_mig_count, errors, warnings, successfull); cop_mig_table = retobj.get("table"); cop_mig_mark = retobj.get("mark"); cop_mig_color = retobj.get("color"); cop_mig_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } if (REP_tasks.contains(CheckValue(item.get("migration_task"))) && !BLACK_list.contains(CheckValue(item.get("migration_task")))) { BLACK_list.add(CheckValue(item.get("migration_task"))); retobj = ParseItem("Copy", item, cop_rep_table, cop_rep_mark, cop_rep_color, cop_rep_count, errors, warnings, successfull); cop_rep_table = retobj.get("table"); cop_rep_mark = retobj.get("mark"); cop_rep_color = retobj.get("color"); cop_rep_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } if (CLOUD_tasks.contains(CheckValue(item.get("migration_task"))) && !BLACK_list.contains(CheckValue(item.get("migration_task")))) { BLACK_list.add(CheckValue(item.get("migration_task"))); retobj = ParseItem("Copy", item, cop_cloud_table, cop_cloud_mark, cop_cloud_color, cop_cloud_count, errors, warnings, successfull); cop_cloud_table = retobj.get("table"); cop_cloud_mark = retobj.get("mark"); cop_cloud_color = retobj.get("color"); cop_cloud_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } } } // close the tables cop_mig_table = cop_mig_table + "

"; cop_rep_table = cop_rep_table + "

"; cop_cloud_table = cop_cloud_table + "

"; } @// ------------------------------------------- @// RESTORES: Iterate through and create tables @// ------------------------------------------- @{ String res_path_color = "green"; String res_path_table = restore_table; String res_path_mark = okmark; Integer res_path_count = 0; String res_hyp_color = "green"; String res_hyp_table = restore_table; String res_hyp_mark = okmark; Integer res_hyp_count = 0; String res_db_color = "green"; String res_db_table = restore_table; String res_db_mark = okmark; Integer res_db_count = 0; String res_other_color = "green"; String res_other_table = restore_table; String res_other_mark = okmark; Integer res_other_count = 0; // remove previous entries from black list BLACK_list.clear(); // nothing to do when no item list if (resitems != null && !resitems.isEmpty()) { // Iterate through restore tasks for (Map item : resitems) { if ( !CheckDateRange(timeshift2, fromDate, toDate, CheckDate2(item.get("start_time"))) ) { // item not in date range continue; } if (Tasks != null && !Tasks.isEmpty()) { if (!Tasks.contains(CheckValue(item.get("task")))) { // item not in Task list continue; } } if (PATH_tasks.contains(CheckValue(item.get("task"))) && !BLACK_list.contains(CheckValue(item.get("task")))) { BLACK_list.add(CheckValue(item.get("task"))); retobj = ParseItem("Restore", item, res_path_table, res_path_mark, res_path_color, res_path_count, errors, warnings, successfull); res_path_table = retobj.get("table"); res_path_mark = retobj.get("mark"); res_path_color = retobj.get("color"); res_path_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } if (HYP_tasks.contains(CheckValue(item.get("task"))) && !BLACK_list.contains(CheckValue(item.get("task")))) { BLACK_list.add(CheckValue(item.get("task"))); retobj = ParseItem("Restore", item, res_hyp_table, res_hyp_mark, res_hyp_color, res_hyp_count, errors, warnings, successfull); res_hyp_table = retobj.get("table"); res_hyp_mark = retobj.get("mark"); res_hyp_color = retobj.get("color"); res_hyp_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } if (DB_tasks.contains(CheckValue(item.get("task"))) && !BLACK_list.contains(CheckValue(item.get("task")))) { BLACK_list.add(CheckValue(item.get("task"))); retobj = ParseItem("Restore", item, res_db_table, res_db_mark, res_db_color, res_db_count, errors, warnings, successfull); res_db_table = retobj.get("table"); res_db_mark = retobj.get("mark"); res_db_color = retobj.get("color"); res_db_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } if ( (OTHER_tasks.contains(CheckValue(item.get("task"))) || SRV_tasks.contains(CheckValue(item.get("task")))) && !BLACK_list.contains(CheckValue(item.get("task")))) { BLACK_list.add(CheckValue(item.get("task"))); retobj = ParseItem("Restore", item, res_other_table, res_other_mark, res_other_color, res_other_count, errors, warnings, successfull); res_other_table = retobj.get("table"); res_other_mark = retobj.get("mark"); res_other_color = retobj.get("color"); res_other_count = Integer.valueOf(retobj.get("count")); errors = Integer.valueOf(retobj.get("errors")); warnings = Integer.valueOf(retobj.get("warnings")); successfull = Integer.valueOf(retobj.get("successfull")); } } } // close the tables res_path_table = res_path_table + "

"; res_hyp_table = res_hyp_table + "

"; res_db_table = res_db_table + "

"; res_other_table = res_other_table + "

"; // set color and mark for title String thumbup = ""; if ( errors > 0 ) { total_color = "red"; total_color = "#dc3545"; // see in ../commons/styles.html: sep-title-error titlemark = errmark; } else { if (warnings > 0) { total_color = "orange"; total_color = "#ffc107"; // see in ../commons/styles.html: sep-title-warning titlemark = warnmark; } else { total_color = "green"; total_color = "#28a745"; // see in ../commons/styles.html: sep-title-ok // titlemark = okmark; titlemark = thumbup; } } } @//------------------------ @// Start with HTML content @//------------------------
@if ( !intersect ) { @// Show a warning when both filters do not overlap

@i18n("F_NoOverlap")

}
@//--- Help mark ---
@i18n(helpmark)
 
@i18n("HowTo")
@//--- Buttons Expand --- @//--- Buttons Expand --- @//--- Report Header with Logo ---
    
@i18n("Report")
@//--- The complete HelpText initially invisible

@{ String rep_header = ""; if ( (location_ids == null || location_ids.isEmpty()) && (client_ids == null || client_ids.isEmpty()) && (Tasks == null || Tasks.isEmpty()) ) { //--- Report Header with hint --- rep_header = rep_header + "
" + "
" + __i18n("Hint") + "
"; } else { //--- Report Header with server and statistics --- rep_header = rep_header + "
" + "
" + __i18n(titlemark) + "   " + __i18n("Title") + Server + "    ( " + __i18n("Errors") + " " + errors + " | " + __i18n("Warnings") + " " + warnings + " | " + __i18n("Successfull") + " " + successfull + " )" + "
"; } } @i18n(rep_header) @//--- 4 Columns for the task reports ---
@i18n("SRV_title")
@if ( (srv_rds_count>0) || fixed) {
@i18n("SRV_subtitle_1") (@(srv_rds_count)) @i18n(srv_rds_mark) @i18n(srv_rds_table)
@{ det_counter = det_counter + 1; } } @if ( (srv_clients_count>0) || fixed) {
@i18n("SRV_subtitle_2") (@(srv_clients_count)) @i18n(srv_clients_mark) @i18n(srv_clients_table)
@{ det_counter = det_counter + 1; } } @if ( (srv_datastores_count>0) || fixed) {
@i18n("SRV_subtitle_3") (@(srv_datastores_count)) @i18n(srv_datastores_mark) @i18n(srv_datastores_table)
@{ det_counter = det_counter + 1; } } @if ( (srv_loaders_count>0) || fixed) {
@i18n("SRV_subtitle_4") (@(srv_loaders_count)) @i18n(srv_loaders_mark) @i18n(srv_loaders_table)
@{ det_counter = det_counter + 1; } }
@i18n("BCK_title")
@if ( (bck_path_count>0) || fixed) {
@i18n("BCK_subtitle_1") (@(bck_path_count)) @i18n(bck_path_mark) @i18n(bck_path_table)
@{ det_counter = det_counter + 1; } } @if ( (bck_hyp_count>0) || fixed) {
@i18n("BCK_subtitle_2") (@(bck_hyp_count)) @i18n(bck_hyp_mark) @i18n(bck_hyp_table)
@{ det_counter = det_counter + 1; } } @if ( (bck_db_count>0) || fixed) {
@i18n("BCK_subtitle_3") (@(bck_db_count)) @i18n(bck_db_mark) @i18n(bck_db_table)
@{ det_counter = det_counter + 1; } } @if ( (bck_other_count>0) || fixed) {
@i18n("BCK_subtitle_4") (@(bck_other_count)) @i18n(bck_other_mark) @i18n(bck_other_table)
@{ det_counter = det_counter + 1; } }
@i18n("RES_title")
@if ( (res_path_count>0) || fixed) {
@i18n("RES_subtitle_1") (@(res_path_count)) @i18n(res_path_mark) @i18n(res_path_table)
@{ det_counter = det_counter + 1; } } @if ( (res_hyp_count>0) || fixed) {
@i18n("RES_subtitle_2") (@(res_hyp_count)) @i18n(res_hyp_mark) @i18n(res_hyp_table)
@{ det_counter = det_counter + 1; } } @if ( (res_db_count>0) || fixed) {
@i18n("RES_subtitle_3") (@(res_db_count)) @i18n(res_db_mark) @i18n(res_db_table)
@{ det_counter = det_counter + 1; } } @if ( (res_other_count>0) || fixed) {
@i18n("RES_subtitle_4") (@(res_other_count)) @i18n(res_other_mark) @i18n(res_other_table)
@{ det_counter = det_counter + 1; } }
@i18n("COP_title")
@if ( (cop_mig_count>0) || fixed) {
@i18n("COP_subtitle_1") (@(cop_mig_count)) @i18n(cop_mig_mark) @i18n(cop_mig_table)
@{ det_counter = det_counter + 1; } } @if ( (cop_rep_count>0) || fixed) {
@i18n("COP_subtitle_2") (@(cop_rep_count)) @i18n(cop_rep_mark) @i18n(cop_rep_table)
@{ det_counter = det_counter + 1; } } @if ( (cop_cloud_count>0) || fixed) {
@i18n("COP_subtitle_3") (@(cop_cloud_count)) @i18n(cop_cloud_mark) @i18n(cop_cloud_table)
@{ det_counter = det_counter + 1; } } @if ( (bck_snap_count>0) || fixed) {
@i18n("COP_subtitle_4") (@(bck_snap_count)) @i18n(bck_snap_mark) @i18n(bck_snap_table)
@{ det_counter = det_counter + 1; } }
@//--- Expand/Collapse function for 2 Buttons --- @//--- Print the line with the report time period --- @if (timeshift2) {
@i18n("TimeShift1") @(days1) @i18n("TimeShift2") } @sepDateRangeLabel(sepFnGetDate(sepFnStringToDate(fromDate), locale), sepFnGetDate(sepFnStringToDate(toDate), locale), "") @//

@i18n("Description")

@i18n("F_Settings")
@i18n("F_Locale")locale = @(locale)
@i18n("F_Start")fromDate = @(fromDate)
@i18n("F_End")toDate = @(toDate)
@i18n("F_TimeShift")timeShift = @(timeShift)
@i18n("F_Locations")location_ids = @(location_ids)
@i18n("F_Clients")client_ids = @(client_ids)
@i18n("F_Tasks")Tasks = @(Tasks)
@i18n("F_Migrations")Migrations = @(Migrations)
@i18n("F_Replications")Replications = @(Replications)
@i18n("F_DataStores")DataStores = @(DataStores)
@i18n("F_Loaders")loader_ids = @(loader_ids)
@i18n("F_DisplayMode")displayMode = @(displayMode)
@{ det_counter = det_counter + 1; } @// print subject line for email @if (errors > 0) { } else { @if (warnings > 0) { } else { } } @i18n(debugoutput)