Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'upstream/master'
  • Loading branch information
Richard White committed Nov 7, 2018
2 parents f8bd544 + a1c2e73 commit 19882fd
Show file tree
Hide file tree
Showing 29 changed files with 671 additions and 47 deletions.
Binary file not shown.
1 change: 1 addition & 0 deletions Source/Admin/Web/Dockerfile
Expand Up @@ -13,4 +13,5 @@ RUN dotnet publish -c Release -o out
FROM microsoft/dotnet:2.2-aspnetcore-runtime-bionic
WORKDIR /app
COPY --from=dotnet-build /src/Source/Admin/Web/out .
COPY --from=dotnet-build /src/Source/Admin/Web/.dolittle ./.dolittle
ENTRYPOINT ["dotnet", "Web.dll"]
49 changes: 40 additions & 9 deletions Source/Alerts/Alerts.sln
Expand Up @@ -3,17 +3,21 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Concepts", "Concepts\Concepts.csproj", "{3ABD948F-92F1-4C1E-AA68-15F553857D32}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Concepts", "Concepts\Concepts.csproj", "{3ABD948F-92F1-4C1E-AA68-15F553857D32}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "Domain\Domain.csproj", "{8C25579F-1041-440C-96B0-44869E2A7B82}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Domain", "Domain\Domain.csproj", "{8C25579F-1041-440C-96B0-44869E2A7B82}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Read", "Read\Read.csproj", "{3BA3F62A-DD53-4EF2-8D3A-50400DF9FD99}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Read", "Read\Read.csproj", "{3BA3F62A-DD53-4EF2-8D3A-50400DF9FD99}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Events", "Events\Events.csproj", "{BCB881B8-91CC-48AA-92F7-CF9CE8630573}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Events", "Events\Events.csproj", "{BCB881B8-91CC-48AA-92F7-CF9CE8630573}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EntryPoint", "EntryPoint\EntryPoint.csproj", "{CF2DFA73-C784-46F2-BEA3-CAF23882CA06}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntryPoint", "EntryPoint\EntryPoint.csproj", "{CF2DFA73-C784-46F2-BEA3-CAF23882CA06}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Policy", "Policy\Policy.csproj", "{CF6C7CC4-B7E8-4805-B37B-FBD907267E7C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Policy", "Policy\Policy.csproj", "{CF6C7CC4-B7E8-4805-B37B-FBD907267E7C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Events.Reporting", "Events.Reporting\Events.Reporting.csproj", "{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Events.Admin", "Events.Admin\Events.Admin.csproj", "{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -24,9 +28,6 @@ Global
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3ABD948F-92F1-4C1E-AA68-15F553857D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3ABD948F-92F1-4C1E-AA68-15F553857D32}.Debug|Any CPU.Build.0 = Debug|Any CPU
Expand Down Expand Up @@ -100,5 +101,35 @@ Global
{CF6C7CC4-B7E8-4805-B37B-FBD907267E7C}.Release|x64.Build.0 = Release|Any CPU
{CF6C7CC4-B7E8-4805-B37B-FBD907267E7C}.Release|x86.ActiveCfg = Release|Any CPU
{CF6C7CC4-B7E8-4805-B37B-FBD907267E7C}.Release|x86.Build.0 = Release|Any CPU
{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}.Debug|x64.ActiveCfg = Debug|Any CPU
{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}.Debug|x64.Build.0 = Debug|Any CPU
{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}.Debug|x86.ActiveCfg = Debug|Any CPU
{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}.Debug|x86.Build.0 = Debug|Any CPU
{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}.Release|Any CPU.Build.0 = Release|Any CPU
{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}.Release|x64.ActiveCfg = Release|Any CPU
{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}.Release|x64.Build.0 = Release|Any CPU
{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}.Release|x86.ActiveCfg = Release|Any CPU
{53BF4A82-4B5A-4913-8D5C-49A09B71D7D2}.Release|x86.Build.0 = Release|Any CPU
{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}.Debug|x64.ActiveCfg = Debug|Any CPU
{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}.Debug|x64.Build.0 = Debug|Any CPU
{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}.Debug|x86.ActiveCfg = Debug|Any CPU
{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}.Debug|x86.Build.0 = Debug|Any CPU
{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}.Release|Any CPU.Build.0 = Release|Any CPU
{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}.Release|x64.ActiveCfg = Release|Any CPU
{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}.Release|x64.Build.0 = Release|Any CPU
{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}.Release|x86.ActiveCfg = Release|Any CPU
{7956DF8A-C0C0-4A18-85F2-A402383FD3A7}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DA8D46EB-D35F-4E89-9EB3-3F45B054FB0F}
EndGlobalSection
EndGlobal
13 changes: 13 additions & 0 deletions Source/Alerts/EntryPoint/.dolittle/artifacts.json
@@ -1,4 +1,17 @@
{
"artifacts": {
"ca3ff584-73e1-4d07-8963-b4071b445a9d": {
"commands": [],
"events": [
{
"artifact": "540464b9-7262-4060-b609-b6902769ee50",
"generation": 1,
"type": "Events.Reporting.CaseReports.CaseReportReceived, Events.Reporting"
}
],
"eventSources": [],
"readModels": [],
"queries": []
}
}
}
15 changes: 14 additions & 1 deletion Source/Alerts/EntryPoint/.dolittle/topology.json
@@ -1,3 +1,16 @@
{

"modules": [],
"features": [
{
"feature": "b1521670-d8e8-4fff-8df2-36866d320d3e",
"name": "Reporting",
"subFeatures": [
{
"feature": "ca3ff584-73e1-4d07-8963-b4071b445a9d",
"name": "CaseReports",
"subFeatures": []
}
]
}
]
}
8 changes: 4 additions & 4 deletions Source/Alerts/EntryPoint/EntryPoint.csproj
Expand Up @@ -34,7 +34,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.5" />


<PackageReference Include="Dolittle.AspNetCore" Version="2.0.0-alpha2*" />
Expand All @@ -48,11 +48,11 @@

<PackageReference Include="Dolittle.Concepts.Serialization.Json" Version="2.0.0-alpha2.*" />

<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />

<PackageReference Include="Autofac" Version="4.8.1" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.0.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.3.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />

</ItemGroup>

Expand Down
11 changes: 11 additions & 0 deletions Source/Alerts/Events.Admin/Events.Admin.csproj
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dolittle.SDK" Version="2.0.0-alpha2.278" />
</ItemGroup>

</Project>
28 changes: 28 additions & 0 deletions Source/Alerts/Events.Admin/HealthRisks/HealthRiskCreated.cs
@@ -0,0 +1,28 @@
using System;
using Dolittle.Artifacts;
using Dolittle.Events;

namespace Events.Admin.HealthRisks
{
[Artifact("43c5c245-40ff-426d-a6f7-226427c142bb")]
public class HealthRiskCreated : IEvent
{
public HealthRiskCreated(Guid id, int readableId, string name, string confirmedCase, string note, string suspectedCase, string probableCase, string communityCase, string keyMessage)
{
this.Id = id;
this.ReadableId = readableId;
this.Name = name;

}
public Guid Id { get; }
public int ReadableId { get; }
public string Name { get; }
//public int? Threshold { get; }
//public string ConfirmedCase { get; }
//public string Note { get; }
//public string SuspectedCase { get; }
//public string ProbableCase { get; }
//public string CommunityCase { get; }
//public string KeyMessage { get; }
}
}
42 changes: 42 additions & 0 deletions Source/Alerts/Events.Reporting/CaseReports/CaseReportRecieved.cs
@@ -0,0 +1,42 @@
using Dolittle.Artifacts;
using Dolittle.Events;
using System;

namespace Events.Reporting.CaseReports
{
[Artifact("540464b9-7262-4060-b609-b6902769ee50")]
public class CaseReportReceived : IEvent
{
public CaseReportReceived(Guid caseReportId, Guid dataCollectorId, Guid healthRiskId,
string origin, string message, int numberOfMalesUnder5, int numberOfMalesAged5AndOlder,
int numberOfFemalesUnder5, int numberOfFemalesAged5AndOlder, double longitude,
double latitude, DateTimeOffset timestamp)
{
this.CaseReportId = caseReportId;
this.DataCollectorId = dataCollectorId;
this.HealthRiskId = healthRiskId;
this.Origin = origin;
this.Message = message;
this.NumberOfMalesUnder5 = numberOfMalesUnder5;
this.NumberOfMalesAged5AndOlder = numberOfMalesAged5AndOlder;
this.NumberOfFemalesUnder5 = numberOfFemalesUnder5;
this.NumberOfFemalesAged5AndOlder = numberOfFemalesAged5AndOlder;
this.Longitude = longitude;
this.Latitude = latitude;
this.Timestamp = timestamp;

}
public Guid CaseReportId { get; }
public Guid DataCollectorId { get; }
public Guid HealthRiskId { get; }
public string Origin { get; }
public string Message { get; }
public int NumberOfMalesUnder5 { get; }
public int NumberOfMalesAged5AndOlder { get; }
public int NumberOfFemalesUnder5 { get; }
public int NumberOfFemalesAged5AndOlder { get; }
public double Longitude { get; }
public double Latitude { get; }
public DateTimeOffset Timestamp { get; }
}
}
11 changes: 11 additions & 0 deletions Source/Alerts/Events.Reporting/Events.Reporting.csproj
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dolittle.SDK" Version="2.0.0-alpha2.278" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions Source/Alerts/Policy/Policy.csproj
Expand Up @@ -7,6 +7,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Events.Reporting\Events.Reporting.csproj" />
<ProjectReference Include="..\Events\Events.csproj" />
<ProjectReference Include="..\Concepts\Concepts.csproj" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Source/Alerts/Read/Read.csproj
Expand Up @@ -7,6 +7,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Events.Reporting\Events.Reporting.csproj" />
<ProjectReference Include="..\Events\Events.csproj" />
<ProjectReference Include="..\Concepts\Concepts.csproj" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Source/Analytics/Web/Dockerfile
Expand Up @@ -13,4 +13,5 @@ RUN dotnet publish -c Release -o out
FROM microsoft/dotnet:2.2-aspnetcore-runtime-bionic
WORKDIR /app
COPY --from=dotnet-build /src/Source/Analytics/Web/out .
COPY --from=dotnet-build /src/Source/Analytics/Web/.dolittle ./.dolittle
ENTRYPOINT ["dotnet", "Web.dll"]
13 changes: 11 additions & 2 deletions Source/Infrastructure/Read/MongoDb/ConceptSerializationProvider.cs
Expand Up @@ -13,9 +13,18 @@ public class ConceptSerializationProvider : IBsonSerializationProvider
public IBsonSerializer GetSerializer(Type type)
{
if (type.IsConcept())
return new ConceptSerializer(type);

{
var createConceptSerializerGenericMethod = this.GetType().GetMethod("CreateConceptSerializer").MakeGenericMethod(type);
dynamic serializer = createConceptSerializerGenericMethod.Invoke(null, new object[]{});
return serializer;
}

return null;
}

public static ConceptSerializer<T> CreateConceptSerializer<T>()
{
return new ConceptSerializer<T>();
}
}
}

0 comments on commit 19882fd

Please sign in to comment.