remove device custom details

this plugin functionality has never been used
This commit is contained in:
Gary Sharp
2023-02-08 16:24:21 +11:00
parent 47e11c0fd6
commit 57a7f67c3a
19 changed files with 617 additions and 1054 deletions
-13
View File
@@ -209,16 +209,13 @@ namespace Disco.Services.Expressions
if (target is User targetUser)
{
detailsVariables.Add("UserDetails", new LazyDictionary(() => detailsService.GetDetails(targetUser).Details));
detailsVariables.Add("AssignedDeviceDetails", targetUser.CurrentDeviceUserAssignments().Select(a => new { a.Device, Details = new LazyDictionary(() => detailsService.GetDetails(targetUser).Details) }).ToDictionary(d => d.Device.SerialNumber, d => d.Details, StringComparer.OrdinalIgnoreCase));
}
else if (target is Job targetJob)
{
detailsVariables.Add("UserDetails", targetJob.User == null ? (IDictionary<string, string>)new Dictionary<string, string>() : new LazyDictionary(() => detailsService.GetDetails(targetJob.User).Details));
detailsVariables.Add("DeviceDetails", targetJob.Device == null ? (IDictionary<string, string>)new Dictionary<string, string>() : new LazyDictionary(() => detailsService.GetDetails(targetJob.Device).Details));
}
else if (target is Device targetDevice)
{
detailsVariables.Add("DeviceDetails", new LazyDictionary(() => detailsService.GetDetails(targetDevice).Details));
detailsVariables.Add("UserDetails", targetDevice.AssignedUser == null ? (IDictionary<string, string>)new Dictionary<string, string>() : new LazyDictionary(() => detailsService.GetDetails(targetDevice.AssignedUser).Details));
}
}
@@ -285,16 +282,6 @@ namespace Disco.Services.Expressions
"#UserDetails",
typeof(Dictionary<string, string>).AssemblyQualifiedName
},
{
"#DeviceDetails",
typeof(Dictionary<string, string>).AssemblyQualifiedName
},
{
"#AssignedDeviceDetails",
typeof(Dictionary<string, Dictionary<string, string>>).AssemblyQualifiedName
},
};
}
public static Dictionary<string, string> ExtensionLibraryTypes()