Skip to content

Commit

Permalink
Merge branch 'develop' into feature/CR-47
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrwins committed Jan 29, 2024
2 parents 7067577 + dde82cb commit 543dd73
Show file tree
Hide file tree
Showing 1,978 changed files with 16,091 additions and 14,459 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!----------------------
Copyright 2023 Battelle Energy Alliance, LLC
Copyright 2024 Battelle Energy Alliance, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -22,13 +23,15 @@
SOFTWARE.
-------------------------->
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>{{subject}}</title>

{{inline-stylesheet}}
</head>

<body>
<table class="email-wrapper" style="width: 100%" cellpadding="0" cellspacing="0">
<tr>
Expand All @@ -46,9 +49,15 @@
<td class="content-cell">
<p>{{name}}</p>
<p>
Hello, thank you for participating in CyberSecureFlorida! We noticed that you have not yet completed your assessment and wanted to see if you were having technical difficulties, had a question, or needed assistance to complete your submission. If so, please contact us at secureflorida@cyberflorida.org, and a team member will respond. Note: this message is automated, and your information remains anonymous and secure.
Hello, thank you for participating in CyberSecureFlorida! We noticed that
you have not yet completed your assessment and wanted to see if you were
having technical difficulties, had a question, or needed assistance to
complete your submission. If so, please contact us at
secureflorida@cyberflorida.org, and a team member will respond. Note: this
message is automated, and your information remains anonymous and secure.
</p>
<p class="cset-app-link"><a href="{{rootUrl}}">Click here to login to view your CSET assessment</a></p>
<p class="cset-app-link"><a href="{{rootUrl}}">Click here to login to view your
CSET assessment</a></p>
<p>
Thanks,
<br />The CSET Team
Expand All @@ -57,7 +66,7 @@
</tr>
</table>
</td>
</tr>
</tr>
</table>

{{email-footer-CF}}
Expand All @@ -66,4 +75,5 @@
</tr>
</table>
</body>
</html>

</html>
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!----------------------
Copyright 2023 Battelle Energy Alliance, LLC
Copyright 2024 Battelle Energy Alliance, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -22,18 +23,20 @@
SOFTWARE.
-------------------------->
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>{{subject}}</title>

{{inline-stylesheet}}
</head>

<body>
<table class="email-wrapper" style="width: 100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table class="email-content" style="width: 100%" cellpadding="0" cellspacing="0">
<table class="email-content" style="width: 100%" cellpadding="0" cellspacing="0">
<!-- Email Body -->
<tr>
<td class="email-body" width="100%" cellpadding="0" cellspacing="0">
Expand All @@ -46,7 +49,8 @@
Download the attachment to see new participants.

</p>
<p class="cset-app-link"><a href="{{rootUrl}}">Click here to login to Cybersecure Florida CSET</a></p>
<p class="cset-app-link"><a href="{{rootUrl}}">Click here to login to
Cybersecure Florida CSET</a></p>
<p>
Thanks,
<br />The CSET Team
Expand All @@ -55,10 +59,11 @@
</tr>
</table>
</td>
</tr>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

</html>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
////////////////////////////////
//
// Copyright 2023 Battelle Energy Alliance, LLC
// Copyright 2024 Battelle Energy Alliance, LLC
//
//
////////////////////////////////
Expand Down Expand Up @@ -113,8 +113,8 @@ public int GetOverallIrpNumber(int assessmentId)
public Model.Acet.ACETDashboard GetIrpCalculation(int assessmentId)
{
Model.Acet.ACETDashboard result = new Model.Acet.ACETDashboard();


// now just properties on an Assessment
ASSESSMENTS assessment = _context.ASSESSMENTS.FirstOrDefault(a => a.Assessment_Id == assessmentId);
if (assessment == null) { return null; }
Expand Down Expand Up @@ -192,7 +192,7 @@ public Model.Acet.ACETDashboard GetIrpCalculation(int assessmentId)
{
_maturity.PersistMaturityLevel(assessmentId, result.SumRiskLevel);
}
else
else
{
_maturity.PersistMaturityLevel(assessmentId, result.Override);
}
Expand Down
12 changes: 6 additions & 6 deletions CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Acet/AcetBusiness.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
////////////////////////////////
//
// Copyright 2023 Battelle Energy Alliance, LLC
// Copyright 2024 Battelle Energy Alliance, LLC
//
//
////////////////////////////////
Expand Down Expand Up @@ -102,7 +102,7 @@ public int GetOverallIrpNumber(int assessmentId)
public Model.Acet.ACETDashboard GetIrpCalculation(int assessmentId)
{
Model.Acet.ACETDashboard result = new Model.Acet.ACETDashboard();

// now just properties on an Assessment
ASSESSMENTS assessment = _context.ASSESSMENTS.FirstOrDefault(a => a.Assessment_Id == assessmentId);
if (assessment == null) { return null; }
Expand Down Expand Up @@ -223,10 +223,10 @@ public static Dictionary<int, SpanishQuestionRow> buildQuestionDictionary()

String defaultPath = "App_Data\\ACET Spanish Question Mapping.xlsx";
MemoryStream memStream = new MemoryStream();
if(Path.Exists("..\\CSETWebCore.Business\\App_Data\\ACET Spanish Question Mapping.xlsx"))
if (Path.Exists("..\\CSETWebCore.Business\\App_Data\\ACET Spanish Question Mapping.xlsx"))
{
defaultPath = "..\\CSETWebCore.Business\\App_Data\\ACET Spanish Question Mapping.xlsx";
}
}
else if (!Path.Exists(defaultPath))
{
return new Dictionary<int, SpanishQuestionRow>();
Expand Down Expand Up @@ -304,7 +304,7 @@ public static Dictionary<int, GroupingSpanishRow> buildGroupingDictionary()

public static Dictionary<string, GroupingSpanishRow> buildResultsGroupingDictionary()
{

String defaultPath = "App_Data\\Spanish ACET Groupings.xlsx";
MemoryStream memStream = new MemoryStream();
if (Path.Exists("..\\CSETWebCore.Business\\App_Data\\Spanish ACET Groupings.xlsx"))
Expand Down Expand Up @@ -410,7 +410,7 @@ public static Dictionary<int, IRPSpanishRow> buildIRPHeaderDictionary()

var rowCount = myExcelObjects.Count;
var dict = new Dictionary<int, IRPSpanishRow>();

foreach (RowInfo<IRPSpanishRow> item in myExcelObjects)
{
try
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
////////////////////////////////
//
// Copyright 2023 Battelle Energy Alliance, LLC
// Copyright 2024 Battelle Energy Alliance, LLC
//
//
////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
////////////////////////////////
//
// Copyright 2023 Battelle Energy Alliance, LLC
// Copyright 2024 Battelle Energy Alliance, LLC
//
//
////////////////////////////////
Expand Down Expand Up @@ -68,7 +68,7 @@ public AggregationBusiness(CSETContext context)
myAllowedAggregIDs.Add(agg.AggregationID);
}

return l.OrderBy(x => x.AggregationDate).ToList();
return l.OrderBy(x => x.AggregationDate).ToList();
}


Expand Down Expand Up @@ -169,9 +169,9 @@ public int SaveAggregationInformation(int aggregationId, CSETWebCore.Model.Aggre
/// <param name="aggregationId"></param>
public void DeleteAggregation(int aggregationId)
{
_context.AGGREGATION_ASSESSMENT.RemoveRange(
_context.AGGREGATION_ASSESSMENT.Where(x => x.Aggregation_Id == aggregationId)
);
_context.AGGREGATION_ASSESSMENT.RemoveRange(
_context.AGGREGATION_ASSESSMENT.Where(x => x.Aggregation_Id == aggregationId)
);

_context.AGGREGATION_INFORMATION.RemoveRange(
_context.AGGREGATION_INFORMATION.Where(x => x.AggregationID == aggregationId)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
////////////////////////////////
//
// Copyright 2023 Battelle Energy Alliance, LLC
// Copyright 2024 Battelle Energy Alliance, LLC
//
//
////////////////////////////////
Expand Down Expand Up @@ -135,7 +135,7 @@ public List<BarChartX> GetMaturityModels(int aggId)
}

// Restructure the data into chart.js format

foreach (var m in modelList)
{
var c = new BarChartX();
Expand All @@ -145,7 +145,8 @@ public List<BarChartX> GetMaturityModels(int aggId)
c.Labels = m.Categories.Select(x => x.CategoryTitle).ToList();

// sort assessment datasets by alias
assessments.OrderBy(x => x.Alias).ToList().ForEach(a => {
assessments.OrderBy(x => x.Alias).ToList().ForEach(a =>
{
if (datasetDict.ContainsKey($"{m.ModelName} {a.Assessment_Id}"))
{
c.Datasets.Add(datasetDict[$"{m.ModelName} {a.Assessment_Id}"]);
Expand Down Expand Up @@ -260,5 +261,5 @@ public class Assessment




}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
////////////////////////////////
//
// Copyright 2023 Battelle Energy Alliance, LLC
// Copyright 2024 Battelle Energy Alliance, LLC
//
//
////////////////////////////////
Expand All @@ -16,7 +16,7 @@

namespace CSETWebCore.Business.Analytics
{
public class AnalyticsBusiness: IAnalyticsBusiness
public class AnalyticsBusiness : IAnalyticsBusiness
{
private CSETContext _context;

Expand All @@ -25,28 +25,28 @@ public AnalyticsBusiness(CSETContext context)
_context = context;

}


public List<AnalyticsMinMaxAvgMedianByGroup> getMaturityDashboardData(int maturity_model_id, int? sectorId, int? industryId)
{
// var minMax = _context.analytics_Compute_MaturityAll(maturity_model_id,sectorId,industryId).ToList();
// var minMax = _context.analytics_Compute_MaturityAll(maturity_model_id,sectorId,industryId).ToList();
// var median = _context.analytics_Compute_MaturityAll_Median(maturity_model_id).ToList();
// var rvalue = from a in minMax join b in median on a.Title equals b.Title
// select new DataRowsAnalytics() { title=a.Title, avg=(int)a.avg,max=(int)a.max,min=(int)a.min,median=b.median};
// return rvalue.ToList();
return _context.analytics_Compute_MaturityAll(maturity_model_id,sectorId,industryId).ToList();
return _context.analytics_Compute_MaturityAll(maturity_model_id, sectorId, industryId).ToList();
}

public List<AnalyticsgetMedianOverall> GetMaturityGroupsForAssessment(int assessmentId, int maturity_model_id)
{
return _context.analytics_compute_single_averages_maturity(assessmentId,maturity_model_id).ToList();
return _context.analytics_compute_single_averages_maturity(assessmentId, maturity_model_id).ToList();
}
public List<standardAnalyticsgetMedianOverall> GetStandardSingleAvg(int assessmentId, string set_name)
{
return _context.analytics_compute_single_averages_standard(assessmentId,set_name).ToList();
return _context.analytics_compute_single_averages_standard(assessmentId, set_name).ToList();
}
public List<SetStandard> GetStandardList(int assessmentId)

public List<SetStandard> GetStandardList(int assessmentId)
{
// var resultsList = from standards in _context.AVAILABLE_STANDARDS
// join sets in _context.SETS
Expand All @@ -59,7 +59,7 @@ public List<SetStandard> GetStandardList(int assessmentId)

public List<AnalyticsStandardMinMaxAvg> GetStandardMinMaxAvg(int assessmentId, string setname, int? sectorId, int? industryId)
{
var minmaxavg = _context.analytics_Compute_standard_all(assessmentId,setname, sectorId, industryId);
var minmaxavg = _context.analytics_Compute_standard_all(assessmentId, setname, sectorId, industryId);
return minmaxavg.ToList();
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!----------------------
Copyright 2023 Battelle Energy Alliance, LLC
Copyright 2024 Battelle Energy Alliance, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -22,13 +23,15 @@
SOFTWARE.
-------------------------->
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>{{subject}}</title>

{{inline-stylesheet}}
</head>

<body>
<table class="email-wrapper" style="width: 100%" cellpadding="0" cellspacing="0">
<tr>
Expand All @@ -47,11 +50,13 @@
<p>{{name}}</p>
<p>
You have been invited to participate in a CSET assessment.
<div>
{{body}}
</div>
<div>
{{body}}
</div>
</p>
<p class="cset-app-link"><a href="{{rootUrl}}/index.html?assessment_id={{id}}">Click here to view your ACET assessment</a></p>
<p class="cset-app-link"><a
href="{{rootUrl}}/index.html?assessment_id={{id}}">Click here to view
your ACET assessment</a></p>
<p>
Thanks,
<br />The ACET Team
Expand All @@ -69,4 +74,5 @@
</tr>
</table>
</body>
</html>

</html>
Loading

0 comments on commit 543dd73

Please sign in to comment.