Skip to content

Commit a99a4f5

Browse files
committed
reboot the project
1 parent 04ac6b0 commit a99a4f5

File tree

13 files changed

+45
-24
lines changed

13 files changed

+45
-24
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using Microsoft.AspNetCore.Identity.UI.Services;
2+
using System.Threading.Tasks;
3+
4+
namespace AzureDevOpsTeamMembersVelocity.Areas.Identity;
5+
6+
public interface IEmailSender
7+
{
8+
Task SendEmailAsync(string email, string v1, string v2);
9+
}
10+
11+
public class EmailSender : IEmailSender
12+
{
13+
public EmailSender()
14+
{
15+
}
16+
17+
public Task SendEmailAsync(string email, string v1, string v2)
18+
{
19+
return Task.CompletedTask;
20+
}
21+
}

AzureDevOpsTeamMembersVelocity/AzureDevOpsTeamMembersVelocity.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
<DocumentationFile>Documentation.xml</DocumentationFile>
8+
<UserSecretsId>3d6eaaa4-04d3-4fc0-9854-e2c5c83b96c0</UserSecretsId>
89
</PropertyGroup>
910

1011
<ItemGroup>
@@ -35,6 +36,7 @@
3536
<PackageReference Include="MudBlazor" Version="5.2.0" />
3637
<PackageReference Include="NReco.Logging.File" Version="1.1.2" />
3738
<PackageReference Include="RateLimiter" Version="2.2.0" />
39+
<PackageReference Include="System.IO.Abstractions" Version="20.0.15" />
3840
</ItemGroup>
3941

4042
<ItemGroup>

AzureDevOpsTeamMembersVelocity/Extensions/UseForwardedHeadersExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static IServiceCollection AddTeamVelocityForwardedHeaders(this IServiceCo
3131
{
3232
var ipInfo = network.Split("/");
3333

34-
options.KnownNetworks.Add(new IPNetwork(IPAddress.Parse(ipInfo[0]), int.Parse(ipInfo[1])));
34+
options.KnownNetworks.Add(new Microsoft.AspNetCore.HttpOverrides.IPNetwork(IPAddress.Parse(ipInfo[0]), int.Parse(ipInfo[1])));
3535
}
3636
});
3737
}

AzureDevOpsTeamMembersVelocity/Hubs/K8sHub.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public K8SHub(IKubernetes client, ILogger<K8SHub> logger)
3737
/// <returns></returns>
3838
public async IAsyncEnumerable<Pair<WatchEventType?, V1Namespace>> Namespaces([EnumeratorCancellation] CancellationToken cancellationToken)
3939
{
40-
var watcher = _kubernetesClient.ListNamespaceWithHttpMessagesAsync(allowWatchBookmarks: false, watch: true, cancellationToken: cancellationToken);
40+
var watcher = _kubernetesClient.CoreV1.ListNamespaceWithHttpMessagesAsync(allowWatchBookmarks: false, watch: true, cancellationToken: cancellationToken);
4141

4242
await foreach (var (type, item) in watcher.WatchAsync<V1Namespace, V1NamespaceList>())
4343
{
@@ -54,7 +54,7 @@ public K8SHub(IKubernetes client, ILogger<K8SHub> logger)
5454
/// <returns></returns>
5555
public async IAsyncEnumerable<Pair<WatchEventType?, V1Deployment>> Deployments([EnumeratorCancellation] CancellationToken cancellationToken)
5656
{
57-
var watcher = _kubernetesClient.ListDeploymentForAllNamespacesWithHttpMessagesAsync(allowWatchBookmarks: false, watch: true, cancellationToken: cancellationToken);
57+
var watcher = _kubernetesClient.AppsV1.ListDeploymentForAllNamespacesWithHttpMessagesAsync(allowWatchBookmarks: false, watch: true, cancellationToken: cancellationToken);
5858

5959
await foreach (var (type, item) in watcher.WatchAsync<V1Deployment, V1DeploymentList>())
6060
{
@@ -71,7 +71,7 @@ public K8SHub(IKubernetes client, ILogger<K8SHub> logger)
7171
/// <returns></returns>
7272
public async IAsyncEnumerable<Pair<WatchEventType?, V1Pod>> Pods([EnumeratorCancellation] CancellationToken cancellationToken)
7373
{
74-
var watcher = _kubernetesClient.ListPodForAllNamespacesWithHttpMessagesAsync(allowWatchBookmarks: false, watch: true, cancellationToken: cancellationToken);
74+
var watcher = _kubernetesClient.CoreV1.ListPodForAllNamespacesWithHttpMessagesAsync(allowWatchBookmarks: false, watch: true, cancellationToken: cancellationToken);
7575

7676
await foreach (var (type, item) in watcher.WatchAsync<V1Pod, V1PodList>())
7777
{

AzureDevOpsTeamMembersVelocity/Hubs/LogStreamHub.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public async IAsyncEnumerable<string> GetPodLog(string ns, string pod, [Enumerat
6161
{
6262
cancellationToken.ThrowIfCancellationRequested();
6363

64-
var stream = await _kubernetesClient.ReadNamespacedPodLogAsync(pod, ns, follow: true, sinceSeconds: 2000, cancellationToken: cancellationToken);
64+
var stream = await _kubernetesClient.CoreV1.ReadNamespacedPodLogAsync(pod, ns, follow: true, sinceSeconds: 2000, cancellationToken: cancellationToken);
6565

6666
var buffer = new byte[8192];
6767

AzureDevOpsTeamMembersVelocity/Pages/Index.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Welcome to the team members velocity app.
9797
@foreach (var iteration in Sprints)
9898
{
9999
<li class="list-group-item list-group-item-action">
100-
<a href="/[email protected]">@iteration.Name</a>
100+
<a href="/[email protected]">@iteration.Name - @iteration?.Attributes?.StartDate</a>
101101
</li>
102102
}
103103
</ul>

AzureDevOpsTeamMembersVelocity/Pages/KubernetesDashboard.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ private async Task DeleteNamespace(V1Namespace ns)
516516
{
517517
try
518518
{
519-
await Client.DeleteNamespaceAsync(ns.Metadata.Name, new V1DeleteOptions());
519+
await Client.CoreV1.DeleteNamespaceAsync(ns.Metadata.Name, new V1DeleteOptions());
520520
}
521521
catch (Exception e)
522522
{
@@ -529,7 +529,7 @@ private async Task DeletePod(V1Pod pod)
529529
{
530530
try
531531
{
532-
await Client.DeleteNamespacedPodAsync(pod.Name(), pod.Namespace(), new V1DeleteOptions());
532+
await Client.CoreV1.DeleteNamespacedPodAsync(pod.Name(), pod.Namespace(), new V1DeleteOptions());
533533
}
534534
catch (Exception e)
535535
{

AzureDevOpsTeamMembersVelocity/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"FileLoggingEnable": "true",
1111

1212
"COOKIEAUTH_USER": "[email protected]",
13-
//"COOKIEAUTH_PASSWORD": "admin",
13+
"COOKIEAUTH_PASSWORD": "admin",
1414

1515
//"USE_IDENTITY": "true",
1616

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
1+
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
22
WORKDIR /app
33
EXPOSE 80
44
EXPOSE 443
55

6-
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
6+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
77
WORKDIR /src
88
COPY ["MockK8s/MockK8s.csproj", "MockK8s/"]
99
COPY ["AzureDevOpsTeamMembersVelocity/AzureDevOpsTeamMembersVelocity.csproj", "AzureDevOpsTeamMembersVelocity/"]

IntegrationTest/IntegrationTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

0 commit comments

Comments
 (0)