mirror of
https://github.com/frosch95/K8sFileBrowser.git
synced 2026-04-11 12:58:22 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ebf42e0d92 | |||
| 9f2ada68be | |||
| 171ef6a87c | |||
|
|
74807bcfac |
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
@@ -9,8 +9,9 @@
|
|||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<Platforms>AnyCPU</Platforms>
|
<Platforms>AnyCPU</Platforms>
|
||||||
<ApplicationIcon>Assets/app.ico</ApplicationIcon>
|
<ApplicationIcon>Assets/app.ico</ApplicationIcon>
|
||||||
<Version>0.1.4</Version>
|
<Version>1.7.0</Version>
|
||||||
<RuntimeIdentifiers>win-x64;linux-x64;osx-arm64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win-x64;linux-x64;osx-arm64</RuntimeIdentifiers>
|
||||||
|
<LangVersion>default</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
@@ -22,21 +23,22 @@
|
|||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.2.5" />
|
<PackageReference Include="Avalonia" Version="11.3.8" />
|
||||||
<PackageReference Include="Avalonia.Desktop" Version="11.2.5" />
|
<PackageReference Include="Avalonia.Desktop" Version="11.3.8" />
|
||||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.5" />
|
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.8" />
|
||||||
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.5" />
|
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.3.8" />
|
||||||
|
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.3.8" />
|
||||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.5" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.3.8" />
|
||||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.5" />
|
<PackageReference Include="Avalonia.Xaml.Interactions" Version="11.3.0.6" />
|
||||||
<PackageReference Include="Avalonia.Xaml.Interactions" Version="11.2.0.14" />
|
<PackageReference Include="Avalonia.Xaml.Interactivity" Version="11.3.0.6" />
|
||||||
<PackageReference Include="Avalonia.Xaml.Interactivity" Version="11.2.0.14" />
|
<PackageReference Include="KubernetesClient" Version="18.0.5" />
|
||||||
<PackageReference Include="KubernetesClient" Version="16.0.2" />
|
<PackageReference Include="ReactiveUI.Avalonia" Version="11.3.8" />
|
||||||
<PackageReference Include="ReactiveUI.Fody" Version="19.5.41" />
|
<PackageReference Include="ReactiveUI.Fody" Version="19.5.41" />
|
||||||
<PackageReference Include="Serilog" Version="4.2.0" />
|
<PackageReference Include="Serilog" Version="4.3.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" />
|
<PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
|
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
|
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.ReactiveUI;
|
|
||||||
using System;
|
using System;
|
||||||
using Avalonia.Logging;
|
using Avalonia.Logging;
|
||||||
|
using ReactiveUI.Avalonia;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
namespace K8sFileBrowser;
|
namespace K8sFileBrowser;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class KubernetesService : IKubernetesService
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var execResult = new KubernetesFileInformationResult(path);
|
var execResult = new KubernetesFileInformationResult(path);
|
||||||
var resultCode = _kubernetesClient
|
_kubernetesClient
|
||||||
.NamespacedPodExecAsync(
|
.NamespacedPodExecAsync(
|
||||||
podName, namespaceName, containerName,
|
podName, namespaceName, containerName,
|
||||||
new[] { "find", path, "-maxdepth", "1", "-exec", "stat", "-c", "%F|%n|%s|%Y", "{}", ";" },
|
new[] { "find", path, "-maxdepth", "1", "-exec", "stat", "-c", "%F|%n|%s|%Y", "{}", ";" },
|
||||||
@@ -128,9 +128,14 @@ public class KubernetesService : IKubernetesService
|
|||||||
}
|
}
|
||||||
|
|
||||||
using var streamReader = new StreamReader(stdError);
|
using var streamReader = new StreamReader(stdError);
|
||||||
while (streamReader.EndOfStream == false)
|
var error = string.Empty;
|
||||||
|
while (await streamReader.ReadLineAsync(cancellationToken) is { } line)
|
||||||
|
{
|
||||||
|
error += line.Trim() + Environment.NewLine;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(error))
|
||||||
{
|
{
|
||||||
var error = await streamReader.ReadToEndAsync(cancellationToken);
|
|
||||||
Log.Error("Remote error: {Error}",error);
|
Log.Error("Remote error: {Error}",error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,9 +7,10 @@ namespace K8sFileBrowser;
|
|||||||
|
|
||||||
public class ViewLocator : IDataTemplate
|
public class ViewLocator : IDataTemplate
|
||||||
{
|
{
|
||||||
public Control Build(object data)
|
public Control Build(object? data)
|
||||||
{
|
{
|
||||||
var name = data.GetType().FullName!.Replace("ViewModel", "View");
|
var name = data?.GetType().FullName!.Replace("ViewModel", "View");
|
||||||
|
if (name == null) return new TextBlock { Text = "Not Found: " + name };
|
||||||
var type = Type.GetType(name);
|
var type = Type.GetType(name);
|
||||||
|
|
||||||
if (type != null)
|
if (type != null)
|
||||||
@@ -20,7 +21,7 @@ public class ViewLocator : IDataTemplate
|
|||||||
return new TextBlock { Text = "Not Found: " + name };
|
return new TextBlock { Text = "Not Found: " + name };
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Match(object data)
|
public bool Match(object? data)
|
||||||
{
|
{
|
||||||
return data is ViewModelBase;
|
return data is ViewModelBase;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- This manifest is used on Windows only.
|
<!-- This manifest is used on Windows only.
|
||||||
Don't remove it as it might cause problems with window transparency and embeded controls.
|
Don't remove it as it might cause problems with window transparency and embeded controls.
|
||||||
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
|
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
|
||||||
<assemblyIdentity version="1.4.0.0" name="K8sFileBrowser.Desktop"/>
|
<assemblyIdentity version="1.7.0.0" name="K8sFileBrowser.Desktop"/>
|
||||||
|
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
<application>
|
<application>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class Build : NukeBuild
|
|||||||
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
||||||
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
|
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
|
||||||
|
|
||||||
[Parameter] readonly string Version = "1.5.0";
|
[Parameter] readonly string Version = "1.7.0";
|
||||||
|
|
||||||
AbsolutePath SourceDirectory => RootDirectory / "K8sFileBrowser";
|
AbsolutePath SourceDirectory => RootDirectory / "K8sFileBrowser";
|
||||||
AbsolutePath OutputDirectory => RootDirectory / "output";
|
AbsolutePath OutputDirectory => RootDirectory / "output";
|
||||||
@@ -47,15 +47,14 @@ class Build : NukeBuild
|
|||||||
.SetConfiguration(Configuration)
|
.SetConfiguration(Configuration)
|
||||||
.SetOutput(WinOutputDirectory)
|
.SetOutput(WinOutputDirectory)
|
||||||
.EnableSelfContained()
|
.EnableSelfContained()
|
||||||
.SetFramework("net8.0")
|
.SetFramework("net10.0")
|
||||||
.SetRuntime("win-x64")
|
.SetRuntime("win-x64")
|
||||||
.EnablePublishSingleFile()
|
.EnablePublishSingleFile()
|
||||||
.EnablePublishReadyToRun()
|
.EnablePublishReadyToRun()
|
||||||
.SetAuthors("Andreas Billmann")
|
.SetAuthors("Andreas Billmann")
|
||||||
.SetCopyright("Copyright (c) 2023")
|
.SetCopyright("Copyright (c) 2025")
|
||||||
.SetVersion(Version)
|
.SetVersion(Version)
|
||||||
.SetProcessArgumentConfigurator(_ => _
|
.SetProcessAdditionalArguments("-p:IncludeNativeLibrariesForSelfExtract=true"));
|
||||||
.Add("-p:IncludeNativeLibrariesForSelfExtract=true")));
|
|
||||||
|
|
||||||
WinOutputDirectory.ZipTo(
|
WinOutputDirectory.ZipTo(
|
||||||
WinZip,
|
WinZip,
|
||||||
@@ -73,15 +72,14 @@ class Build : NukeBuild
|
|||||||
.SetConfiguration(Configuration)
|
.SetConfiguration(Configuration)
|
||||||
.SetOutput(LinuxOutputDirectory)
|
.SetOutput(LinuxOutputDirectory)
|
||||||
.EnableSelfContained()
|
.EnableSelfContained()
|
||||||
.SetFramework("net8.0")
|
.SetFramework("net10.0")
|
||||||
.SetRuntime("linux-x64")
|
.SetRuntime("linux-x64")
|
||||||
.EnablePublishSingleFile()
|
.EnablePublishSingleFile()
|
||||||
.EnablePublishReadyToRun()
|
.EnablePublishReadyToRun()
|
||||||
.SetAuthors("Andreas Billmann")
|
.SetAuthors("Andreas Billmann")
|
||||||
.SetCopyright("Copyright (c) 2023")
|
.SetCopyright("Copyright (c) 2025")
|
||||||
.SetVersion(Version)
|
.SetVersion(Version)
|
||||||
.SetProcessArgumentConfigurator(_ => _
|
.SetProcessAdditionalArguments("-p:IncludeNativeLibrariesForSelfExtract=true"));
|
||||||
.Add("-p:IncludeNativeLibrariesForSelfExtract=true")));
|
|
||||||
|
|
||||||
LinuxOutputDirectory.TarGZipTo(
|
LinuxOutputDirectory.TarGZipTo(
|
||||||
LinuxGz,
|
LinuxGz,
|
||||||
@@ -98,15 +96,14 @@ class Build : NukeBuild
|
|||||||
.SetConfiguration(Configuration)
|
.SetConfiguration(Configuration)
|
||||||
.SetOutput(OsxOutputDirectory)
|
.SetOutput(OsxOutputDirectory)
|
||||||
.EnableSelfContained()
|
.EnableSelfContained()
|
||||||
.SetFramework("net8.0")
|
.SetFramework("net10.0")
|
||||||
.SetRuntime("osx-arm64")
|
.SetRuntime("osx-arm64")
|
||||||
.EnablePublishSingleFile()
|
.EnablePublishSingleFile()
|
||||||
.EnablePublishReadyToRun()
|
.EnablePublishReadyToRun()
|
||||||
.SetAuthors("Andreas Billmann")
|
.SetAuthors("Andreas Billmann")
|
||||||
.SetCopyright("Copyright (c) 2023")
|
.SetCopyright("Copyright (c) 2025")
|
||||||
.SetVersion(Version)
|
.SetVersion(Version)
|
||||||
.SetProcessArgumentConfigurator(_ => _
|
.SetProcessAdditionalArguments("-p:IncludeNativeLibrariesForSelfExtract=true"));
|
||||||
.Add("-p:IncludeNativeLibrariesForSelfExtract=true")));
|
|
||||||
|
|
||||||
OsxOutputDirectory.TarGZipTo(
|
OsxOutputDirectory.TarGZipTo(
|
||||||
OsxGz,
|
OsxGz,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<RootNamespace></RootNamespace>
|
<RootNamespace></RootNamespace>
|
||||||
<NoWarn>CS0649;CS0169</NoWarn>
|
<NoWarn>CS0649;CS0169</NoWarn>
|
||||||
<NukeRootDirectory>..</NukeRootDirectory>
|
<NukeRootDirectory>..</NukeRootDirectory>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Nuke.Common" Version="8.1.4" />
|
<PackageReference Include="Nuke.Common" Version="9.0.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "8.0.0",
|
"version": "10.0.0",
|
||||||
"rollForward": "latestFeature",
|
"rollForward": "latestFeature",
|
||||||
"allowPrerelease": false
|
"allowPrerelease": false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user