diff --git a/src/KPI Generator/Reporting.cs b/src/KPI Generator/Reporting.cs index 403295dba0a982a16cc8a0c751b8b1850a54a9e5..aa9f7ad9c0d10e54858b9ebe0f673c12a7170cfe 100644 --- a/src/KPI Generator/Reporting.cs +++ b/src/KPI Generator/Reporting.cs @@ -24,7 +24,6 @@ public abstract class Reporting<O> where O : class private static string InstanceName { get; set; } = null!; public virtual string ReportingFileName { get; init; } = null!; - public readonly Organization _otherOrganization = new() { Name = "Other", @@ -37,7 +36,6 @@ public abstract class Reporting<O> where O : class /// <remarks>https://git.rwth-aachen.de/coscine/reporting/reporting-database</remarks> private static readonly int ReportingDatabaseProjectId = 75304; - public Reporting(O options) { InstanceName = this.GetType().Name; @@ -71,7 +69,6 @@ public abstract class Reporting<O> where O : class return success; } - private async Task<bool> PublishAsync(IEnumerable<ReportingFileObject> files) { try @@ -180,6 +177,7 @@ public abstract class Reporting<O> where O : class { return string.Format("General/{0}", fileName); } + public static string GetReportingPathOrganization(string organizationRor, string fileName) { return string.Format("Organizations/{0}/{1}", organizationRor, fileName); @@ -190,4 +188,4 @@ public abstract class Reporting<O> where O : class byte[] byteArray = Encoding.UTF8.GetBytes(contents); return new MemoryStream(byteArray); } -} +} \ No newline at end of file diff --git a/src/KPI Generator/Reportings/Resource/ResourceReporting.cs b/src/KPI Generator/Reportings/Resource/ResourceReporting.cs index ba2081d5148b0cb9883ca6f205805a3717a4ab32..845dfe026cd46cd9ff4b7c5dbf9a6349492b0c1e 100644 --- a/src/KPI Generator/Reportings/Resource/ResourceReporting.cs +++ b/src/KPI Generator/Reportings/Resource/ResourceReporting.cs @@ -22,7 +22,6 @@ public class ResourceReporting : Reporting<ResourceReportingOptions> _projectResourceModel = new ProjectResourceModel(); } - public override IEnumerable<ReportingFileObject> GenerateReporting() { var resources = _resourceModel.GetAllWhere(r => r.Deleted.Equals(true) || r.Deleted.Equals(false)); @@ -68,7 +67,6 @@ public class ResourceReporting : Reporting<ResourceReportingOptions> return returnObjects; } - private IEnumerable<ReportingFileObject> GeneratePerOrganization(List<ReturnObject> returnObjects) { var reportingFilesPerOrganization = new List<ReportingFileObject>(); @@ -100,7 +98,7 @@ public class ResourceReporting : Reporting<ResourceReportingOptions> } catch { - Console.WriteLine($"There is no project related to resouce with ID \"{resourceId}\"."); + Console.WriteLine($"There is no project related to resource with ID \"{resourceId}\"."); return null; } } @@ -114,11 +112,10 @@ public class ResourceReporting : Reporting<ResourceReportingOptions> } catch { - Console.WriteLine($"No resource type definition found for resouce with ID \"{resource.Id}\"."); + Console.WriteLine($"No resource type definition found for resource with ID \"{resource.Id}\"."); resourceTypeDefinition = null; } - if (resourceTypeDefinition is not null && resourceTypeDefinition.GetResourceTypeInformation().Result.IsQuotaAdjustable) { return Helpers.CreateResourceQuotaReturnObject(resource, resourceTypeDefinition); @@ -154,5 +151,4 @@ public class ResourceReporting : Reporting<ResourceReportingOptions> } return result; } -} - +} \ No newline at end of file