Certificate/wireless plugins; major refactoring

Migrate much of BI to Services.
Added Wireless Profile Provider plugin feature.
Added Certificate Authority Provider plugin feature.
Modified Certificate Provider plugin feature.
Database migration v17, for Device Profiles.
Enrolment Client Updated to support CA Certificates, Wireless Profiles
and Hardware Info.
New Client Enrolment Protocol to support new features.
Plugin Manifest Generator added to main solution.
Improved AD search performance.
This commit is contained in:
Gary Sharp
2016-09-28 20:16:25 +10:00
parent 489a5df7cc
commit 27c21175d7
210 changed files with 9822 additions and 6675 deletions
@@ -37,5 +37,8 @@ namespace Disco.Services.Tasks
void Finished(string FinishedMessage, string FinishedUrl);
void SetTaskException(Exception TaskException);
void LogWarning(string Message);
void LogInformation(string Message);
}
}
@@ -1,13 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Services.Tasks
{
public class ScheduledTaskMockStatus : IScheduledTaskStatus
{
public string TaskName { get; private set; }
public byte Progress { get; set; }
public string CurrentProcess { get; set; }
public string CurrentDescription { get; set; }
@@ -22,6 +20,11 @@ namespace Disco.Services.Tasks
public Exception TaskException { get; set; }
public ScheduledTaskMockStatus(string TaskName)
{
this.TaskName = TaskName;
}
private byte CalculateProgressValue(byte Progress)
{
return (byte)((Progress * this.ProgressMultiplier) + this.ProgressOffset);
@@ -90,11 +93,25 @@ namespace Disco.Services.Tasks
this.TaskException = TaskException;
}
public void LogWarning(string Message)
{
ScheduledTasksLog.LogScheduledTaskWarning(TaskName, null, Message);
}
public void LogInformation(string Message)
{
ScheduledTasksLog.LogScheduledTaskInformation(TaskName, null, Message);
}
[Obsolete("Use the constructor which requires a TaskName instead")]
public static ScheduledTaskMockStatus Create()
{
return new ScheduledTaskMockStatus();
return new ScheduledTaskMockStatus("Unknown Task");
}
public static ScheduledTaskMockStatus Create(string TaskName)
{
return new ScheduledTaskMockStatus(TaskName);
}
}
}
@@ -111,6 +111,16 @@ namespace Disco.Services.Tasks
this._progress = 0;
}
public void LogWarning(string Message)
{
ScheduledTasksLog.LogScheduledTaskWarning(TaskName, SessionId, Message);
}
public void LogInformation(string Message)
{
ScheduledTasksLog.LogScheduledTaskInformation(TaskName, SessionId, Message);
}
#region Progress Actions
private byte CalculateProgressValue(byte Progress)
{
+36 -2
View File
@@ -25,6 +25,8 @@ namespace Disco.Services.Tasks
InitializeScheduledTasksExceptionWithInner,
ScheduledTasksException = 30,
ScheduledTasksExceptionWithInner,
ScheduledTasksWarning,
ScheduledTasksInformation,
ScheduledTaskExecuted = 50,
ScheduledTaskFinished = 80,
}
@@ -98,6 +100,16 @@ namespace Disco.Services.Tasks
}
}
public static void LogScheduledTaskInformation(string ScheduledTaskName, string SessionId, string Message)
{
Log(EventTypeIds.ScheduledTasksInformation, ScheduledTaskName, SessionId, Message);
}
public static void LogScheduledTaskWarning(string ScheduledTaskName, string SessionId, string Message)
{
Log(EventTypeIds.ScheduledTasksWarning, ScheduledTaskName, SessionId, Message);
}
protected override List<Logging.Models.LogEventType> LoadEventTypes()
{
return new System.Collections.Generic.List<LogEventType>
@@ -178,7 +190,29 @@ namespace Disco.Services.Tasks
UseLive = true,
UsePersist = true,
UseDisplay = true
},
},
new LogEventType
{
Id = (int)EventTypeIds.ScheduledTasksWarning,
ModuleId = _ModuleId,
Name = "Scheduled Task Warning",
Format = "Scheduled Task '{0}' Warning: {2}; Session Id: {1}",
Severity = (int)LogEventType.Severities.Warning,
UseLive = true,
UsePersist = true,
UseDisplay = true
},
new LogEventType
{
Id = (int)EventTypeIds.ScheduledTasksInformation,
ModuleId = _ModuleId,
Name = "Scheduled Task Information",
Format = "Scheduled Task '{0}' Information: {2}; Session Id: {1}",
Severity = (int)LogEventType.Severities.Information,
UseLive = true,
UsePersist = true,
UseDisplay = true
},
new LogEventType
{
Id = (int)EventTypeIds.ScheduledTaskExecuted,
@@ -201,7 +235,7 @@ namespace Disco.Services.Tasks
UsePersist = true,
UseDisplay = true
}
};
};
}
}
}