diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Reports/ReportsDataBusiness.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Reports/ReportsDataBusiness.cs index 80f7b117c1..3e923e761d 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Reports/ReportsDataBusiness.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Reports/ReportsDataBusiness.cs @@ -5,6 +5,7 @@ // //////////////////////////////// using CSETWebCore.Business.Acet; +using CSETWebCore.Business.Aggregation; using CSETWebCore.Business.Maturity; using CSETWebCore.Business.Question; using CSETWebCore.Business.Sal; @@ -1726,8 +1727,14 @@ on a.Mat_Question_Id equals q.Mat_Question_Id } - - + public string GetCsetVersion() + { + return _context.CSET_VERSION.Select(x => x.Cset_Version1).FirstOrDefault(); + } + public string GetAssessmentGuid(int assessmentId) + { + return _context.ASSESSMENTS.Where(x => x.Assessment_Id == assessmentId).Select(x => x.Assessment_GUID).FirstOrDefault().ToString(); + } } } diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Interfaces/Reports/IReportsDataBusiness.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Interfaces/Reports/IReportsDataBusiness.cs index c242b904dc..7af16eaf7d 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Interfaces/Reports/IReportsDataBusiness.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Interfaces/Reports/IReportsDataBusiness.cs @@ -26,6 +26,8 @@ public interface IReportsDataBusiness List GetIseAllQuestionList(); List GetIseSourceFiles(); + string GetCsetVersion(); + string GetAssessmentGuid(int assessmentId); List GetDomains(); void BuildSubGroupings(MaturityGrouping g, int? parentID, diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Reports/MaturityBasicReportData.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Reports/MaturityBasicReportData.cs index 057219a163..0193c2cb23 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Reports/MaturityBasicReportData.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Reports/MaturityBasicReportData.cs @@ -29,6 +29,7 @@ public class MaturityBasicReportData public List QuestionsList { get; set; } public List MatAnsweredQuestions { get; set; } public string AssessmentGuid { get; set; } + public string CsetVersion { get; set; } /// /// Gets the parent questions missing from the given list. Requires the QuestionsList diff --git a/CSETWebApi/CSETWeb_Api/CSETWeb_ApiCore/Controllers/ReportACETWebController.cs b/CSETWebApi/CSETWeb_Api/CSETWeb_ApiCore/Controllers/ReportACETWebController.cs index 2451075b3a..27c8453ecf 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWeb_ApiCore/Controllers/ReportACETWebController.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWeb_ApiCore/Controllers/ReportACETWebController.cs @@ -98,8 +98,8 @@ public IActionResult GetIseAllQuestions() data.MatAnsweredQuestions = _report.GetIseAllQuestionList(); data.Information = _report.GetInformation(); - var assessInfo = _context.ASSESSMENTS.Where(x => x.Assessment_Id == assessmentId).FirstOrDefault(); - data.AssessmentGuid = assessInfo.Assessment_GUID.ToString(); + data.AssessmentGuid = _report.GetAssessmentGuid(assessmentId); + data.CsetVersion = _report.GetCsetVersion(); return Ok(data); } diff --git a/CSETWebNg/src/app/assessment/results/reports/reports.component.html b/CSETWebNg/src/app/assessment/results/reports/reports.component.html index cfa8d659f4..26e5ef3789 100644 --- a/CSETWebNg/src/app/assessment/results/reports/reports.component.html +++ b/CSETWebNg/src/app/assessment/results/reports/reports.component.html @@ -310,18 +310,6 @@

{{ t('acet.acet reports') }}

-

ISE Reports

- - -
-
- -
- "Submit" button is disabled until all required fields on the 'Assessment Configuration' page have been specified. -
-
-
-

ISE Reports

diff --git a/CSETWebNg/src/app/services/ncua.service.ts b/CSETWebNg/src/app/services/ncua.service.ts index a2d2a8a0be..db3c3cb00b 100644 --- a/CSETWebNg/src/app/services/ncua.service.ts +++ b/CSETWebNg/src/app/services/ncua.service.ts @@ -106,7 +106,8 @@ let headers = { "examLevel": '', "region": 0, "guid": '', - "version": '' + "acet_version": '', + "db_version": '' }, "issuesTotal": { "dors": 0, @@ -461,7 +462,7 @@ let headers = { this.questions = r; this.information = this.questions.information; this.examLevel = this.getExamLevel(); - + // goes through domains for (let i = 0; i < this.questions?.matAnsweredQuestions[0]?.assessmentFactors?.length; i++) { let domain = this.questions?.matAnsweredQuestions[0]?.assessmentFactors[i]; @@ -587,7 +588,8 @@ let headers = { "examLevel": this.examLevel, "region": this.assessmentSvc.assessment.regionCode, "guid": this.questions.assessmentGuid, - "version": environment.visibleVersion + "acet_version": environment.visibleVersion, + "db_version": this.questions.csetVersion }; this.jsonString.metaData = metaDataInfo; @@ -725,7 +727,9 @@ let headers = { "examLevel": '', "region": 0, "stateLed": false, - "guid": '' + "guid": '', + "acet_version": '', + "db_version": '' }, "issuesTotal": { "dors": 0,