Skip to content

Commit

Permalink
Program:
Browse files Browse the repository at this point in the history
- Added license checks
- Added more deployment types
- Removed ChromeDriver version 78

Detected SIM Entities
- Fixed small bug with JSON parsing
  • Loading branch information
danielodievich committed Mar 21, 2020
1 parent 8659a92 commit 4fb2e72
Show file tree
Hide file tree
Showing 91 changed files with 991 additions and 176 deletions.
Binary file removed AppDynamics DEXTER.pfx
Binary file not shown.
Binary file added AppDynamics.DEXTER.public.cer
Binary file not shown.
25 changes: 14 additions & 11 deletions AppDynamics.Dexter.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.0;net472</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<RuntimeIdentifiers>win-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<ApplicationIcon>SearchContract.ico</ApplicationIcon>
<SignAssembly>false</SignAssembly>
Expand All @@ -23,16 +23,19 @@
<Compile Remove="EPPlus\**" />
<Compile Remove="Images\**" />
<Compile Remove="lib\**" />
<Compile Remove="LicenseSign\**" />
<Compile Remove="obj_netfx\**" />
<Compile Remove="packages_private\**" />
<EmbeddedResource Remove="EPPlus\**" />
<EmbeddedResource Remove="Images\**" />
<EmbeddedResource Remove="lib\**" />
<EmbeddedResource Remove="LicenseSign\**" />
<EmbeddedResource Remove="obj_netfx\**" />
<EmbeddedResource Remove="packages_private\**" />
<None Remove="EPPlus\**" />
<None Remove="Images\**" />
<None Remove="lib\**" />
<None Remove="LicenseSign\**" />
<None Remove="obj_netfx\**" />
<None Remove="packages_private\**" />
</ItemGroup>
Expand All @@ -52,7 +55,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Aspose.Words" Version="19.12.0" />
<PackageReference Include="Aspose.Words" Version="20.3.0" />
<PackageReference Include="CommandLineParser" Version="2.6.0" />
<PackageReference Include="CsvHelper" Version="7.1.1" />
<PackageReference Include="EPPlus" Version="4.5.3" />
Expand All @@ -72,6 +75,9 @@
</ItemGroup>

<ItemGroup>
<None Update="AppDynamics.DEXTER.public.cer">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="ChromeDriver\79\linux64\chromedriver">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand All @@ -96,6 +102,12 @@
<None Update="HealthCheckSettingMapping.csv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="LicensedFeatures.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="License\AppDynamics.DEXTER.public.cer">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="LinksToApplicationsDashboardsTemplate.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand All @@ -117,15 +129,6 @@
<None Update="ChromeDriver\77\win32\chromedriver.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="ChromeDriver\78\linux64\chromedriver">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="ChromeDriver\78\mac64\chromedriver">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="ChromeDriver\78\win32\chromedriver.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="ConfigCompare\reference.controller\CFG\controllerversion.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
Binary file removed ChromeDriver/78/linux64/chromedriver
Binary file not shown.
Binary file removed ChromeDriver/78/mac64/chromedriver
Binary file not shown.
Binary file removed ChromeDriver/78/win32/chromedriver.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion ControllerApi/ControllerApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public ControllerApi(string controllerURL, string userName, string userPassword)
};

// If customer controller is still leveraging old TLS or SSL3 protocols, enable that
#if (NETCOREAPP3_0)
#if (NETCOREAPP3_1)
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;
#else
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;
Expand Down
1 change: 0 additions & 1 deletion DataObjects/JobConfiguration/JobTarget.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Net;

namespace AppDynamics.Dexter
{
Expand Down
2 changes: 2 additions & 0 deletions DataObjects/ProgramOptions/ProgramOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class ProgramOptions

public string JobName { get; set; }

public JobOutput LicensedReports { get; set; }

public override string ToString()
{
return String.Format(
Expand Down
4 changes: 2 additions & 2 deletions DefaultJob.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
],
"Input": {
"TimeRange": {
"From": "2020-03-09T09:00:00",
"To": "2020-03-09T10:00:00"
"From": "2020-03-20T09:00:00",
"To": "2020-03-20T10:00:00"
},
"UsersGroupsRolesPermissions": true,
"Dashboards": true,
Expand Down
20 changes: 20 additions & 0 deletions LicensedFeatures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"Signature": "jeBQXY+Bum3Lt3hA5kuYfnff/NLQgRj6NwLbMphjU2Sr1Stz9RlR2U3Qy2DScXWNv4Li42VwhszJhKOdTKbHt3U9YtuavyW69wVSrExX9D67wJuuOi08cOVaCwuEiYJSiISUMCn7rZ9gjCy+2QBfAVkAFMpjSWx0YHDpKyMir5fVxO9Ulv3nCXmz0C/lMpiiOpUlWQfPV+B0agRpEtHvcEfg8zvpLW5Bhmbii0I+UqWn4rdcraG2aXFGKb5AsY47UxUjzI+ihuJQ+HzkI9Lo7CraBNiaRp/R5qfI57Q/9l5vOQPVZMhogSBjwgjzvuYh6hr443N6olHF/yjUY1RfxA==",
"LicensedFeatures": {
"ExpirationDateTime": "2031-01-01T00:00:00Z",
"ApplicationSummary": false,
"Configuration": true,
"Dashboards": true,
"DetectedEntities": true,
"EntityDashboards": true,
"EntityDetails": true,
"EntityMetricGraphs": true,
"EntityMetrics": true,
"Events": true,
"FlameGraphs": true,
"HealthCheck": false,
"Licenses": false,
"Snapshots": true,
"UsersGroupsRolesPermissions": true
}
}
9 changes: 8 additions & 1 deletion MethodNamespaceTypeMapping.csv
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ com.microsoft.sqlserver,Microsoft SQL Server Driver,00A1F1,4FBAF0,000000
com.mongodb,Mongo DB,633838,854949,FFFFFF
com.mule,Mule ESB,e3b2ed,f4cafc,000000
com.mysql,MySQL Driver,36ffc3,9ffce0,000000
com.netflix.hystrix,Hystrix Fault Tolerance,633838,854949,FFFFFF
com.newrelic,NewRelic,7668CF,978FCF,FFFFFF
com.nimbusds,NimbusDS,fcf644,fcf760,000000
com.opensymphony,OpenSymphony J2EE,558c07,6aa813,FFFFFF
Expand Down Expand Up @@ -116,6 +117,8 @@ Fiserv,FiServ Financial,993006,b5471b,FFFFFF
freemarker,Apache FreeMarker,FD6DEE,F5CCE7,000000
Glass.Mapper,Sitecore CMS,8abfb9,a7d6d1,000000
gw.,Guidewire,BA90FC,C5A7FC,000000
io.github.resilience4j,Resilience4j Fault Tolerance,8abfb9,a7d6d1,000000
io.lettuce,Lettuce Redis Client,BA90FC,C5A7FC,000000
io.netty,Netty NIO,993006,b5471b,FFFFFF
io.prometheus,Prometheus,BA90FC,C5A7FC,000000
io.undertow,JBoss Undertow,99a30d,acb52a,000000
Expand Down Expand Up @@ -162,7 +165,7 @@ Newtonsoft.Json,Newtonsoft JSON,a3f57f,bffca4,000000
NHibernate,NHibernate ORM,a3f57f,bffca4,000000
NLog,NLog Framework,a2d9f2,bfebff,000000
Novell,Novell,ad5fc9,c169e0,000000
OfficeOpenXml,Office XML,85375,11658c,FFFFFF
OfficeOpenXml,Office XML,085375,11658c,FFFFFF
ognl,Apache OGNL,FD6DEE,F5CCE7,000000
okhttp3,OkHttp Square,FE5810,FF8754,000000
okio,OkHttp Square NIO,8bc4af,9ad9c2,000000
Expand Down Expand Up @@ -192,6 +195,10 @@ redis,Redis Cache,ff4d4d,ff9696,FFFFFF
redis.clients,Redis Cache Client,ff4d4d,ff9696,FFFFFF
ReportExprHostImpl,Microsoft Reporting Services,00A1F1,4FBAF0,000000
RestSharp,RestSharp HTTP Client,ff4d4d,ff9696,FFFFFF
rx.internal,ReactiveX Observable Async,99a30d,acb52a,FFFFFF
rx.Observable,ReactiveX Observable Async,99a30d,acb52a,FFFFFF
rx.observables,ReactiveX Observable Async,99a30d,acb52a,FFFFFF
rx.Subscriber,ReactiveX Observable Async,99a30d,acb52a,FFFFFF
Sitecore,Sitecore CMS,8abfb9,a7d6d1,000000
SNINativeMethodWrapper,.NET ADO.NET,6197FF,94C9FF,000000
StackExchange.Redis,Redis StackExchange,ff4d4d,ff9696,FFFFFF
Expand Down
Binary file modified MethodNamespaceTypeMapping.xlsm
Binary file not shown.
12 changes: 10 additions & 2 deletions ProcessingSteps/Extract/ExtractAPMConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job

try
{
if (this.ShouldExecute(jobConfiguration) == false)
if (this.ShouldExecute(programOptions, jobConfiguration) == false)
{
return true;
}
Expand Down Expand Up @@ -218,8 +218,16 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
}
}

public override bool ShouldExecute(JobConfiguration jobConfiguration)
public override bool ShouldExecute(ProgramOptions programOptions, JobConfiguration jobConfiguration)
{
logger.Trace("LicensedReports.Configuration={0}", programOptions.LicensedReports.Configuration);
loggerConsole.Trace("LicensedReports.Configuration={0}", programOptions.LicensedReports.Configuration);
if (programOptions.LicensedReports.Configuration == false)
{
loggerConsole.Warn("Not licensed for configuration");
return false;
}

logger.Trace("Input.Configuration={0}", jobConfiguration.Input.Configuration);
loggerConsole.Trace("Input.Configuration={0}", jobConfiguration.Input.Configuration);
if (jobConfiguration.Input.Configuration == false)
Expand Down
12 changes: 10 additions & 2 deletions ProcessingSteps/Extract/ExtractAPMEntities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job

try
{
if (this.ShouldExecute(jobConfiguration) == false)
if (this.ShouldExecute(programOptions, jobConfiguration) == false)
{
return true;
}
Expand Down Expand Up @@ -413,8 +413,16 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
}
}

public override bool ShouldExecute(JobConfiguration jobConfiguration)
public override bool ShouldExecute(ProgramOptions programOptions, JobConfiguration jobConfiguration)
{
logger.Trace("LicensedReports.DetectedEntities={0}", programOptions.LicensedReports.DetectedEntities);
loggerConsole.Trace("LicensedReports.DetectedEntities={0}", programOptions.LicensedReports.DetectedEntities);
if (programOptions.LicensedReports.DetectedEntities == false)
{
loggerConsole.Warn("Not licensed for detected entities");
return false;
}

logger.Trace("Input.DetectedEntities={0}", jobConfiguration.Input.DetectedEntities);
loggerConsole.Trace("Input.DetectedEntities={0}", jobConfiguration.Input.DetectedEntities);
if (jobConfiguration.Input.DetectedEntities == false)
Expand Down
Loading

0 comments on commit 4fb2e72

Please sign in to comment.