Status when loading AD Organisational Units

Large domains can take significant time (several seconds) to load the
domain structure (where there are 1000's of OUs)
This commit is contained in:
Gary Sharp
2014-04-17 13:08:37 +10:00
parent d86280ae3e
commit 4fc6c3ca9f
8 changed files with 199 additions and 134 deletions
@@ -275,7 +275,12 @@ namespace Disco.Web.Areas.API.Controllers
.Select(d => new Models.System.DomainOrganisationalUnitsModel() { Domain = d, OrganisationalUnits = ActiveDirectory.RetrieveOrganisationalUnitStructure(d) })
.Select(ous => ous.ToFancyTreeNode()).ToList();
return Json(domainOUs, JsonRequestBehavior.AllowGet);
return new JsonResult()
{
Data = domainOUs,
JsonRequestBehavior = JsonRequestBehavior.AllowGet,
MaxJsonLength = int.MaxValue
};
}
#endregion