U4-9768 Examine Management dashboard indexers and searchers not in same order

This commit is contained in:
Shannon
2017-04-19 14:53:46 +10:00
parent 460dd69884
commit 7c491c1fc1

View File

@@ -74,7 +74,11 @@ namespace Umbraco.Web.WebServices
/// <returns></returns>
public IEnumerable<ExamineIndexerModel> GetIndexerDetails()
{
return ExamineManager.Instance.IndexProviderCollection.Select(CreateModel);
return ExamineManager.Instance.IndexProviderCollection.Select(CreateModel).OrderBy(x =>
{
//order by name , but strip the "Indexer" from the end if it exists
return x.Name.TrimEnd("Indexer");
});
}
/// <summary>
@@ -99,6 +103,10 @@ namespace Umbraco.Web.WebServices
indexerModel.ProviderProperties.Add(p.Name, p.GetValue(searcher, null).ToString());
}
return indexerModel;
}).OrderBy(x =>
{
//order by name , but strip the "Searcher" from the end if it exists
return x.Name.TrimEnd("Searcher");
}));
return model;
}