#184: optionally set managed group descriptions
This commit is contained in:
@@ -6,5 +6,6 @@ namespace Disco.Models.Services.Interop.ActiveDirectory
|
|||||||
{
|
{
|
||||||
public string GroupId { get; set; }
|
public string GroupId { get; set; }
|
||||||
public DateTime? FilterBeginDate { get; set; }
|
public DateTime? FilterBeginDate { get; set; }
|
||||||
|
public bool UpdateDescription { get; set; } = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,21 +80,23 @@ namespace Disco.Services.Interop.ActiveDirectory
|
|||||||
return JsonConvert.DeserializeObject<ADManagedGroupConfiguration>(ConfigurationJson);
|
return JsonConvert.DeserializeObject<ADManagedGroupConfiguration>(ConfigurationJson);
|
||||||
}
|
}
|
||||||
public static string ValidConfigurationToJson(string GroupKey, string GroupId, DateTime? FilterBeginDate)
|
public static string ValidConfigurationToJson(string GroupKey, string GroupId, DateTime? FilterBeginDate)
|
||||||
|
=> ValidConfigurationToJson(GroupKey, GroupId, FilterBeginDate, true);
|
||||||
|
public static string ValidConfigurationToJson(string groupKey, string groupId, DateTime? filterBeginDate, bool updateDescription)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(GroupId))
|
if (string.IsNullOrWhiteSpace(groupId))
|
||||||
GroupId = null;
|
groupId = null;
|
||||||
|
|
||||||
if (GroupId != null)
|
if (groupId != null)
|
||||||
GroupId = ActiveDirectory.Context.ManagedGroups.ValidateGroupId(GroupId, GroupKey);
|
groupId = ActiveDirectory.Context.ManagedGroups.ValidateGroupId(groupId, groupKey);
|
||||||
|
if (groupId == null)
|
||||||
if (GroupId == null)
|
|
||||||
return null;
|
return null;
|
||||||
else
|
else
|
||||||
return JsonConvert.SerializeObject(new ADManagedGroupConfiguration()
|
return JsonConvert.SerializeObject(new ADManagedGroupConfiguration()
|
||||||
{
|
{
|
||||||
GroupId = GroupId,
|
GroupId = groupId,
|
||||||
FilterBeginDate = FilterBeginDate
|
FilterBeginDate = filterBeginDate,
|
||||||
}, new JsonSerializerSettings() { DefaultValueHandling = DefaultValueHandling.Ignore });
|
UpdateDescription = updateDescription,
|
||||||
|
}, new JsonSerializerSettings());
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract void Dispose();
|
public abstract void Dispose();
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ namespace Disco.Services.Interop.ActiveDirectory
|
|||||||
|
|
||||||
public class ActiveDirectoryManagedGroups : IDisposable
|
public class ActiveDirectoryManagedGroups : IDisposable
|
||||||
{
|
{
|
||||||
private ConcurrentDictionary<string, ADManagedGroup> managedGroups;
|
private readonly ConcurrentDictionary<string, ADManagedGroup> managedGroups;
|
||||||
private Subject<ADManagedGroupScheduledAction> actionBuffer;
|
private readonly Subject<ADManagedGroupScheduledAction> actionBuffer;
|
||||||
private IDisposable actionBufferSubscription;
|
private readonly IDisposable actionBufferSubscription;
|
||||||
|
|
||||||
internal ActiveDirectoryManagedGroups()
|
internal ActiveDirectoryManagedGroups()
|
||||||
{
|
{
|
||||||
@@ -379,6 +379,8 @@ namespace Disco.Services.Interop.ActiveDirectory
|
|||||||
throw new InvalidOperationException($"This group [{adGroup.DistinguishedName}] is a Critical System Active Directory Object and Disco ICT refuses to modify it");
|
throw new InvalidOperationException($"This group [{adGroup.DistinguishedName}] is a Critical System Active Directory Object and Disco ICT refuses to modify it");
|
||||||
|
|
||||||
// Update Description
|
// Update Description
|
||||||
|
if (actionGroup.Item1.Configuration.UpdateDescription)
|
||||||
|
{
|
||||||
var groupDescription = $"Disco ICT: {actionGroup.Item1.GroupDescription}";
|
var groupDescription = $"Disco ICT: {actionGroup.Item1.GroupDescription}";
|
||||||
if (adGroupEntry.Entry.Properties.Value<string>("description") != groupDescription)
|
if (adGroupEntry.Entry.Properties.Value<string>("description") != groupDescription)
|
||||||
{
|
{
|
||||||
@@ -387,6 +389,7 @@ namespace Disco.Services.Interop.ActiveDirectory
|
|||||||
adGroupEntryDescription.Clear();
|
adGroupEntryDescription.Clear();
|
||||||
adGroupEntryDescription.Add(groupDescription);
|
adGroupEntryDescription.Add(groupDescription);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Sync Members
|
// Sync Members
|
||||||
var adGroupEntryMembers = adGroupEntry.Entry.Properties["member"];
|
var adGroupEntryMembers = adGroupEntry.Entry.Properties["member"];
|
||||||
@@ -430,7 +433,7 @@ namespace Disco.Services.Interop.ActiveDirectory
|
|||||||
|
|
||||||
internal class ADManagedGroupScheduledAction
|
internal class ADManagedGroupScheduledAction
|
||||||
{
|
{
|
||||||
private Func<DiscoDataContext, IEnumerable<string>> memberResolver;
|
private readonly Func<DiscoDataContext, IEnumerable<string>> memberResolver;
|
||||||
|
|
||||||
public ADManagedGroup ManagedGroup { get; private set; }
|
public ADManagedGroup ManagedGroup { get; private set; }
|
||||||
public ADManagedGroupScheduledActionType ActionType { get; private set; }
|
public ADManagedGroupScheduledActionType ActionType { get; private set; }
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
private const string pInsuredUntil = "insureduntil";
|
private const string pInsuredUntil = "insureduntil";
|
||||||
private const string pInsuranceDetails = "insurancedetails";
|
private const string pInsuranceDetails = "insurancedetails";
|
||||||
private const string pComments = "comments";
|
private const string pComments = "comments";
|
||||||
private const string pDevicesLinkedGroup = "deviceslinkedgroup";
|
|
||||||
private const string pAssignedUsersLinkedGroup = "assigneduserslinkedgroup";
|
|
||||||
|
|
||||||
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure)]
|
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
@@ -94,12 +92,6 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
case pComments:
|
case pComments:
|
||||||
UpdateComments(deviceBatch, value);
|
UpdateComments(deviceBatch, value);
|
||||||
break;
|
break;
|
||||||
case pDevicesLinkedGroup:
|
|
||||||
UpdateDevicesLinkedGroup(deviceBatch, value);
|
|
||||||
break;
|
|
||||||
case pAssignedUsersLinkedGroup:
|
|
||||||
UpdateAssignedUsersLinkedGroup(deviceBatch, value);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
throw new Exception("Invalid Update Key");
|
throw new Exception("Invalid Update Key");
|
||||||
}
|
}
|
||||||
@@ -224,18 +216,17 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure)]
|
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult UpdateDevicesLinkedGroup(int id, string GroupId = null, bool redirect = false)
|
public virtual ActionResult UpdateDevicesLinkedGroup(int id, string groupId = null, bool? updateDescription = null, bool redirect = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
throw new ArgumentOutOfRangeException("id");
|
throw new ArgumentOutOfRangeException(nameof(id));
|
||||||
|
|
||||||
var deviceBatch = Database.DeviceBatches.Find(id);
|
var deviceBatch = Database.DeviceBatches.Find(id)
|
||||||
if (deviceBatch == null)
|
?? throw new ArgumentException("Invalid Device Batch Id", nameof(id));
|
||||||
throw new ArgumentException("Invalid Device Batch Id", "id");
|
|
||||||
|
|
||||||
var syncTaskStatus = UpdateDevicesLinkedGroup(deviceBatch, GroupId);
|
var syncTaskStatus = UpdateDevicesLinkedGroup(deviceBatch, groupId, updateDescription ?? true);
|
||||||
if (redirect)
|
if (redirect)
|
||||||
if (syncTaskStatus == null)
|
if (syncTaskStatus == null)
|
||||||
return RedirectToAction(MVC.Config.DeviceBatch.Index(deviceBatch.Id));
|
return RedirectToAction(MVC.Config.DeviceBatch.Index(deviceBatch.Id));
|
||||||
@@ -257,18 +248,17 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure)]
|
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId = null, bool redirect = false)
|
public virtual ActionResult UpdateAssignedUsersLinkedGroup(int id, string groupId = null, bool? updateDescription = null, bool redirect = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
throw new ArgumentOutOfRangeException("id");
|
throw new ArgumentOutOfRangeException(nameof(id));
|
||||||
|
|
||||||
var deviceBatch = Database.DeviceBatches.Find(id);
|
var deviceBatch = Database.DeviceBatches.Find(id)
|
||||||
if (deviceBatch == null)
|
?? throw new ArgumentException("Invalid Device Batch Id", nameof(id));
|
||||||
throw new ArgumentException("Invalid Device Batch Id", "id");
|
|
||||||
|
|
||||||
var syncTaskStatus = UpdateAssignedUsersLinkedGroup(deviceBatch, GroupId);
|
var syncTaskStatus = UpdateAssignedUsersLinkedGroup(deviceBatch, groupId, updateDescription ?? true);
|
||||||
if (redirect)
|
if (redirect)
|
||||||
if (syncTaskStatus == null)
|
if (syncTaskStatus == null)
|
||||||
return RedirectToAction(MVC.Config.DeviceBatch.Index(deviceBatch.Id));
|
return RedirectToAction(MVC.Config.DeviceBatch.Index(deviceBatch.Id));
|
||||||
@@ -486,9 +476,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledTaskStatus UpdateDevicesLinkedGroup(DeviceBatch DeviceBatch, string devicesLinkedGroup)
|
private ScheduledTaskStatus UpdateDevicesLinkedGroup(DeviceBatch DeviceBatch, string devicesLinkedGroup, bool updateDescription)
|
||||||
{
|
{
|
||||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceBatchDevicesManagedGroup.GetKey(DeviceBatch), devicesLinkedGroup, null);
|
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceBatchDevicesManagedGroup.GetKey(DeviceBatch), devicesLinkedGroup, null, updateDescription);
|
||||||
|
|
||||||
if (DeviceBatch.DevicesLinkedGroup != configJson)
|
if (DeviceBatch.DevicesLinkedGroup != configJson)
|
||||||
{
|
{
|
||||||
@@ -503,9 +493,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledTaskStatus UpdateAssignedUsersLinkedGroup(DeviceBatch DeviceBatch, string assignedUsersLinkedGroup)
|
private ScheduledTaskStatus UpdateAssignedUsersLinkedGroup(DeviceBatch DeviceBatch, string assignedUsersLinkedGroup, bool updateDescription)
|
||||||
{
|
{
|
||||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceBatchAssignedUsersManagedGroup.GetKey(DeviceBatch), assignedUsersLinkedGroup, null);
|
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceBatchAssignedUsersManagedGroup.GetKey(DeviceBatch), assignedUsersLinkedGroup, null, updateDescription);
|
||||||
|
|
||||||
if (DeviceBatch.AssignedUsersLinkedGroup != configJson)
|
if (DeviceBatch.AssignedUsersLinkedGroup != configJson)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -166,19 +166,17 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
[DiscoAuthorize(Claims.Config.DeviceFlag.Configure)]
|
[DiscoAuthorize(Claims.Config.DeviceFlag.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult UpdateDevicesLinkedGroup(int id, string GroupId = null, DateTime? FilterBeginDate = null, bool redirect = false)
|
public virtual ActionResult UpdateDevicesLinkedGroup(int id, string groupId = null, DateTime? filterBeginDate = null, bool? updateDescription = null, bool redirect = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
throw new ArgumentOutOfRangeException("id");
|
throw new ArgumentOutOfRangeException(nameof(id));
|
||||||
|
|
||||||
var deviceFlag = Database.DeviceFlags.Find(id);
|
var deviceFlag = Database.DeviceFlags.Find(id)
|
||||||
if (deviceFlag == null)
|
?? throw new ArgumentException("Invalid Device Flag Id", nameof(id));
|
||||||
throw new ArgumentException("Invalid Device Flag Id", "id");
|
|
||||||
|
|
||||||
|
var syncTaskStatus = UpdateDevicesLinkedGroup(deviceFlag, groupId, filterBeginDate, updateDescription ?? true);
|
||||||
var syncTaskStatus = UpdateDevicesLinkedGroup(deviceFlag, GroupId, FilterBeginDate);
|
|
||||||
if (redirect)
|
if (redirect)
|
||||||
if (syncTaskStatus == null)
|
if (syncTaskStatus == null)
|
||||||
return RedirectToAction(MVC.Config.DeviceFlag.Index(deviceFlag.Id));
|
return RedirectToAction(MVC.Config.DeviceFlag.Index(deviceFlag.Id));
|
||||||
@@ -200,25 +198,23 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
[DiscoAuthorize(Claims.Config.DeviceFlag.Configure)]
|
[DiscoAuthorize(Claims.Config.DeviceFlag.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult UpdateAssignedUserLinkedGroup(int id, string GroupId = null, DateTime? FilterBeginDate = null, bool redirect = false)
|
public virtual ActionResult UpdateAssignedUserLinkedGroup(int id, string groupId = null, DateTime? filterBeginDate = null, bool? updateDescription = null, bool redirect = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
throw new ArgumentOutOfRangeException("id");
|
throw new ArgumentOutOfRangeException(nameof(id));
|
||||||
|
|
||||||
var DeviceFlag = Database.DeviceFlags.Find(id);
|
var deviceFlag = Database.DeviceFlags.Find(id)
|
||||||
if (DeviceFlag == null)
|
?? throw new ArgumentException("Invalid Device Flag Id", nameof(id));
|
||||||
throw new ArgumentException("Invalid Device Flag Id", "id");
|
|
||||||
|
|
||||||
|
var syncTaskStatus = UpdateAssignedUserLinkedGroup(deviceFlag, groupId, filterBeginDate, updateDescription ?? true);
|
||||||
var syncTaskStatus = UpdateAssignedUserLinkedGroup(DeviceFlag, GroupId, FilterBeginDate);
|
|
||||||
if (redirect)
|
if (redirect)
|
||||||
if (syncTaskStatus == null)
|
if (syncTaskStatus == null)
|
||||||
return RedirectToAction(MVC.Config.DeviceFlag.Index(DeviceFlag.Id));
|
return RedirectToAction(MVC.Config.DeviceFlag.Index(deviceFlag.Id));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.DeviceFlag.Index(DeviceFlag.Id)));
|
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.DeviceFlag.Index(deviceFlag.Id)));
|
||||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -340,9 +336,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
DeviceFlagService.Update(Database, deviceFlag);
|
DeviceFlagService.Update(Database, deviceFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledTaskStatus UpdateDevicesLinkedGroup(DeviceFlag deviceFlag, string devicesLinkedGroup, DateTime? filterBeginDate)
|
private ScheduledTaskStatus UpdateDevicesLinkedGroup(DeviceFlag deviceFlag, string devicesLinkedGroup, DateTime? filterBeginDate, bool updateDescription)
|
||||||
{
|
{
|
||||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceFlagDevicesManagedGroup.GetKey(deviceFlag), devicesLinkedGroup, filterBeginDate);
|
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceFlagDevicesManagedGroup.GetKey(deviceFlag), devicesLinkedGroup, filterBeginDate, updateDescription);
|
||||||
|
|
||||||
if (deviceFlag.DevicesLinkedGroup != configJson)
|
if (deviceFlag.DevicesLinkedGroup != configJson)
|
||||||
{
|
{
|
||||||
@@ -358,9 +354,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
private ScheduledTaskStatus UpdateAssignedUserLinkedGroup(DeviceFlag deviceFlag, string assignedUserLinkedGroup, DateTime? filterBeginDate)
|
private ScheduledTaskStatus UpdateAssignedUserLinkedGroup(DeviceFlag deviceFlag, string assignedUserLinkedGroup, DateTime? filterBeginDate, bool updateDescription)
|
||||||
{
|
{
|
||||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceFlagDeviceAssignedUsersManagedGroup.GetKey(deviceFlag), assignedUserLinkedGroup, filterBeginDate);
|
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceFlagDeviceAssignedUsersManagedGroup.GetKey(deviceFlag), assignedUserLinkedGroup, filterBeginDate, updateDescription);
|
||||||
|
|
||||||
if (deviceFlag.DeviceUsersLinkedGroup != configJson)
|
if (deviceFlag.DeviceUsersLinkedGroup != configJson)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
private const string pAssignedUserLocalAdmin = "assigneduserlocaladmin";
|
private const string pAssignedUserLocalAdmin = "assigneduserlocaladmin";
|
||||||
private const string pSetAssignedUserForLogon = "setassigneduserforlogon";
|
private const string pSetAssignedUserForLogon = "setassigneduserforlogon";
|
||||||
private const string pAllowUntrustedReimageJobEnrolment = "allowuntrustedreimagejobrnrolment";
|
private const string pAllowUntrustedReimageJobEnrolment = "allowuntrustedreimagejobrnrolment";
|
||||||
private const string pDevicesLinkedGroup = "deviceslinkedgroup";
|
|
||||||
private const string pAssignedUsersLinkedGroup = "assigneduserslinkedgroup";
|
|
||||||
|
|
||||||
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
@@ -106,12 +104,6 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
case pAllowUntrustedReimageJobEnrolment:
|
case pAllowUntrustedReimageJobEnrolment:
|
||||||
UpdateAllowUntrustedReimageJobEnrolment(deviceProfile, value);
|
UpdateAllowUntrustedReimageJobEnrolment(deviceProfile, value);
|
||||||
break;
|
break;
|
||||||
case pDevicesLinkedGroup:
|
|
||||||
UpdateDevicesLinkedGroup(deviceProfile, value);
|
|
||||||
break;
|
|
||||||
case pAssignedUsersLinkedGroup:
|
|
||||||
UpdateAssignedUsersLinkedGroup(deviceProfile, value);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
throw new Exception("Invalid Update Key");
|
throw new Exception("Invalid Update Key");
|
||||||
}
|
}
|
||||||
@@ -385,18 +377,17 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult UpdateDevicesLinkedGroup(int id, string GroupId = null, bool redirect = false)
|
public virtual ActionResult UpdateDevicesLinkedGroup(int id, string groupId = null, bool? updateDescription = null, bool redirect = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
throw new ArgumentOutOfRangeException("id");
|
throw new ArgumentOutOfRangeException(nameof(id));
|
||||||
|
|
||||||
var deviceProfile = Database.DeviceProfiles.Find(id);
|
var deviceProfile = Database.DeviceProfiles.Find(id)
|
||||||
if (deviceProfile == null)
|
?? throw new ArgumentException("Invalid Device Profile Id", nameof(id));
|
||||||
throw new ArgumentException("Invalid Device Profile Id", "id");
|
|
||||||
|
|
||||||
var syncTaskStatus = UpdateDevicesLinkedGroup(deviceProfile, GroupId);
|
var syncTaskStatus = UpdateDevicesLinkedGroup(deviceProfile, groupId, updateDescription ?? true);
|
||||||
if (redirect)
|
if (redirect)
|
||||||
if (syncTaskStatus == null)
|
if (syncTaskStatus == null)
|
||||||
return RedirectToAction(MVC.Config.DeviceProfile.Index(deviceProfile.Id));
|
return RedirectToAction(MVC.Config.DeviceProfile.Index(deviceProfile.Id));
|
||||||
@@ -418,18 +409,17 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId = null, bool redirect = false)
|
public virtual ActionResult UpdateAssignedUsersLinkedGroup(int id, string groupId = null, bool? updateDescription = null, bool redirect = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
throw new ArgumentOutOfRangeException("id");
|
throw new ArgumentOutOfRangeException(nameof(id));
|
||||||
|
|
||||||
var deviceProfile = Database.DeviceProfiles.Find(id);
|
var deviceProfile = Database.DeviceProfiles.Find(id)
|
||||||
if (deviceProfile == null)
|
?? throw new ArgumentException("Invalid Device Profile Id", nameof(id));
|
||||||
throw new ArgumentException("Invalid Device Profile Id", "id");
|
|
||||||
|
|
||||||
var syncTaskStatus = UpdateAssignedUsersLinkedGroup(deviceProfile, GroupId);
|
var syncTaskStatus = UpdateAssignedUsersLinkedGroup(deviceProfile, groupId, updateDescription ?? true);
|
||||||
if (redirect)
|
if (redirect)
|
||||||
if (syncTaskStatus == null)
|
if (syncTaskStatus == null)
|
||||||
return RedirectToAction(MVC.Config.DeviceProfile.Index(deviceProfile.Id));
|
return RedirectToAction(MVC.Config.DeviceProfile.Index(deviceProfile.Id));
|
||||||
@@ -725,9 +715,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
throw new Exception("Invalid Boolean Value");
|
throw new Exception("Invalid Boolean Value");
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledTaskStatus UpdateDevicesLinkedGroup(DeviceProfile deviceProfile, string devicesLinkedGroup)
|
private ScheduledTaskStatus UpdateDevicesLinkedGroup(DeviceProfile deviceProfile, string devicesLinkedGroup, bool updateDescription)
|
||||||
{
|
{
|
||||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceProfileDevicesManagedGroup.GetKey(deviceProfile), devicesLinkedGroup, null);
|
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceProfileDevicesManagedGroup.GetKey(deviceProfile), devicesLinkedGroup, null, updateDescription);
|
||||||
|
|
||||||
if (deviceProfile.DevicesLinkedGroup != configJson)
|
if (deviceProfile.DevicesLinkedGroup != configJson)
|
||||||
{
|
{
|
||||||
@@ -742,9 +732,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledTaskStatus UpdateAssignedUsersLinkedGroup(DeviceProfile deviceProfile, string assignedUsersLinkedGroup)
|
private ScheduledTaskStatus UpdateAssignedUsersLinkedGroup(DeviceProfile deviceProfile, string assignedUsersLinkedGroup, bool updateDescription)
|
||||||
{
|
{
|
||||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceProfileAssignedUsersManagedGroup.GetKey(deviceProfile), assignedUsersLinkedGroup, null);
|
var configJson = ADManagedGroup.ValidConfigurationToJson(DeviceProfileAssignedUsersManagedGroup.GetKey(deviceProfile), assignedUsersLinkedGroup, null, updateDescription);
|
||||||
|
|
||||||
if (deviceProfile.AssignedUsersLinkedGroup != configJson)
|
if (deviceProfile.AssignedUsersLinkedGroup != configJson)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -255,18 +255,17 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorize(Claims.Config.DocumentTemplate.Configure)]
|
[DiscoAuthorize(Claims.Config.DocumentTemplate.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult UpdateDevicesLinkedGroup(string id, string GroupId = null, DateTime? FilterBeginDate = null, bool redirect = false)
|
public virtual ActionResult UpdateDevicesLinkedGroup(string id, string groupId = null, DateTime? filterBeginDate = null, bool? updateDescription = null, bool redirect = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(id))
|
if (string.IsNullOrWhiteSpace(id))
|
||||||
throw new ArgumentNullException("id");
|
throw new ArgumentNullException(nameof(id));
|
||||||
|
|
||||||
var documentTemplate = Database.DocumentTemplates.Find(id);
|
var documentTemplate = Database.DocumentTemplates.Find(id)
|
||||||
if (documentTemplate == null)
|
?? throw new ArgumentException("Invalid Document Template Id", nameof(id));
|
||||||
throw new ArgumentException("Invalid Document Template Id", "id");
|
|
||||||
|
|
||||||
var syncTaskStatus = UpdateDevicesLinkedGroup(documentTemplate, GroupId, FilterBeginDate);
|
var syncTaskStatus = UpdateDevicesLinkedGroup(documentTemplate, groupId, filterBeginDate, updateDescription ?? true);
|
||||||
if (redirect)
|
if (redirect)
|
||||||
if (syncTaskStatus == null)
|
if (syncTaskStatus == null)
|
||||||
return RedirectToAction(MVC.Config.DocumentTemplate.Index(documentTemplate.Id));
|
return RedirectToAction(MVC.Config.DocumentTemplate.Index(documentTemplate.Id));
|
||||||
@@ -289,18 +288,17 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
[DiscoAuthorize(Claims.Config.DocumentTemplate.Configure)]
|
[DiscoAuthorize(Claims.Config.DocumentTemplate.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult UpdateUsersLinkedGroup(string id, string GroupId = null, DateTime? FilterBeginDate = null, bool redirect = false)
|
public virtual ActionResult UpdateUsersLinkedGroup(string id, string groupId = null, DateTime? filterBeginDate = null, bool? updateDescription = null, bool redirect = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(id))
|
if (string.IsNullOrWhiteSpace(id))
|
||||||
throw new ArgumentNullException("id");
|
throw new ArgumentNullException(nameof(id));
|
||||||
|
|
||||||
var documentTemplate = Database.DocumentTemplates.Find(id);
|
var documentTemplate = Database.DocumentTemplates.Find(id)
|
||||||
if (documentTemplate == null)
|
?? throw new ArgumentException("Invalid Document Template Id", nameof(id));
|
||||||
throw new ArgumentException("Invalid Document Template Id", "id");
|
|
||||||
|
|
||||||
var syncTaskStatus = UpdateUsersLinkedGroup(documentTemplate, GroupId, FilterBeginDate);
|
var syncTaskStatus = UpdateUsersLinkedGroup(documentTemplate, groupId, filterBeginDate, updateDescription ?? true);
|
||||||
if (redirect)
|
if (redirect)
|
||||||
if (syncTaskStatus == null)
|
if (syncTaskStatus == null)
|
||||||
return RedirectToAction(MVC.Config.DocumentTemplate.Index(documentTemplate.Id));
|
return RedirectToAction(MVC.Config.DocumentTemplate.Index(documentTemplate.Id));
|
||||||
@@ -470,16 +468,16 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledTaskStatus UpdateDevicesLinkedGroup(DocumentTemplate DocumentTemplate, string DevicesLinkedGroup, DateTime? FilterBeginDate)
|
private ScheduledTaskStatus UpdateDevicesLinkedGroup(DocumentTemplate documentTemplate, string devicesLinkedGroup, DateTime? filterBeginDate, bool updateDescription)
|
||||||
{
|
{
|
||||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DocumentTemplateDevicesManagedGroup.GetKey(DocumentTemplate), DevicesLinkedGroup, FilterBeginDate);
|
var configJson = ADManagedGroup.ValidConfigurationToJson(DocumentTemplateDevicesManagedGroup.GetKey(documentTemplate), devicesLinkedGroup, filterBeginDate, updateDescription);
|
||||||
|
|
||||||
if (DocumentTemplate.DevicesLinkedGroup != configJson)
|
if (documentTemplate.DevicesLinkedGroup != configJson)
|
||||||
{
|
{
|
||||||
DocumentTemplate.DevicesLinkedGroup = configJson;
|
documentTemplate.DevicesLinkedGroup = configJson;
|
||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
|
|
||||||
var managedGroup = DocumentTemplateDevicesManagedGroup.Initialize(DocumentTemplate);
|
var managedGroup = DocumentTemplateDevicesManagedGroup.Initialize(documentTemplate);
|
||||||
if (managedGroup != null) // Sync Group
|
if (managedGroup != null) // Sync Group
|
||||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||||
}
|
}
|
||||||
@@ -487,16 +485,16 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledTaskStatus UpdateUsersLinkedGroup(DocumentTemplate DocumentTemplate, string UsersLinkedGroup, DateTime? FilterBeginDate)
|
private ScheduledTaskStatus UpdateUsersLinkedGroup(DocumentTemplate documentTemplate, string usersLinkedGroup, DateTime? filterBeginDate, bool updateDescription)
|
||||||
{
|
{
|
||||||
var configJson = ADManagedGroup.ValidConfigurationToJson(DocumentTemplateUsersManagedGroup.GetKey(DocumentTemplate), UsersLinkedGroup, FilterBeginDate);
|
var configJson = ADManagedGroup.ValidConfigurationToJson(DocumentTemplateUsersManagedGroup.GetKey(documentTemplate), usersLinkedGroup, filterBeginDate, updateDescription);
|
||||||
|
|
||||||
if (DocumentTemplate.UsersLinkedGroup != configJson)
|
if (documentTemplate.UsersLinkedGroup != configJson)
|
||||||
{
|
{
|
||||||
DocumentTemplate.UsersLinkedGroup = configJson;
|
documentTemplate.UsersLinkedGroup = configJson;
|
||||||
Database.SaveChanges();
|
Database.SaveChanges();
|
||||||
|
|
||||||
var managedGroup = DocumentTemplateUsersManagedGroup.Initialize(DocumentTemplate);
|
var managedGroup = DocumentTemplateUsersManagedGroup.Initialize(documentTemplate);
|
||||||
if (managedGroup != null) // Sync Group
|
if (managedGroup != null) // Sync Group
|
||||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,25 +166,23 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId = null, DateTime? FilterBeginDate = null, bool redirect = false)
|
public virtual ActionResult UpdateAssignedUsersLinkedGroup(int id, string groupId = null, DateTime? filterBeginDate = null, bool? updateDescription = null, bool redirect = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
throw new ArgumentOutOfRangeException(nameof(id));
|
throw new ArgumentOutOfRangeException(nameof(id));
|
||||||
|
|
||||||
var UserFlag = Database.UserFlags.Find(id);
|
var userFlag = Database.UserFlags.Find(id)
|
||||||
if (UserFlag == null)
|
?? throw new ArgumentException("Invalid User Flag Id", nameof(id));
|
||||||
throw new ArgumentException("Invalid User Flag Id", nameof(id));
|
|
||||||
|
|
||||||
|
var syncTaskStatus = UpdateAssignedUsersLinkedGroup(userFlag, groupId, filterBeginDate, updateDescription ?? true);
|
||||||
var syncTaskStatus = UpdateAssignedUsersLinkedGroup(UserFlag, GroupId, FilterBeginDate);
|
|
||||||
if (redirect)
|
if (redirect)
|
||||||
if (syncTaskStatus == null)
|
if (syncTaskStatus == null)
|
||||||
return RedirectToAction(MVC.Config.UserFlag.Index(UserFlag.Id));
|
return RedirectToAction(MVC.Config.UserFlag.Index(userFlag.Id));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.UserFlag.Index(UserFlag.Id)));
|
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.UserFlag.Index(userFlag.Id)));
|
||||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -200,25 +198,23 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||||
[HttpPost, ValidateAntiForgeryToken]
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
public virtual ActionResult UpdateAssignedUserDevicesLinkedGroup(int id, string GroupId = null, DateTime? FilterBeginDate = null, bool redirect = false)
|
public virtual ActionResult UpdateAssignedUserDevicesLinkedGroup(int id, string groupId = null, DateTime? filterBeginDate = null, bool? updateDescription = null, bool redirect = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
throw new ArgumentOutOfRangeException(nameof(id));
|
throw new ArgumentOutOfRangeException(nameof(id));
|
||||||
|
|
||||||
var UserFlag = Database.UserFlags.Find(id);
|
var userFlag = Database.UserFlags.Find(id)
|
||||||
if (UserFlag == null)
|
?? throw new ArgumentException("Invalid User Flag Id", nameof(id));
|
||||||
throw new ArgumentException("Invalid User Flag Id", nameof(id));
|
|
||||||
|
|
||||||
|
var syncTaskStatus = UpdateAssignedUserDevicesLinkedGroup(userFlag, groupId, filterBeginDate, updateDescription ?? true);
|
||||||
var syncTaskStatus = UpdateAssignedUserDevicesLinkedGroup(UserFlag, GroupId, FilterBeginDate);
|
|
||||||
if (redirect)
|
if (redirect)
|
||||||
if (syncTaskStatus == null)
|
if (syncTaskStatus == null)
|
||||||
return RedirectToAction(MVC.Config.UserFlag.Index(UserFlag.Id));
|
return RedirectToAction(MVC.Config.UserFlag.Index(userFlag.Id));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.UserFlag.Index(UserFlag.Id)));
|
syncTaskStatus.SetFinishedUrl(Url.Action(MVC.Config.UserFlag.Index(userFlag.Id)));
|
||||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
return RedirectToAction(MVC.Config.Logging.TaskStatus(syncTaskStatus.SessionId));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -340,19 +336,19 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
UserFlagService.Update(Database, UserFlag);
|
UserFlagService.Update(Database, UserFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledTaskStatus UpdateAssignedUsersLinkedGroup(UserFlag UserFlag, string AssignedUsersLinkedGroup, DateTime? FilterBeginDate)
|
private ScheduledTaskStatus UpdateAssignedUsersLinkedGroup(UserFlag userFlag, string assignedUsersLinkedGroup, DateTime? filterBeginDate, bool updateDescription)
|
||||||
{
|
{
|
||||||
var configJson = ADManagedGroup.ValidConfigurationToJson(UserFlagUsersManagedGroup.GetKey(UserFlag), AssignedUsersLinkedGroup, FilterBeginDate);
|
var configJson = ADManagedGroup.ValidConfigurationToJson(UserFlagUsersManagedGroup.GetKey(userFlag), assignedUsersLinkedGroup, filterBeginDate, updateDescription);
|
||||||
|
|
||||||
if (UserFlag.UsersLinkedGroup != configJson)
|
if (userFlag.UsersLinkedGroup != configJson)
|
||||||
{
|
{
|
||||||
UserFlag.UsersLinkedGroup = configJson;
|
userFlag.UsersLinkedGroup = configJson;
|
||||||
UserFlagService.Update(Database, UserFlag);
|
UserFlagService.Update(Database, userFlag);
|
||||||
|
|
||||||
if (UserFlag.UsersLinkedGroup != null)
|
if (userFlag.UsersLinkedGroup != null)
|
||||||
{
|
{
|
||||||
// Sync Group
|
// Sync Group
|
||||||
if (UserFlagUsersManagedGroup.TryGetManagedGroup(UserFlag, out var managedGroup))
|
if (UserFlagUsersManagedGroup.TryGetManagedGroup(userFlag, out var managedGroup))
|
||||||
{
|
{
|
||||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||||
}
|
}
|
||||||
@@ -361,19 +357,19 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
private ScheduledTaskStatus UpdateAssignedUserDevicesLinkedGroup(UserFlag UserFlag, string AssignedUserDevicesLinkedGroup, DateTime? FilterBeginDate)
|
private ScheduledTaskStatus UpdateAssignedUserDevicesLinkedGroup(UserFlag userFlag, string assignedUserDevicesLinkedGroup, DateTime? filterBeginDate, bool updateDescription)
|
||||||
{
|
{
|
||||||
var configJson = ADManagedGroup.ValidConfigurationToJson(UserFlagUserDevicesManagedGroup.GetKey(UserFlag), AssignedUserDevicesLinkedGroup, FilterBeginDate);
|
var configJson = ADManagedGroup.ValidConfigurationToJson(UserFlagUserDevicesManagedGroup.GetKey(userFlag), assignedUserDevicesLinkedGroup, filterBeginDate, updateDescription);
|
||||||
|
|
||||||
if (UserFlag.UserDevicesLinkedGroup != configJson)
|
if (userFlag.UserDevicesLinkedGroup != configJson)
|
||||||
{
|
{
|
||||||
UserFlag.UserDevicesLinkedGroup = configJson;
|
userFlag.UserDevicesLinkedGroup = configJson;
|
||||||
UserFlagService.Update(Database, UserFlag);
|
UserFlagService.Update(Database, userFlag);
|
||||||
|
|
||||||
if (UserFlag.UserDevicesLinkedGroup != null)
|
if (userFlag.UserDevicesLinkedGroup != null)
|
||||||
{
|
{
|
||||||
// Sync Group
|
// Sync Group
|
||||||
if (UserFlagUserDevicesManagedGroup.TryGetManagedGroup(UserFlag, out var managedGroup))
|
if (UserFlagUserDevicesManagedGroup.TryGetManagedGroup(userFlag, out var managedGroup))
|
||||||
{
|
{
|
||||||
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
return ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<div class="code" title="@group.Id">
|
<div class="code" title="@group.Id">
|
||||||
<i class="fa fa-fw fa-lg fa-link success"></i>@group.Domain.FriendlyDistinguishedNamePath(group.DistinguishedName)
|
<i class="fa fa-fw fa-lg fa-link success"></i>@group.Domain.FriendlyDistinguishedNamePath(group.DistinguishedName)
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="@(Model.ManagedGroup.Configuration.GroupId)" data-linkedgroupfilterdateoption="@(Model.ManagedGroup.IncludeFilterBeginDate)" data-linkedgroupfilterdate="@(Model.ManagedGroup.Configuration.FilterBeginDate)" data-linkedroupdescription="@(Model.CategoryDescription)" data-linkedroupupdateurl="@(Model.UpdateUrl)">Change Link</button>
|
<button type="button" class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="@(Model.ManagedGroup.Configuration.GroupId)" data-linkedgroupfilterdateoption="@(Model.ManagedGroup.IncludeFilterBeginDate)" data-linkedgroupfilterdate="@(Model.ManagedGroup.Configuration.FilterBeginDate)" data-linkedgroupdescription="@(Model.CategoryDescription)" data-linkedgroupupdateurl="@(Model.UpdateUrl)" data-linkedgroupupdatedescription="@(Model.ManagedGroup.Configuration.UpdateDescription)">Change Link</button>
|
||||||
using (Html.BeginForm(MVC.API.System.SyncActiveDirectoryManagedGroup(Model.ManagedGroup.Key, Context.Request.Path)))
|
using (Html.BeginForm(MVC.API.System.SyncActiveDirectoryManagedGroup(Model.ManagedGroup.Key, Context.Request.Path)))
|
||||||
{
|
{
|
||||||
@Html.AntiForgeryToken()
|
@Html.AntiForgeryToken()
|
||||||
@@ -34,12 +34,12 @@
|
|||||||
<div class="code error">
|
<div class="code error">
|
||||||
<i class="fa fa-fw fa-lg fa-unlink error"></i>Group Not Found: <strong class="code">@Model.ManagedGroup.Configuration.GroupId</strong>
|
<i class="fa fa-fw fa-lg fa-unlink error"></i>Group Not Found: <strong class="code">@Model.ManagedGroup.Configuration.GroupId</strong>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="@(Model.ManagedGroup.Configuration.GroupId)" data-linkedgroupfilterdateoption="@(Model.ManagedGroup.IncludeFilterBeginDate)" data-linkedgroupfilterdate="@(Model.ManagedGroup.Configuration.FilterBeginDate)" data-linkedroupdescription="@(Model.CategoryDescription)" data-linkedroupupdateurl="@(Model.UpdateUrl)">Change Link</button>
|
<button type="button" class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="@(Model.ManagedGroup.Configuration.GroupId)" data-linkedgroupfilterdateoption="@(Model.ManagedGroup.IncludeFilterBeginDate)" data-linkedgroupfilterdate="@(Model.ManagedGroup.Configuration.FilterBeginDate)" data-linkedgroupdescription="@(Model.CategoryDescription)" data-linkedgroupupdateurl="@(Model.UpdateUrl)" data-linkedgroupupdatedescription="@(Model.ManagedGroup.Configuration.UpdateDescription)">Change Link</button>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<button type="button" class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="" data-linkedgroupfilterdateoption="@(Model.IncludeFilterBeginDate)" data-linkedroupdescription="@(Model.CategoryDescription)" data-linkedroupupdateurl="@(Model.UpdateUrl)">Link Group</button>
|
<button type="button" class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="" data-linkedgroupfilterdateoption="@(Model.IncludeFilterBeginDate)" data-linkedgroupdescription="@(Model.CategoryDescription)" data-linkedgroupupdateurl="@(Model.UpdateUrl)" data-linkedgroupupdatedescription="True">Link Group</button>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ WriteLiteral(" data-linkedgroupfilterdate=\"");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\"");
|
WriteLiteral("\"");
|
||||||
|
|
||||||
WriteLiteral(" data-linkedroupdescription=\"");
|
WriteLiteral(" data-linkedgroupdescription=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 25 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
#line 25 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||||
@@ -188,7 +188,7 @@ WriteLiteral(" data-linkedroupdescription=\"");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\"");
|
WriteLiteral("\"");
|
||||||
|
|
||||||
WriteLiteral(" data-linkedroupupdateurl=\"");
|
WriteLiteral(" data-linkedgroupupdateurl=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 25 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
#line 25 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||||
@@ -199,6 +199,17 @@ WriteLiteral(" data-linkedroupupdateurl=\"");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\"");
|
WriteLiteral("\"");
|
||||||
|
|
||||||
|
WriteLiteral(" data-linkedgroupupdatedescription=\"");
|
||||||
|
|
||||||
|
|
||||||
|
#line 25 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||||
|
Write(Model.ManagedGroup.Configuration.UpdateDescription);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\"");
|
||||||
|
|
||||||
WriteLiteral(">Change Link</button>\r\n");
|
WriteLiteral(">Change Link</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
@@ -303,7 +314,7 @@ WriteLiteral(" data-linkedgroupfilterdate=\"");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\"");
|
WriteLiteral("\"");
|
||||||
|
|
||||||
WriteLiteral(" data-linkedroupdescription=\"");
|
WriteLiteral(" data-linkedgroupdescription=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 37 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
#line 37 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||||
@@ -314,7 +325,7 @@ WriteLiteral(" data-linkedroupdescription=\"");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\"");
|
WriteLiteral("\"");
|
||||||
|
|
||||||
WriteLiteral(" data-linkedroupupdateurl=\"");
|
WriteLiteral(" data-linkedgroupupdateurl=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 37 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
#line 37 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||||
@@ -325,6 +336,17 @@ WriteLiteral(" data-linkedroupupdateurl=\"");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\"");
|
WriteLiteral("\"");
|
||||||
|
|
||||||
|
WriteLiteral(" data-linkedgroupupdatedescription=\"");
|
||||||
|
|
||||||
|
|
||||||
|
#line 37 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||||
|
Write(Model.ManagedGroup.Configuration.UpdateDescription);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\"");
|
||||||
|
|
||||||
WriteLiteral(">Change Link</button>\r\n");
|
WriteLiteral(">Change Link</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
@@ -356,7 +378,7 @@ WriteLiteral(" data-linkedgroupfilterdateoption=\"");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\"");
|
WriteLiteral("\"");
|
||||||
|
|
||||||
WriteLiteral(" data-linkedroupdescription=\"");
|
WriteLiteral(" data-linkedgroupdescription=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 42 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
#line 42 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||||
@@ -367,7 +389,7 @@ WriteLiteral(" data-linkedroupdescription=\"");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\"");
|
WriteLiteral("\"");
|
||||||
|
|
||||||
WriteLiteral(" data-linkedroupupdateurl=\"");
|
WriteLiteral(" data-linkedgroupupdateurl=\"");
|
||||||
|
|
||||||
|
|
||||||
#line 42 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
#line 42 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||||
@@ -378,6 +400,8 @@ WriteLiteral(" data-linkedroupupdateurl=\"");
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\"");
|
WriteLiteral("\"");
|
||||||
|
|
||||||
|
WriteLiteral(" data-linkedgroupupdatedescription=\"True\"");
|
||||||
|
|
||||||
WriteLiteral(">Link Group</button>\r\n");
|
WriteLiteral(">Link Group</button>\r\n");
|
||||||
|
|
||||||
|
|
||||||
@@ -398,14 +422,14 @@ WriteLiteral(" <div");
|
|||||||
|
|
||||||
WriteLiteral(" class=\"code\"");
|
WriteLiteral(" class=\"code\"");
|
||||||
|
|
||||||
WriteAttribute("title", Tuple.Create(" title=\"", 2966), Tuple.Create("\"", 2983)
|
WriteAttribute("title", Tuple.Create(" title=\"", 3193), Tuple.Create("\"", 3210)
|
||||||
|
|
||||||
#line 51 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
#line 51 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 2974), Tuple.Create<System.Object, System.Int32>(group.Id
|
, Tuple.Create(Tuple.Create("", 3201), Tuple.Create<System.Object, System.Int32>(group.Id
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 2974), false)
|
, 3201), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n <i");
|
WriteLiteral(">\r\n <i");
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<label for="Config_LinkedGroup_Id">Linked Group:</label>
|
<label for="Config_LinkedGroup_Id">Linked Group:</label>
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<input id="Config_LinkedGroup_Id" type="text" name="GroupId" data-sourceurl="@(Url.Action(MVC.API.System.SearchGroupSubjects()))" />
|
<input id="Config_LinkedGroup_Id" type="text" name="groupId" data-sourceurl="@(Url.Action(MVC.API.System.SearchGroupSubjects()))" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -20,7 +20,15 @@
|
|||||||
<label for="Config_LinkedGroup_FilterDate">Filter Date: </label>
|
<label for="Config_LinkedGroup_FilterDate">Filter Date: </label>
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<input id="Config_LinkedGroup_FilterDate" type="text" name="FilterBeginDate" placeholder="No Filter" autocomplete="off" />
|
<input id="Config_LinkedGroup_FilterDate" type="text" name="filterBeginDate" placeholder="No Filter" autocomplete="off" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th> </th>
|
||||||
|
<td>
|
||||||
|
<input id="Config_LinkedGroup_UpdateDescriptionOff" type="hidden" name="updateDescription" value="False" disabled />
|
||||||
|
<input id="Config_LinkedGroup_UpdateDescription" type="checkbox" name="updateDescription" value="True" checked />
|
||||||
|
<label for="Config_LinkedGroup_UpdateDescription">Update Group Description</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -30,6 +38,7 @@
|
|||||||
<p class="fa-p">
|
<p class="fa-p">
|
||||||
<i class="fa fa-exclamation-circle"></i><strong>Warning:</strong> This group will be managed by Disco ICT.<br />
|
<i class="fa fa-exclamation-circle"></i><strong>Warning:</strong> This group will be managed by Disco ICT.<br />
|
||||||
Any <strong>existing members will be removed from the group</strong>, and it will be automatically synchronized with related members.
|
Any <strong>existing members will be removed from the group</strong>, and it will be automatically synchronized with related members.
|
||||||
|
If the 'Update Group Description' option is selected, the group's description will also be updated to reflect its managed status.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,9 +47,10 @@
|
|||||||
let dialog;
|
let dialog;
|
||||||
let dialogGroupId;
|
let dialogGroupId;
|
||||||
let dialogFilterDate;
|
let dialogFilterDate;
|
||||||
|
let dialogUpdateDescription;
|
||||||
let dialogTitle;
|
let dialogTitle;
|
||||||
|
|
||||||
function showDialog(groupId, filterDateOption, filterDateValue, updateUrl, title) {
|
function showDialog(groupId, filterDateOption, filterDateValue, updateUrl, title, updateDescription) {
|
||||||
if (dialog == null) {
|
if (dialog == null) {
|
||||||
dialog = $('#Config_LinkedGroup_Dialog').dialog({
|
dialog = $('#Config_LinkedGroup_Dialog').dialog({
|
||||||
width: 450,
|
width: 450,
|
||||||
@@ -57,6 +67,10 @@
|
|||||||
dateFormat: 'yy/mm/dd'
|
dateFormat: 'yy/mm/dd'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
dialogUpdateDescription = $('#Config_LinkedGroup_UpdateDescription').on('change', function () {
|
||||||
|
$('#Config_LinkedGroup_UpdateDescriptionOff').prop('disabled', $(this).prop('checked'));
|
||||||
|
});
|
||||||
|
|
||||||
dialogGroupId = $('#Config_LinkedGroup_Id');
|
dialogGroupId = $('#Config_LinkedGroup_Id');
|
||||||
dialogGroupId.focus(function () { $(this).select(); });
|
dialogGroupId.focus(function () { $(this).select(); });
|
||||||
dialogGroupId.autocomplete({
|
dialogGroupId.autocomplete({
|
||||||
@@ -109,6 +123,8 @@
|
|||||||
dialogFilterDate.closest('tr').hide();
|
dialogFilterDate.closest('tr').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dialogUpdateDescription.prop('checked', updateDescription);
|
||||||
|
|
||||||
dialogTitle.text(title);
|
dialogTitle.text(title);
|
||||||
dialog.dialog('option', 'buttons', dialogButtons);
|
dialog.dialog('option', 'buttons', dialogButtons);
|
||||||
dialog.dialog('option', 'title', 'Linked Group: ' + title);
|
dialog.dialog('option', 'title', 'Linked Group: ' + title);
|
||||||
@@ -120,11 +136,12 @@
|
|||||||
|
|
||||||
var configuredGroupId = $this.attr('data-linkedgroupid');
|
var configuredGroupId = $this.attr('data-linkedgroupid');
|
||||||
var configuredFilterBeginDate = $this.attr('data-linkedgroupfilterdate');
|
var configuredFilterBeginDate = $this.attr('data-linkedgroupfilterdate');
|
||||||
var filterDateOption = $this.attr('data-linkedgroupfilterdateoption') == 'True';
|
var filterDateOption = $this.attr('data-linkedgroupfilterdateoption') === 'True';
|
||||||
var description = $this.attr('data-linkedroupdescription');
|
var description = $this.attr('data-linkedgroupdescription');
|
||||||
var updateUrl = $this.attr('data-linkedroupupdateurl');
|
var updateUrl = $this.attr('data-linkedgroupupdateurl');
|
||||||
|
var updateDescription = $this.attr('data-linkedgroupupdatedescription') === 'True';
|
||||||
|
|
||||||
showDialog(configuredGroupId, filterDateOption, configuredFilterBeginDate, updateUrl, description);
|
showDialog(configuredGroupId, filterDateOption, configuredFilterBeginDate, updateUrl, description, updateDescription);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ WriteLiteral(" id=\"Config_LinkedGroup_Id\"");
|
|||||||
|
|
||||||
WriteLiteral(" type=\"text\"");
|
WriteLiteral(" type=\"text\"");
|
||||||
|
|
||||||
WriteLiteral(" name=\"GroupId\"");
|
WriteLiteral(" name=\"groupId\"");
|
||||||
|
|
||||||
WriteLiteral(" data-sourceurl=\"");
|
WriteLiteral(" data-sourceurl=\"");
|
||||||
|
|
||||||
@@ -121,14 +121,40 @@ WriteLiteral(" id=\"Config_LinkedGroup_FilterDate\"");
|
|||||||
|
|
||||||
WriteLiteral(" type=\"text\"");
|
WriteLiteral(" type=\"text\"");
|
||||||
|
|
||||||
WriteLiteral(" name=\"FilterBeginDate\"");
|
WriteLiteral(" name=\"filterBeginDate\"");
|
||||||
|
|
||||||
WriteLiteral(" placeholder=\"No Filter\"");
|
WriteLiteral(" placeholder=\"No Filter\"");
|
||||||
|
|
||||||
WriteLiteral(" autocomplete=\"off\"");
|
WriteLiteral(" autocomplete=\"off\"");
|
||||||
|
|
||||||
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n </tbody>\r\n " +
|
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
||||||
" </table>\r\n </form>\r\n <div");
|
" <th> </th>\r\n <td>\r\n " +
|
||||||
|
" <input");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"Config_LinkedGroup_UpdateDescriptionOff\"");
|
||||||
|
|
||||||
|
WriteLiteral(" type=\"hidden\"");
|
||||||
|
|
||||||
|
WriteLiteral(" name=\"updateDescription\"");
|
||||||
|
|
||||||
|
WriteLiteral(" value=\"False\"");
|
||||||
|
|
||||||
|
WriteLiteral(" disabled />\r\n <input");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"Config_LinkedGroup_UpdateDescription\"");
|
||||||
|
|
||||||
|
WriteLiteral(" type=\"checkbox\"");
|
||||||
|
|
||||||
|
WriteLiteral(" name=\"updateDescription\"");
|
||||||
|
|
||||||
|
WriteLiteral(" value=\"True\"");
|
||||||
|
|
||||||
|
WriteLiteral(" checked />\r\n <label");
|
||||||
|
|
||||||
|
WriteLiteral(" for=\"Config_LinkedGroup_UpdateDescription\"");
|
||||||
|
|
||||||
|
WriteLiteral(">Update Group Description</label>\r\n </td>\r\n </t" +
|
||||||
|
"r>\r\n </tbody>\r\n </table>\r\n </form>\r\n <div");
|
||||||
|
|
||||||
WriteLiteral(" class=\"info-box error\"");
|
WriteLiteral(" class=\"info-box error\"");
|
||||||
|
|
||||||
@@ -142,56 +168,64 @@ WriteLiteral(" class=\"fa fa-exclamation-circle\"");
|
|||||||
|
|
||||||
WriteLiteral("></i><strong>Warning:</strong> This group will be managed by Disco ICT.<br />\r\n " +
|
WriteLiteral("></i><strong>Warning:</strong> This group will be managed by Disco ICT.<br />\r\n " +
|
||||||
" Any <strong>existing members will be removed from the group</strong>, " +
|
" Any <strong>existing members will be removed from the group</strong>, " +
|
||||||
"and it will be automatically synchronized with related members.\r\n </p>\r\n " +
|
"and it will be automatically synchronized with related members.\r\n If " +
|
||||||
" </div>\r\n</div>\r\n<script>\r\n $(function () {\r\n let dialog;\r\n l" +
|
"the \'Update Group Description\' option is selected, the group\'s description will " +
|
||||||
"et dialogGroupId;\r\n let dialogFilterDate;\r\n let dialogTitle;\r\n\r\n " +
|
"also be updated to reflect its managed status.\r\n </p>\r\n </div>\r\n</div>" +
|
||||||
" function showDialog(groupId, filterDateOption, filterDateValue, updateUrl," +
|
"\r\n<script>\r\n $(function () {\r\n let dialog;\r\n let dialogGroupId;" +
|
||||||
" title) {\r\n if (dialog == null) {\r\n dialog = $(\'#Confi" +
|
"\r\n let dialogFilterDate;\r\n let dialogUpdateDescription;\r\n l" +
|
||||||
"g_LinkedGroup_Dialog\').dialog({\r\n width: 450,\r\n " +
|
"et dialogTitle;\r\n\r\n function showDialog(groupId, filterDateOption, filter" +
|
||||||
" resizable: false,\r\n modal: true,\r\n a" +
|
"DateValue, updateUrl, title, updateDescription) {\r\n if (dialog == nul" +
|
||||||
"utoOpen: false\r\n });\r\n\r\n dialogFilterDate = $(\'#Co" +
|
"l) {\r\n dialog = $(\'#Config_LinkedGroup_Dialog\').dialog({\r\n " +
|
||||||
"nfig_LinkedGroup_FilterDate\');\r\n dialogFilterDate.datetimepicker(" +
|
" width: 450,\r\n resizable: false,\r\n " +
|
||||||
"{\r\n ampm: true,\r\n changeYear: true,\r\n " +
|
" modal: true,\r\n autoOpen: false\r\n });\r\n\r\n " +
|
||||||
" changeMonth: true,\r\n dateFormat: \'yy/mm/dd\'\r\n " +
|
" dialogFilterDate = $(\'#Config_LinkedGroup_FilterDate\');\r\n " +
|
||||||
" });\r\n\r\n dialogGroupId = $(\'#Config_LinkedGroup_Id\'" +
|
" dialogFilterDate.datetimepicker({\r\n ampm: true,\r\n " +
|
||||||
");\r\n dialogGroupId.focus(function () { $(this).select(); });\r\n " +
|
" changeYear: true,\r\n changeMonth: true,\r\n " +
|
||||||
" dialogGroupId.autocomplete({\r\n source: dialogGro" +
|
" dateFormat: \'yy/mm/dd\'\r\n });\r\n\r\n di" +
|
||||||
"upId.attr(\'data-sourceurl\'),\r\n minLength: 2,\r\n " +
|
"alogUpdateDescription = $(\'#Config_LinkedGroup_UpdateDescription\').on(\'change\', " +
|
||||||
" select: function (e, ui) {\r\n dialogGroupId.val(ui.it" +
|
"function () {\r\n $(\'#Config_LinkedGroup_UpdateDescriptionOff\')" +
|
||||||
"em.Id);\r\n return false;\r\n }\r\n " +
|
".prop(\'disabled\', $(this).prop(\'checked\'));\r\n });\r\n\r\n " +
|
||||||
" }).data(\'ui-autocomplete\')._renderItem = function (ul, item) {\r\n " +
|
" dialogGroupId = $(\'#Config_LinkedGroup_Id\');\r\n dialogGroupId." +
|
||||||
" return $(\"<li>\")\r\n .data(\"item.autocomplete\", " +
|
"focus(function () { $(this).select(); });\r\n dialogGroupId.autocom" +
|
||||||
"item)\r\n .append(\"<a><strong>\" + item.Name + \"</strong><br" +
|
"plete({\r\n source: dialogGroupId.attr(\'data-sourceurl\'),\r\n " +
|
||||||
">\" + item.Id + \" (\" + item.Type + \")</a>\")\r\n .appendTo(ul" +
|
" minLength: 2,\r\n select: function (e, ui) {\r\n " +
|
||||||
");\r\n };\r\n\r\n dialogTitle = $(\'#Config_LinkedGroup_T" +
|
" dialogGroupId.val(ui.item.Id);\r\n r" +
|
||||||
"itle\');\r\n }\r\n\r\n var dialogButtons = {};\r\n if (!" +
|
"eturn false;\r\n }\r\n }).data(\'ui-autocomplete\')." +
|
||||||
"!groupId) {\r\n dialogButtons[\'Remove Link\'] = function () {\r\n " +
|
"_renderItem = function (ul, item) {\r\n return $(\"<li>\")\r\n " +
|
||||||
" $(this).dialog(\'disable\');\r\n dialogGroupId.val" +
|
" .data(\"item.autocomplete\", item)\r\n .ap" +
|
||||||
"(\'\');\r\n dialogGroupId.closest(\'form\').attr(\'action\', updateUr" +
|
"pend(\"<a><strong>\" + item.Name + \"</strong><br>\" + item.Id + \" (\" + item.Type + " +
|
||||||
"l).submit();\r\n }\r\n }\r\n dialogButtons[(!!gro" +
|
"\")</a>\")\r\n .appendTo(ul);\r\n };\r\n\r\n " +
|
||||||
"upId ? \'Save Changes\' : \'Link Group\')] = function () {\r\n if (!dia" +
|
" dialogTitle = $(\'#Config_LinkedGroup_Title\');\r\n }\r\n\r\n " +
|
||||||
"logGroupId.val()) {\r\n alert(\'A Linked Group must be specified" +
|
" var dialogButtons = {};\r\n if (!!groupId) {\r\n dialo" +
|
||||||
"\');\r\n return;\r\n }\r\n $(this).dia" +
|
"gButtons[\'Remove Link\'] = function () {\r\n $(this).dialog(\'dis" +
|
||||||
"log(\'disable\');\r\n dialogGroupId.closest(\'form\').attr(\'action\', up" +
|
"able\');\r\n dialogGroupId.val(\'\');\r\n dialogG" +
|
||||||
"dateUrl).submit();\r\n }\r\n dialogButtons[\'Cancel\'] = functio" +
|
"roupId.closest(\'form\').attr(\'action\', updateUrl).submit();\r\n }\r\n " +
|
||||||
"n () {\r\n $(this).dialog(\'close\');\r\n };\r\n\r\n " +
|
" }\r\n dialogButtons[(!!groupId ? \'Save Changes\' : \'Link Grou" +
|
||||||
"dialogGroupId.val(groupId);\r\n\r\n if (!!filterDateOption) {\r\n " +
|
"p\')] = function () {\r\n if (!dialogGroupId.val()) {\r\n " +
|
||||||
" if (!!filterDateValue) {\r\n dialogFilterDate.datetimepic" +
|
" alert(\'A Linked Group must be specified\');\r\n return;\r\n" +
|
||||||
"ker(\'setDate\', moment(filterDateValue).toDate());\r\n } else {\r\n " +
|
" }\r\n $(this).dialog(\'disable\');\r\n d" +
|
||||||
" dialogFilterDate.val(\'\');\r\n }\r\n d" +
|
"ialogGroupId.closest(\'form\').attr(\'action\', updateUrl).submit();\r\n }\r" +
|
||||||
"ialogFilterDate.closest(\'tr\').show();\r\n } else {\r\n dia" +
|
"\n dialogButtons[\'Cancel\'] = function () {\r\n $(this).di" +
|
||||||
"logFilterDate.closest(\'tr\').hide();\r\n }\r\n\r\n dialogTitle.te" +
|
"alog(\'close\');\r\n };\r\n\r\n dialogGroupId.val(groupId);\r\n\r\n " +
|
||||||
"xt(title);\r\n dialog.dialog(\'option\', \'buttons\', dialogButtons);\r\n " +
|
" if (!!filterDateOption) {\r\n if (!!filterDateValue) {\r\n " +
|
||||||
" dialog.dialog(\'option\', \'title\', \'Linked Group: \' + title);\r\n " +
|
" dialogFilterDate.datetimepicker(\'setDate\', moment(filterDateVa" +
|
||||||
" dialog.dialog(\'open\');\r\n }\r\n\r\n $(document).on(\'click\', \'.Config_L" +
|
"lue).toDate());\r\n } else {\r\n dialogFilterDate." +
|
||||||
"inkedGroup_LinkButton\', function () {\r\n $this = $(this);\r\n\r\n " +
|
"val(\'\');\r\n }\r\n dialogFilterDate.closest(\'tr\').show" +
|
||||||
" var configuredGroupId = $this.attr(\'data-linkedgroupid\');\r\n var co" +
|
"();\r\n } else {\r\n dialogFilterDate.closest(\'tr\').hide()" +
|
||||||
"nfiguredFilterBeginDate = $this.attr(\'data-linkedgroupfilterdate\');\r\n " +
|
";\r\n }\r\n\r\n dialogUpdateDescription.prop(\'checked\', updateDe" +
|
||||||
" var filterDateOption = $this.attr(\'data-linkedgroupfilterdateoption\') == \'True\'" +
|
"scription);\r\n\r\n dialogTitle.text(title);\r\n dialog.dialog(\'" +
|
||||||
";\r\n var description = $this.attr(\'data-linkedroupdescription\');\r\n " +
|
"option\', \'buttons\', dialogButtons);\r\n dialog.dialog(\'option\', \'title\'" +
|
||||||
" var updateUrl = $this.attr(\'data-linkedroupupdateurl\');\r\n\r\n s" +
|
", \'Linked Group: \' + title);\r\n dialog.dialog(\'open\');\r\n }\r\n\r\n " +
|
||||||
"howDialog(configuredGroupId, filterDateOption, configuredFilterBeginDate, update" +
|
" $(document).on(\'click\', \'.Config_LinkedGroup_LinkButton\', function () {\r\n" +
|
||||||
"Url, description);\r\n\r\n return false;\r\n });\r\n });\r\n</script>" +
|
" $this = $(this);\r\n\r\n var configuredGroupId = $this.attr(\'" +
|
||||||
|
"data-linkedgroupid\');\r\n var configuredFilterBeginDate = $this.attr(\'d" +
|
||||||
|
"ata-linkedgroupfilterdate\');\r\n var filterDateOption = $this.attr(\'dat" +
|
||||||
|
"a-linkedgroupfilterdateoption\') === \'True\';\r\n var description = $this" +
|
||||||
|
".attr(\'data-linkedgroupdescription\');\r\n var updateUrl = $this.attr(\'d" +
|
||||||
|
"ata-linkedgroupupdateurl\');\r\n var updateDescription = $this.attr(\'dat" +
|
||||||
|
"a-linkedgroupupdatedescription\') === \'True\';\r\n\r\n showDialog(configure" +
|
||||||
|
"dGroupId, filterDateOption, configuredFilterBeginDate, updateUrl, description, u" +
|
||||||
|
"pdateDescription);\r\n\r\n return false;\r\n });\r\n });\r\n</script>" +
|
||||||
"\r\n");
|
"\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -443,7 +443,8 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public class ActionParamsClass_UpdateDevicesLinkedGroup
|
public class ActionParamsClass_UpdateDevicesLinkedGroup
|
||||||
{
|
{
|
||||||
public readonly string id = "id";
|
public readonly string id = "id";
|
||||||
public readonly string GroupId = "GroupId";
|
public readonly string groupId = "groupId";
|
||||||
|
public readonly string updateDescription = "updateDescription";
|
||||||
public readonly string redirect = "redirect";
|
public readonly string redirect = "redirect";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_UpdateAssignedUsersLinkedGroup s_params_UpdateAssignedUsersLinkedGroup = new ActionParamsClass_UpdateAssignedUsersLinkedGroup();
|
static readonly ActionParamsClass_UpdateAssignedUsersLinkedGroup s_params_UpdateAssignedUsersLinkedGroup = new ActionParamsClass_UpdateAssignedUsersLinkedGroup();
|
||||||
@@ -453,7 +454,8 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public class ActionParamsClass_UpdateAssignedUsersLinkedGroup
|
public class ActionParamsClass_UpdateAssignedUsersLinkedGroup
|
||||||
{
|
{
|
||||||
public readonly string id = "id";
|
public readonly string id = "id";
|
||||||
public readonly string GroupId = "GroupId";
|
public readonly string groupId = "groupId";
|
||||||
|
public readonly string updateDescription = "updateDescription";
|
||||||
public readonly string redirect = "redirect";
|
public readonly string redirect = "redirect";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
||||||
@@ -753,30 +755,32 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void UpdateDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, bool redirect);
|
partial void UpdateDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string groupId, bool? updateDescription, bool redirect);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup(int id, string GroupId, bool redirect)
|
public override System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup(int id, string groupId, bool? updateDescription, bool redirect)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "groupId", groupId);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "updateDescription", updateDescription);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||||
UpdateDevicesLinkedGroupOverride(callInfo, id, GroupId, redirect);
|
UpdateDevicesLinkedGroupOverride(callInfo, id, groupId, updateDescription, redirect);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void UpdateAssignedUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, bool redirect);
|
partial void UpdateAssignedUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string groupId, bool? updateDescription, bool redirect);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId, bool redirect)
|
public override System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup(int id, string groupId, bool? updateDescription, bool redirect)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "groupId", groupId);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "updateDescription", updateDescription);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||||
UpdateAssignedUsersLinkedGroupOverride(callInfo, id, GroupId, redirect);
|
UpdateAssignedUsersLinkedGroupOverride(callInfo, id, groupId, updateDescription, redirect);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -326,8 +326,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public class ActionParamsClass_UpdateDevicesLinkedGroup
|
public class ActionParamsClass_UpdateDevicesLinkedGroup
|
||||||
{
|
{
|
||||||
public readonly string id = "id";
|
public readonly string id = "id";
|
||||||
public readonly string GroupId = "GroupId";
|
public readonly string groupId = "groupId";
|
||||||
public readonly string FilterBeginDate = "FilterBeginDate";
|
public readonly string filterBeginDate = "filterBeginDate";
|
||||||
|
public readonly string updateDescription = "updateDescription";
|
||||||
public readonly string redirect = "redirect";
|
public readonly string redirect = "redirect";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_UpdateAssignedUserLinkedGroup s_params_UpdateAssignedUserLinkedGroup = new ActionParamsClass_UpdateAssignedUserLinkedGroup();
|
static readonly ActionParamsClass_UpdateAssignedUserLinkedGroup s_params_UpdateAssignedUserLinkedGroup = new ActionParamsClass_UpdateAssignedUserLinkedGroup();
|
||||||
@@ -337,8 +338,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public class ActionParamsClass_UpdateAssignedUserLinkedGroup
|
public class ActionParamsClass_UpdateAssignedUserLinkedGroup
|
||||||
{
|
{
|
||||||
public readonly string id = "id";
|
public readonly string id = "id";
|
||||||
public readonly string GroupId = "GroupId";
|
public readonly string groupId = "groupId";
|
||||||
public readonly string FilterBeginDate = "FilterBeginDate";
|
public readonly string filterBeginDate = "filterBeginDate";
|
||||||
|
public readonly string updateDescription = "updateDescription";
|
||||||
public readonly string redirect = "redirect";
|
public readonly string redirect = "redirect";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
||||||
@@ -550,32 +552,34 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void UpdateDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, System.DateTime? FilterBeginDate, bool redirect);
|
partial void UpdateDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string groupId, System.DateTime? filterBeginDate, bool? updateDescription, bool redirect);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup(int id, string GroupId, System.DateTime? FilterBeginDate, bool redirect)
|
public override System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup(int id, string groupId, System.DateTime? filterBeginDate, bool? updateDescription, bool redirect)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "groupId", groupId);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "FilterBeginDate", FilterBeginDate);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "filterBeginDate", filterBeginDate);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "updateDescription", updateDescription);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||||
UpdateDevicesLinkedGroupOverride(callInfo, id, GroupId, FilterBeginDate, redirect);
|
UpdateDevicesLinkedGroupOverride(callInfo, id, groupId, filterBeginDate, updateDescription, redirect);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void UpdateAssignedUserLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, System.DateTime? FilterBeginDate, bool redirect);
|
partial void UpdateAssignedUserLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string groupId, System.DateTime? filterBeginDate, bool? updateDescription, bool redirect);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult UpdateAssignedUserLinkedGroup(int id, string GroupId, System.DateTime? FilterBeginDate, bool redirect)
|
public override System.Web.Mvc.ActionResult UpdateAssignedUserLinkedGroup(int id, string groupId, System.DateTime? filterBeginDate, bool? updateDescription, bool redirect)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUserLinkedGroup);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUserLinkedGroup);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "groupId", groupId);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "FilterBeginDate", FilterBeginDate);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "filterBeginDate", filterBeginDate);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "updateDescription", updateDescription);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||||
UpdateAssignedUserLinkedGroupOverride(callInfo, id, GroupId, FilterBeginDate, redirect);
|
UpdateAssignedUserLinkedGroupOverride(callInfo, id, groupId, filterBeginDate, updateDescription, redirect);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -474,7 +474,8 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public class ActionParamsClass_UpdateDevicesLinkedGroup
|
public class ActionParamsClass_UpdateDevicesLinkedGroup
|
||||||
{
|
{
|
||||||
public readonly string id = "id";
|
public readonly string id = "id";
|
||||||
public readonly string GroupId = "GroupId";
|
public readonly string groupId = "groupId";
|
||||||
|
public readonly string updateDescription = "updateDescription";
|
||||||
public readonly string redirect = "redirect";
|
public readonly string redirect = "redirect";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_UpdateAssignedUsersLinkedGroup s_params_UpdateAssignedUsersLinkedGroup = new ActionParamsClass_UpdateAssignedUsersLinkedGroup();
|
static readonly ActionParamsClass_UpdateAssignedUsersLinkedGroup s_params_UpdateAssignedUsersLinkedGroup = new ActionParamsClass_UpdateAssignedUsersLinkedGroup();
|
||||||
@@ -484,7 +485,8 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public class ActionParamsClass_UpdateAssignedUsersLinkedGroup
|
public class ActionParamsClass_UpdateAssignedUsersLinkedGroup
|
||||||
{
|
{
|
||||||
public readonly string id = "id";
|
public readonly string id = "id";
|
||||||
public readonly string GroupId = "GroupId";
|
public readonly string groupId = "groupId";
|
||||||
|
public readonly string updateDescription = "updateDescription";
|
||||||
public readonly string redirect = "redirect";
|
public readonly string redirect = "redirect";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
||||||
@@ -802,30 +804,32 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void UpdateDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, bool redirect);
|
partial void UpdateDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string groupId, bool? updateDescription, bool redirect);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup(int id, string GroupId, bool redirect)
|
public override System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup(int id, string groupId, bool? updateDescription, bool redirect)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "groupId", groupId);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "updateDescription", updateDescription);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||||
UpdateDevicesLinkedGroupOverride(callInfo, id, GroupId, redirect);
|
UpdateDevicesLinkedGroupOverride(callInfo, id, groupId, updateDescription, redirect);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void UpdateAssignedUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, bool redirect);
|
partial void UpdateAssignedUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string groupId, bool? updateDescription, bool redirect);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId, bool redirect)
|
public override System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup(int id, string groupId, bool? updateDescription, bool redirect)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "groupId", groupId);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "updateDescription", updateDescription);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||||
UpdateAssignedUsersLinkedGroupOverride(callInfo, id, GroupId, redirect);
|
UpdateAssignedUsersLinkedGroupOverride(callInfo, id, groupId, updateDescription, redirect);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -545,8 +545,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public class ActionParamsClass_UpdateDevicesLinkedGroup
|
public class ActionParamsClass_UpdateDevicesLinkedGroup
|
||||||
{
|
{
|
||||||
public readonly string id = "id";
|
public readonly string id = "id";
|
||||||
public readonly string GroupId = "GroupId";
|
public readonly string groupId = "groupId";
|
||||||
public readonly string FilterBeginDate = "FilterBeginDate";
|
public readonly string filterBeginDate = "filterBeginDate";
|
||||||
|
public readonly string updateDescription = "updateDescription";
|
||||||
public readonly string redirect = "redirect";
|
public readonly string redirect = "redirect";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_UpdateUsersLinkedGroup s_params_UpdateUsersLinkedGroup = new ActionParamsClass_UpdateUsersLinkedGroup();
|
static readonly ActionParamsClass_UpdateUsersLinkedGroup s_params_UpdateUsersLinkedGroup = new ActionParamsClass_UpdateUsersLinkedGroup();
|
||||||
@@ -556,8 +557,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public class ActionParamsClass_UpdateUsersLinkedGroup
|
public class ActionParamsClass_UpdateUsersLinkedGroup
|
||||||
{
|
{
|
||||||
public readonly string id = "id";
|
public readonly string id = "id";
|
||||||
public readonly string GroupId = "GroupId";
|
public readonly string groupId = "groupId";
|
||||||
public readonly string FilterBeginDate = "FilterBeginDate";
|
public readonly string filterBeginDate = "filterBeginDate";
|
||||||
|
public readonly string updateDescription = "updateDescription";
|
||||||
public readonly string redirect = "redirect";
|
public readonly string redirect = "redirect";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_ImporterThumbnail s_params_ImporterThumbnail = new ActionParamsClass_ImporterThumbnail();
|
static readonly ActionParamsClass_ImporterThumbnail s_params_ImporterThumbnail = new ActionParamsClass_ImporterThumbnail();
|
||||||
@@ -1016,32 +1018,34 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void UpdateDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string GroupId, System.DateTime? FilterBeginDate, bool redirect);
|
partial void UpdateDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string groupId, System.DateTime? filterBeginDate, bool? updateDescription, bool redirect);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup(string id, string GroupId, System.DateTime? FilterBeginDate, bool redirect)
|
public override System.Web.Mvc.ActionResult UpdateDevicesLinkedGroup(string id, string groupId, System.DateTime? filterBeginDate, bool? updateDescription, bool redirect)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDevicesLinkedGroup);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "groupId", groupId);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "FilterBeginDate", FilterBeginDate);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "filterBeginDate", filterBeginDate);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "updateDescription", updateDescription);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||||
UpdateDevicesLinkedGroupOverride(callInfo, id, GroupId, FilterBeginDate, redirect);
|
UpdateDevicesLinkedGroupOverride(callInfo, id, groupId, filterBeginDate, updateDescription, redirect);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void UpdateUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string GroupId, System.DateTime? FilterBeginDate, bool redirect);
|
partial void UpdateUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string groupId, System.DateTime? filterBeginDate, bool? updateDescription, bool redirect);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult UpdateUsersLinkedGroup(string id, string GroupId, System.DateTime? FilterBeginDate, bool redirect)
|
public override System.Web.Mvc.ActionResult UpdateUsersLinkedGroup(string id, string groupId, System.DateTime? filterBeginDate, bool? updateDescription, bool redirect)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateUsersLinkedGroup);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateUsersLinkedGroup);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "groupId", groupId);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "FilterBeginDate", FilterBeginDate);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "filterBeginDate", filterBeginDate);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "updateDescription", updateDescription);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||||
UpdateUsersLinkedGroupOverride(callInfo, id, GroupId, FilterBeginDate, redirect);
|
UpdateUsersLinkedGroupOverride(callInfo, id, groupId, filterBeginDate, updateDescription, redirect);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -326,8 +326,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public class ActionParamsClass_UpdateAssignedUsersLinkedGroup
|
public class ActionParamsClass_UpdateAssignedUsersLinkedGroup
|
||||||
{
|
{
|
||||||
public readonly string id = "id";
|
public readonly string id = "id";
|
||||||
public readonly string GroupId = "GroupId";
|
public readonly string groupId = "groupId";
|
||||||
public readonly string FilterBeginDate = "FilterBeginDate";
|
public readonly string filterBeginDate = "filterBeginDate";
|
||||||
|
public readonly string updateDescription = "updateDescription";
|
||||||
public readonly string redirect = "redirect";
|
public readonly string redirect = "redirect";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_UpdateAssignedUserDevicesLinkedGroup s_params_UpdateAssignedUserDevicesLinkedGroup = new ActionParamsClass_UpdateAssignedUserDevicesLinkedGroup();
|
static readonly ActionParamsClass_UpdateAssignedUserDevicesLinkedGroup s_params_UpdateAssignedUserDevicesLinkedGroup = new ActionParamsClass_UpdateAssignedUserDevicesLinkedGroup();
|
||||||
@@ -337,8 +338,9 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
public class ActionParamsClass_UpdateAssignedUserDevicesLinkedGroup
|
public class ActionParamsClass_UpdateAssignedUserDevicesLinkedGroup
|
||||||
{
|
{
|
||||||
public readonly string id = "id";
|
public readonly string id = "id";
|
||||||
public readonly string GroupId = "GroupId";
|
public readonly string groupId = "groupId";
|
||||||
public readonly string FilterBeginDate = "FilterBeginDate";
|
public readonly string filterBeginDate = "filterBeginDate";
|
||||||
|
public readonly string updateDescription = "updateDescription";
|
||||||
public readonly string redirect = "redirect";
|
public readonly string redirect = "redirect";
|
||||||
}
|
}
|
||||||
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
||||||
@@ -550,32 +552,34 @@ namespace Disco.Web.Areas.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void UpdateAssignedUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, System.DateTime? FilterBeginDate, bool redirect);
|
partial void UpdateAssignedUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string groupId, System.DateTime? filterBeginDate, bool? updateDescription, bool redirect);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId, System.DateTime? FilterBeginDate, bool redirect)
|
public override System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup(int id, string groupId, System.DateTime? filterBeginDate, bool? updateDescription, bool redirect)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "groupId", groupId);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "FilterBeginDate", FilterBeginDate);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "filterBeginDate", filterBeginDate);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "updateDescription", updateDescription);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||||
UpdateAssignedUsersLinkedGroupOverride(callInfo, id, GroupId, FilterBeginDate, redirect);
|
UpdateAssignedUsersLinkedGroupOverride(callInfo, id, groupId, filterBeginDate, updateDescription, redirect);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
partial void UpdateAssignedUserDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, System.DateTime? FilterBeginDate, bool redirect);
|
partial void UpdateAssignedUserDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string groupId, System.DateTime? filterBeginDate, bool? updateDescription, bool redirect);
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public override System.Web.Mvc.ActionResult UpdateAssignedUserDevicesLinkedGroup(int id, string GroupId, System.DateTime? FilterBeginDate, bool redirect)
|
public override System.Web.Mvc.ActionResult UpdateAssignedUserDevicesLinkedGroup(int id, string groupId, System.DateTime? filterBeginDate, bool? updateDescription, bool redirect)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUserDevicesLinkedGroup);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUserDevicesLinkedGroup);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "groupId", groupId);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "FilterBeginDate", FilterBeginDate);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "filterBeginDate", filterBeginDate);
|
||||||
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "updateDescription", updateDescription);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||||
UpdateAssignedUserDevicesLinkedGroupOverride(callInfo, id, GroupId, FilterBeginDate, redirect);
|
UpdateAssignedUserDevicesLinkedGroupOverride(callInfo, id, groupId, filterBeginDate, updateDescription, redirect);
|
||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user