Skip to content

Commit f83159e

Browse files
committed
Disable Info page.
1 parent fc04c8b commit f83159e

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

WolfLeash/Components/Layout/MainLayout.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@
8282
new NavItem { Id = "9", Href = "/clients/paired", IconName = IconName.List, Text = "Paired Clients", ParentId="8"},
8383
new NavItem { Id = "10", Href = "/clients/pairing", IconName = IconName.Plus, Text = "Pairing Requests", ParentId="8"},
8484

85-
new NavItem { Id = "11", Href = "/info", IconName = IconName.ClipboardData, Text = "Information" },
85+
//new NavItem { Id = "11", Href = "/info", IconName = IconName.ClipboardData, Text = "Information" },
8686
87-
new NavItem { Id = "12", Href = "/settings", IconName = IconName.Gear, Text = "Settings" }
87+
new NavItem { Id = "11", Href = "/settings", IconName = IconName.Gear, Text = "Settings" }
8888
};
8989

9090
return navItems;

WolfLeash/Components/Misc/DiskUsage.razor

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@using System.Diagnostics
12
@using NSwagDocker
23
@using WolfLeash.Components.Classes
34
@inject Api Api
@@ -154,7 +155,28 @@
154155
{
155156
try
156157
{
157-
158+
/*var proc = new Process
159+
{
160+
StartInfo = new ProcessStartInfo
161+
{
162+
FileName = "/bin/du",
163+
Arguments = $"-s {path}",
164+
UseShellExecute = false,
165+
RedirectStandardOutput = true,
166+
CreateNoWindow = true
167+
}
168+
};
169+
proc.Start();
170+
while (!proc.StandardOutput.EndOfStream)
171+
{
172+
var line = proc.StandardOutput.ReadLine();
173+
if (line is not null)
174+
{
175+
Console.WriteLine(line);
176+
// do something with line
177+
}
178+
}*/
179+
158180
return GetDirectorySize(new DirectoryInfo(path)) / (double)1_000_000_000;
159181
}
160182
catch (DirectoryNotFoundException)

0 commit comments

Comments
 (0)