Ejemplo n.º 1
0
 public static void GetListPostAction(DataRow inputRow, DataTable dataTable, DataObjectStore store)
 {
     if (RbacPrincipal.Current.IsInRole("LiveID"))
     {
         DLPPolicy.AggregateData(inputRow, dataTable, store);
     }
 }
Ejemplo n.º 2
0
        private static void AggregateData(DataRow inputRow, DataTable dataTable, DataObjectStore store)
        {
            DLPPolicyReportingService dlppolicyReportingService        = new DLPPolicyReportingService();
            PowerShellResults <MailTrafficPolicyReport> dlptrafficData = dlppolicyReportingService.GetDLPTrafficData(new DLPPolicyTrafficReportParameters
            {
                StartDate = new DateTime?((DateTime)ExDateTime.GetNow(EcpDateTimeHelper.GetCurrentUserTimeZone()).Subtract(new TimeSpan(48, 0, 0)).ToUtc()),
                EndDate   = new DateTime?((DateTime)ExDateTime.GetNow(EcpDateTimeHelper.GetCurrentUserTimeZone()).ToUtc()),
                EventType = "DlpPolicyHits,DlpPolicyOverride,DlpPolicyFalsePositive",
                Direction = "Outbound"
            });

            if (dlptrafficData != null && dlptrafficData.Output != null)
            {
                IEnumerable <MailTrafficPolicyReport> source = from d in dlptrafficData.Output
                                                               orderby d.Date.Date descending, d.Date.Hour descending
                select d;
                IEnumerable <MailTrafficPolicyReport> reportData = source.Take(24);
                IEnumerable <MailTrafficPolicyReport> trendData  = source.Skip(24);
                foreach (object obj in dataTable.Rows)
                {
                    DataRow row = (DataRow)obj;
                    DLPPolicy.CalcuatePolicyData(row, "Name", "Hits", "HitsTrend", "DlpPolicyHits", reportData, trendData);
                    DLPPolicy.CalcuatePolicyData(row, "Name", "Overrides", "OverridesTrend", "DlpPolicyOverride", reportData, trendData);
                    DLPPolicy.CalcuatePolicyData(row, "Name", "FalsePositives", "FalsePositivesTrend", "DlpPolicyFalsePositive", reportData, trendData);
                }
            }
        }