Refactor navigation links in Metrology static pages to update "FI Backlog" to "Reporting Services" with new URL.

- Updated links in the following files:
  - Static/Metrology/AwaitingDispo/index.html
  - Static/Metrology/Export/index.html
  - Static/Metrology/RunHeaders/index.html
  - Static/Metrology/RunInfo/index.html
  - Static/Metrology/index.html
  - Static/RunHeaders/index.html
  - Static/RunInfo/index.html
  - Static/awaiting-disposition.html
  - Static/export.html
  - Static/files.html
  - Static/index.html
  - Static/run-headers.html

Removed obsolete HTTP request files from Tests/.vscode directory.

- Deleted files:
  - tc_col_metrology-viewer-dev.http
  - tc_col_metrology-viewer-v1.http
  - tc_col_metrology-viewer-v2.http
  - tc_col_metrology-viewer-v3.http
  - tc_col_metrology-viewer-v4.http
  - tc_col_metrology-viewer.http
  - wafer-counter.http

Added new HTTP request files for development and production environments.

- Added files:
  - api-metrology-viewer-dev.http
  - api-metrology-viewer.http
  - api-v1-InfinityQS.http
  - api-v1-wafer-counter.http
  - api-v2-InfinityQS.http
  - api-v3-InfinityQS.http
  - api-v4-InfinityQS.http

Updated Unit Tests for Inbound and WaferCounter controllers to reflect changes in repository methods and test scenarios.

- Modified UnitTestWaferCounterController.cs to change area and wafer size parameters.
- Removed UnitInboundController.cs and added new tests for InboundController functionality.

Refactored FileShareRepository and WaferCounterRepository to improve file handling and data retrieval logic.

- Updated methods to handle multiple file extensions and improve error handling.
- Adjusted logic for retrieving last quantity and slot map based on file type.

Added static pipeline configuration for deployment.

- Created static-pipeline.yml for automated deployment process.
This commit is contained in:
2025-09-03 08:13:35 -07:00
parent 7b2a843664
commit 8e294ab83f
39 changed files with 357 additions and 120 deletions

View File

@ -1,4 +1,11 @@
{
"files.associations": {
"*.ffs_gui": "xml",
"*.hurl": "http",
"*.org": "ini",
"*.net": "ini",
"default": "ini"
},
"cSpell.words": [
"Infineon"
]

View File

@ -30,9 +30,16 @@ public class ExportRepository : IExportRepository
_RepositoryName = nameof(ExportRepository)[..^10];
}
private static string[] Get()
private static string[] Get(HeaderCommon headerCommon)
{
DateTime dateTime = DateTime.Now;
DateTime dateTime;
if (headerCommon.ID < 1)
dateTime = DateTime.Now;
else
{
DateTimeOffset dateTimeOffset = DateTimeOffset.UnixEpoch.AddSeconds(headerCommon.ID).ToLocalTime();
dateTime = new(dateTimeOffset.Ticks);
}
DateTime lastWeekDateTime = dateTime.AddDays(-7);
Calendar calendar = new CultureInfo("en-US").Calendar;
string weekOfYear = $"{dateTime:yyyy}_Week_{calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday):00}";
@ -40,11 +47,11 @@ public class ExportRepository : IExportRepository
return new string[] { weekOfYear, lastWeekOfYear };
}
private NginxFileSystemSortable[] GetNginxFileSystemSortableCollection(HeaderCommon headerCommon, HttpClient httpClient, string endsWith)
private NginxFileSystemSortable[] GetNginxFileSystemSortableCollection(HeaderCommon headerCommon, HttpClient httpClient, string[] endsWithCollection)
{
List<NginxFileSystemSortable> results = new();
Uri uri;
string[] weeks = Get();
string[] weeks = Get(headerCommon);
ReadOnlyCollection<NginxFileSystemSortable> collection;
foreach (string weekYear in weeks)
{
@ -52,7 +59,7 @@ public class ExportRepository : IExportRepository
uri = _FileShareRepository.Append(new Uri(_AppSettings.EcMesaFileShareMetrologySi), "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}");
else
uri = _FileShareRepository.Append(new Uri(_AppSettings.EcMesaFileShareMetrologySi), "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}", $"-{headerCommon.ID}");
collection = _FileShareRepository.GetNginxFileSystemSortableCollection(httpClient, uri, endsWith);
collection = _FileShareRepository.GetNginxFileSystemSortableCollection(httpClient, uri, endsWithCollection);
results.AddRange(collection);
}
return results.OrderByDescending(l => l.DateTime).ToArray();
@ -79,7 +86,7 @@ public class ExportRepository : IExportRepository
{
string result;
HttpClient httpClient = _HttpClientFactory.CreateClient();
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, ".txt");
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, [".txt"]);
result = GetLines(httpClient, nginxFileSystemSortableCollection);
return result;
}
@ -96,7 +103,7 @@ public class ExportRepository : IExportRepository
const string ticks = "Ticks";
JsonProperty[] jsonProperties;
HttpClient httpClient = _HttpClientFactory.CreateClient();
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, ".json");
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, [".json"]);
foreach (NginxFileSystemSortable nginxFileSystemSortable in nginxFileSystemSortableCollection)
{
json = GetLines(httpClient, nginxFileSystemSortableCollection);
@ -137,7 +144,7 @@ public class ExportRepository : IExportRepository
string json;
HeaderCommon? hc;
HttpClient httpClient = _HttpClientFactory.CreateClient();
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, ".json");
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, [".json"]);
foreach (NginxFileSystemSortable nginxFileSystemSortable in nginxFileSystemSortableCollection)
{
json = GetLines(httpClient, nginxFileSystemSortableCollection);
@ -158,7 +165,7 @@ public class ExportRepository : IExportRepository
{
string result;
HttpClient httpClient = _HttpClientFactory.CreateClient();
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, ".pdsf");
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, [".pdsf"]);
result = GetLines(httpClient, nginxFileSystemSortableCollection);
return result;
}

View File

@ -80,7 +80,7 @@ public class FileShareRepository : IFileShareRepository
return result;
}
ReadOnlyCollection<NginxFileSystemSortable> IFileShareRepository.GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string? endsWith)
ReadOnlyCollection<NginxFileSystemSortable> IFileShareRepository.GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string[] endsWithCollection)
{
List<NginxFileSystemSortable> results = new();
Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync(uri);
@ -94,7 +94,7 @@ public class FileShareRepository : IFileShareRepository
List<NginxFileSystemSortable> nginxFileSystemSortableCollection = NginxFileSystemSortable.Convert(fileShareRepository, uri, nginxFileSystemCollection);
foreach (NginxFileSystemSortable nginxFileSystemSortable in nginxFileSystemSortableCollection.OrderByDescending(l => l.DateTime))
{
if (!string.IsNullOrEmpty(endsWith) && !nginxFileSystemSortable.Name.EndsWith(endsWith))
if (!endsWithCollection.Any(l => string.IsNullOrEmpty(l) && !nginxFileSystemSortable.Name.EndsWith(l)))
continue;
results.Add(nginxFileSystemSortable);
}

View File

@ -82,6 +82,7 @@ stages:
- script: dotnet clean --configuration $(Configuration)
workingDirectory: Server
displayName: 'App - Clean'
- script: C:/Windows/system32/inetsrv/appcmd.exe stop apppool /apppool.name:$(AssemblyTitle).$(Configuration)
workingDirectory: Server
@ -123,6 +124,10 @@ stages:
workingDirectory: Server
displayName: 'Start Website'
- script: hurl.exe server-development.hurl --verbose
workingDirectory: Tests
displayName: 'Test Website'
- stage: Release
displayName: Release
pool: