public IList <GraphDto> GetGraphs(bool includeRevisionGraphs = false) { var graphNames = _graphManagementRepo.GetGraphs(includeRevisionGraphs); var graphConfigs = _graphConfigurationService.GetConfigurationOverview(); var currentGraphConfig = graphConfigs.FirstOrDefault(); var historicGraphConfigs = graphConfigs.Where(t => t != currentGraphConfig); var graphs = graphNames.Select(graph => { var graphUri = new Uri(graph); if (IsActiveGraph(graph, currentGraphConfig)) { return(new GraphDto(graphUri, Common.Enums.Graph.GraphStatus.Active, currentGraphConfig.StartDateTime)); } if (historicGraphConfigs.TryGetFirstOrDefault(c => c.Graphs.Contains(graph), out var historicGraphConfig)) { return(new GraphDto(graphUri, Common.Enums.Graph.GraphStatus.Historic, historicGraphConfig.StartDateTime)); } return(new GraphDto(graphUri, Common.Enums.Graph.GraphStatus.Unreferenced, string.Empty)); }).ToList(); return(graphs); }
public IActionResult GetHistoricOverviewList() { var result = _MetadataGraphConfigurationService.GetConfigurationOverview(); return(Ok(result)); }