Skip to content

Commit 9db8cbd

Browse files
committed
Add reset disk alert command
1 parent c4322c6 commit 9db8cbd

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.17")]
36-
[assembly: AssemblyFileVersion("1.0.0.17")]
35+
[assembly: AssemblyVersion("1.0.0.18")]
36+
[assembly: AssemblyFileVersion("1.0.0.18")]

XRFAgent.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<UpdatePeriodically>false</UpdatePeriodically>
2626
<UpdateRequired>false</UpdateRequired>
2727
<MapFileExtensions>true</MapFileExtensions>
28-
<ApplicationRevision>17</ApplicationRevision>
28+
<ApplicationRevision>18</ApplicationRevision>
2929
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
3030
<UseApplicationTrust>false</UseApplicationTrust>
3131
<BootstrapperEnabled>true</BootstrapperEnabled>
@@ -119,7 +119,7 @@
119119
<Version>6.1.2</Version>
120120
</PackageReference>
121121
<PackageReference Include="System.Text.Json">
122-
<Version>9.0.8</Version>
122+
<Version>9.0.10</Version>
123123
</PackageReference>
124124
</ItemGroup>
125125
<ItemGroup>

docs/ErrorCodes.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@
2626

2727
6061 - Detected disk error
2828

29+
6062 - Reset disk alert (informational)
30+
2931
6071 - Speed test error
30-
6072 - Speed test results (informational)
32+
6072 - Speed test results (informational)
33+

modCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public static void Handle(string inputCommand, string inputSource, string reques
4949
case "remote" when inputData.Length == 4:
5050
if (inputData[1] == "rekey" && inputData[2].StartsWith("https://")) { outputResponse = modSync.RemoteRekey(inputData[2], inputData[3]); } break;
5151
case "reset" when inputData.Length == 3:
52+
if (inputData[1] == "disk" && inputData[2] == "alert") { outputResponse = modSystem.ResetDiskAlert(); }
5253
if (inputData[1] == "installed" && inputData[2] == "software") { outputResponse = modSystem.ResetInstalledSoftware(); } break;
5354
case "run" when inputData.Length == 2:
5455
if (inputData[1] == "speedtest") { outputResponse = "Running speed test"; modNetwork.RunSpeedTest(); } break;

modSystem.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ public static string GetInstalledSoftware()
8989
}
9090
}
9191

92+
/// <summary>
93+
/// Clears an existing disk failure warning.
94+
/// </summary>
95+
/// <returns>Result of resetting disk alert</returns>
96+
public static string ResetDiskAlert()
97+
{
98+
modLogging.LogEvent("Reset disk alert", EventLogEntryType.Information, 6062);
99+
modSync.SendSingleConfig("Alert_DiskFailure", "cleared");
100+
return "Disk alert cleared";
101+
}
102+
92103
/// <summary>
93104
/// Drops the installed software inventory, then gathers an updated version.
94105
/// </summary>

0 commit comments

Comments
 (0)