public static DashboardEntity GetHomePageDashboard() { var result = GetDashboard(false, null); if (result == null) { return(null); } using (ViewLogLogic.LogView(result.ToLite(), "GetHomePageDashboard")) return(result); }
public static UserChartEntity RetrieveUserChart(this Lite <UserChartEntity> userChart) { using (ViewLogLogic.LogView(userChart, "UserChart")) { var result = UserCharts.Value.GetOrThrow(userChart); var isAllowed = Schema.Current.GetInMemoryFilter <UserChartEntity>(userInterface: false); if (!isAllowed(result)) { throw new EntityNotFoundException(userChart.EntityType, userChart.Id); } return(result); } }
public static DashboardEntity RetrieveDashboard(this Lite <DashboardEntity> dashboard) { using (ViewLogLogic.LogView(dashboard, "Dashboard")) { var result = Dashboards.Value.GetOrThrow(dashboard); var isAllowed = Schema.Current.GetInMemoryFilter <DashboardEntity>(userInterface: true); if (!isAllowed(result)) { throw new EntityNotFoundException(dashboard.EntityType, dashboard.Id); } return(result); } }
public static DashboardEntity GetEmbeddedDashboard(Type entityType) { var isAllowed = Schema.Current.GetInMemoryFilter <DashboardEntity>(userInterface: true); var result = DashboardsByType.Value.TryGetC(entityType).EmptyIfNull().Select(Dashboards.Value.GetOrThrow) .Where(d => d.EmbeddedInEntity.Value != DashboardEmbedededInEntity.None && isAllowed(d)) .OrderByDescending(a => a.DashboardPriority).FirstOrDefault(); if (result == null) { return(null); } using (ViewLogLogic.LogView(result.ToLite(), "GetEmbeddedDashboard")) return(result); }
public static List <DashboardEntity> GetEmbeddedDashboards(Type entityType) { var isAllowed = Schema.Current.GetInMemoryFilter <DashboardEntity>(userInterface: false); var result = DashboardsByType.Value.TryGetC(entityType).EmptyIfNull().Select(lite => Dashboards.Value.GetOrThrow(lite)) .Where(d => d.EmbeddedInEntity != DashboardEmbedededInEntity.None && isAllowed(d)) .OrderByDescending(a => a.DashboardPriority) .ToList(); if (!result.Any()) { return(result); } foreach (var item in result) { using (ViewLogLogic.LogView(item.ToLite(), "GetEmbeddedDashboards")) { } } return(result); }
static IDisposable Manager_RetrievingForView(Lite <Entity> lite) { return(ViewLogLogic.LogView(lite, "WebRetrieve")); }
private static IDisposable?ExecutionMode_OnApiRetrieved(Entity entity, string url) { return(ViewLogLogic.LogView(entity.ToLite(), url)); }