diff --git a/src/Tgstation.Server.Api/Models/Job.cs b/src/Tgstation.Server.Api/Models/Job.cs
index 2aa7ac6c55..d0231963b4 100644
--- a/src/Tgstation.Server.Api/Models/Job.cs
+++ b/src/Tgstation.Server.Api/Models/Job.cs
@@ -3,7 +3,7 @@
namespace Tgstation.Server.Api.Models
{
///
- /// Represents a long running job on the server
+ /// Represents a long running job on the server. Model is read-only, updates attempt to cancel the job
///
[Model]
public sealed class Job
@@ -37,5 +37,10 @@ namespace Tgstation.Server.Api.Models
/// If the has incremental progress, this will range from 1 - 100. 0 otherwise
///
public int Progress { get; set; }
+
+ ///
+ /// If the current user has permission to cancel the job. Will be if isn't
+ ///
+ public bool? UserCanCancel { get; set; }
}
}
diff --git a/src/Tgstation.Server.Client/Components/IChatClient.cs b/src/Tgstation.Server.Client/Components/IChatClient.cs
index 47cc7ce057..4699395a6f 100644
--- a/src/Tgstation.Server.Client/Components/IChatClient.cs
+++ b/src/Tgstation.Server.Client/Components/IChatClient.cs
@@ -6,7 +6,7 @@ using Tgstation.Server.Api.Rights;
namespace Tgstation.Server.Client.Components
{
///
- /// For managing server administration
+ /// For managing the chat bots
///
public interface IChatClient : IRightsClient
{
@@ -14,7 +14,7 @@ namespace Tgstation.Server.Client.Components
/// Get the represented by the
///
/// The for the operation
- /// A resulting in the represented by the
+ /// A resulting in the represented by the
Task Read(CancellationToken cancellationToken);
///
diff --git a/src/Tgstation.Server.Client/Components/IDreamMakerClient.cs b/src/Tgstation.Server.Client/Components/IDreamMakerClient.cs
new file mode 100644
index 0000000000..276f1d2258
--- /dev/null
+++ b/src/Tgstation.Server.Client/Components/IDreamMakerClient.cs
@@ -0,0 +1,35 @@
+using System.Threading;
+using System.Threading.Tasks;
+using Tgstation.Server.Api.Models;
+using Tgstation.Server.Api.Rights;
+
+namespace Tgstation.Server.Client.Components
+{
+ ///
+ /// For managing the compiler
+ ///
+ public interface IDreamMakerClient : IRightsClient
+ {
+ ///
+ /// Get the represented by the
+ ///
+ /// The for the operation
+ /// A resulting in the represented by the
+ Task Read(CancellationToken cancellationToken);
+
+ ///
+ /// Updates the setttings
+ ///
+ /// The to update
+ /// The for the operation
+ /// A representing the running operation
+ Task Update(DreamMaker dreamMaker, CancellationToken cancellationToken);
+
+ ///
+ /// Compile the current repository revision
+ ///
+ /// The for the operation
+ /// A representing the running operation
+ Task Compile(CancellationToken cancellationToken);
+ }
+}
diff --git a/src/Tgstation.Server.Client/Components/IInstanceClient.cs b/src/Tgstation.Server.Client/Components/IInstanceClient.cs
index 12f2eda8c1..baebd33d91 100644
--- a/src/Tgstation.Server.Client/Components/IInstanceClient.cs
+++ b/src/Tgstation.Server.Client/Components/IInstanceClient.cs
@@ -29,16 +29,26 @@ namespace Tgstation.Server.Client.Components
///
IConfigurationClient Configuration { get; }
- ///
- /// Access the
- ///
- IInstanceUserClient Users { get; }
+ ///
+ /// Access the
+ ///
+ IInstanceUserClient Users { get; }
- ///
- /// Get the represented by the
- ///
- /// The for the operation
- /// A resulting in the represented by the
- Task Read(CancellationToken cancellationToken);
+ ///
+ /// Access the
+ ///
+ IChatClient Chat { get; }
+
+ ///
+ /// Access the
+ ///
+ IDreamMakerClient DreamMaker { get; }
+
+ ///
+ /// Get the represented by the
+ ///
+ /// The for the operation
+ /// A resulting in the represented by the
+ Task Read(CancellationToken cancellationToken);
}
}
\ No newline at end of file
diff --git a/src/Tgstation.Server.Client/Components/IJobsClient.cs b/src/Tgstation.Server.Client/Components/IJobsClient.cs
new file mode 100644
index 0000000000..7f912b3ab1
--- /dev/null
+++ b/src/Tgstation.Server.Client/Components/IJobsClient.cs
@@ -0,0 +1,28 @@
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Tgstation.Server.Api.Models;
+
+namespace Tgstation.Server.Client.Components
+{
+ ///
+ /// Access to running jobs
+ ///
+ public interface IJobsClient
+ {
+ ///
+ /// List the active jobs the user can view
+ ///
+ /// The for the operation
+ /// A resulting in a of active s the user can view
+ Task> List(CancellationToken cancellationToken);
+
+ ///
+ /// Cancels a
+ ///
+ /// The to cancel
+ /// The for the operation
+ /// A representing the running operation
+ Task Cancel(Job job, CancellationToken cancellationToken);
+ }
+}
diff --git a/src/Tgstation.Server.Client/Components/ITokenClient.cs b/src/Tgstation.Server.Client/Components/ITokenClient.cs
index 01b9404b8c..03965132a0 100644
--- a/src/Tgstation.Server.Client/Components/ITokenClient.cs
+++ b/src/Tgstation.Server.Client/Components/ITokenClient.cs
@@ -12,7 +12,7 @@ namespace Tgstation.Server.Client.Components
public interface ITokenClient: IRightsClient
{
///
- /// Generate a new for the connected user, expiring the current one if applicable
+ /// Generate a new for the connected user/ipaddress, deleting the current one if applicable
///
/// The for the operation
/// A resulting in the new
diff --git a/src/Tgstation.Server.Client/IServerClient.cs b/src/Tgstation.Server.Client/IServerClient.cs
index cd0b17e357..aa0fb7cc39 100644
--- a/src/Tgstation.Server.Client/IServerClient.cs
+++ b/src/Tgstation.Server.Client/IServerClient.cs
@@ -40,6 +40,16 @@ namespace Tgstation.Server.Client
///
IInstanceManagerClient Instances { get; }
+ ///
+ /// Access the
+ ///
+ IAdministrationClient Administration { get; }
+
+ ///
+ /// These generally shouldn't be used in favor of the based polling and s other clients use. However, this is the only way to access jobs the client didn't start in it's current session
+ ///
+ IJobsClient Jobs { get; }
+
///
/// The of the connected server
///