@using Newtonsoft.Json @using BTCPayServer.Services @using BTCPayServer.Services.Reporting @using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Contracts @using BTCPayServer.Plugins.DynamicReports @model BTCPayServer.Plugins.DynamicReports.DynamicReportViewModel @inject IScopeProvider ScopeProvider @inject ReportService ReportService @inject DynamicReportService DynamicReportService @{ var storeId = ScopeProvider.GetCurrentStoreId(); var reportName = Context.Request.Query["reportName"].ToString(); reportName = string.IsNullOrEmpty(reportName) ? null : reportName; var existingReports = ReportService.ReportProviders.Where(pair => pair.Value is PostgresReportProvider).Select(pair => pair.Key).ToList(); ViewData.SetActivePage("DynamicReports", reportName is null ? "Create dynamic report" : $"Edit {reportName} dynamic report", reportName); }