Compare commits
	
		
			3 Commits
		
	
	
		
			4c2bef71ec
			...
			06-05-a
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 51878972c6 | |||
| 6f52566fc2 | |||
| 2afb312065 | 
| @ -28,19 +28,19 @@ | |||||||
|         <PackageReference Include="Dapper" Version="2.1.44" /> |         <PackageReference Include="Dapper" Version="2.1.44" /> | ||||||
|         <PackageReference Include="EntityFramework" Version="6.5.1" /> |         <PackageReference Include="EntityFramework" Version="6.5.1" /> | ||||||
|         <PackageReference Include="jQuery" Version="3.7.1" /> |         <PackageReference Include="jQuery" Version="3.7.1" /> | ||||||
|         <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.7" /> |         <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.10" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> |         <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> | ||||||
|         <PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" /> |         <PackageReference Include="Swashbuckle.AspNetCore" Version="6.8.1" /> | ||||||
|         <PackageReference Include="System.Data.SqlClient" Version="4.8.6" /> |         <PackageReference Include="System.Data.SqlClient" Version="4.8.6" /> | ||||||
|         <PackageReference Include="System.Drawing.Common" Version="8.0.7" /> |         <PackageReference Include="System.Drawing.Common" Version="8.0.10" /> | ||||||
|     </ItemGroup> |     </ItemGroup> | ||||||
|     <ItemGroup> |     <ItemGroup> | ||||||
|         <ProjectReference Include="..\Shared\OI.Metrology.Shared.csproj" /> |         <ProjectReference Include="..\Shared\OI.Metrology.Shared.csproj" /> | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ using OI.Metrology.Server.Models; | |||||||
| using OI.Metrology.Shared.DataModels; | using OI.Metrology.Shared.DataModels; | ||||||
| using OI.Metrology.Shared.Models; | using OI.Metrology.Shared.Models; | ||||||
| using OI.Metrology.Shared.Models.Stateless; | using OI.Metrology.Shared.Models.Stateless; | ||||||
|  | using System.Collections.ObjectModel; | ||||||
| using System.Data; | using System.Data; | ||||||
| using System.Globalization; | using System.Globalization; | ||||||
| using System.Text; | using System.Text; | ||||||
| @ -44,15 +45,15 @@ public class ExportRepository : IExportRepository | |||||||
|         List<NginxFileSystemSortable> results = new(); |         List<NginxFileSystemSortable> results = new(); | ||||||
|         Uri uri; |         Uri uri; | ||||||
|         string[] weeks = Get(); |         string[] weeks = Get(); | ||||||
|         List<NginxFileSystemSortable> nginxFileSystemSortableCollection; |         ReadOnlyCollection<NginxFileSystemSortable> collection; | ||||||
|         foreach (string weekYear in weeks) |         foreach (string weekYear in weeks) | ||||||
|         { |         { | ||||||
|             if (headerCommon.ID < 1) |             if (headerCommon.ID < 1) | ||||||
|                 uri = _FileShareRepository.Append(new Uri(_AppSettings.EcMesaFileShareMetrologySi), "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}"); |                 uri = _FileShareRepository.Append(new Uri(_AppSettings.EcMesaFileShareMetrologySi), "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}"); | ||||||
|             else |             else | ||||||
|                 uri = _FileShareRepository.Append(new Uri(_AppSettings.EcMesaFileShareMetrologySi), "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}", $"-{headerCommon.ID}"); |                 uri = _FileShareRepository.Append(new Uri(_AppSettings.EcMesaFileShareMetrologySi), "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}", $"-{headerCommon.ID}"); | ||||||
|             nginxFileSystemSortableCollection = _FileShareRepository.GetNginxFileSystemSortableCollection(httpClient, uri, endsWith); |             collection = _FileShareRepository.GetNginxFileSystemSortableCollection(httpClient, uri, endsWith); | ||||||
|             results.AddRange(nginxFileSystemSortableCollection); |             results.AddRange(collection); | ||||||
|         } |         } | ||||||
|         return results.OrderByDescending(l => l.DateTime).ToArray(); |         return results.OrderByDescending(l => l.DateTime).ToArray(); | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -1,5 +1,7 @@ | |||||||
|  | using OI.Metrology.Shared.DataModels; | ||||||
| using OI.Metrology.Shared.Models; | using OI.Metrology.Shared.Models; | ||||||
| using OI.Metrology.Shared.Models.Stateless; | using OI.Metrology.Shared.Models.Stateless; | ||||||
|  | using System.Collections.ObjectModel; | ||||||
| using System.Text.Json; | using System.Text.Json; | ||||||
| using System.Web; | using System.Web; | ||||||
|  |  | ||||||
| @ -78,7 +80,7 @@ public class FileShareRepository : IFileShareRepository | |||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     List<NginxFileSystemSortable> IFileShareRepository.GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string? endsWith) |     ReadOnlyCollection<NginxFileSystemSortable> IFileShareRepository.GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string? endsWith) | ||||||
|     { |     { | ||||||
|         List<NginxFileSystemSortable> results = new(); |         List<NginxFileSystemSortable> results = new(); | ||||||
|         Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync(uri); |         Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync(uri); | ||||||
| @ -97,10 +99,13 @@ public class FileShareRepository : IFileShareRepository | |||||||
|                 results.Add(nginxFileSystemSortable); |                 results.Add(nginxFileSystemSortable); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         return results; |         return new(results); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     List<CharacterizationInfo> IFileShareRepository.GetArchiveData(CharacterizationParameters archiveParameters) => |     ReadOnlyCollection<CharacterizationInfo> IFileShareRepository.GetArchiveData(CharacterizationParameters archiveParameters) => | ||||||
|  |         throw new NotImplementedException(); | ||||||
|  |  | ||||||
|  |     ReadOnlyCollection<ToolTypeNameId> IFileShareRepository.GetEquipmentIds() => | ||||||
|         throw new NotImplementedException(); |         throw new NotImplementedException(); | ||||||
|  |  | ||||||
| } | } | ||||||
| @ -227,7 +227,7 @@ public class ToolTypesRepository : IToolTypesRepository | |||||||
|                 { |                 { | ||||||
|                     HttpClient httpClient = _HttpClientFactory.CreateClient(); |                     HttpClient httpClient = _HttpClientFactory.CreateClient(); | ||||||
|                     httpClient.BaseAddress = new(_AppSettings.ApiFileShare); |                     httpClient.BaseAddress = new(_AppSettings.ApiFileShare); | ||||||
|                     _FileShareRepository.CopyFile(httpClient, processDataStandardFormat, Path.Combine(directly, $"Viewer_{Path.GetFileName(processDataStandardFormat)}")); |                     _FileShareRepository.CopyFile(httpClient, processDataStandardFormat, Path.Combine(directly, $"Viewer{Path.GetFileName(processDataStandardFormat)}")); | ||||||
|                     result = null; |                     result = null; | ||||||
|                 } |                 } | ||||||
|                 catch (Exception ex) { result = ex.Message; } |                 catch (Exception ex) { result = ex.Message; } | ||||||
|  | |||||||
							
								
								
									
										36
									
								
								Shared/DataModels/WaferCounterArchive.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								Shared/DataModels/WaferCounterArchive.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,36 @@ | |||||||
|  | using System.Text.Json.Serialization; | ||||||
|  |  | ||||||
|  | namespace OI.Metrology.Shared.DataModels; | ||||||
|  |  | ||||||
|  | public class WaferCounterArchive | ||||||
|  | { | ||||||
|  |  | ||||||
|  |     public long ID { get; set; } | ||||||
|  |     public DateTime InsertDate { get; set; } | ||||||
|  |     public Guid AttachmentID { get; set; } | ||||||
|  |     public string? Title { get; set; } | ||||||
|  |     public DateTime Date { get; set; } | ||||||
|  |     public long ToolTypeID { get; set; } | ||||||
|  |     public string? ToolTypeName { get; set; } | ||||||
|  |  | ||||||
|  |     public string? MesEntity { get; set; } | ||||||
|  |  | ||||||
|  |     public string? Employee { get; set; } | ||||||
|  |     public string? Layer { get; set; } | ||||||
|  |     public string? PSN { get; set; } | ||||||
|  |     public string? RDS { get; set; } | ||||||
|  |     public string? Reactor { get; set; } | ||||||
|  |     public string? Recipe { get; set; } | ||||||
|  |     public string? Zone { get; set; } | ||||||
|  |  | ||||||
|  |     public string? SlotMap { get; set; } | ||||||
|  |     public string? Text { get; set; } | ||||||
|  |     public int? Total { get; set; } | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | [JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString)] | ||||||
|  | [JsonSerializable(typeof(WaferCounterArchive))] | ||||||
|  | public partial class WaferCounterArchiveSourceGenerationContext : JsonSerializerContext | ||||||
|  | { | ||||||
|  | } | ||||||
							
								
								
									
										17
									
								
								Shared/Models/PollValue.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								Shared/Models/PollValue.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | |||||||
|  | using System.Text.Json.Serialization; | ||||||
|  |  | ||||||
|  | namespace OI.Metrology.Shared.Models; | ||||||
|  |  | ||||||
|  | public record PollValue(string? Json, | ||||||
|  |                         [property: JsonPropertyName("id")] int? Id, | ||||||
|  |                         [property: JsonPropertyName("page")] string? Page, | ||||||
|  |                         string? QueryString, | ||||||
|  |                         string? RemoteIpAddress, | ||||||
|  |                         [property: JsonPropertyName("time")] long? Time, | ||||||
|  |                         [property: JsonPropertyName("value")] int? Value); | ||||||
|  |  | ||||||
|  | [JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString)] | ||||||
|  | [JsonSerializable(typeof(PollValue))] | ||||||
|  | public partial class PollValueSourceGenerationContext : JsonSerializerContext | ||||||
|  | { | ||||||
|  | } | ||||||
							
								
								
									
										16
									
								
								Shared/Models/Stateless/IAzureDevOpsController.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								Shared/Models/Stateless/IAzureDevOpsController.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,16 @@ | |||||||
|  | namespace OI.Metrology.Shared.Models.Stateless; | ||||||
|  |  | ||||||
|  | public interface IAzureDevOpsController<T> | ||||||
|  | { | ||||||
|  |  | ||||||
|  |     enum Action : int | ||||||
|  |     { | ||||||
|  |         Index = 0, | ||||||
|  |         Save = 1 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     static string GetRouteName() => nameof(IAzureDevOpsController<T>)[1..^10]; | ||||||
|  |  | ||||||
|  |     T Save(); | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										8
									
								
								Shared/Models/Stateless/IAzureDevOpsRepository.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Shared/Models/Stateless/IAzureDevOpsRepository.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,8 @@ | |||||||
|  | namespace OI.Metrology.Shared.Models.Stateless; | ||||||
|  |  | ||||||
|  | public interface IAzureDevOpsRepository | ||||||
|  | { | ||||||
|  |  | ||||||
|  |     void Save(PollValue pollValue); | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -1,3 +1,6 @@ | |||||||
|  | using OI.Metrology.Shared.DataModels; | ||||||
|  | using System.Collections.ObjectModel; | ||||||
|  |  | ||||||
| namespace OI.Metrology.Shared.Models.Stateless; | namespace OI.Metrology.Shared.Models.Stateless; | ||||||
|  |  | ||||||
| public interface IFileShareRepository | public interface IFileShareRepository | ||||||
| @ -7,9 +10,10 @@ public interface IFileShareRepository | |||||||
|     void MoveFile(string from, string to); |     void MoveFile(string from, string to); | ||||||
|     Uri Append(Uri uri, params string[] paths); |     Uri Append(Uri uri, params string[] paths); | ||||||
|     void FileWrite(string path, string contents); |     void FileWrite(string path, string contents); | ||||||
|  |     ReadOnlyCollection<ToolTypeNameId> GetEquipmentIds(); | ||||||
|     HttpResponseMessage ReadFile(HttpClient httpClient, Uri uri); |     HttpResponseMessage ReadFile(HttpClient httpClient, Uri uri); | ||||||
|     void CopyFile(HttpClient httpClient, string from, string to); |     void CopyFile(HttpClient httpClient, string from, string to); | ||||||
|     void MoveFile(HttpClient httpClient, string from, string to); |     void MoveFile(HttpClient httpClient, string from, string to); | ||||||
|     List<CharacterizationInfo> GetArchiveData(CharacterizationParameters characterizationParameters); |     ReadOnlyCollection<CharacterizationInfo> GetArchiveData(CharacterizationParameters characterizationParameters); | ||||||
|     List<NginxFileSystemSortable> GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string? endsWith); |     ReadOnlyCollection<NginxFileSystemSortable> GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string? endsWith); | ||||||
| } | } | ||||||
							
								
								
									
										
											BIN
										
									
								
								Static/favicon.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Static/favicon.ico
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 2.0 KiB | 
| @ -6,25 +6,25 @@ | |||||||
|     <meta name="viewport" content="width=device-width" /> |     <meta name="viewport" content="width=device-width" /> | ||||||
|     <title>File(s)</title> |     <title>File(s)</title> | ||||||
|  |  | ||||||
|     <script src="/js/modernizr-3.6.0-custom.js?no-cache=2024-06-18-10-54" type="text/javascript"></script> |     <script src="/js/modernizr-3.6.0-custom.js?no-cache=2024-10-04-08-34" type="text/javascript"></script> | ||||||
|  |  | ||||||
|     <link href="/styles/bootstrap.min.css?no-cache=2024-06-18-10-54" rel="stylesheet" /> |     <link href="/styles/bootstrap.min.css?no-cache=2024-10-04-08-34" rel="stylesheet" /> | ||||||
|     <link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?no-cache=2024-06-18-10-54" |     <link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?no-cache=2024-10-04-08-34" | ||||||
|         rel="stylesheet" /> |         rel="stylesheet" /> | ||||||
|     <link href="/igniteui/css/structure/infragistics.css?no-cache=2024-06-18-10-54" rel="stylesheet" /> |     <link href="/igniteui/css/structure/infragistics.css?no-cache=2024-10-04-08-34" rel="stylesheet" /> | ||||||
|     <link href="/styles/site-server.css?no-cache=2024-06-18-10-54" rel="stylesheet" /> |     <link href="/styles/site-server.css?no-cache=2024-10-04-08-34" rel="stylesheet" /> | ||||||
|     <link href="/styles/index.css?no-cache=2024-06-18-10-54" rel="stylesheet" /> |     <link href="/styles/files.css?no-cache=2024-10-04-08-34" rel="stylesheet" /> | ||||||
|  |  | ||||||
|     <script src="/js/jquery-3.6.0.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script> |     <script src="/js/jquery-3.6.0.min.js?no-cache=2024-10-04-08-34" type="text/javascript"></script> | ||||||
|     <script src="/js/jquery-ui.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script> |     <script src="/js/jquery-ui.min.js?no-cache=2024-10-04-08-34" type="text/javascript"></script> | ||||||
|     <script src="/igniteui/js/infragistics.core.js?no-cache=2024-06-18-10-54" type="text/javascript"></script> |     <script src="/igniteui/js/infragistics.core.js?no-cache=2024-10-04-08-34" type="text/javascript"></script> | ||||||
|     <script src="/igniteui/js/infragistics.lob.js?no-cache=2024-06-18-10-54" type="text/javascript"></script> |     <script src="/igniteui/js/infragistics.lob.js?no-cache=2024-10-04-08-34" type="text/javascript"></script> | ||||||
|     <script src="/igniteui/js/infragistics.dv.js?no-cache=2024-06-18-10-54" type="text/javascript"></script> |     <script src="/igniteui/js/infragistics.dv.js?no-cache=2024-10-04-08-34" type="text/javascript"></script> | ||||||
|  |  | ||||||
|     <script src="/js/chart-4.3.0.min.js" type="module"></script> |     <script src="/js/chart-4.3.0.min.js" type="module"></script> | ||||||
|  |  | ||||||
|     <script src="/js/common.js?no-cache=2024-06-18-10-54" type="text/javascript"></script> |     <script src="/js/common.js?no-cache=2024-10-04-08-34" type="text/javascript"></script> | ||||||
|     <script src="/js/site-server.js?no-cache=2024-06-18-10-54" type="text/javascript"></script> |     <script src="/js/site-server.js?no-cache=2024-10-04-08-34" type="text/javascript"></script> | ||||||
| </head> | </head> | ||||||
|  |  | ||||||
| <body> | <body> | ||||||
| @ -64,7 +64,7 @@ | |||||||
|  |  | ||||||
|         <form class="form-inline mb-4"> |         <form class="form-inline mb-4"> | ||||||
|             <div class="form-group"> |             <div class="form-group"> | ||||||
|                 <label for="ToolType">Tool Type</label> |                 <label for="ToolType">Tool</label> | ||||||
|                 <div class="form-control" id="ToolType"></div> |                 <div class="form-control" id="ToolType"></div> | ||||||
|             </div> |             </div> | ||||||
|             <div class="form-group"> |             <div class="form-group"> | ||||||
| @ -94,7 +94,7 @@ | |||||||
|             </div> |             </div> | ||||||
|         </form> |         </form> | ||||||
|  |  | ||||||
|         <div style="height: 300px;" id="HeaderGridDiv"> |         <div style="height: 500px;" id="HeaderGridDiv"> | ||||||
|             <span id="ToolTypeID" hidden></span> |             <span id="ToolTypeID" hidden></span> | ||||||
|             <table id="HeaderGrid"></table> |             <table id="HeaderGrid"></table> | ||||||
|         </div> |         </div> | ||||||
| @ -103,46 +103,14 @@ | |||||||
|             <div class="col-xs-1"> |             <div class="col-xs-1"> | ||||||
|                 <input type="button" class="btn" id="GetDataButton" value="Get Data" disabled /> |                 <input type="button" class="btn" id="GetDataButton" value="Get Data" disabled /> | ||||||
|             </div> |             </div> | ||||||
|             <div class="col-xs-1"> |  | ||||||
|                 <input type="button" class="btn" id="ReviewButton" value="Review" disabled /> |  | ||||||
|             </div> |  | ||||||
|             <div class="col-xs-1"> |  | ||||||
|                 <input type="button" class="btn" id="RecipeParametersButton" value="Parameters" disabled /> |  | ||||||
|             </div> |  | ||||||
|             <div class="col-xs-1"> |  | ||||||
|                 <input type="button" class="btn" id="ViewButton" value="View" disabled /> |  | ||||||
|             </div> |  | ||||||
|             <div class="col-xs-1"> |  | ||||||
|                 <input type="button" class="btn" id="PinButton" value="Pin" disabled /> |  | ||||||
|             </div> |  | ||||||
|         </div> |         </div> | ||||||
|  |  | ||||||
|         <div id="DetailsDiv" hidden> |         <div id="DetailsDiv" hidden> | ||||||
|  |  | ||||||
|             <span id="HeaderId" hidden></span> |             <span id="HeaderId" hidden></span> | ||||||
|             <span id="HeaderAttachmentId" hidden></span> |             <span id="HeaderAttachmentId" hidden></span> | ||||||
|             <div style="padding-bottom: 20px;" id="DetailsGridDiv"> |             <div style="padding-bottom: 20px;" id="DetailsGridDiv"> | ||||||
|                 <table id="DetailsGrid"></table> |                 <table id="DetailsGrid"></table> | ||||||
|             </div> |             </div> | ||||||
|  |  | ||||||
|             <div id="ExportDiv" style="margin-top: 10px;" hidden> |  | ||||||
|                 <input type="button" value="Send to OpenInsight" id="OIExportButton" /> |  | ||||||
|                 <span id="OIExportResult" style="margin-left: 10px; font-weight: bold; color: #366b02;"></span> |  | ||||||
|             </div> |  | ||||||
|  |  | ||||||
|             <p style="margin-top: 20px;"> |  | ||||||
|                 <iframe id="DataAttachmentFrame" style="height:900px; border-width:thin; margin-right: 10px;" |  | ||||||
|                     hidden></iframe> |  | ||||||
|                 <iframe id="HeaderAttachmentFrame" style="height:900px; border-width:thin;" hidden></iframe> |  | ||||||
|                   |  | ||||||
|             <div id="DataAttachmentDiv" hidden> |  | ||||||
|                 <canvas id="DataAttachmentCanvas"></canvas> |  | ||||||
|             </div> |  | ||||||
|             <div id="HeaderAttachmentDiv" hidden> |  | ||||||
|                 <canvas id="HeaderAttachmentCanvas"></canvas> |  | ||||||
|             </div> |  | ||||||
|             </p> |  | ||||||
|  |  | ||||||
|         </div> |         </div> | ||||||
|  |  | ||||||
|         <hr /> |         <hr /> | ||||||
| @ -153,9 +121,9 @@ | |||||||
|  |  | ||||||
|     <div id="MessageModal"></div> |     <div id="MessageModal"></div> | ||||||
|  |  | ||||||
|     <script src="/js/bootstrap.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script> |     <script src="/js/bootstrap.min.js?no-cache=2024-10-04-08-34" type="text/javascript"></script> | ||||||
|     <script src="/js/respond.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script> |     <script src="/js/respond.min.js?no-cache=2024-10-04-08-34" type="text/javascript"></script> | ||||||
|     <script src="/js/files.js?no-cache=2024-06-18-10-54" type="text/javascript"></script> |     <script src="/js/files.js?no-cache=2024-10-04-08-34" type="text/javascript"></script> | ||||||
| </body> | </body> | ||||||
|  |  | ||||||
| </html> | </html> | ||||||
| @ -1,10 +1,5 @@ | |||||||
| $(document).ready(function () { | $(document).ready(function () { | ||||||
|  |  | ||||||
|     const queryString = window.location.search; |     initFiles("https://oi-metrology-viewer-prod.mes.infineon.com:4438/api", "https://oi-metrology-viewer-prod.mes.infineon.com", "https://eaf-prod.mes.infineon.com:4439"); | ||||||
|     const urlParams = new URLSearchParams(queryString); |  | ||||||
|     const initialHeaderId = urlParams.get('headerid'); |  | ||||||
|     const initialToolTypeID = urlParams.get('tooltypeid'); |  | ||||||
|     const initialHeaderAttachmentId = urlParams.get('headerattachmentid'); |  | ||||||
|     initFiles("https://oi-metrology-viewer-prod.mes.infineon.com:4433/api", "https://oi-metrology-viewer-prod.mes.infineon.com", initialToolTypeID, initialHeaderId, initialHeaderAttachmentId); |  | ||||||
|  |  | ||||||
| }); | }); | ||||||
							
								
								
									
										161
									
								
								Static/js/leo.js
									
									
									
									
									
								
							
							
						
						
									
										161
									
								
								Static/js/leo.js
									
									
									
									
									
								
							| @ -1,161 +0,0 @@ | |||||||
| function compareFunction(a, b) { |  | ||||||
|     return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function showOne(rowData) { |  | ||||||
|     if (rowData == null) |  | ||||||
|         return; |  | ||||||
|     var data = []; |  | ||||||
|     data.push({ name: "ADO Edit", value: '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + rowData["Id"] + '">' + rowData["Id"] + '</a>' }); |  | ||||||
|     for (const property in rowData) { |  | ||||||
|         if (rowData[property] == null) |  | ||||||
|             continue; |  | ||||||
|         data.push({ name: property, value: rowData[property].toString() }); |  | ||||||
|     } |  | ||||||
|     $("#AllGrid").igGrid({ |  | ||||||
|         autoGenerateColumns: true, |  | ||||||
|         dataSource: data, |  | ||||||
|         width: "100%", |  | ||||||
|         showHeader: false, |  | ||||||
|     }); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function loadOne() { |  | ||||||
|     var selectedRow = $("#HeaderGrid").data("igGridSelection").selectedRow(); |  | ||||||
|     if (selectedRow == null) |  | ||||||
|         return; |  | ||||||
|     var rowData = $("#HeaderGrid").data("igGrid").dataSource.dataView()[selectedRow.index]; |  | ||||||
|     showOne(rowData); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function detailSelectionChangedRunInfo(evt, ui) { |  | ||||||
|     if (ui.row.index === 0) |  | ||||||
|         return; |  | ||||||
|     var rowData = ui.owner.grid.dataSource.dataView()[ui.row.index]; |  | ||||||
|     showOne(rowData); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function getState(state) { |  | ||||||
|     var result; |  | ||||||
|     if (state == null) |  | ||||||
|         result = "9-Null"; |  | ||||||
|     else if (state === "New") |  | ||||||
|         result = `1-${state}`; |  | ||||||
|     else if (state === "Active") |  | ||||||
|         result = `2-${state}`; |  | ||||||
|     else if (state === "Resolved") |  | ||||||
|         result = `3-${state}`; |  | ||||||
|     else if (state === "Closed") |  | ||||||
|         result = `4-${state}`; |  | ||||||
|     else if (state === "Removed") |  | ||||||
|         result = `5-${state}`; |  | ||||||
|     else |  | ||||||
|         result = `8-${state}`; |  | ||||||
|     return result; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function getPriority(workItemType, priority) { |  | ||||||
|     var result; |  | ||||||
|     if (workItemType === "Bug") |  | ||||||
|         result = "0-Bug"; |  | ||||||
|     else if (priority == null || priority === 0) |  | ||||||
|         result = "9-Null"; |  | ||||||
|     else if (priority === 1) |  | ||||||
|         result = `${priority}-High`; |  | ||||||
|     else if (priority === 2) |  | ||||||
|         result = `${priority}-Med`; |  | ||||||
|     else if (priority === 3) |  | ||||||
|         result = `${priority}-Low`; |  | ||||||
|     else if (priority === 4) |  | ||||||
|         result = `${priority}-TBD`; |  | ||||||
|     else |  | ||||||
|         result = "8-Not"; |  | ||||||
|     return result; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function getTimeCriticality(workItemType, timeCriticality) { |  | ||||||
|     var result; |  | ||||||
|     if (workItemType === "Bug") |  | ||||||
|         result = "0-Bug"; |  | ||||||
|     else if (timeCriticality == null || timeCriticality === 0) |  | ||||||
|         result = "9-Null"; |  | ||||||
|     else if (timeCriticality === 1) |  | ||||||
|         result = `${timeCriticality}-QSM`; |  | ||||||
|     else if (timeCriticality === 2) |  | ||||||
|         result = `${timeCriticality}-Qual`; |  | ||||||
|     else if (timeCriticality === 3) |  | ||||||
|         result = `${timeCriticality}-Eff`; |  | ||||||
|     else |  | ||||||
|         result = "8-Not"; |  | ||||||
|     return result; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function getWorkItems(data) { |  | ||||||
|     var workItems = []; |  | ||||||
|     var workItem; |  | ||||||
|     for (var i = data.length - 1; i > -1; i--) { |  | ||||||
|         workItem = data[i]; |  | ||||||
|         if (workItem.AreaPath !== 'ART SPS\\LEO') |  | ||||||
|             continue; |  | ||||||
|         if (workItem.Tags != null && workItem.Tags.includes("Ignore")) |  | ||||||
|             continue; |  | ||||||
|         if (workItem.WorkItemType !== 'Feature' && workItem.WorkItemType !== 'Bug') |  | ||||||
|             continue; |  | ||||||
|         workItem["State"] = getState(workItem["State"]) |  | ||||||
|         workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"]) |  | ||||||
|         workItem["TimeCriticality"] = getTimeCriticality(workItem["WorkItemType"], workItem["TimeCriticality"]) |  | ||||||
|         workItems.push(workItem); |  | ||||||
|     } |  | ||||||
|     workItems.sort(compareFunction); |  | ||||||
|     return workItems; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function initIndex(url) { |  | ||||||
|     $.getJSON(url, { _: new Date().getTime() }, function (data) { |  | ||||||
|         var workItems = getWorkItems(data); |  | ||||||
|         console.log(data.length); |  | ||||||
|         if (data.length > 0) |  | ||||||
|             console.log(data[0]); |  | ||||||
|         $("#HeaderGrid").igGrid({ |  | ||||||
|             autoGenerateColumns: false, |  | ||||||
|             dataSource: workItems, |  | ||||||
|             height: "100%", |  | ||||||
|             primaryKey: "Id", |  | ||||||
|             width: "100%", |  | ||||||
|             columns: [ |  | ||||||
|                 { key: "Id", dataType: "number" }, |  | ||||||
|                 { key: "Requester", dataType: "string" }, |  | ||||||
|                 { headerText: "Assigned To", key: "AssignedTo", dataType: "string" }, |  | ||||||
|                 { key: "Title", dataType: "string", width: "20%" }, |  | ||||||
|                 { headerText: "System(s)", key: "Tags", dataType: "string" }, |  | ||||||
|                 { key: "Priority", dataType: "string" }, |  | ||||||
|                 { headerText: "Qual/Eff", key: "TimeCriticality", dataType: "string" }, |  | ||||||
|                 { key: "State", dataType: "string" }, |  | ||||||
|                 { headerText: "Effort in Days", key: "Effort", dataType: "number" }, |  | ||||||
|                 { headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" }, |  | ||||||
|                 { headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" }, |  | ||||||
|                 { headerText: "Target", key: "TargetDate", dataType: "date", format: "date" }, |  | ||||||
|                 { key: "AreaPath", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "AssignedTo", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "BusinessValue", dataType: "number", hidden: true }, |  | ||||||
|                 { key: "ChangedDate", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "CommentCount", dataType: "number", hidden: true }, |  | ||||||
|                 { key: "CreatedDate", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "Description", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "IterationPath", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "Revision", dataType: "number", hidden: true }, |  | ||||||
|                 { key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "StartDate", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "WorkItemType", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "WeightedShortestJobFirst", dataType: "number", hidden: true }, |  | ||||||
|             ], |  | ||||||
|             features: [ |  | ||||||
|                 { name: "Sorting", type: "local" }, |  | ||||||
|                 { name: "Filtering", type: "local" }, |  | ||||||
|                 { name: "Selection", mode: "row", multipleSelection: false, rowSelectionChanging: detailSelectionChangedRunInfo }, |  | ||||||
|                 { name: "Paging", type: "local", recordCountKey: "TotalRows", pageSize: 10, pageSizeUrlKey: "pageSize", "pageIndexUrlKey": "page", showPageSizeDropDown: true }, |  | ||||||
|             ], |  | ||||||
|         }); |  | ||||||
|     }); |  | ||||||
|     $("#HeaderGrid").on("dblclick", "tr", loadOne); |  | ||||||
| } |  | ||||||
							
								
								
									
										161
									
								
								Static/js/mes.js
									
									
									
									
									
								
							
							
						
						
									
										161
									
								
								Static/js/mes.js
									
									
									
									
									
								
							| @ -1,161 +0,0 @@ | |||||||
| function compareFunction(a, b) { |  | ||||||
|     return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function showOne(rowData) { |  | ||||||
|     if (rowData == null) |  | ||||||
|         return; |  | ||||||
|     var data = []; |  | ||||||
|     data.push({ name: "Edit in ADO", value: '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + rowData["Id"] + '">Edit in ADO ' + rowData["Id"] + '</a>' }); |  | ||||||
|     for (const property in rowData) { |  | ||||||
|         if (rowData[property] == null) |  | ||||||
|             continue; |  | ||||||
|         data.push({ name: property, value: rowData[property].toString() }); |  | ||||||
|     } |  | ||||||
|     $("#AllGrid").igGrid({ |  | ||||||
|         autoGenerateColumns: true, |  | ||||||
|         dataSource: data, |  | ||||||
|         width: "100%", |  | ||||||
|         showHeader: false, |  | ||||||
|     }); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function loadOne() { |  | ||||||
|     var selectedRow = $("#HeaderGrid").data("igGridSelection").selectedRow(); |  | ||||||
|     if (selectedRow == null) |  | ||||||
|         return; |  | ||||||
|     var rowData = $("#HeaderGrid").data("igGrid").dataSource.dataView()[selectedRow.index]; |  | ||||||
|     showOne(rowData); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function detailSelectionChangedRunInfo(evt, ui) { |  | ||||||
|     if (ui.row.index === 0) |  | ||||||
|         return; |  | ||||||
|     var rowData = ui.owner.grid.dataSource.dataView()[ui.row.index]; |  | ||||||
|     showOne(rowData); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function getState(state) { |  | ||||||
|     var result; |  | ||||||
|     if (state == null) |  | ||||||
|         result = "9-Null"; |  | ||||||
|     else if (state === "New") |  | ||||||
|         result = `1-${state}`; |  | ||||||
|     else if (state === "Active") |  | ||||||
|         result = `2-${state}`; |  | ||||||
|     else if (state === "Resolved") |  | ||||||
|         result = `3-${state}`; |  | ||||||
|     else if (state === "Closed") |  | ||||||
|         result = `4-${state}`; |  | ||||||
|     else if (state === "Removed") |  | ||||||
|         result = `5-${state}`; |  | ||||||
|     else |  | ||||||
|         result = `8-${state}`; |  | ||||||
|     return result; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function getPriority(workItemType, priority) { |  | ||||||
|     var result; |  | ||||||
|     if (workItemType === "Bug") |  | ||||||
|         result = "0-Bug"; |  | ||||||
|     else if (priority == null || priority === 0) |  | ||||||
|         result = "9-Null"; |  | ||||||
|     else if (priority === 1) |  | ||||||
|         result = `${priority}-High`; |  | ||||||
|     else if (priority === 2) |  | ||||||
|         result = `${priority}-Med`; |  | ||||||
|     else if (priority === 3) |  | ||||||
|         result = `${priority}-Low`; |  | ||||||
|     else if (priority === 4) |  | ||||||
|         result = `${priority}-TBD`; |  | ||||||
|     else |  | ||||||
|         result = "8-Not"; |  | ||||||
|     return result; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function getTimeCriticality(workItemType, timeCriticality) { |  | ||||||
|     var result; |  | ||||||
|     if (workItemType === "Bug") |  | ||||||
|         result = "0-Bug"; |  | ||||||
|     else if (timeCriticality == null || timeCriticality === 0) |  | ||||||
|         result = "9-Null"; |  | ||||||
|     else if (timeCriticality === 1) |  | ||||||
|         result = `${timeCriticality}-QSM`; |  | ||||||
|     else if (timeCriticality === 2) |  | ||||||
|         result = `${timeCriticality}-Qual`; |  | ||||||
|     else if (timeCriticality === 3) |  | ||||||
|         result = `${timeCriticality}-Eff`; |  | ||||||
|     else |  | ||||||
|         result = "8-Not"; |  | ||||||
|     return result; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function getWorkItems(data) { |  | ||||||
|     var workItems = []; |  | ||||||
|     var workItem; |  | ||||||
|     for (var i = data.length - 1; i > -1; i--) { |  | ||||||
|         workItem = data[i]; |  | ||||||
|         if (workItem.AreaPath !== 'ART SPS\\MES') |  | ||||||
|             continue; |  | ||||||
|         if (workItem.Tags != null && workItem.Tags.includes("Ignore")) |  | ||||||
|             continue; |  | ||||||
|         if (workItem.WorkItemType !== 'Feature' && workItem.WorkItemType !== 'Bug') |  | ||||||
|             continue; |  | ||||||
|         workItem["State"] = getState(workItem["State"]) |  | ||||||
|         workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"]) |  | ||||||
|         workItem["TimeCriticality"] = getTimeCriticality(workItem["WorkItemType"], workItem["TimeCriticality"]) |  | ||||||
|         workItems.push(workItem); |  | ||||||
|     } |  | ||||||
|     workItems.sort(compareFunction); |  | ||||||
|     return workItems; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function initIndex(url) { |  | ||||||
|     $.getJSON(url, { _: new Date().getTime() }, function (data) { |  | ||||||
|         var workItems = getWorkItems(data); |  | ||||||
|         console.log(data.length); |  | ||||||
|         if (data.length > 0) |  | ||||||
|             console.log(data[0]); |  | ||||||
|         $("#HeaderGrid").igGrid({ |  | ||||||
|             autoGenerateColumns: false, |  | ||||||
|             dataSource: workItems, |  | ||||||
|             height: "100%", |  | ||||||
|             primaryKey: "Id", |  | ||||||
|             width: "100%", |  | ||||||
|             columns: [ |  | ||||||
|                 { key: "Id", dataType: "number" }, |  | ||||||
|                 { key: "Requester", dataType: "string" }, |  | ||||||
|                 { headerText: "Assigned To", key: "AssignedTo", dataType: "string" }, |  | ||||||
|                 { key: "Title", dataType: "string", width: "20%" }, |  | ||||||
|                 { headerText: "System(s)", key: "Tags", dataType: "string" }, |  | ||||||
|                 { key: "Priority", dataType: "string" }, |  | ||||||
|                 { headerText: "Qual/Eff", key: "TimeCriticality", dataType: "string" }, |  | ||||||
|                 { key: "State", dataType: "string" }, |  | ||||||
|                 { headerText: "Effort in Days", key: "Effort", dataType: "number" }, |  | ||||||
|                 { headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" }, |  | ||||||
|                 { headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" }, |  | ||||||
|                 { headerText: "Target", key: "TargetDate", dataType: "date", format: "date" }, |  | ||||||
|                 { key: "AreaPath", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "AssignedTo", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "BusinessValue", dataType: "number", hidden: true }, |  | ||||||
|                 { key: "ChangedDate", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "CommentCount", dataType: "number", hidden: true }, |  | ||||||
|                 { key: "CreatedDate", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "Description", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "IterationPath", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "Revision", dataType: "number", hidden: true }, |  | ||||||
|                 { key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "StartDate", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "WorkItemType", dataType: "string", hidden: true }, |  | ||||||
|                 { key: "WeightedShortestJobFirst", dataType: "number", hidden: true }, |  | ||||||
|             ], |  | ||||||
|             features: [ |  | ||||||
|                 { name: "Sorting", type: "local" }, |  | ||||||
|                 { name: "Filtering", type: "local" }, |  | ||||||
|                 { name: "Selection", mode: "row", multipleSelection: false, rowSelectionChanging: detailSelectionChangedRunInfo }, |  | ||||||
|                 { name: "Paging", type: "local", recordCountKey: "TotalRows", pageSize: 10, pageSizeUrlKey: "pageSize", "pageIndexUrlKey": "page", showPageSizeDropDown: true }, |  | ||||||
|             ], |  | ||||||
|         }); |  | ||||||
|     }); |  | ||||||
|     $("#HeaderGrid").on("dblclick", "tr", loadOne); |  | ||||||
| } |  | ||||||
| @ -2,12 +2,14 @@ var _chart = null; | |||||||
| var _CdeId = null; | var _CdeId = null; | ||||||
| var _apiUrl = null; | var _apiUrl = null; | ||||||
| var _BioRadId = null; | var _BioRadId = null; | ||||||
|  | var _Collection = []; | ||||||
| var _toolType = null; | var _toolType = null; | ||||||
| var _StaticUrl = null; | var _StaticUrl = null; | ||||||
| var _workMaterial = {}; | var _workMaterial = {}; | ||||||
| var _initialHeaderId = null; | var _initialHeaderId = null; | ||||||
| var _toolTypeMetaData = null; | var _toolTypeMetaData = null; | ||||||
| var _initialHeaderAttachmentId = null; | var _initialHeaderAttachmentId = null; | ||||||
|  | var _EcMesaFileShareCharacterizationSi = null; | ||||||
|  |  | ||||||
| async function loadRunInfoAwaitingDisposition() { | async function loadRunInfoAwaitingDisposition() { | ||||||
|   var row = $("#grid").igGrid("selectedRow"); |   var row = $("#grid").igGrid("selectedRow"); | ||||||
| @ -169,6 +171,34 @@ function loadHeaderGridRunInfo() { | |||||||
|   }); |   }); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | function loadHeaderGridFiles() { | ||||||
|  |   var toolTypeName = $("#ToolType").igCombo("text"); | ||||||
|  |   $("#ToolTypeID").text(""); | ||||||
|  |   hideDetailsDivRunInfo(); | ||||||
|  |   disableHeaderButtonsRunInfo(); | ||||||
|  |   $("#HeaderId").text(""); | ||||||
|  |   $("#HeaderAttachmentId").text(""); | ||||||
|  |   var gridCreated = $("#HeaderGrid").data("igGrid"); | ||||||
|  |   if (gridCreated) | ||||||
|  |     $("#HeaderGrid").igGrid("destroy"); | ||||||
|  |   $.ajax({ | ||||||
|  |     type: "GET", | ||||||
|  |     url: _EcMesaFileShareCharacterizationSi + "/Archive/" + toolTypeName + ".json", | ||||||
|  |     success: function (r) { | ||||||
|  |       if ((r.Results == null) || (r.Results.ToolType == null) || (r.Results.Metadata == null)) | ||||||
|  |         ShowErrorMessage("Invalid tool-type: " + toolTypeName); | ||||||
|  |       else { | ||||||
|  |         _toolType = r.Results.ToolType; | ||||||
|  |         _toolTypeMetaData = r.Results.Metadata; | ||||||
|  |         requestHeaderDataFiles(); | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     error: function (e) { | ||||||
|  |       DisplayWSMessage("error", "There was an error getting tool-type info by archive.", e); | ||||||
|  |     } | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  |  | ||||||
| function disableHeaderButtonsRunInfo() { | function disableHeaderButtonsRunInfo() { | ||||||
|   $("#GetDataButton").prop("disabled", true); |   $("#GetDataButton").prop("disabled", true); | ||||||
|   $("#ReviewButton").prop("disabled", true); |   $("#ReviewButton").prop("disabled", true); | ||||||
| @ -632,6 +662,39 @@ function copySelected(attachmentID, title, data) { | |||||||
|   copy(allText); |   copy(allText); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | function copySelectedB(attachmentID, title, collection) { | ||||||
|  |   var allText = ""; | ||||||
|  |   var headerText = ""; | ||||||
|  |   var selectedRow = $("#HeaderGrid").data("igGridSelection").selectedRow(); | ||||||
|  |   if (selectedRow !== null) { | ||||||
|  |     var rowData = $("#HeaderGrid").data("igGrid").dataSource.dataView()[selectedRow.index]; | ||||||
|  |     for (const property in rowData) { | ||||||
|  |       if (property === "ID" || property === attachmentID || property === title) | ||||||
|  |         continue; | ||||||
|  |       allText = allText + property + '\t'; | ||||||
|  |       headerText = headerText + rowData[property] + '\t'; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |   for (var i = 0; i < collection.length; i++) { | ||||||
|  |     if (i === 0) { | ||||||
|  |       for (const property in collection[i]) { | ||||||
|  |         if (property === "ID" || property === "InsertDate" || property === attachmentID || property === title) | ||||||
|  |           continue; | ||||||
|  |         allText = allText + property + '\t'; | ||||||
|  |       } | ||||||
|  |       allText = allText + '\r'; | ||||||
|  |     } | ||||||
|  |     allText = allText + headerText; | ||||||
|  |     for (const property in collection[i]) { | ||||||
|  |       if (property === "ID" || property === "InsertDate" || property === attachmentID || property === title) | ||||||
|  |         continue; | ||||||
|  |       allText = allText + collection[i][property] + '\t'; | ||||||
|  |     } | ||||||
|  |     allText = allText + '\r'; | ||||||
|  |   } | ||||||
|  |   copy(allText); | ||||||
|  | } | ||||||
|  |  | ||||||
| function loadDetailsRunInfo() { | function loadDetailsRunInfo() { | ||||||
|   showDetailsDivRunInfo(); |   showDetailsDivRunInfo(); | ||||||
|   loadHeaderAttachmentRunInfo(); |   loadHeaderAttachmentRunInfo(); | ||||||
| @ -667,7 +730,7 @@ function loadDetailsRunInfo() { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   $.getJSON(detailsURL, function (data) { |   $.getJSON(detailsURL, function (data) { | ||||||
|     var gridParms = { |     var gridParams = { | ||||||
|       autoGenerateColumns: false, |       autoGenerateColumns: false, | ||||||
|       primaryKey: "ID", |       primaryKey: "ID", | ||||||
|       features: [ |       features: [ | ||||||
| @ -682,21 +745,96 @@ function loadDetailsRunInfo() { | |||||||
|       dataBound: markAsReviewedRunInfo, |       dataBound: markAsReviewedRunInfo, | ||||||
|     }; |     }; | ||||||
|     if ((_toolType != null) && (_toolType.DataGridAttributes != null)) { |     if ((_toolType != null) && (_toolType.DataGridAttributes != null)) { | ||||||
|       jQuery.extend(gridParms, JSON.parse(_toolType.DataGridAttributes)); |       jQuery.extend(gridParams, JSON.parse(_toolType.DataGridAttributes)); | ||||||
|     } |     } | ||||||
|     $("#DetailsGrid").igGrid(gridParms); |     $("#DetailsGrid").igGrid(gridParams); | ||||||
|     if ($("#chkCopyOnGet").is(':checked')) { |     if ($("#chkCopyOnGet").is(':checked')) { | ||||||
|       copySelected(attachmentID, title, data); |       copySelected(attachmentID, title, data); | ||||||
|     } |     } | ||||||
|   }); |   }); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | function loadDetailsGridFiles() { | ||||||
|  |   showDetailsDivRunInfo(); | ||||||
|  |   loadHeaderAttachmentRunInfo(); | ||||||
|  |   var collection = []; | ||||||
|  |   var gridCreated = $("#DetailsGrid").data("igGrid"); | ||||||
|  |   if (gridCreated) | ||||||
|  |     $("#DetailsGrid").igGrid("destroy"); | ||||||
|  |   var title = "Title"; | ||||||
|  |   var attachmentID = "AttachmentID"; | ||||||
|  |   var gridColumns = [ | ||||||
|  |     { key: "ID", dataType: "number", hidden: true }, | ||||||
|  |     { key: attachmentID, dataType: "string", hidden: true }, | ||||||
|  |     { key: title, dataType: "string", hidden: true }, | ||||||
|  |   ]; | ||||||
|  |   var selectedRow = $("#HeaderGrid").data("igGridSelection").selectedRow(); | ||||||
|  |   if (selectedRow == null) | ||||||
|  |     return; | ||||||
|  |   var rowData = $("#HeaderGrid").data("igGrid").dataSource.dataView()[selectedRow.index]; | ||||||
|  |   for (var i = 0; i < _Collection.length; i++) { | ||||||
|  |     if (_Collection[i].Details == null || _Collection[i].ID !== rowData.ID || _Collection[i].ArchiveLot !== rowData.ArchiveLot) | ||||||
|  |       continue; | ||||||
|  |     for (var j = 0; j < _Collection[i].Details.length; j++) { | ||||||
|  |       _Collection[i].Details[j]['ID'] = j; | ||||||
|  |       collection.push(_Collection[i].Details[j]); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |   if (collection.length === 0) { | ||||||
|  |     gridColumns.push({ | ||||||
|  |       key: "No Data", | ||||||
|  |       headerText: "No Data", | ||||||
|  |       width: "150px", | ||||||
|  |     }); | ||||||
|  |   } | ||||||
|  |   else { | ||||||
|  |     for (var i = 0; i < _toolTypeMetaData.length; i++) { | ||||||
|  |       var f = _toolTypeMetaData[i]; | ||||||
|  |       if ((f.Header == false) && (f.GridDisplayOrder > 0)) { | ||||||
|  |         var col = { | ||||||
|  |           key: f.ApiName, | ||||||
|  |           headerText: f.DisplayTitle, | ||||||
|  |           width: "150px", | ||||||
|  |         }; | ||||||
|  |         if (f.GridAttributes != null) | ||||||
|  |           jQuery.extend(col, JSON.parse(f.GridAttributes)); | ||||||
|  |         if (col.formatter != null) { | ||||||
|  |           if (col.formatter == "boolToYesNo") | ||||||
|  |             col.formatter = boolToYesNo; | ||||||
|  |           else | ||||||
|  |             col.formatter = null; | ||||||
|  |         } | ||||||
|  |         gridColumns.push(col); | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |   var gridParams = { | ||||||
|  |     autoGenerateColumns: false, | ||||||
|  |     primaryKey: "ID", | ||||||
|  |     features: [ | ||||||
|  |       { name: "Selection", mode: "row" }, | ||||||
|  |       { name: "Resizing" }, | ||||||
|  |       { name: "Sorting", type: "local" } | ||||||
|  |     ], | ||||||
|  |     columns: gridColumns, | ||||||
|  |     dataSource: collection, | ||||||
|  |     dataSourceType: 'json' | ||||||
|  |   }; | ||||||
|  |   if ((_toolType != null) && (_toolType.DataGridAttributes != null)) { | ||||||
|  |     jQuery.extend(gridParams, JSON.parse(_toolType.DataGridAttributes)); | ||||||
|  |   } | ||||||
|  |   $("#DetailsGrid").igGrid(gridParams); | ||||||
|  |   if ($("#chkCopyOnGet").is(':checked')) { | ||||||
|  |     copySelectedB(attachmentID, title, collection); | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
| function requestHeaderDataRunInfo() { | function requestHeaderDataRunInfo() { | ||||||
|   var startDate = $("#StartDate").igDatePicker("value"); |   var startDate = $("#StartDate").igDatePicker("value"); | ||||||
|   var startTime = $("#StartTime").igTimePicker("value"); |   var startTime = $("#StartTime").igTimePicker("value"); | ||||||
|   var endDate = $("#EndDate").igDatePicker("value"); |   var endDate = $("#EndDate").igDatePicker("value"); | ||||||
|   var endTime = $("#EndTime").igTimePicker("value"); |   var endTime = $("#EndTime").igTimePicker("value"); | ||||||
|   var parms = { |   var params = { | ||||||
|     datebegin: new Date( |     datebegin: new Date( | ||||||
|       startDate.getFullYear(), startDate.getMonth(), startDate.getDate(), |       startDate.getFullYear(), startDate.getMonth(), startDate.getDate(), | ||||||
|       startTime.getHours(), startTime.getMinutes(), startTime.getSeconds()).toISOString(), |       startTime.getHours(), startTime.getMinutes(), startTime.getSeconds()).toISOString(), | ||||||
| @ -707,7 +845,7 @@ function requestHeaderDataRunInfo() { | |||||||
|   var headerId = 0; |   var headerId = 0; | ||||||
|   if (_initialHeaderId > 0) { |   if (_initialHeaderId > 0) { | ||||||
|     headerId = _initialHeaderId; |     headerId = _initialHeaderId; | ||||||
|     parms.headerid = headerId; |     params.headerid = headerId; | ||||||
|     $("#HeaderId").text(headerId); |     $("#HeaderId").text(headerId); | ||||||
|     $("#HeaderAttachmentId").text(_initialHeaderAttachmentId); |     $("#HeaderAttachmentId").text(_initialHeaderAttachmentId); | ||||||
|     _initialHeaderId = -1; |     _initialHeaderId = -1; | ||||||
| @ -716,7 +854,7 @@ function requestHeaderDataRunInfo() { | |||||||
|     $("#PinButton").hide(); |     $("#PinButton").hide(); | ||||||
|   else |   else | ||||||
|     $("#PinButton").show(); |     $("#PinButton").show(); | ||||||
|   var headerURL = _apiUrl + "/tooltypes/" + _toolType.ID + "/headers?" + $.param(parms); |   var headerURL = _apiUrl + "/tooltypes/" + _toolType.ID + "/headers?" + $.param(params); | ||||||
|   var gridColumns = [ |   var gridColumns = [ | ||||||
|     { key: "ID", dataType: "number", hidden: true }, |     { key: "ID", dataType: "number", hidden: true }, | ||||||
|     { key: "AttachmentID", dataType: "string", hidden: true }, |     { key: "AttachmentID", dataType: "string", hidden: true }, | ||||||
| @ -741,7 +879,7 @@ function requestHeaderDataRunInfo() { | |||||||
|       gridColumns.push(col); |       gridColumns.push(col); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   var gridParms = { |   var gridParams = { | ||||||
|     autoGenerateColumns: false, |     autoGenerateColumns: false, | ||||||
|     primaryKey: "ID", |     primaryKey: "ID", | ||||||
|     height: "100%", |     height: "100%", | ||||||
| @ -758,14 +896,99 @@ function requestHeaderDataRunInfo() { | |||||||
|     responseDataKey: "Results", |     responseDataKey: "Results", | ||||||
|   }; |   }; | ||||||
|   if ((_toolType != null) && (_toolType.HeaderGridAttributes != null)) { |   if ((_toolType != null) && (_toolType.HeaderGridAttributes != null)) { | ||||||
|     jQuery.extend(gridParms, JSON.parse(_toolType.HeaderGridAttributes)); |     jQuery.extend(gridParams, JSON.parse(_toolType.HeaderGridAttributes)); | ||||||
|   } |   } | ||||||
|   $("#HeaderGrid").igGrid(gridParms); |   $("#HeaderGrid").igGrid(gridParams); | ||||||
|   if (headerId > 0) { |   if (headerId > 0) { | ||||||
|     loadDetailsRunInfo(); |     loadDetailsRunInfo(); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | function clearArray(array) { | ||||||
|  |   if (array !== null) { | ||||||
|  |     while (array.length > 0) { | ||||||
|  |       array.pop(); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | function requestHeaderDataFiles() { | ||||||
|  |   clearArray(_Collection); | ||||||
|  |   var toolTypeName = $("#ToolType").igCombo("text"); | ||||||
|  |   var startDate = $("#StartDate").igDatePicker("value"); | ||||||
|  |   var startTime = $("#StartTime").igTimePicker("value"); | ||||||
|  |   var endDate = $("#EndDate").igDatePicker("value"); | ||||||
|  |   var endTime = $("#EndTime").igTimePicker("value"); | ||||||
|  |   var params = { | ||||||
|  |     area: null, | ||||||
|  |     'end-time': new Date( | ||||||
|  |       endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), | ||||||
|  |       endTime.getHours(), endTime.getMinutes(), endTime.getSeconds()).toISOString(), | ||||||
|  |     'equipment-id': toolTypeName, | ||||||
|  |     'search-pattern': '*.wc', | ||||||
|  |     'start-time': new Date( | ||||||
|  |       startDate.getFullYear(), startDate.getMonth(), startDate.getDate(), | ||||||
|  |       startTime.getHours(), startTime.getMinutes(), startTime.getSeconds()).toISOString(), | ||||||
|  |     'wafer-size': null, | ||||||
|  |   } | ||||||
|  |   var headerURL = _apiUrl + "/v1/file-share/archive-data/?" + $.param(params); | ||||||
|  |   var gridColumns = [ | ||||||
|  |     { key: "ID", dataType: "number", hidden: true }, | ||||||
|  |     { key: "ArchiveLot", dataType: "string", hidden: true }, | ||||||
|  |     { key: "ArchiveLastWriteTime", dataType: "date", hidden: true }, | ||||||
|  |     { key: "AttachmentID", dataType: "string", hidden: true }, | ||||||
|  |     { key: "Title", dataType: "string", hidden: true }, | ||||||
|  |   ]; | ||||||
|  |   for (var i = 0; i < _toolTypeMetaData.length; i++) { | ||||||
|  |     var f = _toolTypeMetaData[i]; | ||||||
|  |     if ((f.Header == true) && (f.GridDisplayOrder > 0)) { | ||||||
|  |       var col = { | ||||||
|  |         key: f.ApiName, | ||||||
|  |         headerText: f.DisplayTitle, | ||||||
|  |         width: "150px", | ||||||
|  |       }; | ||||||
|  |       if (f.GridAttributes != null) | ||||||
|  |         jQuery.extend(col, JSON.parse(f.GridAttributes)); | ||||||
|  |       if (col.formatter != null) { | ||||||
|  |         if (col.formatter == "boolToYesNo") | ||||||
|  |           col.formatter = boolToYesNo; | ||||||
|  |         else | ||||||
|  |           col.formatter = null; | ||||||
|  |       } | ||||||
|  |       gridColumns.push(col); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |   $.getJSON(headerURL, function (data) { | ||||||
|  |     var singleton; | ||||||
|  |     for (var i = 0; i < data.length; i++) { | ||||||
|  |       singleton = JSON.parse(data[i].lines.join(' ')); | ||||||
|  |       singleton['ID'] = i; | ||||||
|  |       singleton['ArchiveLot'] = data[i].lot; | ||||||
|  |       singleton['ArchiveLastWriteTime'] = data[i].lastWriteTime; | ||||||
|  |       _Collection.push(singleton); | ||||||
|  |     } | ||||||
|  |     var gridParams = { | ||||||
|  |       autoGenerateColumns: false, | ||||||
|  |       height: "100%", | ||||||
|  |       width: "100%", | ||||||
|  |       features: [ | ||||||
|  |         { name: "Paging", type: "local", recordCountKey: "TotalRows", pageSize: 100, pageSizeList: [50, 100, 250, 500], pageSizeUrlKey: "pageSize", "pageIndexUrlKey": "page" }, | ||||||
|  |         { name: "Selection", mode: "row", rowSelectionChanged: headerSelectionChangedRunInfo }, | ||||||
|  |         { name: "Filtering", type: "local" }, | ||||||
|  |         { name: 'Resizing' }, | ||||||
|  |         { name: "Sorting", type: "local" } | ||||||
|  |       ], | ||||||
|  |       columns: gridColumns, | ||||||
|  |       dataSource: _Collection, | ||||||
|  |       responseDataKey: "Results", | ||||||
|  |     }; | ||||||
|  |     if ((_toolType != null) && (_toolType.HeaderGridAttributes != null)) { | ||||||
|  |       jQuery.extend(gridParams, JSON.parse(_toolType.HeaderGridAttributes)); | ||||||
|  |     } | ||||||
|  |     $("#HeaderGrid").igGrid(gridParams); | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  |  | ||||||
| function reviewButtonRunInfo() { | function reviewButtonRunInfo() { | ||||||
|   var toolTypeId = $("#ToolTypeID").text(); |   var toolTypeId = $("#ToolTypeID").text(); | ||||||
|   var headerId = parseInt($("#HeaderId").text()); |   var headerId = parseInt($("#HeaderId").text()); | ||||||
| @ -816,19 +1039,19 @@ function recipeParametersButtonRunInfo() { | |||||||
|     $.getJSON('https://oi-prod-ec-api.mes.infineon.com:4433/api/oiWizard/materials/rds/' + jsonObject.RDS, function (data) { |     $.getJSON('https://oi-prod-ec-api.mes.infineon.com:4433/api/oiWizard/materials/rds/' + jsonObject.RDS, function (data) { | ||||||
|       $("#RecipeParametersButton").prop("disabled", false); |       $("#RecipeParametersButton").prop("disabled", false); | ||||||
|       var text = ""; |       var text = ""; | ||||||
|       var seperator = '\t'; |       var separator = '\t'; | ||||||
|       for (var i = 0; i < data.rds.rdsLayers.length; i++) { |       for (var i = 0; i < data.rds.rdsLayers.length; i++) { | ||||||
|         text = text |         text = text | ||||||
|           + data.rds.rdsLayers[i].EpiTime |           + data.rds.rdsLayers[i].EpiTime | ||||||
|           + seperator + data.rds.rdsLayers[i].EpiH2Flow |           + separator + data.rds.rdsLayers[i].EpiH2Flow | ||||||
|           + seperator + data.rds.rdsLayers[i].TCSFlow |           + separator + data.rds.rdsLayers[i].TCSFlow | ||||||
|           + seperator + data.rds.rdsLayers[i].DiluentAdjParam |           + separator + data.rds.rdsLayers[i].DiluentAdjParam | ||||||
|           + seperator + data.rds.rdsLayers[i].EpiH2Flow |           + separator + data.rds.rdsLayers[i].EpiH2Flow | ||||||
|           + seperator + data.rds.rdsLayers[i].DopantFlow |           + separator + data.rds.rdsLayers[i].DopantFlow | ||||||
|           + seperator + data.rds.rdsLayers[i].FOffset |           + separator + data.rds.rdsLayers[i].FOffset | ||||||
|           + seperator + data.rds.rdsLayers[i].SOffset |           + separator + data.rds.rdsLayers[i].SOffset | ||||||
|           + seperator + data.rds.rdsLayers[i].ROffset |           + separator + data.rds.rdsLayers[i].ROffset | ||||||
|           + seperator + data.rds.rdsLayers[i].SuscEtch; |           + separator + data.rds.rdsLayers[i].SuscEtch; | ||||||
|       } |       } | ||||||
|       $("#textareaClipboard").val(text); |       $("#textareaClipboard").val(text); | ||||||
|       $("#ModalBodyGrid").igGrid({ |       $("#ModalBodyGrid").igGrid({ | ||||||
| @ -889,14 +1112,14 @@ function viewButtonRunInfo() { | |||||||
|     $.getJSON(detailsURL, function (data) { |     $.getJSON(detailsURL, function (data) { | ||||||
|       var obj = {}; |       var obj = {}; | ||||||
|       var text = ""; |       var text = ""; | ||||||
|       var seperator = jsonObject.RDS.length < 6 ? '\r' : '\t'; |       var separator = jsonObject.RDS.length < 6 ? '\r' : '\t'; | ||||||
|       for (var i = 0; i < data.Results.length && (jsonObject.RDS.length < 6 || i < 9); i++) { |       for (var i = 0; i < data.Results.length; i++) { | ||||||
|         if (data.Results[i].Thickness) { |         if (data.Results[i].Thickness && data.Results[i].Position && parseInt(data.Results[i].Position) > 0) { | ||||||
|           text = text + data.Results[i].Thickness + seperator; |           text = text + data.Results[i].Thickness + separator; | ||||||
|           obj['Point' + (i + 1)] = data.Results[i].Thickness; |           obj['Point' + (i + 1)] = data.Results[i].Thickness; | ||||||
|         } |         } | ||||||
|         else if (data.Results[i].Rs) { |         else if (data.Results[i].Rs && data.Results[i].Position && parseInt(data.Results[i].Position) > 0) { | ||||||
|           text = text + data.Results[i].Rs + seperator; |           text = text + data.Results[i].Rs + separator; | ||||||
|           obj['Point' + (i + 1)] = data.Results[i].Rs; |           obj['Point' + (i + 1)] = data.Results[i].Rs; | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @ -968,18 +1191,18 @@ function pinButtonRunInfo() { | |||||||
|             responseDataKey: "Results", |             responseDataKey: "Results", | ||||||
|           }); |           }); | ||||||
|           var text = ""; |           var text = ""; | ||||||
|           var seperator = '\t'; |           var separator = '\t'; | ||||||
|           for (var i = 0; i < data.Results.length; i++) { |           for (var i = 0; i < data.Results.length; i++) { | ||||||
|             text = text |             text = text | ||||||
|               + data.Results[i].Point1 |               + data.Results[i].Point1 | ||||||
|               + seperator + data.Results[i].Point2 |               + separator + data.Results[i].Point2 | ||||||
|               + seperator + data.Results[i].Point3 |               + separator + data.Results[i].Point3 | ||||||
|               + seperator + data.Results[i].Point4 |               + separator + data.Results[i].Point4 | ||||||
|               + seperator + data.Results[i].Point5 |               + separator + data.Results[i].Point5 | ||||||
|               + seperator + data.Results[i].Point6 |               + separator + data.Results[i].Point6 | ||||||
|               + seperator + data.Results[i].Point7 |               + separator + data.Results[i].Point7 | ||||||
|               + seperator + data.Results[i].Point8 |               + separator + data.Results[i].Point8 | ||||||
|               + seperator + data.Results[i].Point9; |               + separator + data.Results[i].Point9; | ||||||
|           } |           } | ||||||
|           $("#textareaClipboard").val(text); |           $("#textareaClipboard").val(text); | ||||||
|           $("#ModalBodyGrid").igGrid({ |           $("#ModalBodyGrid").igGrid({ | ||||||
| @ -1274,43 +1497,29 @@ function restartButton() { | |||||||
|   clearWorkMaterial(); |   clearWorkMaterial(); | ||||||
| }; | }; | ||||||
|  |  | ||||||
| function initFiles(apiUrl, staticUrl, initialToolTypeID, initialHeaderId, initialHeaderAttachmentId) { | function initFiles(apiUrl, staticUrl, ecMesaFileShareCharacterizationSi) { | ||||||
|   _apiUrl = apiUrl; |   _apiUrl = apiUrl; | ||||||
|  |   _initialHeaderId = "" | ||||||
|   _StaticUrl = staticUrl; |   _StaticUrl = staticUrl; | ||||||
|   _initialHeaderId = initialHeaderId === null ? "" : initialHeaderId; |   _initialHeaderAttachmentId = ""; | ||||||
|   _initialHeaderAttachmentId = initialHeaderAttachmentId === null ? "" : initialHeaderAttachmentId; |   _EcMesaFileShareCharacterizationSi = ecMesaFileShareCharacterizationSi; | ||||||
|   $.getJSON(_apiUrl + '/tooltypes', function (data) { |   $.getJSON(_apiUrl + '/v1/file-share/equipment-ids', function (data) { | ||||||
|     for (var i = 0; i < data.Results.length; i++) { |  | ||||||
|       if (data.Results[i].ToolTypeName === "CDE") { |  | ||||||
|         _CdeId = data.Results[i].ID; |  | ||||||
|       } |  | ||||||
|       else if (data.Results[i].ToolTypeName === "BioRad") { |  | ||||||
|         _BioRadId = data.Results[i].ID; |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|     $("#ToolType").igCombo({ |     $("#ToolType").igCombo({ | ||||||
|       dataSource: data, |       dataSource: data, | ||||||
|       responseDataKey: "Results", |       textKey: "toolTypeName", | ||||||
|       textKey: "ToolTypeName", |       valueKey: "id", | ||||||
|       valueKey: "ID", |  | ||||||
|       mode: "dropdown", |       mode: "dropdown", | ||||||
|       width: 150, |       width: 150, | ||||||
|       itemsRendered: function (evt, ui) { |       itemsRendered: function () { | ||||||
|         loadHeaderGridRunInfo(); |         loadHeaderGridFiles(); | ||||||
|       }, |       }, | ||||||
|       selectionChanged: loadHeaderGridRunInfo, |       selectionChanged: loadHeaderGridFiles, | ||||||
|       initialSelectedItems: [{ value: initialToolTypeID === null ? 1 : initialToolTypeID }] |  | ||||||
|     }); |     }); | ||||||
|   }); |   }); | ||||||
|   setInitialDateTimesRunInfo(6 * 60 * 60 * 1000); |   setInitialDateTimesRunInfo(6 * 60 * 60 * 1000); | ||||||
|   $("#HeaderGrid").on("dblclick", "tr", loadDetailsRunInfo); |   $("#HeaderGrid").on("dblclick", "tr", loadDetailsGridFiles); | ||||||
|   $("#LoadHeadersButton").click(loadHeaderGridRunInfo); |   $("#LoadHeadersButton").click(loadHeaderGridFiles); | ||||||
|   $("#GetDataButton").click(loadDetailsRunInfo); |   $("#GetDataButton").click(loadDetailsGridFiles); | ||||||
|   $("#ReviewButton").click(reviewButtonRunInfo); |  | ||||||
|   $("#RecipeParametersButton").click(recipeParametersButtonRunInfo); |  | ||||||
|   $("#ViewButton").click(viewButtonRunInfo); |  | ||||||
|   $("#PinButton").click(pinButtonRunInfo); |  | ||||||
|   $("#OIExportButton").click(oiExportButtonRunInfo); |  | ||||||
|   setInterval(function () { |   setInterval(function () { | ||||||
|     if ($("#chkAutoRefresh").is(':checked')) { |     if ($("#chkAutoRefresh").is(':checked')) { | ||||||
|       setInitialDateTimesRunInfo(null); |       setInitialDateTimesRunInfo(null); | ||||||
|  | |||||||
| @ -1,43 +0,0 @@ | |||||||
| <!DOCTYPE html> |  | ||||||
| <html> |  | ||||||
|  |  | ||||||
| <head> |  | ||||||
|     <meta charset="utf-8" /> |  | ||||||
|     <meta name="viewport" content="width=device-width" /> |  | ||||||
|     <title>FI Backlog HiRel (Leominster)</title> |  | ||||||
|     <link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?v=2024-09-07-08-19" rel="stylesheet" /> |  | ||||||
|     <link href="/igniteui/css/structure/infragistics.css?v=2024-09-07-08-19" rel="stylesheet" /> |  | ||||||
|     <script src="/js/jquery-3.6.0.min.js?v=2024-09-07-08-19" type="text/javascript"></script> |  | ||||||
|     <script src="/js/jquery-ui.min.js?v=2024-09-07-08-19" type="text/javascript"></script> |  | ||||||
|     <script src="/js/leo.js?v=2024-09-07-08-19" type="text/javascript"></script> |  | ||||||
|     <script src="/igniteui/js/infragistics.core.js?v=2024-09-07-08-19" type="text/javascript"></script> |  | ||||||
|     <script src="/igniteui/js/infragistics.lob.js?v=2024-09-07-08-19" type="text/javascript"></script> |  | ||||||
|     <script src="/igniteui/js/infragistics.dv.js?v=2024-09-07-08-19" type="text/javascript"></script> |  | ||||||
| </head> |  | ||||||
| <body> |  | ||||||
|     <div style="float: right;"> |  | ||||||
|         <a target="_blank" href="/json/Feature.html">Feature(s)</a> |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     <h2>FI Backlog HiRel (Leominster)</h2> |  | ||||||
|  |  | ||||||
|     <div style="height: 550px;" id="HeaderGridDiv"> |  | ||||||
|         <table id="HeaderGrid"></table> |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     <br />  |  | ||||||
|  |  | ||||||
|     <div id="AllGridDiv"> |  | ||||||
|         <table id="AllGrid"></table> |  | ||||||
|     </div> |  | ||||||
|      |  | ||||||
|     <script> |  | ||||||
|      |  | ||||||
|         $(document).ready(function () {     |  | ||||||
|             initIndex("/json/work-items.json?v=2024-09-07-08-19");     |  | ||||||
|         }); |  | ||||||
|      |  | ||||||
|     </script> |  | ||||||
| </body> |  | ||||||
|  |  | ||||||
| </html> |  | ||||||
| @ -1,43 +0,0 @@ | |||||||
| <!DOCTYPE html> |  | ||||||
| <html> |  | ||||||
|  |  | ||||||
| <head> |  | ||||||
|     <meta charset="utf-8" /> |  | ||||||
|     <meta name="viewport" content="width=device-width" /> |  | ||||||
|     <title>FI Backlog Mesa</title> |  | ||||||
|     <link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?v=2024-09-07-08-19" rel="stylesheet" /> |  | ||||||
|     <link href="/igniteui/css/structure/infragistics.css?v=2024-09-07-08-19" rel="stylesheet" /> |  | ||||||
|     <script src="/js/jquery-3.6.0.min.js?v=2024-09-07-08-19" type="text/javascript"></script> |  | ||||||
|     <script src="/js/jquery-ui.min.js?v=2024-09-07-08-19" type="text/javascript"></script> |  | ||||||
|     <script src="/js/mes.js?v=2024-09-07-08-19" type="text/javascript"></script> |  | ||||||
|     <script src="/igniteui/js/infragistics.core.js?v=2024-09-07-08-19" type="text/javascript"></script> |  | ||||||
|     <script src="/igniteui/js/infragistics.lob.js?v=2024-09-07-08-19" type="text/javascript"></script> |  | ||||||
|     <script src="/igniteui/js/infragistics.dv.js?v=2024-09-07-08-19" type="text/javascript"></script> |  | ||||||
| </head> |  | ||||||
| <body> |  | ||||||
|     <div style="float: right;"> |  | ||||||
|         <a target="_blank" href="/json/Feature.html">Feature(s)</a> |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     <h2>FI Backlog Mesa</h2> |  | ||||||
|  |  | ||||||
|     <div style="height: 550px;" id="HeaderGridDiv"> |  | ||||||
|         <table id="HeaderGrid"></table> |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     <br />  |  | ||||||
|  |  | ||||||
|     <div id="AllGridDiv"> |  | ||||||
|         <table id="AllGrid"></table> |  | ||||||
|     </div> |  | ||||||
|      |  | ||||||
|     <script> |  | ||||||
|      |  | ||||||
|         $(document).ready(function () {     |  | ||||||
|             initIndex("/json/work-items.json?v=2024-09-07-08-19");     |  | ||||||
|         }); |  | ||||||
|      |  | ||||||
|     </script> |  | ||||||
| </body> |  | ||||||
|  |  | ||||||
| </html> |  | ||||||
							
								
								
									
										12
									
								
								Static/styles/files.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								Static/styles/files.css
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | |||||||
|  | #HeaderGridDiv, | ||||||
|  | #DetailsGridDiv { | ||||||
|  |     font-size: 12px; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | #HeaderGrid { | ||||||
|  |     font-family: monospace; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | #DetailsGrid { | ||||||
|  |     font-family: monospace; | ||||||
|  | } | ||||||
							
								
								
									
										11
									
								
								Tests/.vscode/tc_col_metrology-viewer-dev.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								Tests/.vscode/tc_col_metrology-viewer-dev.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | |||||||
|  | ### | ||||||
|  | POST http://localhost:5126/api/inbound/cde | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET http://localhost:5126/api/export/headers | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | POST http://localhost:5003/api/inbound/SRP | ||||||
|  | Accept: application/json | ||||||
							
								
								
									
										5
									
								
								Tests/.vscode/tc_col_metrology-viewer-v1.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								Tests/.vscode/tc_col_metrology-viewer-v1.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | |||||||
|  | @host = https://oi-metrology-viewer-prod.mes.infineon.com:4432/api/v1 | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/WaferCounter/8INCH/last-quantity-and-slot-map/?area=MU | ||||||
|  | Accept: application/json | ||||||
							
								
								
									
										21
									
								
								Tests/.vscode/tc_col_metrology-viewer-v2.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								Tests/.vscode/tc_col_metrology-viewer-v2.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,21 @@ | |||||||
|  | @host = https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2 | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/1677273357/header | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/1677273357/events | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/1677273357/descriptors | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/1677273357/data | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/1677273357/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 14:15:00 | ||||||
|  | Accept: application/json | ||||||
							
								
								
									
										20
									
								
								Tests/.vscode/tc_col_metrology-viewer-v3.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								Tests/.vscode/tc_col_metrology-viewer-v3.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,20 @@ | |||||||
|  | @host = https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV3 | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/61/product-data-average-sum-of-defects-process-mean-process-sigma?recipe=8IN_IFX_ROTR | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/epi-pro-temp-verificatio | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/epi-pro-temp-verification-row | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/111/header | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV3/CDE4_250520183333000/header | ||||||
							
								
								
									
										32
									
								
								Tests/.vscode/tc_col_metrology-viewer-v4.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								Tests/.vscode/tc_col_metrology-viewer-v4.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,32 @@ | |||||||
|  | @host = http://metrology-viewer-prod.mes.infineon.com:5002/api/v4/InfinityQS | ||||||
|  | @hostB = https://oi-metrology-viewer-prod.mes.infineon.com:4435/api/v4/InfinityQS | ||||||
|  | @hostE = https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/t1ooltypes | ||||||
|  | @hostF = https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/v4/InfinityQS | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/reactors | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/4589/production-specification | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/engineering-spc-review | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{hostB}}/58/last-group-id-with-value/?part=4840&test=1228920625 | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{hostE}}/-1/headertitles | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{hostF}}/epi-pro-temp-verification | ||||||
|  | Accept: text/html | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{hostF}}/epi-pro-temp-verification-rows | ||||||
|  | Accept: application/json | ||||||
							
								
								
									
										51
									
								
								Tests/.vscode/tc_col_metrology-viewer.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								Tests/.vscode/tc_col_metrology-viewer.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,51 @@ | |||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com/api/tooltypes | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com/api/export/export | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | POST http://oi-metrology-viewer-prod.mes.infineon.com/api/inbound/SRP | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com/api/export/pdsf | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com/api/export/logistics | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com/api/export/logistics | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com/api/export/headers | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/header | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/events | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/descriptors | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/data | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/commandText/?sub_group_id=1677273357&process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 14:15:00 | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET https://oi-metrology-viewer-prod.mes.infineon.com:4436/api/AppSettings/App | ||||||
|  | Accept: application/json | ||||||
							
								
								
									
										23
									
								
								Tests/.vscode/wafer-counter.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								Tests/.vscode/wafer-counter.http
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | |||||||
|  |  | ||||||
|  | @host = https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/file-share/archive-data/?area=FQA&equipment-id=FQA-8INCH&search-pattern=*.wc&wafer-size=8INCH | ||||||
|  | @hostB = https://oi-metrology-viewer-prod.mes.infineon.com:4437/api/v1 | ||||||
|  | @hostC = https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1 | ||||||
|  | @waferSize = 6INCH | ||||||
|  | @area = FQA | ||||||
|  | @cassID = Test | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/archive-data/?area=FQA&equipment-id=FQA-8INCH&search-pattern=*.wc&wafer-size=8INCH | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{host}}/archive-data/?area=FQA&equipment-id=FQA-8INCH&search-pattern=*.wc&wafer-size=8INCH | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{hostC}}/WaferCounter/{{waferSize}}/last-quantity-and-slot-map/?area={{area}}&text={{cassID}} | ||||||
|  | Accept: application/json | ||||||
|  |  | ||||||
|  | ### | ||||||
|  | GET {{hostB}}/file-share/equipment-ids | ||||||
|  | Accept: application/json | ||||||
| @ -26,15 +26,15 @@ | |||||||
|         <DefineConstants>Linux</DefineConstants> |         <DefineConstants>Linux</DefineConstants> | ||||||
|     </PropertyGroup> |     </PropertyGroup> | ||||||
|     <ItemGroup> |     <ItemGroup> | ||||||
|         <PackageReference Include="coverlet.collector" Version="6.0.2" /> |         <PackageReference Include="coverlet.collector" Version="6.0.4" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" /> |         <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.12" /> | ||||||
|         <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" /> |         <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" /> | ||||||
|         <PackageReference Include="MSTest.TestAdapter" Version="3.5.2" /> |         <PackageReference Include="MSTest.TestAdapter" Version="3.7.2" /> | ||||||
|         <PackageReference Include="MSTest.TestFramework" Version="3.5.2" /> |         <PackageReference Include="MSTest.TestFramework" Version="3.7.2" /> | ||||||
|     </ItemGroup> |     </ItemGroup> | ||||||
|     <ItemGroup> |     <ItemGroup> | ||||||
|         <ProjectReference Include="..\Shared\OI.Metrology.Shared.csproj" /> |         <ProjectReference Include="..\Shared\OI.Metrology.Shared.csproj" /> | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ public class UnitAwaitingDispoController | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -23,7 +23,7 @@ public class UnitAwaitingDispoController | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -35,7 +35,7 @@ public class UnitAwaitingDispoController | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IAwaitingDispoController<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IAwaitingDispoController<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [Ignore] |     [Ignore] | ||||||
| @ -47,7 +47,7 @@ public class UnitAwaitingDispoController | |||||||
|         IMetrologyRepository? metrologyRepository = serviceProvider?.GetRequiredService<IMetrologyRepository>(); |         IMetrologyRepository? metrologyRepository = serviceProvider?.GetRequiredService<IMetrologyRepository>(); | ||||||
|         IEnumerable<AwaitingDisposition>? awaitingDispositions = metrologyRepository?.GetAwaitingDisposition(); |         IEnumerable<AwaitingDisposition>? awaitingDispositions = metrologyRepository?.GetAwaitingDisposition(); | ||||||
|         Assert.IsTrue(awaitingDispositions is not null); |         Assert.IsTrue(awaitingDispositions is not null); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [Ignore] |     [Ignore] | ||||||
| @ -59,7 +59,7 @@ public class UnitAwaitingDispoController | |||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         string? json = await httpClient.GetStringAsync($"api/{_ControllerName}"); |         string? json = await httpClient.GetStringAsync($"api/{_ControllerName}"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(IMetrologyRepository.GetAwaitingDisposition)}Api.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(IMetrologyRepository.GetAwaitingDisposition)}Api.json"), json); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [Ignore] |     [Ignore] | ||||||
| @ -70,7 +70,7 @@ public class UnitAwaitingDispoController | |||||||
|         IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider; |         IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider; | ||||||
|         IMetrologyRepository? metrologyRepository = serviceProvider?.GetRequiredService<IMetrologyRepository>(); |         IMetrologyRepository? metrologyRepository = serviceProvider?.GetRequiredService<IMetrologyRepository>(); | ||||||
|         _ = metrologyRepository?.UpdateReviewDate(toolTypeId: 1, headerId: 1, clearDate: false); |         _ = metrologyRepository?.UpdateReviewDate(toolTypeId: 1, headerId: 1, clearDate: false); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [Ignore] |     [Ignore] | ||||||
| @ -81,7 +81,7 @@ public class UnitAwaitingDispoController | |||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         _ = await httpClient.GetFromJsonAsync<object>($"api/{_ControllerName}/markasreviewed"); |         _ = await httpClient.GetFromJsonAsync<object>($"api/{_ControllerName}/markasreviewed"); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [Ignore] |     [Ignore] | ||||||
| @ -93,7 +93,7 @@ public class UnitAwaitingDispoController | |||||||
|         IMetrologyRepository? metrologyRepository = serviceProvider?.GetRequiredService<IMetrologyRepository>(); |         IMetrologyRepository? metrologyRepository = serviceProvider?.GetRequiredService<IMetrologyRepository>(); | ||||||
|         int? dateCleared = metrologyRepository?.UpdateReviewDate(toolTypeId: 1, headerId: 1, clearDate: true); |         int? dateCleared = metrologyRepository?.UpdateReviewDate(toolTypeId: 1, headerId: 1, clearDate: true); | ||||||
|         Assert.IsTrue(dateCleared <= 1); |         Assert.IsTrue(dateCleared <= 1); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [Ignore] |     [Ignore] | ||||||
| @ -104,7 +104,7 @@ public class UnitAwaitingDispoController | |||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         _ = await httpClient.PostAsync($"api/{_ControllerName}/markasawaiting", null); |         _ = await httpClient.PostAsync($"api/{_ControllerName}/markasawaiting", null); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -115,7 +115,7 @@ public class UnitAwaitingDispoController | |||||||
|         IMetrologyRepository? metrologyRepository = serviceProvider?.GetRequiredService<IMetrologyRepository>(); |         IMetrologyRepository? metrologyRepository = serviceProvider?.GetRequiredService<IMetrologyRepository>(); | ||||||
|         Guid? guid = metrologyRepository?.GetHeaderAttachmentID(toolTypeId: 1, headerId: 1); |         Guid? guid = metrologyRepository?.GetHeaderAttachmentID(toolTypeId: 1, headerId: 1); | ||||||
|         Assert.IsNotNull(guid); |         Assert.IsNotNull(guid); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -126,7 +126,7 @@ public class UnitAwaitingDispoController | |||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         HttpResponseMessage httpResponseMessage = await httpClient.GetAsync($"api/{_ControllerName}/1/header-attachment-id?headerid=1"); |         HttpResponseMessage httpResponseMessage = await httpClient.GetAsync($"api/{_ControllerName}/1/header-attachment-id?headerid=1"); | ||||||
|         Assert.IsNotNull(httpResponseMessage.Content); |         Assert.IsNotNull(httpResponseMessage.Content); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
| @ -15,7 +15,7 @@ public class UnitInboundController | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -23,7 +23,7 @@ public class UnitInboundController | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -42,7 +42,7 @@ public class UnitInboundController | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IInboundController<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IInboundController<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -60,7 +60,7 @@ public class UnitInboundController | |||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         _ = await httpClient.PostAsync($"api/{_ControllerName}/BioRad", GetStringContent()); |         _ = await httpClient.PostAsync($"api/{_ControllerName}/BioRad", GetStringContent()); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -72,7 +72,7 @@ public class UnitInboundController | |||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         _ = await httpClient.PostAsync($"api/{_ControllerName}/BioRad/attachment", GetStringContent()); |         _ = await httpClient.PostAsync($"api/{_ControllerName}/BioRad/attachment", GetStringContent()); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ public class UnitTestAppSettingsController | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -23,7 +23,7 @@ public class UnitTestAppSettingsController | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -42,7 +42,7 @@ public class UnitTestAppSettingsController | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IAppSettingsController<object>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IAppSettingsController<object>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -53,7 +53,7 @@ public class UnitTestAppSettingsController | |||||||
|         IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider; |         IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider; | ||||||
|         IAppSettingsRepository<Server.Models.Binder.AppSettings>? appSettingsRepository = serviceProvider?.GetRequiredService<IAppSettingsRepository<Server.Models.Binder.AppSettings>>(); |         IAppSettingsRepository<Server.Models.Binder.AppSettings>? appSettingsRepository = serviceProvider?.GetRequiredService<IAppSettingsRepository<Server.Models.Binder.AppSettings>>(); | ||||||
|         appSettingsRepository?.VerifyConnectionStrings(); |         appSettingsRepository?.VerifyConnectionStrings(); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -64,7 +64,7 @@ public class UnitTestAppSettingsController | |||||||
|         IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider; |         IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider; | ||||||
|         AppSettings? appSettings = serviceProvider?.GetRequiredService<AppSettings>(); |         AppSettings? appSettings = serviceProvider?.GetRequiredService<AppSettings>(); | ||||||
|         Assert.IsNotNull(appSettings); |         Assert.IsNotNull(appSettings); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -76,7 +76,7 @@ public class UnitTestAppSettingsController | |||||||
|         IAppSettingsRepository<Server.Models.Binder.AppSettings>? appSettingsRepository = serviceProvider?.GetRequiredService<IAppSettingsRepository<Server.Models.Binder.AppSettings>>(); |         IAppSettingsRepository<Server.Models.Binder.AppSettings>? appSettingsRepository = serviceProvider?.GetRequiredService<IAppSettingsRepository<Server.Models.Binder.AppSettings>>(); | ||||||
|         Server.Models.Binder.AppSettings? appSettings = appSettingsRepository?.GetAppSettings(); |         Server.Models.Binder.AppSettings? appSettings = appSettingsRepository?.GetAppSettings(); | ||||||
|         Assert.IsTrue(appSettings is not null); |         Assert.IsTrue(appSettings is not null); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -94,7 +94,7 @@ public class UnitTestAppSettingsController | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetAppSettings)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetAppSettings)}.json"), json); | ||||||
|         Assert.IsNotNull(json); |         Assert.IsNotNull(json); | ||||||
|         Assert.IsTrue(json != "[]"); |         Assert.IsTrue(json != "[]"); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -106,7 +106,7 @@ public class UnitTestAppSettingsController | |||||||
|         IAppSettingsRepository<Server.Models.Binder.AppSettings>? appSettingsRepository = serviceProvider?.GetRequiredService<IAppSettingsRepository<Server.Models.Binder.AppSettings>>(); |         IAppSettingsRepository<Server.Models.Binder.AppSettings>? appSettingsRepository = serviceProvider?.GetRequiredService<IAppSettingsRepository<Server.Models.Binder.AppSettings>>(); | ||||||
|         string? result = appSettingsRepository?.GetBuildNumberAndGitCommitSeven(); |         string? result = appSettingsRepository?.GetBuildNumberAndGitCommitSeven(); | ||||||
|         Assert.IsTrue(result is not null); |         Assert.IsTrue(result is not null); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -123,7 +123,7 @@ public class UnitTestAppSettingsController | |||||||
|         string json = await httpResponseMessage.Content.ReadAsStringAsync(); |         string json = await httpResponseMessage.Content.ReadAsStringAsync(); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetBuildNumberAndGitCommitSeven)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetBuildNumberAndGitCommitSeven)}.json"), json); | ||||||
|         Assert.IsNotNull(json); |         Assert.IsNotNull(json); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
| @ -14,7 +14,7 @@ public class UnitTestClientSettingsController | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -22,7 +22,7 @@ public class UnitTestClientSettingsController | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -34,7 +34,7 @@ public class UnitTestClientSettingsController | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IClientSettingsController<object>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IClientSettingsController<object>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -47,7 +47,7 @@ public class UnitTestClientSettingsController | |||||||
|         List<string>? clientSettings = clientSettingsRepository?.GetClientSettings(null); |         List<string>? clientSettings = clientSettingsRepository?.GetClientSettings(null); | ||||||
|         Assert.IsTrue(clientSettings is not null); |         Assert.IsTrue(clientSettings is not null); | ||||||
| #endif | #endif | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| #pragma warning disable CS1998 | #pragma warning disable CS1998 | ||||||
| @ -67,7 +67,7 @@ public class UnitTestClientSettingsController | |||||||
|         Assert.IsNotNull(json); |         Assert.IsNotNull(json); | ||||||
|         Assert.IsTrue(json != "[]"); |         Assert.IsTrue(json != "[]"); | ||||||
| #endif | #endif | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
| #pragma warning restore CS1998 | #pragma warning restore CS1998 | ||||||
|  |  | ||||||
| @ -79,7 +79,7 @@ public class UnitTestClientSettingsController | |||||||
|         IClientSettingsRepository? clientSettingsRepository = serviceProvider?.GetRequiredService<IClientSettingsRepository>(); |         IClientSettingsRepository? clientSettingsRepository = serviceProvider?.GetRequiredService<IClientSettingsRepository>(); | ||||||
|         string? ipAddress = clientSettingsRepository?.GetIpAddress(null); |         string? ipAddress = clientSettingsRepository?.GetIpAddress(null); | ||||||
|         Assert.IsTrue(ipAddress is not null); |         Assert.IsTrue(ipAddress is not null); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -95,7 +95,7 @@ public class UnitTestClientSettingsController | |||||||
|         string json = await httpResponseMessage.Content.ReadAsStringAsync(); |         string json = await httpResponseMessage.Content.ReadAsStringAsync(); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetIpAddress)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetIpAddress)}.json"), json); | ||||||
|         Assert.IsNotNull(json); |         Assert.IsNotNull(json); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
| @ -16,7 +16,7 @@ public class UnitTestExportController | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -24,7 +24,7 @@ public class UnitTestExportController | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -43,7 +43,7 @@ public class UnitTestExportController | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IExportController<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IExportController<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -61,7 +61,7 @@ public class UnitTestExportController | |||||||
|         IExportRepository? exportRepository = serviceProvider?.GetRequiredService<IExportRepository>(); |         IExportRepository? exportRepository = serviceProvider?.GetRequiredService<IExportRepository>(); | ||||||
|         string? result = exportRepository?.GetExport(GetHeaderCommon()); |         string? result = exportRepository?.GetExport(GetHeaderCommon()); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -74,7 +74,7 @@ public class UnitTestExportController | |||||||
|         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/export"); |         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/export"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetExport)}.txt"), result); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetExport)}.txt"), result); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -86,7 +86,7 @@ public class UnitTestExportController | |||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/export", GetStringContent()); |         HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/export", GetStringContent()); | ||||||
|         Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK); |         Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -98,7 +98,7 @@ public class UnitTestExportController | |||||||
|         IExportRepository? exportRepository = serviceProvider?.GetRequiredService<IExportRepository>(); |         IExportRepository? exportRepository = serviceProvider?.GetRequiredService<IExportRepository>(); | ||||||
|         Result<HeaderCommon[]>? result = exportRepository?.GetHeaders(GetHeaderCommon()); |         Result<HeaderCommon[]>? result = exportRepository?.GetHeaders(GetHeaderCommon()); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -112,7 +112,7 @@ public class UnitTestExportController | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetHeaders)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetHeaders)}.json"), json); | ||||||
|         Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json); |         Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -124,7 +124,7 @@ public class UnitTestExportController | |||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/headers", GetStringContent()); |         HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/headers", GetStringContent()); | ||||||
|         Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK); |         Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -136,7 +136,7 @@ public class UnitTestExportController | |||||||
|         IExportRepository? exportRepository = serviceProvider?.GetRequiredService<IExportRepository>(); |         IExportRepository? exportRepository = serviceProvider?.GetRequiredService<IExportRepository>(); | ||||||
|         Result<HeaderCommon[]>? result = exportRepository?.GetLogistics(GetHeaderCommon()); |         Result<HeaderCommon[]>? result = exportRepository?.GetLogistics(GetHeaderCommon()); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -150,7 +150,7 @@ public class UnitTestExportController | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetLogistics)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetLogistics)}.json"), json); | ||||||
|         Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json); |         Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -162,7 +162,7 @@ public class UnitTestExportController | |||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/logistics", GetStringContent()); |         HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/logistics", GetStringContent()); | ||||||
|         Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK); |         Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -174,7 +174,7 @@ public class UnitTestExportController | |||||||
|         IExportRepository? exportRepository = serviceProvider?.GetRequiredService<IExportRepository>(); |         IExportRepository? exportRepository = serviceProvider?.GetRequiredService<IExportRepository>(); | ||||||
|         string? result = exportRepository?.GetProcessDataStandardFormat(GetHeaderCommon()); |         string? result = exportRepository?.GetProcessDataStandardFormat(GetHeaderCommon()); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -187,7 +187,7 @@ public class UnitTestExportController | |||||||
|         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/processDataStandardFormat"); |         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/processDataStandardFormat"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetProcessDataStandardFormat)}.pdsf"), result); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetProcessDataStandardFormat)}.pdsf"), result); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -199,7 +199,7 @@ public class UnitTestExportController | |||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/processDataStandardFormat", GetStringContent()); |         HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/processDataStandardFormat", GetStringContent()); | ||||||
|         Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK); |         Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -215,7 +215,7 @@ public class UnitTestExportController | |||||||
|         Result<DataTable>? result = exportRepository?.GetExportData(metrologyRepository, toolTypeId: 1, datebegin: null, dateend: null); |         Result<DataTable>? result = exportRepository?.GetExportData(metrologyRepository, toolTypeId: 1, datebegin: null, dateend: null); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsNotNull(result.Results.Rows.Count > 0); |         Assert.IsNotNull(result.Results.Rows.Count > 0); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [Ignore] |     [Ignore] | ||||||
| @ -230,7 +230,7 @@ public class UnitTestExportController | |||||||
|         Result<DataTable>? result = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json); |         Result<DataTable>? result = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsNotNull(result.Results.Rows.Count > 0); |         Assert.IsNotNull(result.Results.Rows.Count > 0); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -243,7 +243,7 @@ public class UnitTestExportController | |||||||
|         Assert.IsTrue(metrologyRepository is not null); |         Assert.IsTrue(metrologyRepository is not null); | ||||||
|         string? result = exportRepository?.GetCSVExport(metrologyRepository, toolTypeId: 1, datebegin: null, dateend: null); |         string? result = exportRepository?.GetCSVExport(metrologyRepository, toolTypeId: 1, datebegin: null, dateend: null); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [Ignore] |     [Ignore] | ||||||
| @ -256,7 +256,7 @@ public class UnitTestExportController | |||||||
|         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/1/csv?datebegin=&dateend="); |         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/1/csv?datebegin=&dateend="); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCSVExport)}.csv"), result); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCSVExport)}.csv"), result); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
| @ -1,8 +1,10 @@ | |||||||
| using Microsoft.AspNetCore.Mvc.Testing; | using Microsoft.AspNetCore.Mvc.Testing; | ||||||
| using Microsoft.Extensions.DependencyInjection; | using Microsoft.Extensions.DependencyInjection; | ||||||
| using Microsoft.Extensions.Logging; | using Microsoft.Extensions.Logging; | ||||||
|  | using OI.Metrology.Shared.DataModels; | ||||||
| using OI.Metrology.Shared.Models; | using OI.Metrology.Shared.Models; | ||||||
| using OI.Metrology.Shared.Models.Stateless; | using OI.Metrology.Shared.Models.Stateless; | ||||||
|  | using System.Collections.ObjectModel; | ||||||
|  |  | ||||||
| namespace OI.Metrology.Tests; | namespace OI.Metrology.Tests; | ||||||
|  |  | ||||||
| @ -14,7 +16,7 @@ public class UnitTestFileShareController | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Wafer.Counter.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Wafer.Counter.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -22,7 +24,7 @@ public class UnitTestFileShareController | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Wafer.Counter.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Wafer.Counter.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Wafer.Counter.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Wafer.Counter.Program>>(); | ||||||
| @ -42,7 +44,7 @@ public class UnitTestFileShareController | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IFileShareController<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IFileShareController<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -55,7 +57,7 @@ public class UnitTestFileShareController | |||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         string? response = await httpClient.GetStringAsync($"api/v1/file-share/copy-file/?from=\\\\mesfs.infineon.com\\EC_Metrology_Si\\MetrologyAttachments\\CDERunHeader_\\2024\\WW11\\247233\\CDE5_240315162756858.pdsf&to=\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08RESIMAPCDE\\Test\\a.pdsf"); |         string? response = await httpClient.GetStringAsync($"api/v1/file-share/copy-file/?from=\\\\mesfs.infineon.com\\EC_Metrology_Si\\MetrologyAttachments\\CDERunHeader_\\2024\\WW11\\247233\\CDE5_240315162756858.pdsf&to=\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08RESIMAPCDE\\Test\\a.pdsf"); | ||||||
|         Assert.IsNotNull(response); |         Assert.IsNotNull(response); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -68,7 +70,7 @@ public class UnitTestFileShareController | |||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         string? response = await httpClient.GetStringAsync($"api/v1/file-share/move-file/?from=\\\\mesfs.infineon.com\\EC_Metrology_Si\\MetrologyAttachments\\CDERunHeader_\\2024\\WW11\\247233\\CDE5_240315162756858.pdsf&to=\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08RESIMAPCDE\\Test\\a.pdsf"); |         string? response = await httpClient.GetStringAsync($"api/v1/file-share/move-file/?from=\\\\mesfs.infineon.com\\EC_Metrology_Si\\MetrologyAttachments\\CDERunHeader_\\2024\\WW11\\247233\\CDE5_240315162756858.pdsf&to=\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08RESIMAPCDE\\Test\\a.pdsf"); | ||||||
|         Assert.IsNotNull(response); |         Assert.IsNotNull(response); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -80,7 +82,7 @@ public class UnitTestFileShareController | |||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         string? response = await httpClient.GetStringAsync($"api/v1/file-share/file-write/?path=\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08RESIMAPCDE\\Test\\b.pdsf&contents=b"); |         string? response = await httpClient.GetStringAsync($"api/v1/file-share/file-write/?path=\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08RESIMAPCDE\\Test\\b.pdsf&contents=b"); | ||||||
|         Assert.IsNotNull(response); |         Assert.IsNotNull(response); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -88,7 +90,7 @@ public class UnitTestFileShareController | |||||||
|     public void GetArchiveData() |     public void GetArchiveData() | ||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         List<CharacterizationInfo>? result; |         ReadOnlyCollection<CharacterizationInfo>? result; | ||||||
|         CharacterizationParameters characterizationParameters; |         CharacterizationParameters characterizationParameters; | ||||||
|         IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider; |         IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider; | ||||||
|         IFileShareRepository? fileShareRepository = serviceProvider?.GetRequiredService<IFileShareRepository>(); |         IFileShareRepository? fileShareRepository = serviceProvider?.GetRequiredService<IFileShareRepository>(); | ||||||
| @ -101,7 +103,7 @@ public class UnitTestFileShareController | |||||||
|         characterizationParameters = new(string.Empty, "CDE5", "CDE*.json", null, null, "8INCH"); |         characterizationParameters = new(string.Empty, "CDE5", "CDE*.json", null, null, "8INCH"); | ||||||
|         result = fileShareRepository?.GetArchiveData(characterizationParameters); |         result = fileShareRepository?.GetArchiveData(characterizationParameters); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -113,7 +115,31 @@ public class UnitTestFileShareController | |||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         string? response = await httpClient.GetStringAsync($"api/v1/file-share/archive-data/?area=FQA&equipment-id=FQA-8INCH&search-pattern=*.wc&wafer-size=8INCH"); |         string? response = await httpClient.GetStringAsync($"api/v1/file-share/archive-data/?area=FQA&equipment-id=FQA-8INCH&search-pattern=*.wc&wafer-size=8INCH"); | ||||||
|         Assert.IsNotNull(response); |         Assert.IsNotNull(response); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|  |         NonThrowTryCatch(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     [TestMethod] | ||||||
|  |     public void EquipmentIds() | ||||||
|  |     { | ||||||
|  |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|  |         IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider; | ||||||
|  |         IFileShareRepository? fileShareRepository = serviceProvider?.GetRequiredService<IFileShareRepository>(); | ||||||
|  |         ReadOnlyCollection<ToolTypeNameId>? result = fileShareRepository?.GetEquipmentIds(); | ||||||
|  |         Assert.IsNotNull(result); | ||||||
|  |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|  |         NonThrowTryCatch(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     [TestMethod] | ||||||
|  |     public async Task EquipmentIdsApi() | ||||||
|  |     { | ||||||
|  |         HttpClient? httpClient = _WebApplicationFactory?.CreateClient(); | ||||||
|  |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|  |         Assert.IsTrue(httpClient is not null); | ||||||
|  |         string? response = await httpClient.GetStringAsync($"api/v1/file-share/equipment-ids"); | ||||||
|  |         Assert.IsNotNull(response); | ||||||
|  |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
| @ -13,7 +13,7 @@ public class UnitTestISpreadingResistanceProfileController | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -21,7 +21,7 @@ public class UnitTestISpreadingResistanceProfileController | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -40,7 +40,7 @@ public class UnitTestISpreadingResistanceProfileController | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(ISpreadingResistanceProfileController<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(ISpreadingResistanceProfileController<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -62,7 +62,7 @@ public class UnitTestISpreadingResistanceProfileController | |||||||
|             Assert.IsTrue(bytes.Length != 0); |             Assert.IsTrue(bytes.Length != 0); | ||||||
|             File.WriteAllBytes(Path.Combine(directory, "srp.png"), bytes); |             File.WriteAllBytes(Path.Combine(directory, "srp.png"), bytes); | ||||||
|         } |         } | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
| @ -14,7 +14,7 @@ public class UnitTestInfinityQSController | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -22,7 +22,7 @@ public class UnitTestInfinityQSController | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -41,7 +41,7 @@ public class UnitTestInfinityQSController | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IInfinityQSController<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IInfinityQSController<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -56,7 +56,7 @@ public class UnitTestInfinityQSController | |||||||
|         IInfinityQSRepository? infinityQSRepository = serviceProvider?.GetRequiredService<IInfinityQSRepository>(); |         IInfinityQSRepository? infinityQSRepository = serviceProvider?.GetRequiredService<IInfinityQSRepository>(); | ||||||
|         string? result = infinityQSRepository?.GetCommandText("1677273357", "61", "CDE5", "5012", "575908", ""); |         string? result = infinityQSRepository?.GetCommandText("1677273357", "61", "CDE5", "5012", "575908", ""); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -72,7 +72,7 @@ public class UnitTestInfinityQSController | |||||||
|         string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/commandText/?sub_group_id=1677273357&process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 15:15:00"); |         string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/commandText/?sub_group_id=1677273357&process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 15:15:00"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json); | ||||||
|         Assert.IsNotNull(json); |         Assert.IsNotNull(json); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -93,7 +93,7 @@ public class UnitTestInfinityQSController | |||||||
|         Assert.IsNotNull(result?.Results[0].SE_TSNO); |         Assert.IsNotNull(result?.Results[0].SE_TSNO); | ||||||
|         Assert.IsNotNull(result?.Results[0].TD_NAME); |         Assert.IsNotNull(result?.Results[0].TD_NAME); | ||||||
|         Assert.IsNotNull(result?.Results[0].TD_TEST); |         Assert.IsNotNull(result?.Results[0].TD_TEST); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -111,7 +111,7 @@ public class UnitTestInfinityQSController | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetData)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetData)}.json"), json); | ||||||
|         Result<InfinityQSBase[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBase[]>>(json); |         Result<InfinityQSBase[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBase[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -129,7 +129,7 @@ public class UnitTestInfinityQSController | |||||||
|         Assert.IsTrue(result?.Results.Length != 0); |         Assert.IsTrue(result?.Results.Length != 0); | ||||||
|         Assert.IsNotNull(result?.Results[0].SD_SGRP); |         Assert.IsNotNull(result?.Results[0].SD_SGRP); | ||||||
|         Assert.IsNotNull(result?.Results[0].SD_TSNO); |         Assert.IsNotNull(result?.Results[0].SD_TSNO); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -147,7 +147,7 @@ public class UnitTestInfinityQSController | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetDescriptors)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetDescriptors)}.json"), json); | ||||||
|         Result<InfinityQSDescriptor[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptor[]>>(json); |         Result<InfinityQSDescriptor[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptor[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -162,7 +162,7 @@ public class UnitTestInfinityQSController | |||||||
|         IInfinityQSRepository? infinityQSRepository = serviceProvider?.GetRequiredService<IInfinityQSRepository>(); |         IInfinityQSRepository? infinityQSRepository = serviceProvider?.GetRequiredService<IInfinityQSRepository>(); | ||||||
|         Result<InfinityQSEvent[]>? result = infinityQSRepository?.GetEvents("1677273357"); |         Result<InfinityQSEvent[]>? result = infinityQSRepository?.GetEvents("1677273357"); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -179,7 +179,7 @@ public class UnitTestInfinityQSController | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEvents)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEvents)}.json"), json); | ||||||
|         Result<InfinityQSEvent[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSEvent[]>>(json); |         Result<InfinityQSEvent[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSEvent[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -194,7 +194,7 @@ public class UnitTestInfinityQSController | |||||||
|         IInfinityQSRepository? infinityQSRepository = serviceProvider?.GetRequiredService<IInfinityQSRepository>(); |         IInfinityQSRepository? infinityQSRepository = serviceProvider?.GetRequiredService<IInfinityQSRepository>(); | ||||||
|         Result<InfinityQSBase[]>? result = infinityQSRepository?.GetHeader("1677273357"); |         Result<InfinityQSBase[]>? result = infinityQSRepository?.GetHeader("1677273357"); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -211,7 +211,7 @@ public class UnitTestInfinityQSController | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetHeader)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetHeader)}.json"), json); | ||||||
|         Result<InfinityQSBase[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBase[]>>(json); |         Result<InfinityQSBase[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBase[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
| @ -14,7 +14,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -22,7 +22,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -41,7 +41,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IInfinityQSV2Controller<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IInfinityQSV2Controller<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -53,7 +53,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|         IInfinityQSV2Repository? infinityQSV2Repository = serviceProvider?.GetRequiredService<IInfinityQSV2Repository>(); |         IInfinityQSV2Repository? infinityQSV2Repository = serviceProvider?.GetRequiredService<IInfinityQSV2Repository>(); | ||||||
|         string? result = infinityQSV2Repository?.GetCommandText("1677273357", "61", "CDE5", "5012", "575908", ""); |         string? result = infinityQSV2Repository?.GetCommandText("1677273357", "61", "CDE5", "5012", "575908", ""); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -69,7 +69,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|         string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 15:15:00"); |         string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 15:15:00"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json); | ||||||
|         Assert.IsNotNull(json); |         Assert.IsNotNull(json); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -90,7 +90,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|         Assert.IsNotNull(result?.Results[0].SiteNumber); |         Assert.IsNotNull(result?.Results[0].SiteNumber); | ||||||
|         Assert.IsNotNull(result?.Results[0].VariableNumber); |         Assert.IsNotNull(result?.Results[0].VariableNumber); | ||||||
|         Assert.IsNotNull(result?.Results[0].SubGroupDateTime); |         Assert.IsNotNull(result?.Results[0].SubGroupDateTime); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -108,7 +108,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetData)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetData)}.json"), json); | ||||||
|         Result<InfinityQSBaseV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBaseV2[]>>(json); |         Result<InfinityQSBaseV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBaseV2[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -126,7 +126,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|         Assert.IsTrue(result?.Results.Length != 0); |         Assert.IsTrue(result?.Results.Length != 0); | ||||||
|         Assert.IsNotNull(result?.Results[0].SubGroupId); |         Assert.IsNotNull(result?.Results[0].SubGroupId); | ||||||
|         Assert.IsNotNull(result?.Results[0].SiteNumber); |         Assert.IsNotNull(result?.Results[0].SiteNumber); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -144,7 +144,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetDescriptors)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetDescriptors)}.json"), json); | ||||||
|         Result<InfinityQSDescriptorV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptorV2[]>>(json); |         Result<InfinityQSDescriptorV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptorV2[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -159,7 +159,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|         IInfinityQSV2Repository? infinityQSV2Repository = serviceProvider?.GetRequiredService<IInfinityQSV2Repository>(); |         IInfinityQSV2Repository? infinityQSV2Repository = serviceProvider?.GetRequiredService<IInfinityQSV2Repository>(); | ||||||
|         Result<InfinityQSEventV2[]>? result = infinityQSV2Repository?.GetEvents("1677273357"); |         Result<InfinityQSEventV2[]>? result = infinityQSV2Repository?.GetEvents("1677273357"); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -176,7 +176,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEvents)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEvents)}.json"), json); | ||||||
|         Result<InfinityQSEventV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSEventV2[]>>(json); |         Result<InfinityQSEventV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSEventV2[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -192,7 +192,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|         Result<InfinityQSBaseV2[]>? result = infinityQSV2Repository?.GetHeader("1677273357"); |         Result<InfinityQSBaseV2[]>? result = infinityQSV2Repository?.GetHeader("1677273357"); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsNotNull(result?.Results[0].Part); |         Assert.IsNotNull(result?.Results[0].Part); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -210,7 +210,7 @@ public class UnitTestInfinityQSV2Controller | |||||||
|         Result<InfinityQSBaseV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBaseV2[]>>(json); |         Result<InfinityQSBaseV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBaseV2[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsNotNull(result?.Results[0].Part); |         Assert.IsNotNull(result?.Results[0].Part); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
| @ -14,7 +14,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -22,7 +22,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -41,7 +41,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IInfinityQSV3Controller<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IInfinityQSV3Controller<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -53,7 +53,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         IInfinityQSV3Repository? infinityQSV3Repository = serviceProvider?.GetRequiredService<IInfinityQSV3Repository>(); |         IInfinityQSV3Repository? infinityQSV3Repository = serviceProvider?.GetRequiredService<IInfinityQSV3Repository>(); | ||||||
|         string? result = infinityQSV3Repository?.GetCommandText("1698497987", "61", "CDE5", "5012", "575908", ""); |         string? result = infinityQSV3Repository?.GetCommandText("1698497987", "61", "CDE5", "5012", "575908", ""); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -66,7 +66,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1698497987/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 15:15:00"); |         string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1698497987/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 15:15:00"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json); | ||||||
|         Assert.IsNotNull(json); |         Assert.IsNotNull(json); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -84,7 +84,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         Assert.IsNotNull(result?.Results[0].SiteNumber); |         Assert.IsNotNull(result?.Results[0].SiteNumber); | ||||||
|         Assert.IsNotNull(result?.Results[0].VariableNumber); |         Assert.IsNotNull(result?.Results[0].VariableNumber); | ||||||
|         Assert.IsNotNull(result?.Results[0].SubGroupDateTime); |         Assert.IsNotNull(result?.Results[0].SubGroupDateTime); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -99,7 +99,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetData)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetData)}.json"), json); | ||||||
|         Result<InfinityQSV3[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSV3[]>>(json); |         Result<InfinityQSV3[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSV3[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -114,7 +114,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         Assert.IsTrue(result?.Results.Length != 0); |         Assert.IsTrue(result?.Results.Length != 0); | ||||||
|         Assert.IsNotNull(result?.Results[0].SubGroupId); |         Assert.IsNotNull(result?.Results[0].SubGroupId); | ||||||
|         Assert.IsNotNull(result?.Results[0].SiteNumber); |         Assert.IsNotNull(result?.Results[0].SiteNumber); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -129,7 +129,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetDescriptors)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetDescriptors)}.json"), json); | ||||||
|         Result<InfinityQSDescriptorV3[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptorV3[]>>(json); |         Result<InfinityQSDescriptorV3[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptorV3[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -142,7 +142,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         Result<InfinityQSV3[]>? result = infinityQSV3Repository?.GetHeader("1698497987"); |         Result<InfinityQSV3[]>? result = infinityQSV3Repository?.GetHeader("1698497987"); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsNotNull(result?.Results[0].Part); |         Assert.IsNotNull(result?.Results[0].Part); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -157,7 +157,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         Result<InfinityQSV3[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSV3[]>>(json); |         Result<InfinityQSV3[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSV3[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsNotNull(result?.Results[0].Part); |         Assert.IsNotNull(result?.Results[0].Part); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -169,7 +169,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         IInfinityQSV3Repository? infinityQSV3Repository = serviceProvider?.GetRequiredService<IInfinityQSV3Repository>(); |         IInfinityQSV3Repository? infinityQSV3Repository = serviceProvider?.GetRequiredService<IInfinityQSV3Repository>(); | ||||||
|         string? result = infinityQSV3Repository?.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma("41", "8IN_THIN ROTR"); |         string? result = infinityQSV3Repository?.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma("41", "8IN_THIN ROTR"); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -182,7 +182,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/41/product-data-average-sum-of-defects-process-mean-process-sigma?recipe=8IN_THIN ROTR"); |         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/41/product-data-average-sum-of-defects-process-mean-process-sigma?recipe=8IN_THIN ROTR"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetProductDataAverageSumOfDefectsProcessMeanProcessSigma)}.json"), result); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetProductDataAverageSumOfDefectsProcessMeanProcessSigma)}.json"), result); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -195,7 +195,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         IInfinityQSV3Repository? infinityQSV3Repository = serviceProvider?.GetRequiredService<IInfinityQSV3Repository>(); |         IInfinityQSV3Repository? infinityQSV3Repository = serviceProvider?.GetRequiredService<IInfinityQSV3Repository>(); | ||||||
|         List<string[]>? results = infinityQSV3Repository?.GetEpiProTempVerificationRows(night); |         List<string[]>? results = infinityQSV3Repository?.GetEpiProTempVerificationRows(night); | ||||||
|         Assert.IsNotNull(results); |         Assert.IsNotNull(results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -208,7 +208,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/epi-pro-temp-verification-rows/?night=44&night=46&night=52&night=54"); |         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/epi-pro-temp-verification-rows/?night=44&night=46&night=52&night=54"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEpiProTempVerificationRows)}.json"), result); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEpiProTempVerificationRows)}.json"), result); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -221,7 +221,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         IInfinityQSV3Repository? infinityQSV3Repository = serviceProvider?.GetRequiredService<IInfinityQSV3Repository>(); |         IInfinityQSV3Repository? infinityQSV3Repository = serviceProvider?.GetRequiredService<IInfinityQSV3Repository>(); | ||||||
|         string? result = infinityQSV3Repository?.GetEpiProTempVerification(night); |         string? result = infinityQSV3Repository?.GetEpiProTempVerification(night); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -234,7 +234,7 @@ public class UnitTestInfinityQSV3Controller | |||||||
|         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/epi-pro-temp-verification/?night=44&night=46&night=52&night=54"); |         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/epi-pro-temp-verification/?night=44&night=46&night=52&night=54"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEpiProTempVerification)}.html"), result); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEpiProTempVerification)}.html"), result); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static string _ControllerVersion; |     private static string _ControllerVersion; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| @ -24,7 +24,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -45,7 +45,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IInfinityQSV4Controller<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IInfinityQSV4Controller<string>.GetRouteName(), _ControllerName); | ||||||
|         Assert.AreEqual(IInfinityQSV4Controller<string>.GetRouteVersion(), _ControllerVersion); |         Assert.AreEqual(IInfinityQSV4Controller<string>.GetRouteVersion(), _ControllerVersion); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -57,7 +57,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>(); |         IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>(); | ||||||
|         string? result = infinityQSV4Repository?.GetCommandText("1718539249", "61", "CDE5", "5012", "575908", ""); |         string? result = infinityQSV4Repository?.GetCommandText("1718539249", "61", "CDE5", "5012", "575908", ""); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -70,7 +70,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1718539249/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 15:15:00"); |         string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1718539249/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 15:15:00"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json); | ||||||
|         Assert.IsNotNull(json); |         Assert.IsNotNull(json); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -88,7 +88,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         Assert.IsNotNull(result?.Results[0].SiteNumber); |         Assert.IsNotNull(result?.Results[0].SiteNumber); | ||||||
|         Assert.IsNotNull(result?.Results[0].VariableNumber); |         Assert.IsNotNull(result?.Results[0].VariableNumber); | ||||||
|         Assert.IsNotNull(result?.Results[0].SubGroupDateTime); |         Assert.IsNotNull(result?.Results[0].SubGroupDateTime); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -103,7 +103,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetData)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetData)}.json"), json); | ||||||
|         Result<InfinityQSV4[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSV4[]>>(json); |         Result<InfinityQSV4[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSV4[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -118,7 +118,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         Assert.IsTrue(result?.Results.Length != 0); |         Assert.IsTrue(result?.Results.Length != 0); | ||||||
|         Assert.IsNotNull(result?.Results[0].SubGroupId); |         Assert.IsNotNull(result?.Results[0].SubGroupId); | ||||||
|         Assert.IsNotNull(result?.Results[0].SiteNumber); |         Assert.IsNotNull(result?.Results[0].SiteNumber); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -133,7 +133,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetDescriptors)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetDescriptors)}.json"), json); | ||||||
|         Result<InfinityQSDescriptorV3[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptorV3[]>>(json); |         Result<InfinityQSDescriptorV3[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptorV3[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -146,7 +146,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         Result<InfinityQSV4[]>? result = infinityQSV4Repository?.GetHeader("1718539249"); |         Result<InfinityQSV4[]>? result = infinityQSV4Repository?.GetHeader("1718539249"); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsNotNull(result?.Results[0].Part); |         Assert.IsNotNull(result?.Results[0].Part); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -161,7 +161,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         Result<InfinityQSV4[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSV4[]>>(json); |         Result<InfinityQSV4[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSV4[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsNotNull(result?.Results[0].Part); |         Assert.IsNotNull(result?.Results[0].Part); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -173,7 +173,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>(); |         IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>(); | ||||||
|         string? result = infinityQSV4Repository?.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma("41", "8IN_THIN ROTR"); |         string? result = infinityQSV4Repository?.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma("41", "8IN_THIN ROTR"); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -186,7 +186,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         string? result = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/41/product-data-average-sum-of-defects-process-mean-process-sigma?recipe=8IN_THIN ROTR"); |         string? result = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/41/product-data-average-sum-of-defects-process-mean-process-sigma?recipe=8IN_THIN ROTR"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetProductDataAverageSumOfDefectsProcessMeanProcessSigma)}.json"), result); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetProductDataAverageSumOfDefectsProcessMeanProcessSigma)}.json"), result); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -199,7 +199,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>(); |         IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>(); | ||||||
|         List<string[]>? results = infinityQSV4Repository?.GetEpiProTempVerificationRows(night); |         List<string[]>? results = infinityQSV4Repository?.GetEpiProTempVerificationRows(night); | ||||||
|         Assert.IsNotNull(results); |         Assert.IsNotNull(results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -212,7 +212,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         string? result = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/epi-pro-temp-verification-rows/?night=44&night=46&night=52&night=54"); |         string? result = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/epi-pro-temp-verification-rows/?night=44&night=46&night=52&night=54"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEpiProTempVerificationRows)}.json"), result); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEpiProTempVerificationRows)}.json"), result); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -225,7 +225,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>(); |         IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>(); | ||||||
|         string? result = infinityQSV4Repository?.GetEpiProTempVerification(night); |         string? result = infinityQSV4Repository?.GetEpiProTempVerification(night); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -238,7 +238,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         string? result = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/epi-pro-temp-verification/?night=44&night=46&night=52&night=54"); |         string? result = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/epi-pro-temp-verification/?night=44&night=46&night=52&night=54"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEpiProTempVerification)}.html"), result); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEpiProTempVerification)}.html"), result); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -250,7 +250,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>(); |         IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>(); | ||||||
|         List<Reactor>? results = infinityQSV4Repository?.GetReactors(); |         List<Reactor>? results = infinityQSV4Repository?.GetReactors(); | ||||||
|         Assert.IsNotNull(results); |         Assert.IsNotNull(results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -266,7 +266,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|             result = infinityQSV4Repository?.GetProductionSpecification(part); |             result = infinityQSV4Repository?.GetProductionSpecification(part); | ||||||
|             Assert.IsNotNull(result); |             Assert.IsNotNull(result); | ||||||
|         } |         } | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -298,7 +298,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|             result = infinityQSV4Repository?.GetProductionSpecification(part); |             result = infinityQSV4Repository?.GetProductionSpecification(part); | ||||||
|             Assert.IsNotNull(result); |             Assert.IsNotNull(result); | ||||||
|         } |         } | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -313,7 +313,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>(); |         IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>(); | ||||||
|         string? result = infinityQSV4Repository?.GetLastGroupIdWithValue(process, part, test); |         string? result = infinityQSV4Repository?.GetLastGroupIdWithValue(process, part, test); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -329,7 +329,7 @@ public class UnitTestInfinityQSV4Controller | |||||||
|         string? result = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/{process}/last-group-id-with-value/?part={part}&test={test}"); |         string? result = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/{process}/last-group-id-with-value/?part={part}&test={test}"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetLastGroupIdWithValue)}.html"), result); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetLastGroupIdWithValue)}.html"), result); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
| @ -13,7 +13,7 @@ public class UnitTestOpenInsightV1Controller | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -21,7 +21,7 @@ public class UnitTestOpenInsightV1Controller | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -40,7 +40,7 @@ public class UnitTestOpenInsightV1Controller | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IOpenInsightV1Controller<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IOpenInsightV1Controller<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -51,7 +51,7 @@ public class UnitTestOpenInsightV1Controller | |||||||
|         IOpenInsightV1Repository? openInsightRepository = serviceProvider?.GetRequiredService<IOpenInsightV1Repository>(); |         IOpenInsightV1Repository? openInsightRepository = serviceProvider?.GetRequiredService<IOpenInsightV1Repository>(); | ||||||
|         string? result = openInsightRepository?.GetTencorRun("615071", "10/30/2023 06:48:34PM", "6IN_EPP ROTR"); |         string? result = openInsightRepository?.GetTencorRun("615071", "10/30/2023 06:48:34PM", "6IN_EPP ROTR"); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -64,7 +64,7 @@ public class UnitTestOpenInsightV1Controller | |||||||
|         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/615071/tencor-run?insert_date=10/30/2023 06:48:34PM&recipe=6IN_EPP ROTR"); |         string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/615071/tencor-run?insert_date=10/30/2023 06:48:34PM&recipe=6IN_EPP ROTR"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetTencorRun)}.json"), result); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetTencorRun)}.json"), result); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
| @ -14,7 +14,7 @@ public class UnitTestPinController | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -22,7 +22,7 @@ public class UnitTestPinController | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -34,7 +34,7 @@ public class UnitTestPinController | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IPinController<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IPinController<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -44,10 +44,10 @@ public class UnitTestPinController | |||||||
|         IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider; |         IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider; | ||||||
|         IMetrologyRepository? metrologyRepository = serviceProvider?.GetRequiredService<IMetrologyRepository>(); |         IMetrologyRepository? metrologyRepository = serviceProvider?.GetRequiredService<IMetrologyRepository>(); | ||||||
|         IPinRepository? pinRepository = serviceProvider?.GetRequiredService<IPinRepository>(); |         IPinRepository? pinRepository = serviceProvider?.GetRequiredService<IPinRepository>(); | ||||||
|         Assert.IsTrue(metrologyRepository is not null); |         Assert.IsNotNull(metrologyRepository); | ||||||
|         Result<Pinned[]>? result = pinRepository?.GetPinnedTable(metrologyRepository, id: 1, cde_id: null, biorad_id: null, rds: null); |         Result<Pinned[]>? result = pinRepository?.GetPinnedTable(metrologyRepository, id: 1, cde_id: null, biorad_id: null, rds: null); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -55,12 +55,12 @@ public class UnitTestPinController | |||||||
|     { |     { | ||||||
|         HttpClient? httpClient = _WebApplicationFactory?.CreateClient(); |         HttpClient? httpClient = _WebApplicationFactory?.CreateClient(); | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsNotNull(httpClient); | ||||||
|         string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/-1/pinned"); |         string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/-1/pinned"); | ||||||
|         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetPinnedTable)}.json"), json); |         File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetPinnedTable)}.json"), json); | ||||||
|         Result<Pinned[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<Pinned[]>>(json); |         Result<Pinned[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<Pinned[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
| @ -14,7 +14,7 @@ public class UnitTestServiceShopOrderController | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -22,7 +22,7 @@ public class UnitTestServiceShopOrderController | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -34,7 +34,7 @@ public class UnitTestServiceShopOrderController | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IServiceShopOrderController<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IServiceShopOrderController<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -44,7 +44,7 @@ public class UnitTestServiceShopOrderController | |||||||
|             throw new NullReferenceException(nameof(_Logger)); |             throw new NullReferenceException(nameof(_Logger)); | ||||||
|         ServiceShopOrder[] serviceShopOrders = IServiceShopOrder.GetServiceShopOrders(null); |         ServiceShopOrder[] serviceShopOrders = IServiceShopOrder.GetServiceShopOrders(null); | ||||||
|         Assert.IsNotNull(serviceShopOrders); |         Assert.IsNotNull(serviceShopOrders); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -60,7 +60,7 @@ public class UnitTestServiceShopOrderController | |||||||
|         serviceShopOrders = await serviceShopOrderRepository.GetServiceShopOrders("23188d3d-9b75-ed11-ab8b-0050568f2fc3"); |         serviceShopOrders = await serviceShopOrderRepository.GetServiceShopOrders("23188d3d-9b75-ed11-ab8b-0050568f2fc3"); | ||||||
|         Assert.IsTrue(serviceShopOrders is not null && serviceShopOrders.Length != 0); |         Assert.IsTrue(serviceShopOrders is not null && serviceShopOrders.Length != 0); | ||||||
|         Assert.IsNotNull(serviceShopOrders[0].ToString()); |         Assert.IsNotNull(serviceShopOrders[0].ToString()); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -75,7 +75,7 @@ public class UnitTestServiceShopOrderController | |||||||
|         ServiceShopOrder[]? serviceShopOrders = System.Text.Json.JsonSerializer.Deserialize<ServiceShopOrder[]>(json); |         ServiceShopOrder[]? serviceShopOrders = System.Text.Json.JsonSerializer.Deserialize<ServiceShopOrder[]>(json); | ||||||
|         Assert.IsNotNull(serviceShopOrders); |         Assert.IsNotNull(serviceShopOrders); | ||||||
|         Assert.IsTrue(serviceShopOrders.Length != 0); |         Assert.IsTrue(serviceShopOrders.Length != 0); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
| @ -17,7 +17,7 @@ public class UnitTestToolTypesController | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Server.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -25,7 +25,7 @@ public class UnitTestToolTypesController | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Server.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Server.Program>>(); | ||||||
| @ -44,7 +44,7 @@ public class UnitTestToolTypesController | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IToolTypesController<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IToolTypesController<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -59,7 +59,7 @@ public class UnitTestToolTypesController | |||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsTrue(result.Results.Length != 0); |         Assert.IsTrue(result.Results.Length != 0); | ||||||
|         Assert.IsFalse(result.Results.All(l => l.ID == 0)); |         Assert.IsFalse(result.Results.All(l => l.ID == 0)); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -74,7 +74,7 @@ public class UnitTestToolTypesController | |||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsTrue(result.Results.Length != 0); |         Assert.IsTrue(result.Results.Length != 0); | ||||||
|         Assert.IsFalse(result.Results.All(l => l.ID == 0)); |         Assert.IsFalse(result.Results.All(l => l.ID == 0)); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -90,7 +90,7 @@ public class UnitTestToolTypesController | |||||||
|         Assert.IsNotNull(result.Results.Metadata); |         Assert.IsNotNull(result.Results.Metadata); | ||||||
|         Assert.IsTrue(result.Results.Metadata.Length != 0); |         Assert.IsTrue(result.Results.Metadata.Length != 0); | ||||||
|         Assert.IsFalse(result.Results.Metadata.All(l => l.ToolTypeID == 0)); |         Assert.IsFalse(result.Results.Metadata.All(l => l.ToolTypeID == 0)); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -106,7 +106,7 @@ public class UnitTestToolTypesController | |||||||
|         Assert.IsNotNull(result.Results.Metadata); |         Assert.IsNotNull(result.Results.Metadata); | ||||||
|         Assert.IsTrue(result.Results.Metadata.Length != 0); |         Assert.IsTrue(result.Results.Metadata.Length != 0); | ||||||
|         Assert.IsFalse(result.Results.Metadata.All(l => l.ToolTypeID == 0)); |         Assert.IsFalse(result.Results.Metadata.All(l => l.ToolTypeID == 0)); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -120,7 +120,7 @@ public class UnitTestToolTypesController | |||||||
|         Result<DataTable>? result = toolTypesRepository?.GetHeaders(metrologyRepository, id: 1, datebegin: null, dateend: null, page: null, pagesize: null, headerid: null); |         Result<DataTable>? result = toolTypesRepository?.GetHeaders(metrologyRepository, id: 1, datebegin: null, dateend: null, page: null, pagesize: null, headerid: null); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsNotNull(result.Results.Rows.Count > 0); |         Assert.IsNotNull(result.Results.Rows.Count > 0); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -134,7 +134,7 @@ public class UnitTestToolTypesController | |||||||
|         Result<DataTable>? result = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json); |         Result<DataTable>? result = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsNotNull(result.Results.Rows.Count > 0); |         Assert.IsNotNull(result.Results.Rows.Count > 0); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -148,7 +148,7 @@ public class UnitTestToolTypesController | |||||||
|         Result<HeaderCommon[]>? result = toolTypesRepository?.GetHeaderTitles(metrologyRepository, id: -1, page: null, pagesize: null); |         Result<HeaderCommon[]>? result = toolTypesRepository?.GetHeaderTitles(metrologyRepository, id: -1, page: null, pagesize: null); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsTrue(result?.Results.Length != 0); |         Assert.IsTrue(result?.Results.Length != 0); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -162,7 +162,7 @@ public class UnitTestToolTypesController | |||||||
|         Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json); |         Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsTrue(result.Results.Length != 0); |         Assert.IsTrue(result.Results.Length != 0); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -176,7 +176,7 @@ public class UnitTestToolTypesController | |||||||
|         Result<ColumnValue[]>? result = toolTypesRepository?.GetHeaderFields(metrologyRepository, id: 1, headerid: 1); |         Result<ColumnValue[]>? result = toolTypesRepository?.GetHeaderFields(metrologyRepository, id: 1, headerid: 1); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsTrue(result.Results.Length != 0); |         Assert.IsTrue(result.Results.Length != 0); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -190,7 +190,7 @@ public class UnitTestToolTypesController | |||||||
|         Result<ColumnValue[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<ColumnValue[]>>(json); |         Result<ColumnValue[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<ColumnValue[]>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsTrue(result.Results.Length != 0); |         Assert.IsTrue(result.Results.Length != 0); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -204,7 +204,7 @@ public class UnitTestToolTypesController | |||||||
|         Result<DataTable>? result = toolTypesRepository?.GetData(metrologyRepository, id: 1, headerid: 1); |         Result<DataTable>? result = toolTypesRepository?.GetData(metrologyRepository, id: 1, headerid: 1); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsNotNull(result.Results.Rows.Count > 0); |         Assert.IsNotNull(result.Results.Rows.Count > 0); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
| @ -218,7 +218,7 @@ public class UnitTestToolTypesController | |||||||
|         Result<DataTable>? result = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json); |         Result<DataTable>? result = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json); | ||||||
|         Assert.IsNotNull(result?.Results); |         Assert.IsNotNull(result?.Results); | ||||||
|         Assert.IsNotNull(result.Results.Rows.Count > 0); |         Assert.IsNotNull(result.Results.Rows.Count > 0); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [Ignore] |     [Ignore] | ||||||
| @ -239,7 +239,7 @@ public class UnitTestToolTypesController | |||||||
|         Assert.IsTrue(toolTypesRepository is not null); |         Assert.IsTrue(toolTypesRepository is not null); | ||||||
|         (string? message, string? _, Stream? _) = toolTypesRepository.GetAttachment(metrologyRepository, attachmentsService, toolTypeId, tabletype, attachmentId, filename); |         (string? message, string? _, Stream? _) = toolTypesRepository.GetAttachment(metrologyRepository, attachmentsService, toolTypeId, tabletype, attachmentId, filename); | ||||||
|         Assert.IsTrue(message is null); |         Assert.IsTrue(message is null); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [Ignore] |     [Ignore] | ||||||
| @ -250,7 +250,7 @@ public class UnitTestToolTypesController | |||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         _ = await httpClient.GetFromJsonAsync<object>($"api/{_ControllerName}/1/data/files/ffdf5410-ca19-4097-bfa4-b398e236d07e/data.txt"); |         _ = await httpClient.GetFromJsonAsync<object>($"api/{_ControllerName}/1/data/files/ffdf5410-ca19-4097-bfa4-b398e236d07e/data.txt"); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [Ignore] |     [Ignore] | ||||||
| @ -268,7 +268,7 @@ public class UnitTestToolTypesController | |||||||
|         Assert.IsTrue(metrologyRepository is not null); |         Assert.IsTrue(metrologyRepository is not null); | ||||||
|         string? message = toolTypesRepository?.OIExport(metrologyRepository, attachmentsService, toolTypeId: 1, headerid: 1); |         string? message = toolTypesRepository?.OIExport(metrologyRepository, attachmentsService, toolTypeId: 1, headerid: 1); | ||||||
|         Assert.IsTrue(message is null); |         Assert.IsTrue(message is null); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     [Ignore] |     [Ignore] | ||||||
| @ -279,7 +279,7 @@ public class UnitTestToolTypesController | |||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         _ = await httpClient.GetFromJsonAsync<object>($"api/{_ControllerName}/1/headers/1/export"); |         _ = await httpClient.GetFromJsonAsync<object>($"api/{_ControllerName}/1/headers/1/export"); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
| @ -14,7 +14,7 @@ public class UnitTestWaferCounterController | |||||||
|  |  | ||||||
|     private static ILogger? _Logger; |     private static ILogger? _Logger; | ||||||
|     private static string _ControllerName; |     private static string _ControllerName; | ||||||
|     private static TestContext _TestContext; |     private static string? _TestContextTestName; | ||||||
|     private static WebApplicationFactory<Wafer.Counter.Program>? _WebApplicationFactory; |     private static WebApplicationFactory<Wafer.Counter.Program>? _WebApplicationFactory; | ||||||
|  |  | ||||||
| #pragma warning restore | #pragma warning restore | ||||||
| @ -22,7 +22,7 @@ public class UnitTestWaferCounterController | |||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitAsync(TestContext testContext) |     public static void ClassInitAsync(TestContext testContext) | ||||||
|     { |     { | ||||||
|         _TestContext = testContext; |         _TestContextTestName = testContext.TestName; | ||||||
|         _WebApplicationFactory = new WebApplicationFactory<Wafer.Counter.Program>(); |         _WebApplicationFactory = new WebApplicationFactory<Wafer.Counter.Program>(); | ||||||
|         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; |         IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; | ||||||
|         _Logger = serviceProvider.GetRequiredService<ILogger<Wafer.Counter.Program>>(); |         _Logger = serviceProvider.GetRequiredService<ILogger<Wafer.Counter.Program>>(); | ||||||
| @ -41,7 +41,7 @@ public class UnitTestWaferCounterController | |||||||
|     { |     { | ||||||
|         _Logger?.LogInformation("Starting Web Application"); |         _Logger?.LogInformation("Starting Web Application"); | ||||||
|         Assert.AreEqual(IFileShareController<string>.GetRouteName(), _ControllerName); |         Assert.AreEqual(IFileShareController<string>.GetRouteName(), _ControllerName); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -54,7 +54,7 @@ public class UnitTestWaferCounterController | |||||||
|         IWaferCounterRepository? waferCounterRepository = serviceProvider?.GetRequiredService<IWaferCounterRepository>(); |         IWaferCounterRepository? waferCounterRepository = serviceProvider?.GetRequiredService<IWaferCounterRepository>(); | ||||||
|         WaferCounter? result = waferCounterRepository?.GetLastQuantityAndSlotMap(area: "FQA", waferSize: "8INCH", text: "Test"); |         WaferCounter? result = waferCounterRepository?.GetLastQuantityAndSlotMap(area: "FQA", waferSize: "8INCH", text: "Test"); | ||||||
|         Assert.IsNotNull(result); |         Assert.IsNotNull(result); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -67,7 +67,7 @@ public class UnitTestWaferCounterController | |||||||
|         Assert.IsTrue(httpClient is not null); |         Assert.IsTrue(httpClient is not null); | ||||||
|         string? response = await httpClient.GetStringAsync($"api/v1/{_ControllerName}/FQA/last-quantity-and-slot-map/?waferSize=8INCH&text=Test"); |         string? response = await httpClient.GetStringAsync($"api/v1/{_ControllerName}/FQA/last-quantity-and-slot-map/?waferSize=8INCH&text=Test"); | ||||||
|         Assert.IsNotNull(response); |         Assert.IsNotNull(response); | ||||||
|         _Logger?.LogInformation("{TestName} completed", _TestContext?.TestName); |         _Logger?.LogInformation("{TestName} completed", _TestContextTestName); | ||||||
|         NonThrowTryCatch(); |         NonThrowTryCatch(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
							
								
								
									
										10
									
								
								Wafer-Counter/.vscode/tasks.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								Wafer-Counter/.vscode/tasks.json
									
									
									
									
										vendored
									
									
								
							| @ -1,6 +1,16 @@ | |||||||
| { | { | ||||||
|     "version": "2.0.0", |     "version": "2.0.0", | ||||||
|     "tasks": [ |     "tasks": [ | ||||||
|  |         { | ||||||
|  |             "label": "dotnetRunDebug", | ||||||
|  |             "command": "dotnet OI.Metrology.Wafer.Counter.dll", | ||||||
|  |             "dependsOn": "build", | ||||||
|  |             "problemMatcher": [], | ||||||
|  |             "type": "shell", | ||||||
|  |             "options": { | ||||||
|  |               "cwd": "${workspaceFolder}/bin/Debug/net8.0" | ||||||
|  |             } | ||||||
|  |         }, | ||||||
|         { |         { | ||||||
|             "label": "build", |             "label": "build", | ||||||
|             "command": "dotnet", |             "command": "dotnet", | ||||||
|  | |||||||
| @ -8,9 +8,9 @@ namespace OI.Metrology.Wafer.Counter.ApiControllers; | |||||||
| public class AppSettingsController : ControllerBase, IAppSettingsController<ActionResult> | public class AppSettingsController : ControllerBase, IAppSettingsController<ActionResult> | ||||||
| { | { | ||||||
|  |  | ||||||
|     private readonly IAppSettingsRepository<Models.Binder.AppSettings> _AppSettingsRepository; |     private readonly IAppSettingsRepository<Models.AppSettings> _AppSettingsRepository; | ||||||
|  |  | ||||||
|     public AppSettingsController(IAppSettingsRepository<Models.Binder.AppSettings> AppSettingsRepository) => |     public AppSettingsController(IAppSettingsRepository<Models.AppSettings> AppSettingsRepository) => | ||||||
|         _AppSettingsRepository = AppSettingsRepository; |         _AppSettingsRepository = AppSettingsRepository; | ||||||
|  |  | ||||||
|     [HttpGet(nameof(IAppSettingsController<ActionResult>.Action.App))] |     [HttpGet(nameof(IAppSettingsController<ActionResult>.Action.App))] | ||||||
|  | |||||||
							
								
								
									
										26
									
								
								Wafer-Counter/ApiControllers/AzureDevOpsController.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								Wafer-Counter/ApiControllers/AzureDevOpsController.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,26 @@ | |||||||
|  | using Microsoft.AspNetCore.Mvc; | ||||||
|  | using OI.Metrology.Shared.Models; | ||||||
|  | using OI.Metrology.Shared.Models.Stateless; | ||||||
|  | using OI.Metrology.Wafer.Counter.Helper; | ||||||
|  |  | ||||||
|  | namespace OI.Metrology.Wafer.Counter.ApiControllers; | ||||||
|  |  | ||||||
|  | [Route("api/v1/ado")] | ||||||
|  | public class AzureDevOpsController : Controller, IAzureDevOpsController<IResult> | ||||||
|  | { | ||||||
|  |  | ||||||
|  |     private readonly IAzureDevOpsRepository _AzureDevOpsRepository; | ||||||
|  |  | ||||||
|  |     public AzureDevOpsController(IAzureDevOpsRepository azureDevOpsRepository) => | ||||||
|  |         _AzureDevOpsRepository = azureDevOpsRepository; | ||||||
|  |  | ||||||
|  |     [HttpPost("save")] | ||||||
|  |     public IResult Save() | ||||||
|  |     { | ||||||
|  |         PollValue? pollValue = ParameterHelper.GetPollValue(Request.HttpContext.Connection?.RemoteIpAddress, Request.Body); | ||||||
|  |         ArgumentNullException.ThrowIfNull(pollValue); | ||||||
|  |         _AzureDevOpsRepository.Save(pollValue); | ||||||
|  |         return Results.Ok(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -1,9 +1,9 @@ | |||||||
| using Microsoft.AspNetCore.Mvc; | using Microsoft.AspNetCore.Mvc; | ||||||
|  | using OI.Metrology.Shared.DataModels; | ||||||
| using OI.Metrology.Shared.Models; | using OI.Metrology.Shared.Models; | ||||||
| using OI.Metrology.Shared.Models.Stateless; | using OI.Metrology.Shared.Models.Stateless; | ||||||
| using System.Collections.Specialized; | using OI.Metrology.Wafer.Counter.Helper; | ||||||
| using System.Text.Json; | using System.Collections.ObjectModel; | ||||||
| using System.Web; |  | ||||||
|  |  | ||||||
| namespace OI.Metrology.Wafer.Counter.ApiControllers; | namespace OI.Metrology.Wafer.Counter.ApiControllers; | ||||||
|  |  | ||||||
| @ -37,39 +37,21 @@ public class FileShareController : Controller, IFileShareController<IResult> | |||||||
|         return Results.Ok(); |         return Results.Ok(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private static Dictionary<string, string?> GetKeyValuePairs(QueryString queryString) |  | ||||||
|     { |  | ||||||
|         Dictionary<string, string?> results = []; |  | ||||||
|         if (queryString.HasValue) |  | ||||||
|         { |  | ||||||
|             NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(queryString.Value); |  | ||||||
|             foreach (string? key in nameValueCollection.AllKeys) |  | ||||||
|             { |  | ||||||
|                 if (key is null) |  | ||||||
|                     continue; |  | ||||||
|                 results.Add(key, nameValueCollection[key]); |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private static CharacterizationParameters? GetCharacterizationParameters(QueryString queryString) |  | ||||||
|     { |  | ||||||
|         CharacterizationParameters? result; |  | ||||||
|         Dictionary<string, string?> keyValuePairs = GetKeyValuePairs(queryString); |  | ||||||
|         string json = JsonSerializer.Serialize(keyValuePairs); |  | ||||||
|         result = string.IsNullOrEmpty(json) ? null : JsonSerializer.Deserialize(json, CharacterizationParametersSourceGenerationContext.Default.CharacterizationParameters); |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     [HttpGet("archive-data")] |     [HttpGet("archive-data")] | ||||||
|     public IActionResult ArchiveData() |     public IActionResult ArchiveData() | ||||||
|     { |     { | ||||||
|         List<CharacterizationInfo> results; |         ReadOnlyCollection<CharacterizationInfo> results; | ||||||
|         CharacterizationParameters? characterizationParameters = GetCharacterizationParameters(Request.QueryString); |         CharacterizationParameters? characterizationParameters = ParameterHelper.GetCharacterizationParameters(Request.QueryString); | ||||||
|         ArgumentNullException.ThrowIfNull(characterizationParameters); |         ArgumentNullException.ThrowIfNull(characterizationParameters); | ||||||
|         results = _FileShareRepository.GetArchiveData(characterizationParameters); |         results = _FileShareRepository.GetArchiveData(characterizationParameters); | ||||||
|         return Json(results); |         return Json(results); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     [HttpGet("equipment-ids")] | ||||||
|  |     public IActionResult EquipmentIds() | ||||||
|  |     { | ||||||
|  |         ReadOnlyCollection<ToolTypeNameId> results = _FileShareRepository.GetEquipmentIds(); | ||||||
|  |         return Json(results); | ||||||
|  |     } | ||||||
|  |  | ||||||
| } | } | ||||||
							
								
								
									
										82
									
								
								Wafer-Counter/Helper/ParameterHelper.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										82
									
								
								Wafer-Counter/Helper/ParameterHelper.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,82 @@ | |||||||
|  | using OI.Metrology.Shared.Models; | ||||||
|  | using System.Collections.Specialized; | ||||||
|  | using System.Net; | ||||||
|  | using System.Text.Json; | ||||||
|  | using System.Web; | ||||||
|  |  | ||||||
|  | namespace OI.Metrology.Wafer.Counter.Helper; | ||||||
|  |  | ||||||
|  | public class ParameterHelper | ||||||
|  | { | ||||||
|  |  | ||||||
|  |     private static Dictionary<string, string?> GetKeyValuePairs(QueryString queryString) | ||||||
|  |     { | ||||||
|  |         Dictionary<string, string?> results = []; | ||||||
|  |         if (queryString.HasValue) | ||||||
|  |         { | ||||||
|  |             NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(queryString.Value); | ||||||
|  |             foreach (string? key in nameValueCollection.AllKeys) | ||||||
|  |             { | ||||||
|  |                 if (key is null) | ||||||
|  |                     continue; | ||||||
|  |                 results.Add(key, nameValueCollection[key]); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         return results; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     internal static CharacterizationParameters? GetCharacterizationParameters(QueryString queryString) | ||||||
|  |     { | ||||||
|  |         CharacterizationParameters? result; | ||||||
|  |         Dictionary<string, string?> keyValuePairs = GetKeyValuePairs(queryString); | ||||||
|  |         string json = JsonSerializer.Serialize(keyValuePairs, new JsonSerializerOptions() { WriteIndented = true }); | ||||||
|  |         result = string.IsNullOrEmpty(json) ? null : JsonSerializer.Deserialize(json, CharacterizationParametersSourceGenerationContext.Default.CharacterizationParameters); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static string? GetQueryString(Stream stream) | ||||||
|  |     { | ||||||
|  |         string? result; | ||||||
|  |         if (!stream.CanRead) | ||||||
|  |             result = null; | ||||||
|  |         else | ||||||
|  |         { | ||||||
|  |             Task<string> task = new StreamReader(stream).ReadToEndAsync(); | ||||||
|  |             result = task.Result; | ||||||
|  |         } | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static Dictionary<string, string?> GetKeyValuePairs(string? queryString) | ||||||
|  |     { | ||||||
|  |         Dictionary<string, string?> results = []; | ||||||
|  |         if (!string.IsNullOrEmpty(queryString)) | ||||||
|  |         { | ||||||
|  |             NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(queryString); | ||||||
|  |             foreach (string? key in nameValueCollection.AllKeys) | ||||||
|  |             { | ||||||
|  |                 if (key is null) | ||||||
|  |                     continue; | ||||||
|  |                 results.Add(key, nameValueCollection[key]); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         return results; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     internal static PollValue? GetPollValue(IPAddress? remoteIpAddress, Stream stream) | ||||||
|  |     { | ||||||
|  |         PollValue? result; | ||||||
|  |         string? queryString = GetQueryString(stream); | ||||||
|  |         Dictionary<string, string?> keyValuePairs = GetKeyValuePairs(queryString); | ||||||
|  |         string json = JsonSerializer.Serialize(keyValuePairs, new JsonSerializerOptions() { WriteIndented = true }); | ||||||
|  |         result = string.IsNullOrEmpty(json) ? null : JsonSerializer.Deserialize(json, PollValueSourceGenerationContext.Default.PollValue); | ||||||
|  |         if (result is not null) | ||||||
|  |         { | ||||||
|  |             result = new(null, result.Id, result.Page, queryString, remoteIpAddress is null ? string.Empty : remoteIpAddress.ToString(), result.Time, result.Value); | ||||||
|  |             json = JsonSerializer.Serialize(result, PollValueSourceGenerationContext.Default.PollValue); | ||||||
|  |             result = new(json, result.Id, result.Page, queryString, remoteIpAddress is null ? string.Empty : remoteIpAddress.ToString(), result.Time, result.Value); | ||||||
|  |         } | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -1,6 +1,6 @@ | |||||||
| using System.Text.RegularExpressions; | using System.Text.RegularExpressions; | ||||||
| 
 | 
 | ||||||
| namespace OI.Metrology.Wafer.Counter.Repository; | namespace OI.Metrology.Wafer.Counter.Helper; | ||||||
| 
 | 
 | ||||||
| public partial class RegexHelper | public partial class RegexHelper | ||||||
| { | { | ||||||
| @ -1,8 +1,10 @@ | |||||||
| using System.Text.Json; | using System.Text.Json; | ||||||
|  | using System.Text.Json.Serialization; | ||||||
|  |  | ||||||
| namespace OI.Metrology.Wafer.Counter.Models; | namespace OI.Metrology.Wafer.Counter.Models; | ||||||
|  |  | ||||||
| public record AppSettings(string BuildNumber, | public record AppSettings(string AzureDevOpsDestinationDirectory, | ||||||
|  |                           string BuildNumber, | ||||||
|                           string Company, |                           string Company, | ||||||
|                           string EcCharacterizationSi, |                           string EcCharacterizationSi, | ||||||
|                           string EcMesaFileShareCharacterizationSi, |                           string EcMesaFileShareCharacterizationSi, | ||||||
| @ -20,8 +22,60 @@ public record AppSettings(string BuildNumber, | |||||||
|  |  | ||||||
|     public override string ToString() |     public override string ToString() | ||||||
|     { |     { | ||||||
|         string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true }); |         string result = JsonSerializer.Serialize(this, AppSettingsSourceGenerationContext.Default.AppSettings); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static void Verify(AppSettings appSettings) | ||||||
|  |     { | ||||||
|  |         if (string.IsNullOrEmpty(appSettings.Company)) | ||||||
|  |             throw new Exception("Company name must have a value!"); | ||||||
|  |         if (string.IsNullOrEmpty(appSettings.WorkingDirectoryName)) | ||||||
|  |             throw new Exception("Working directory name must have a value!"); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public static AppSettings Get(IConfigurationRoot configurationRoot) | ||||||
|  |     { | ||||||
|  |         AppSettings result; | ||||||
|  |         AppSettings? appSettings = configurationRoot.GetSection(nameof(AppSettings)).Get<AppSettings>(); | ||||||
|  | #pragma warning restore IL3050, IL2026 | ||||||
|  |         if (appSettings is null | ||||||
|  |             || appSettings?.Company is null) | ||||||
|  |         { | ||||||
|  |             List<string> paths = []; | ||||||
|  |             foreach (IConfigurationProvider configurationProvider in configurationRoot.Providers) | ||||||
|  |             { | ||||||
|  |                 if (configurationProvider is not Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider jsonConfigurationProvider) | ||||||
|  |                     continue; | ||||||
|  |                 if (jsonConfigurationProvider.Source.FileProvider is not Microsoft.Extensions.FileProviders.PhysicalFileProvider physicalFileProvider) | ||||||
|  |                     continue; | ||||||
|  |                 paths.Add(physicalFileProvider.Root); | ||||||
|  |             } | ||||||
|  |             throw new NotSupportedException($"Not found!{Environment.NewLine}{string.Join(Environment.NewLine, paths.Distinct())}"); | ||||||
|  |         } | ||||||
|  |         result = new(appSettings.AzureDevOpsDestinationDirectory, | ||||||
|  |                      appSettings.BuildNumber, | ||||||
|  |                      appSettings.Company, | ||||||
|  |                      appSettings.EcCharacterizationSi, | ||||||
|  |                      appSettings.EcMesaFileShareCharacterizationSi, | ||||||
|  |                      appSettings.GitCommitSeven, | ||||||
|  |                      appSettings.IsDevelopment, | ||||||
|  |                      appSettings.IsStaging, | ||||||
|  |                      appSettings.MockRoot, | ||||||
|  |                      appSettings.MonAResource, | ||||||
|  |                      appSettings.MonASite, | ||||||
|  |                      appSettings.URLs, | ||||||
|  |                      appSettings.WaferCounterDestinationDirectory, | ||||||
|  |                      appSettings.WaferCounterTwoFileSecondsWait, | ||||||
|  |                      appSettings.WorkingDirectoryName); | ||||||
|  |         Verify(result); | ||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | [JsonSourceGenerationOptions(WriteIndented = true)] | ||||||
|  | [JsonSerializable(typeof(AppSettings))] | ||||||
|  | public partial class AppSettingsSourceGenerationContext : JsonSerializerContext | ||||||
|  | { | ||||||
|  | } | ||||||
| @ -1,2 +0,0 @@ | |||||||
| [*.cs] |  | ||||||
| csharp_preserve_single_line_statements = true |  | ||||||
| @ -1,99 +0,0 @@ | |||||||
| using System.Text.Json; |  | ||||||
| using System.Text.Json.Serialization; |  | ||||||
|  |  | ||||||
| namespace OI.Metrology.Wafer.Counter.Models.Binder; |  | ||||||
|  |  | ||||||
| public class AppSettings |  | ||||||
| { |  | ||||||
|  |  | ||||||
|     public string? BuildNumber { get; set; } |  | ||||||
|     public string? Company { get; set; } |  | ||||||
|     public string? EcCharacterizationSi { get; set; } |  | ||||||
|     public string? EcMesaFileShareCharacterizationSi { get; set; } |  | ||||||
|     public string? GitCommitSeven { get; set; } |  | ||||||
|     public bool? IsDevelopment { get; set; } |  | ||||||
|     public bool? IsStaging { get; set; } |  | ||||||
|     public string? MockRoot { get; set; } |  | ||||||
|     public string? MonAResource { get; set; } |  | ||||||
|     public string? MonASite { get; set; } |  | ||||||
|     public string? URLs { get; set; } |  | ||||||
|     public string? WaferCounterDestinationDirectory { get; set; } |  | ||||||
|     public int? WaferCounterTwoFileSecondsWait { get; set; } |  | ||||||
|     public string? WorkingDirectoryName { get; set; } |  | ||||||
|  |  | ||||||
|     public override string ToString() |  | ||||||
|     { |  | ||||||
|         string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true }); |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private static void PreVerify(IConfigurationRoot configurationRoot, AppSettings? appSettings) |  | ||||||
|     { |  | ||||||
|         if (appSettings?.Company is null) |  | ||||||
|         { |  | ||||||
|             List<string> paths = new(); |  | ||||||
|             foreach (IConfigurationProvider configurationProvider in configurationRoot.Providers) |  | ||||||
|             { |  | ||||||
|                 if (configurationProvider is not Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider jsonConfigurationProvider) |  | ||||||
|                     continue; |  | ||||||
|                 if (jsonConfigurationProvider.Source.FileProvider is not Microsoft.Extensions.FileProviders.PhysicalFileProvider physicalFileProvider) |  | ||||||
|                     continue; |  | ||||||
|                 paths.Add(physicalFileProvider.Root); |  | ||||||
|             } |  | ||||||
|             throw new NotSupportedException($"Not found!{Environment.NewLine}{string.Join(Environment.NewLine, paths.Distinct())}"); |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private static Models.AppSettings Get(AppSettings? appSettings) |  | ||||||
|     { |  | ||||||
|         Models.AppSettings result; |  | ||||||
|         if (appSettings is null) throw new NullReferenceException(nameof(appSettings)); |  | ||||||
|         if (appSettings.BuildNumber is null) throw new NullReferenceException(nameof(BuildNumber)); |  | ||||||
|         if (appSettings.Company is null) throw new NullReferenceException(nameof(Company)); |  | ||||||
|         if (appSettings.EcCharacterizationSi is null) throw new NullReferenceException(nameof(EcCharacterizationSi)); |  | ||||||
|         if (appSettings.EcMesaFileShareCharacterizationSi is null) throw new NullReferenceException(nameof(EcMesaFileShareCharacterizationSi)); |  | ||||||
|         if (appSettings.GitCommitSeven is null) throw new NullReferenceException(nameof(GitCommitSeven)); |  | ||||||
|         if (appSettings.IsDevelopment is null) throw new NullReferenceException(nameof(IsDevelopment)); |  | ||||||
|         if (appSettings.IsStaging is null) throw new NullReferenceException(nameof(IsStaging)); |  | ||||||
|         if (appSettings.MockRoot is null) throw new NullReferenceException(nameof(MockRoot)); |  | ||||||
|         if (appSettings.MonAResource is null) throw new NullReferenceException(nameof(MonAResource)); |  | ||||||
|         if (appSettings.MonASite is null) throw new NullReferenceException(nameof(MonASite)); |  | ||||||
|         if (appSettings.URLs is null) throw new NullReferenceException(nameof(URLs)); |  | ||||||
|         if (appSettings.WaferCounterDestinationDirectory is null) throw new NullReferenceException(nameof(WaferCounterDestinationDirectory)); |  | ||||||
|         if (appSettings.WaferCounterTwoFileSecondsWait is null) throw new NullReferenceException(nameof(WaferCounterTwoFileSecondsWait)); |  | ||||||
|         if (appSettings.WorkingDirectoryName is null) throw new NullReferenceException(nameof(WorkingDirectoryName)); |  | ||||||
|         result = new(appSettings.BuildNumber, |  | ||||||
|                      appSettings.Company, |  | ||||||
|                      appSettings.EcCharacterizationSi, |  | ||||||
|                      appSettings.EcMesaFileShareCharacterizationSi, |  | ||||||
|                      appSettings.GitCommitSeven, |  | ||||||
|                      appSettings.IsDevelopment.Value, |  | ||||||
|                      appSettings.IsStaging.Value, |  | ||||||
|                      appSettings.MockRoot, |  | ||||||
|                      appSettings.MonAResource, |  | ||||||
|                      appSettings.MonASite, |  | ||||||
|                      appSettings.URLs, |  | ||||||
|                      appSettings.WaferCounterDestinationDirectory, |  | ||||||
|                      appSettings.WaferCounterTwoFileSecondsWait.Value, |  | ||||||
|                      appSettings.WorkingDirectoryName); |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     public static Models.AppSettings Get(IConfigurationRoot configurationRoot) |  | ||||||
|     { |  | ||||||
|         Models.AppSettings result; |  | ||||||
| #pragma warning disable IL3050, IL2026 |  | ||||||
|         AppSettings? appSettings = configurationRoot.Get<AppSettings>(); |  | ||||||
| #pragma warning restore IL3050, IL2026 |  | ||||||
|         PreVerify(configurationRoot, appSettings); |  | ||||||
|         result = Get(appSettings); |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
| } |  | ||||||
|  |  | ||||||
| [JsonSourceGenerationOptions(WriteIndented = true)] |  | ||||||
| [JsonSerializable(typeof(AppSettings))] |  | ||||||
| internal partial class BinderAppSettingsSourceGenerationContext : JsonSerializerContext |  | ||||||
| { |  | ||||||
| } |  | ||||||
| @ -19,17 +19,17 @@ | |||||||
|         <PackageReference Include="Dapper" Version="2.1.44" /> |         <PackageReference Include="Dapper" Version="2.1.44" /> | ||||||
|         <PackageReference Include="EntityFramework" Version="6.5.1" /> |         <PackageReference Include="EntityFramework" Version="6.5.1" /> | ||||||
|         <PackageReference Include="jQuery" Version="3.7.1" /> |         <PackageReference Include="jQuery" Version="3.7.1" /> | ||||||
|         <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.8" /> |         <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.10" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="8.0.1" /> | ||||||
|         <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> |         <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> | ||||||
|         <PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.3" /> |         <PackageReference Include="Swashbuckle.AspNetCore" Version="6.8.1" /> | ||||||
|         <PackageReference Include="System.Data.SqlClient" Version="4.8.6" /> |         <PackageReference Include="System.Data.SqlClient" Version="4.8.6" /> | ||||||
|     </ItemGroup> |     </ItemGroup> | ||||||
|     <ItemGroup> |     <ItemGroup> | ||||||
|  | |||||||
| @ -14,11 +14,7 @@ public class Program | |||||||
|         ILogger<Program>? logger = null; |         ILogger<Program>? logger = null; | ||||||
|         WebApplicationBuilder webApplicationBuilder = WebApplication.CreateBuilder(args); |         WebApplicationBuilder webApplicationBuilder = WebApplication.CreateBuilder(args); | ||||||
|         _ = webApplicationBuilder.Configuration.AddUserSecrets<Program>(); |         _ = webApplicationBuilder.Configuration.AddUserSecrets<Program>(); | ||||||
|         AppSettings appSettings = Models.Binder.AppSettings.Get(webApplicationBuilder.Configuration); |         AppSettings appSettings = AppSettings.Get(webApplicationBuilder.Configuration); | ||||||
|         if (string.IsNullOrEmpty(appSettings.Company)) |  | ||||||
|             throw new Exception("Company name must have a value!"); |  | ||||||
|         if (string.IsNullOrEmpty(appSettings.WorkingDirectoryName)) |  | ||||||
|             throw new Exception("Working directory name must have a value!"); |  | ||||||
|         try |         try | ||||||
|         { |         { | ||||||
|             _ = webApplicationBuilder.Services.AddMemoryCache(); |             _ = webApplicationBuilder.Services.AddMemoryCache(); | ||||||
| @ -31,8 +27,9 @@ public class Program | |||||||
|             _ = webApplicationBuilder.Services.AddHttpClient(); |             _ = webApplicationBuilder.Services.AddHttpClient(); | ||||||
|             _ = webApplicationBuilder.Services.AddSingleton(_ => appSettings); |             _ = webApplicationBuilder.Services.AddSingleton(_ => appSettings); | ||||||
|             _ = webApplicationBuilder.Services.AddSingleton<IFileShareRepository, FileShareRepository>(); |             _ = webApplicationBuilder.Services.AddSingleton<IFileShareRepository, FileShareRepository>(); | ||||||
|  |             _ = webApplicationBuilder.Services.AddSingleton<IAzureDevOpsRepository, AzureDevOpsRepository>(); | ||||||
|             _ = webApplicationBuilder.Services.AddSingleton<IWaferCounterRepository, WaferCounterRepository>(); |             _ = webApplicationBuilder.Services.AddSingleton<IWaferCounterRepository, WaferCounterRepository>(); | ||||||
|             _ = webApplicationBuilder.Services.AddSingleton<IAppSettingsRepository<Models.Binder.AppSettings>>(_ => appSettingsRepository); |             _ = webApplicationBuilder.Services.AddSingleton<IAppSettingsRepository<AppSettings>>(_ => appSettingsRepository); | ||||||
|  |  | ||||||
|             _ = webApplicationBuilder.Services.AddSwaggerGen(); |             _ = webApplicationBuilder.Services.AddSwaggerGen(); | ||||||
|             _ = webApplicationBuilder.Services.AddSession(sessionOptions => |             _ = webApplicationBuilder.Services.AddSession(sessionOptions => | ||||||
|  | |||||||
| @ -3,27 +3,18 @@ using OI.Metrology.Shared.Models.Stateless; | |||||||
|  |  | ||||||
| namespace OI.Metrology.Wafer.Counter.Repository; | namespace OI.Metrology.Wafer.Counter.Repository; | ||||||
|  |  | ||||||
| public class AppSettingsRepository : IAppSettingsRepository<Models.Binder.AppSettings> | public class AppSettingsRepository : IAppSettingsRepository<AppSettings> | ||||||
| { | { | ||||||
|  |  | ||||||
|     private readonly AppSettings _AppSettings; |     private readonly AppSettings _AppSettings; | ||||||
|  |  | ||||||
|     public AppSettingsRepository(AppSettings appSettings) => _AppSettings = appSettings; |     public AppSettingsRepository(AppSettings appSettings) => | ||||||
|  |         _AppSettings = appSettings; | ||||||
|  |  | ||||||
|     internal Models.Binder.AppSettings GetAppSettings() |     internal AppSettings GetAppSettings() => | ||||||
|     { |         _AppSettings; | ||||||
|         Models.Binder.AppSettings result = new() |  | ||||||
|         { |  | ||||||
|             BuildNumber = _AppSettings.BuildNumber, |  | ||||||
|             Company = _AppSettings.Company, |  | ||||||
|             GitCommitSeven = _AppSettings.GitCommitSeven, |  | ||||||
|             IsDevelopment = _AppSettings.IsDevelopment, |  | ||||||
|             IsStaging = _AppSettings.IsStaging, |  | ||||||
|         }; |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     Models.Binder.AppSettings IAppSettingsRepository<Models.Binder.AppSettings>.GetAppSettings() => GetAppSettings(); |     AppSettings IAppSettingsRepository<AppSettings>.GetAppSettings() => GetAppSettings(); | ||||||
|  |  | ||||||
|     internal string GetBuildNumberAndGitCommitSeven() |     internal string GetBuildNumberAndGitCommitSeven() | ||||||
|     { |     { | ||||||
| @ -31,10 +22,10 @@ public class AppSettingsRepository : IAppSettingsRepository<Models.Binder.AppSet | |||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     string IAppSettingsRepository<Models.Binder.AppSettings>.GetBuildNumberAndGitCommitSeven() => |     string IAppSettingsRepository<AppSettings>.GetBuildNumberAndGitCommitSeven() => | ||||||
|         GetBuildNumberAndGitCommitSeven(); |         GetBuildNumberAndGitCommitSeven(); | ||||||
|  |  | ||||||
|     void IAppSettingsRepository<Models.Binder.AppSettings>.VerifyConnectionStrings() => |     void IAppSettingsRepository<AppSettings>.VerifyConnectionStrings() => | ||||||
|         throw new NotImplementedException(); |         throw new NotImplementedException(); | ||||||
|  |  | ||||||
| } | } | ||||||
							
								
								
									
										25
									
								
								Wafer-Counter/Repositories/AzureDevOpsRepository.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								Wafer-Counter/Repositories/AzureDevOpsRepository.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | |||||||
|  | using OI.Metrology.Shared.Models; | ||||||
|  | using OI.Metrology.Shared.Models.Stateless; | ||||||
|  | using OI.Metrology.Wafer.Counter.Models; | ||||||
|  |  | ||||||
|  | namespace OI.Metrology.Wafer.Counter.Repository; | ||||||
|  |  | ||||||
|  | public class AzureDevOpsRepository : IAzureDevOpsRepository | ||||||
|  | { | ||||||
|  |  | ||||||
|  |     private readonly AppSettings _AppSettings; | ||||||
|  |  | ||||||
|  |     public AzureDevOpsRepository(AppSettings appSettings) => | ||||||
|  |         _AppSettings = appSettings; | ||||||
|  |  | ||||||
|  |     void IAzureDevOpsRepository.Save(PollValue pollValue) | ||||||
|  |     { | ||||||
|  |         ArgumentNullException.ThrowIfNull(pollValue.Id); | ||||||
|  |         ArgumentNullException.ThrowIfNull(pollValue.Page); | ||||||
|  |         string directory = Path.Combine(_AppSettings.AzureDevOpsDestinationDirectory, pollValue.Page, pollValue.Id.Value.ToString()); | ||||||
|  |         if (!Directory.Exists(directory)) | ||||||
|  |             _ = Directory.CreateDirectory(directory); | ||||||
|  |         File.WriteAllText(Path.Combine(directory, $"{pollValue.Time}.json"), pollValue.Json is null ? string.Empty : pollValue.Json); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -1,3 +1,4 @@ | |||||||
|  | using OI.Metrology.Shared.DataModels; | ||||||
| using OI.Metrology.Shared.Models; | using OI.Metrology.Shared.Models; | ||||||
| using OI.Metrology.Shared.Models.Stateless; | using OI.Metrology.Shared.Models.Stateless; | ||||||
| using OI.Metrology.Wafer.Counter.Models; | using OI.Metrology.Wafer.Counter.Models; | ||||||
| @ -82,7 +83,7 @@ public class FileShareRepository : IFileShareRepository | |||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     List<NginxFileSystemSortable> IFileShareRepository.GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string? endsWith) |     ReadOnlyCollection<NginxFileSystemSortable> IFileShareRepository.GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string? endsWith) | ||||||
|     { |     { | ||||||
|         List<NginxFileSystemSortable> results = new(); |         List<NginxFileSystemSortable> results = new(); | ||||||
|         Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync(uri); |         Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync(uri); | ||||||
| @ -101,12 +102,12 @@ public class FileShareRepository : IFileShareRepository | |||||||
|                 results.Add(nginxFileSystemSortable); |                 results.Add(nginxFileSystemSortable); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         return results; |         return new(results); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private static ReadOnlyCollection<string> GetValidDirectories(string equipmentDirectory, DateTime startDateTime, DateTime endDateTime) |     private static ReadOnlyCollection<string> GetValidDirectories(string equipmentDirectory, DateTime startDateTime, DateTime endDateTime) | ||||||
|     { |     { | ||||||
|         List<string> results = [equipmentDirectory]; |         List<string> results = []; | ||||||
|         DateTime dateTime; |         DateTime dateTime; | ||||||
|         string weekOfYear; |         string weekOfYear; | ||||||
|         Calendar calendar = new CultureInfo("en-US").Calendar; |         Calendar calendar = new CultureInfo("en-US").Calendar; | ||||||
| @ -121,27 +122,37 @@ public class FileShareRepository : IFileShareRepository | |||||||
|         return new(results); |         return new(results); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private static ReadOnlyCollection<FileInfo> GetCollection(CharacterizationParameters characterizationParameters, string searchPattern, DateTime startDateTime, DateTime endDateTime, ReadOnlyCollection<string> validDirectories) |     private static ReadOnlyCollection<string> GetFiles(CharacterizationParameters characterizationParameters, string equipmentDirectory, string searchPattern, DateTime startDateTime, DateTime endDateTime, ReadOnlyCollection<string> validDirectories) | ||||||
|     { |     { | ||||||
|         FileInfo[] results; |         List<string> results = []; | ||||||
|         string[] directories; |         string[] directories; | ||||||
|         List<FileInfo> collection = []; |  | ||||||
|         string startDateTimeTicks = startDateTime.Ticks.ToString(); |         string startDateTimeTicks = startDateTime.Ticks.ToString(); | ||||||
|         string delta = (endDateTime.Ticks - startDateTime.Ticks).ToString(); |         string delta = (endDateTime.Ticks - startDateTime.Ticks).ToString(); | ||||||
|         string ticksSearchPattern = $"{startDateTime.Ticks.ToString()[..(startDateTimeTicks.Length - delta.Length + 1)]}*"; |         string ticksSearchPattern = $"{startDateTime.Ticks.ToString()[..(startDateTimeTicks.Length - delta.Length - 1)]}*"; | ||||||
|  |         bool check = characterizationParameters.SearchPattern is null || searchPattern == characterizationParameters.SearchPattern; | ||||||
|  |         if (check) | ||||||
|  |             results.AddRange(Directory.GetFiles(equipmentDirectory, searchPattern, SearchOption.AllDirectories)); | ||||||
|         foreach (string validDirectory in validDirectories) |         foreach (string validDirectory in validDirectories) | ||||||
|         { |         { | ||||||
|             if (string.IsNullOrEmpty(validDirectory) || !Directory.Exists(validDirectory)) |             if (string.IsNullOrEmpty(validDirectory) || !Directory.Exists(validDirectory)) | ||||||
|                 continue; |                 continue; | ||||||
|             if (characterizationParameters.SearchPattern is null || searchPattern == characterizationParameters.SearchPattern) |             if (check) | ||||||
|                 collection.AddRange(Directory.GetFiles(validDirectory, searchPattern, SearchOption.AllDirectories).Select(l => new FileInfo(l))); |                 results.AddRange(Directory.GetFiles(validDirectory, searchPattern, SearchOption.AllDirectories)); | ||||||
|             else |             else | ||||||
|             { |             { | ||||||
|                 directories = Directory.GetDirectories(validDirectory, ticksSearchPattern, SearchOption.AllDirectories); |                 directories = Directory.GetDirectories(validDirectory, ticksSearchPattern, SearchOption.AllDirectories); | ||||||
|                 foreach (string directory in directories) |                 foreach (string directory in directories) | ||||||
|                     collection.AddRange(Directory.GetFiles(directory, searchPattern, SearchOption.TopDirectoryOnly).Select(l => new FileInfo(l))); |                     results.AddRange(Directory.GetFiles(directory, searchPattern, SearchOption.TopDirectoryOnly)); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |         return new(results); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static ReadOnlyCollection<FileInfo> GetCollection(CharacterizationParameters characterizationParameters, string equipmentDirectory, string searchPattern, DateTime startDateTime, DateTime endDateTime, ReadOnlyCollection<string> validDirectories) | ||||||
|  |     { | ||||||
|  |         FileInfo[] results; | ||||||
|  |         ReadOnlyCollection<string> files = GetFiles(characterizationParameters, equipmentDirectory, searchPattern, startDateTime, endDateTime, validDirectories); | ||||||
|  |         FileInfo[] collection = files.Select(l => new FileInfo(l)).ToArray(); | ||||||
|         results = (from l in collection where l.LastWriteTime >= startDateTime && l.LastWriteTime <= endDateTime orderby l.LastWriteTime descending select l).ToArray(); |         results = (from l in collection where l.LastWriteTime >= startDateTime && l.LastWriteTime <= endDateTime orderby l.LastWriteTime descending select l).ToArray(); | ||||||
|         return new(results); |         return new(results); | ||||||
|     } |     } | ||||||
| @ -193,7 +204,7 @@ public class FileShareRepository : IFileShareRepository | |||||||
|         DateTime endDateTime = characterizationParameters.EndTime is null ? DateTime.Now : DateTime.Parse(characterizationParameters.EndTime).ToLocalTime(); |         DateTime endDateTime = characterizationParameters.EndTime is null ? DateTime.Now : DateTime.Parse(characterizationParameters.EndTime).ToLocalTime(); | ||||||
|         DateTime startDateTime = characterizationParameters.StartTime is null ? DateTime.Now.AddHours(-6) : DateTime.Parse(characterizationParameters.StartTime).ToLocalTime(); |         DateTime startDateTime = characterizationParameters.StartTime is null ? DateTime.Now.AddHours(-6) : DateTime.Parse(characterizationParameters.StartTime).ToLocalTime(); | ||||||
|         ReadOnlyCollection<string> validDirectories = GetValidDirectories(equipmentDirectory, startDateTime, endDateTime); |         ReadOnlyCollection<string> validDirectories = GetValidDirectories(equipmentDirectory, startDateTime, endDateTime); | ||||||
|         ReadOnlyCollection<FileInfo> collection = GetCollection(characterizationParameters, searchPattern, startDateTime, endDateTime, validDirectories); |         ReadOnlyCollection<FileInfo> collection = GetCollection(characterizationParameters, equipmentDirectory, searchPattern, startDateTime, endDateTime, validDirectories); | ||||||
|         foreach (FileInfo fileInfo in collection) |         foreach (FileInfo fileInfo in collection) | ||||||
|         { |         { | ||||||
|             if (string.IsNullOrEmpty(fileInfo.DirectoryName)) |             if (string.IsNullOrEmpty(fileInfo.DirectoryName)) | ||||||
| @ -218,7 +229,7 @@ public class FileShareRepository : IFileShareRepository | |||||||
|         return new(results); |         return new(results); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     List<CharacterizationInfo> IFileShareRepository.GetArchiveData(CharacterizationParameters characterizationParameters) |     ReadOnlyCollection<CharacterizationInfo> IFileShareRepository.GetArchiveData(CharacterizationParameters characterizationParameters) | ||||||
|     { |     { | ||||||
|         List<CharacterizationInfo> results = []; |         List<CharacterizationInfo> results = []; | ||||||
|         string searchPattern; |         string searchPattern; | ||||||
| @ -240,4 +251,23 @@ public class FileShareRepository : IFileShareRepository | |||||||
|         return new(results); |         return new(results); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     ReadOnlyCollection<ToolTypeNameId> IFileShareRepository.GetEquipmentIds() | ||||||
|  |     { | ||||||
|  |         List<ToolTypeNameId> results = []; | ||||||
|  |         string directoryName; | ||||||
|  |         ToolTypeNameId toolTypeNameId; | ||||||
|  |         string archiveDirectory = Path.Combine(_AppSettings.EcCharacterizationSi, "Archive"); | ||||||
|  |         string[] directories = Directory.GetDirectories(archiveDirectory, "*", SearchOption.TopDirectoryOnly); | ||||||
|  |         string[] fileNames = Directory.GetFiles(archiveDirectory, "*.json", SearchOption.TopDirectoryOnly).Select(l => Path.GetFileNameWithoutExtension(l)).ToArray(); | ||||||
|  |         for (int i = 0; i < directories.Length; i++) | ||||||
|  |         { | ||||||
|  |             directoryName = Path.GetFileName(directories[i]); | ||||||
|  |             if (!fileNames.Contains(directoryName)) | ||||||
|  |                 continue; | ||||||
|  |             toolTypeNameId = new() { ID = i, ToolTypeName = directoryName }; | ||||||
|  |             results.Add(toolTypeNameId); | ||||||
|  |         } | ||||||
|  |         return new(results); | ||||||
|  |     } | ||||||
|  |  | ||||||
| } | } | ||||||
| @ -1,7 +1,9 @@ | |||||||
| using OI.Metrology.Shared.DataModels; | using OI.Metrology.Shared.DataModels; | ||||||
| using OI.Metrology.Shared.Models; | using OI.Metrology.Shared.Models; | ||||||
| using OI.Metrology.Shared.Models.Stateless; | using OI.Metrology.Shared.Models.Stateless; | ||||||
|  | using OI.Metrology.Wafer.Counter.Helper; | ||||||
| using OI.Metrology.Wafer.Counter.Models; | using OI.Metrology.Wafer.Counter.Models; | ||||||
|  | using System.Collections.ObjectModel; | ||||||
| using System.Globalization; | using System.Globalization; | ||||||
| using System.Text.Json; | using System.Text.Json; | ||||||
| using System.Text.RegularExpressions; | using System.Text.RegularExpressions; | ||||||
| @ -32,17 +34,25 @@ public class WaferCounterRepository : IWaferCounterRepository | |||||||
|         _RepositoryName = nameof(WaferCounterRepository)[..^10]; |         _RepositoryName = nameof(WaferCounterRepository)[..^10]; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void MoveFile(string area, string waferSize, string windowsFileSystemSafeText, string waferSizeDirectory, NginxFileSystemSortable nginxFileSystemSortable) |     private void MoveFile(string area, string waferSize, WaferCounter? waferCounter, string windowsFileSystemSafeText, string waferSizeDirectory, NginxFileSystemSortable nginxFileSystemSortable) | ||||||
|     { |     { | ||||||
|         string equipmentId = $"{area}-{waferSize}"; |         string equipmentId = $"{area}-{waferSize}"; | ||||||
|  |         WaferCounterArchive waferCounterArchive = new() | ||||||
|  |         { | ||||||
|  |             Date = nginxFileSystemSortable.DateTime, | ||||||
|  |             MesEntity = equipmentId, | ||||||
|  |             RDS = windowsFileSystemSafeText, | ||||||
|  |             SlotMap = waferCounter?.SlotMap, | ||||||
|  |             Text = waferCounter?.Text, | ||||||
|  |             Total = waferCounter?.Total, | ||||||
|  |         }; | ||||||
|         Calendar calendar = new CultureInfo("en-US").Calendar; |         Calendar calendar = new CultureInfo("en-US").Calendar; | ||||||
|         string from = Path.Combine(waferSizeDirectory, nginxFileSystemSortable.Name); |         string from = Path.Combine(waferSizeDirectory, nginxFileSystemSortable.Name); | ||||||
|         string archive = Path.Combine(_AppSettings.EcCharacterizationSi, "Archive", equipmentId); |         string archive = Path.Combine(_AppSettings.EcCharacterizationSi, "Archive", equipmentId); | ||||||
|         HeaderCommon headerCommon = new() { RDS = windowsFileSystemSafeText, MesEntity = equipmentId }; |  | ||||||
|         string weekOfYear = $"{nginxFileSystemSortable.DateTime:yyyy}_Week_{calendar.GetWeekOfYear(nginxFileSystemSortable.DateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday):00}"; |         string weekOfYear = $"{nginxFileSystemSortable.DateTime:yyyy}_Week_{calendar.GetWeekOfYear(nginxFileSystemSortable.DateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday):00}"; | ||||||
|         string directory = Path.Combine(archive, weekOfYear, nginxFileSystemSortable.DateTime.ToString("yyyy-MM-dd"), windowsFileSystemSafeText); |         string directory = Path.Combine(archive, weekOfYear, nginxFileSystemSortable.DateTime.ToString("yyyy-MM-dd"), windowsFileSystemSafeText); | ||||||
|         string file = Path.Combine(directory, nginxFileSystemSortable.DateTime.Ticks.ToString(), $"{nginxFileSystemSortable.Name}.json"); |         string file = Path.Combine(directory, nginxFileSystemSortable.DateTime.Ticks.ToString(), $"{nginxFileSystemSortable.Name}.json"); | ||||||
|         string json = JsonSerializer.Serialize(headerCommon, new JsonSerializerOptions() { WriteIndented = true }); |         string json = JsonSerializer.Serialize(waferCounterArchive, WaferCounterArchiveSourceGenerationContext.Default.WaferCounterArchive); | ||||||
|         _FileShareRepository.FileWrite(file, json); |         _FileShareRepository.FileWrite(file, json); | ||||||
|         string to = Path.Combine(directory, nginxFileSystemSortable.Name); |         string to = Path.Combine(directory, nginxFileSystemSortable.Name); | ||||||
|         _FileShareRepository.MoveFile(from, to); |         _FileShareRepository.MoveFile(from, to); | ||||||
| @ -145,10 +155,12 @@ public class WaferCounterRepository : IWaferCounterRepository | |||||||
|     { |     { | ||||||
|         List<NginxFileSystemSortable> results = new(); |         List<NginxFileSystemSortable> results = new(); | ||||||
|         DateTime dateTime = DateTime.Now; |         DateTime dateTime = DateTime.Now; | ||||||
|  |         ReadOnlyCollection<NginxFileSystemSortable> collection; | ||||||
|         long ticks = dateTime.AddSeconds(_AppSettings.WaferCounterTwoFileSecondsWait).Ticks; |         long ticks = dateTime.AddSeconds(_AppSettings.WaferCounterTwoFileSecondsWait).Ticks; | ||||||
|         for (int i = 0; i < int.MaxValue; i++) |         for (int i = 0; i < int.MaxValue; i++) | ||||||
|         { |         { | ||||||
|             results = _FileShareRepository.GetNginxFileSystemSortableCollection(httpClient, waferSizeUri, ".wc"); |             collection = _FileShareRepository.GetNginxFileSystemSortableCollection(httpClient, waferSizeUri, ".wc"); | ||||||
|  |             results.AddRange(collection); | ||||||
|             if (results.Count > 0 || DateTime.Now.Ticks > ticks) |             if (results.Count > 0 || DateTime.Now.Ticks > ticks) | ||||||
|                 break; |                 break; | ||||||
|             Thread.Sleep(250); |             Thread.Sleep(250); | ||||||
| @ -197,7 +209,7 @@ public class WaferCounterRepository : IWaferCounterRepository | |||||||
|             string windowsFileSystemSafeText = _Regex.Replace(text, "."); |             string windowsFileSystemSafeText = _Regex.Replace(text, "."); | ||||||
|             result = GetLastQuantityAndSlotMap(waferSize, httpClient, nginxFileSystemSortableCollection[0]); |             result = GetLastQuantityAndSlotMap(waferSize, httpClient, nginxFileSystemSortableCollection[0]); | ||||||
|             for (int i = 0; i < nginxFileSystemSortableCollection.Count; i++) |             for (int i = 0; i < nginxFileSystemSortableCollection.Count; i++) | ||||||
|                 MoveFile(area, waferSize, windowsFileSystemSafeText, waferSizeDirectory, nginxFileSystemSortableCollection[i]); |                 MoveFile(area, waferSize, result, windowsFileSystemSafeText, waferSizeDirectory, nginxFileSystemSortableCollection[i]); | ||||||
|         } |         } | ||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user