Compare commits
3 Commits
7b2a843664
...
09-23-a
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ff031178f | |||
| b1b20e1bb0 | |||
| 8e294ab83f |
7
Server/.vscode/settings.json
vendored
7
Server/.vscode/settings.json
vendored
@ -1,4 +1,11 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"*.ffs_gui": "xml",
|
||||
"*.hurl": "http",
|
||||
"*.org": "ini",
|
||||
"*.net": "ini",
|
||||
"default": "ini"
|
||||
},
|
||||
"cSpell.words": [
|
||||
"Infineon"
|
||||
]
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -15,5 +15,5 @@ public interface IFileShareRepository
|
||||
void CopyFile(HttpClient httpClient, string from, string to);
|
||||
void MoveFile(HttpClient httpClient, string from, string to);
|
||||
ReadOnlyCollection<CharacterizationInfo> GetArchiveData(CharacterizationParameters characterizationParameters);
|
||||
ReadOnlyCollection<NginxFileSystemSortable> GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string? endsWith);
|
||||
ReadOnlyCollection<NginxFileSystemSortable> GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string[] endsWithCollection);
|
||||
}
|
||||
141
Static/.vscode/tasks.json
vendored
141
Static/.vscode/tasks.json
vendored
@ -1,28 +1,129 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
"inputs": [
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "MakeDirctory",
|
||||
"command": "mkdir",
|
||||
"args": [
|
||||
"D:\\web-sites\\OI-Metrology\\pp-6737ddfb-_______-OI-Metrology-Release"
|
||||
"default": "Development",
|
||||
"description": "Which ASP Net Core Environment?",
|
||||
"id": "ASPNETCORE_ENVIRONMENT",
|
||||
"options": [
|
||||
"Development",
|
||||
"Production"
|
||||
],
|
||||
"type": "pickString"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "CopySite",
|
||||
"command": "robocopy",
|
||||
"args": [
|
||||
"L:\\DevOps\\Mesa_FI\\OI-Metrology\\Static",
|
||||
"D:\\web-sites\\OI-Metrology\\pp-6737ddfb-_______-OI-Metrology-Release\\Static",
|
||||
"/E",
|
||||
"/MT:6",
|
||||
"/NFL",
|
||||
"/NDL",
|
||||
"/NJH",
|
||||
"/NJS"
|
||||
"default": "{AssemblyTitle}",
|
||||
"description": "What Assembly Title?",
|
||||
"id": "AssemblyTitle",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "{Build.BuildId}",
|
||||
"description": "Which Build BuildId?",
|
||||
"id": "Build.BuildId",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "{Build.Reason}",
|
||||
"description": "Which Build Reason?",
|
||||
"id": "Build.Reason",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "{Build.Repository.Id}",
|
||||
"description": "Which Build Repository Id?",
|
||||
"id": "Build.Repository.Id",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "{Build.Repository.Name}",
|
||||
"description": "Which Build Repository Name?",
|
||||
"id": "Build.Repository.Name",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "{Build.SourceVersion}",
|
||||
"description": "Which Build Source Version?",
|
||||
"id": "Build.SourceVersion",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "Static",
|
||||
"description": "Which Configuration?",
|
||||
"id": "Configuration",
|
||||
"options": [
|
||||
"Debug",
|
||||
"Release",
|
||||
"Static"
|
||||
],
|
||||
"type": "pickString"
|
||||
},
|
||||
{
|
||||
"default": "net8.0",
|
||||
"description": "Which Core Version?",
|
||||
"id": "CoreVersion",
|
||||
"options": [
|
||||
"net8.0"
|
||||
],
|
||||
"type": "pickString"
|
||||
},
|
||||
{
|
||||
"default": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe",
|
||||
"description": "Which MS Build?",
|
||||
"id": "MSBuild",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/",
|
||||
"description": "Which Nuget Source?",
|
||||
"id": "NugetSource",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "win-x64",
|
||||
"description": "Which Runtime?",
|
||||
"id": "Runtime",
|
||||
"options": [
|
||||
"win-x64",
|
||||
"win-x32",
|
||||
"linux-x64",
|
||||
"linux-x32"
|
||||
],
|
||||
"type": "pickString"
|
||||
},
|
||||
{
|
||||
"default": "L:/",
|
||||
"description": "Which System DefaultWorkingDirectory?",
|
||||
"id": "System.DefaultWorkingDirectory",
|
||||
"options": [
|
||||
"L:/",
|
||||
"D:/",
|
||||
"C:/"
|
||||
],
|
||||
"type": "pickString"
|
||||
},
|
||||
{
|
||||
"default": "v4.8",
|
||||
"description": "Which Core Target Framework Version?",
|
||||
"id": "TargetFrameworkVersion",
|
||||
"options": [
|
||||
"v4.8"
|
||||
],
|
||||
"type": "pickString"
|
||||
},
|
||||
{
|
||||
"default": "{UserSecretsId}",
|
||||
"description": "Which Core User Secrets Id?",
|
||||
"id": "UserSecretsId",
|
||||
"type": "promptString"
|
||||
}
|
||||
]
|
||||
],
|
||||
"tasks": [
|
||||
{
|
||||
"command": "(robocopy /MIR \"../Static\" \"D:/${input:Configuration}/${input:Build.Repository.Name}/${input:Build.Repository.Id}/${input:AssemblyTitle}\") ^& IF %ERRORLEVEL% LEQ 7 exit 0",
|
||||
"label": "Copy Files to: D:/",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
}
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
</div>
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html" class="alert-info">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -115,7 +115,7 @@
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
@ -919,17 +919,18 @@ function requestHeaderDataFiles() {
|
||||
var startTime = $("#StartTime").igTimePicker("value");
|
||||
var endDate = $("#EndDate").igDatePicker("value");
|
||||
var endTime = $("#EndTime").igTimePicker("value");
|
||||
var segments = toolTypeName.split('-');
|
||||
var params = {
|
||||
area: null,
|
||||
area: segments.length === 2 ? segments[0] : null,
|
||||
'end-time': new Date(
|
||||
endDate.getFullYear(), endDate.getMonth(), endDate.getDate(),
|
||||
endTime.getHours(), endTime.getMinutes(), endTime.getSeconds()).toISOString(),
|
||||
'equipment-id': toolTypeName,
|
||||
'search-pattern': '*.wc',
|
||||
'search-pattern': segments.length === 2 ? '*.pdsf' : '*.json',
|
||||
'start-time': new Date(
|
||||
startDate.getFullYear(), startDate.getMonth(), startDate.getDate(),
|
||||
startTime.getHours(), startTime.getMinutes(), startTime.getSeconds()).toISOString(),
|
||||
'wafer-size': null,
|
||||
'wafer-size': segments.length === 2 ? segments[1] : null,
|
||||
}
|
||||
var headerURL = _apiUrl + "/v1/file-share/archive-data/?" + $.param(params);
|
||||
var gridColumns = [
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<li><a href="/export.html">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||
<li><a href="https://goto.infineon.com/mesareportingservices" target="_blank">Reporting Services</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right">
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
</table>
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2024 - Infineon Technologies</p>
|
||||
<p>© 2025 - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
47
Static/static-pipeline.yml
Normal file
47
Static/static-pipeline.yml
Normal file
@ -0,0 +1,47 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
paths:
|
||||
include:
|
||||
- Static
|
||||
|
||||
stages:
|
||||
- stage: Static
|
||||
displayName: Static
|
||||
pool:
|
||||
name: 'OpenInsight Metrology Viewer'
|
||||
demands: OpenInsight-Metrology-Viewer-Wafer-Counter-Static
|
||||
variables:
|
||||
assemblyTitle: 'OI.Metrology.Wafer.Static'
|
||||
configuration: 'Static'
|
||||
jobs:
|
||||
- job: Static
|
||||
steps:
|
||||
- script: |
|
||||
echo Assembly Title: $(AssemblyTitle)
|
||||
echo Build Id: $(Build.BuildId)
|
||||
echo Build Reason: $(Build.Reason)
|
||||
echo Repo Id: $(Build.Repository.Id)
|
||||
echo Repo Name: $(Build.Repository.Name)
|
||||
echo Source Version: $(Build.SourceVersion)
|
||||
echo Configuration: $(Configuration)
|
||||
displayName: 'Echo Check'
|
||||
|
||||
- script: (robocopy /MIR \"..\Static\" \"D:\$(Configuration)\$(Build.Repository.Name)\$(Build.Repository.Id)\$(AssemblyTitle)\") ^& IF %ERRORLEVEL% LEQ 7 exit 0
|
||||
workingDirectory: Static
|
||||
displayName: 'Robocopy'
|
||||
|
||||
- script: rmdir "D:\web-sites\$(AssemblyTitle).$(Configuration)"
|
||||
workingDirectory: Static
|
||||
displayName: 'Remove MKLink'
|
||||
continueOnError: true
|
||||
|
||||
- script: mklink /J "D:\web-sites\$(AssemblyTitle).$(Configuration)" "D:\$(Configuration)\$(Build.Repository.Name)\$(Build.Repository.Id)\$(AssemblyTitle)"
|
||||
workingDirectory: Static
|
||||
displayName: 'Create MKLink'
|
||||
|
||||
- script: mkdir "D:\web-sites\$(AssemblyTitle).$(Configuration)\$(AssemblyTitle).$(Configuration)"
|
||||
workingDirectory: Static
|
||||
displayName: 'Make Directory'
|
||||
continueOnError: true
|
||||
33
Tests/.vscode/api-metrology-viewer.http
vendored
Normal file
33
Tests/.vscode/api-metrology-viewer.http
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/tooltypes
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/export/export
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
POST http://oi-metrology-viewer-prod.mes.infineon.com:4433/api/inbound/SRP
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/export/pdsf
|
||||
Accept: application/json
|
||||
|
||||
{ "PSN": "5131", "Reactor": "23", "RDS": "631836", "ID": 1710783849 }
|
||||
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/export/logistics
|
||||
Accept: application/json
|
||||
|
||||
{ "PSN": "5131", "Reactor": "23", "RDS": "631836", "ID": 1710783849 }
|
||||
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/export/processDataStandardFormat
|
||||
Accept: application/json
|
||||
|
||||
{ "PSN": "5131", "Reactor": "23", "RDS": "631836", "ID": 1710783849 }
|
||||
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/export/headers
|
||||
Accept: application/json
|
||||
19
Tests/.vscode/api-v1-InfinityQS.http
vendored
Normal file
19
Tests/.vscode/api-v1-InfinityQS.http
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/InfinityQS/1677273357/header
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/InfinityQS/1677273357/events
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/InfinityQS/1677273357/descriptors
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/InfinityQS/1677273357/data
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/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
|
||||
@ -17,4 +17,4 @@ GET {{host}}/111/header
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV3/CDE4_250520183333000/header
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV3/1756084021/header
|
||||
7
Tests/.vscode/settings.json
vendored
7
Tests/.vscode/settings.json
vendored
@ -1,4 +1,11 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"*.ffs_gui": "xml",
|
||||
"*.hurl": "http",
|
||||
"*.org": "ini",
|
||||
"*.net": "ini",
|
||||
"default": "ini"
|
||||
},
|
||||
"coverage-gutters.coverageBaseDir": "../.vscode/TestResults/**",
|
||||
"cSpell.words": [
|
||||
"appsettings",
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
@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
|
||||
51
Tests/.vscode/tc_col_metrology-viewer.http
vendored
51
Tests/.vscode/tc_col_metrology-viewer.http
vendored
@ -1,51 +0,0 @@
|
||||
###
|
||||
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
|
||||
@ -93,9 +93,7 @@ public class UnitTestFileShareController : BaseTestClass
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void GetArchiveData()
|
||||
{
|
||||
@ -113,13 +111,14 @@ public class UnitTestFileShareController : BaseTestClass
|
||||
characterizationParameters = new(string.Empty, "CDE5", "CDE*.json", null, null, "8INCH");
|
||||
result = fileShareRepository?.GetArchiveData(characterizationParameters);
|
||||
Assert.IsNotNull(result);
|
||||
characterizationParameters = new("FQA", "FQA-8INCH", "*.wc", null, null, "8INCH");
|
||||
result = fileShareRepository?.GetArchiveData(characterizationParameters);
|
||||
Assert.IsNotNull(result);
|
||||
_Logger?.LogInformation("{TestName} completed", TestContext.TestName);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public async Task ArchiveDataApi()
|
||||
{
|
||||
|
||||
@ -8,7 +8,7 @@ using System.Text;
|
||||
namespace OI.Metrology.Tests;
|
||||
|
||||
[TestClass]
|
||||
public class UnitInboundController : BaseTestClass
|
||||
public class UnitTestInboundController : BaseTestClass
|
||||
{
|
||||
|
||||
#pragma warning disable CS8618
|
||||
@ -80,6 +80,7 @@ public class UnitTestInfinityQSV4Controller : BaseTestClass
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public void GetData()
|
||||
{
|
||||
@ -99,6 +100,7 @@ public class UnitTestInfinityQSV4Controller : BaseTestClass
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public async Task GetDataApi()
|
||||
{
|
||||
@ -173,6 +175,7 @@ public class UnitTestInfinityQSV4Controller : BaseTestClass
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public void GetProductDataAverageSumOfDefectsProcessMeanProcessSigma()
|
||||
{
|
||||
@ -185,6 +188,7 @@ public class UnitTestInfinityQSV4Controller : BaseTestClass
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public async Task GetProductDataAverageSumOfDefectsProcessMeanProcessSigmaApi()
|
||||
{
|
||||
|
||||
@ -58,7 +58,7 @@ public class UnitTestWaferCounterController : BaseTestClass
|
||||
_Logger?.LogInformation("Starting Web Application");
|
||||
IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider;
|
||||
IWaferCounterRepository? waferCounterRepository = serviceProvider?.GetRequiredService<IWaferCounterRepository>();
|
||||
WaferCounter? result = waferCounterRepository?.GetLastQuantityAndSlotMap(area: "FQA", waferSize: "8INCH", text: "Test");
|
||||
WaferCounter? result = waferCounterRepository?.GetLastQuantityAndSlotMap(area: "MU", waferSize: "9INCH", text: "Test");
|
||||
Assert.IsNotNull(result);
|
||||
_Logger?.LogInformation("{TestName} completed", TestContext.TestName);
|
||||
NonThrowTryCatch();
|
||||
@ -71,7 +71,7 @@ public class UnitTestWaferCounterController : BaseTestClass
|
||||
HttpClient? httpClient = _WebApplicationFactory?.CreateClient();
|
||||
_Logger?.LogInformation("Starting Web Application");
|
||||
Assert.IsNotNull(httpClient);
|
||||
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}/MU/last-quantity-and-slot-map/?waferSize=9INCH&text=Test");
|
||||
Assert.IsNotNull(response);
|
||||
_Logger?.LogInformation("{TestName} completed", TestContext.TestName);
|
||||
NonThrowTryCatch();
|
||||
|
||||
21
Tests/server-development.hurl
Normal file
21
Tests/server-development.hurl
Normal file
@ -0,0 +1,21 @@
|
||||
###
|
||||
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4432/api/AppSettings/App
|
||||
Accept: application/json
|
||||
|
||||
HTTP 200
|
||||
[Asserts]
|
||||
header "Content-Type" == "application/json; charset=utf-8"
|
||||
jsonpath "$.company" == "Infineon Technologies Americas Corp."
|
||||
|
||||
###
|
||||
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4432/api/tooltypes
|
||||
Accept: application/json
|
||||
|
||||
HTTP 200
|
||||
[Asserts]
|
||||
header "Content-Type" == "application/json; charset=utf-8"
|
||||
jsonpath "$.Results" count > 5
|
||||
|
||||
###
|
||||
21
Tests/server-release.hurl
Normal file
21
Tests/server-release.hurl
Normal file
@ -0,0 +1,21 @@
|
||||
###
|
||||
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/AppSettings/App
|
||||
Accept: application/json
|
||||
|
||||
HTTP 200
|
||||
[Asserts]
|
||||
header "Content-Type" == "application/json; charset=utf-8"
|
||||
jsonpath "$.company" == "Infineon Technologies Americas Corp."
|
||||
|
||||
###
|
||||
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/tooltypes
|
||||
Accept: application/json
|
||||
|
||||
HTTP 200
|
||||
[Asserts]
|
||||
header "Content-Type" == "application/json; charset=utf-8"
|
||||
jsonpath "$.Results" count > 5
|
||||
|
||||
###
|
||||
@ -83,7 +83,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);
|
||||
@ -97,7 +97,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(nginxFileSystemSortable.Name) && nginxFileSystemSortable.Name.EndsWith(l)))
|
||||
continue;
|
||||
results.Add(nginxFileSystemSortable);
|
||||
}
|
||||
@ -122,36 +122,30 @@ public class FileShareRepository : IFileShareRepository
|
||||
return new(results);
|
||||
}
|
||||
|
||||
private static ReadOnlyCollection<string> GetFiles(CharacterizationParameters characterizationParameters, string equipmentDirectory, string searchPattern, DateTime startDateTime, DateTime endDateTime, ReadOnlyCollection<string> validDirectories)
|
||||
private static ReadOnlyCollection<string> GetFiles(CharacterizationParameters characterizationParameters, string equipmentDirectory, DateTime startDateTime, DateTime endDateTime, ReadOnlyCollection<string> validDirectories)
|
||||
{
|
||||
List<string> results = [];
|
||||
string[] directories;
|
||||
SearchOption searchOption;
|
||||
string startDateTimeTicks = startDateTime.Ticks.ToString();
|
||||
string delta = (endDateTime.Ticks - startDateTime.Ticks).ToString();
|
||||
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)
|
||||
{
|
||||
if (string.IsNullOrEmpty(validDirectory) || !Directory.Exists(validDirectory))
|
||||
if (string.IsNullOrEmpty(characterizationParameters.SearchPattern) || string.IsNullOrEmpty(validDirectory) || !Directory.Exists(validDirectory))
|
||||
continue;
|
||||
if (check)
|
||||
results.AddRange(Directory.GetFiles(validDirectory, searchPattern, SearchOption.AllDirectories));
|
||||
else
|
||||
{
|
||||
directories = Directory.GetDirectories(validDirectory, ticksSearchPattern, SearchOption.AllDirectories);
|
||||
foreach (string directory in directories)
|
||||
results.AddRange(Directory.GetFiles(directory, searchPattern, SearchOption.TopDirectoryOnly));
|
||||
}
|
||||
searchOption = validDirectory == equipmentDirectory ? SearchOption.TopDirectoryOnly : SearchOption.AllDirectories;
|
||||
directories = Directory.GetDirectories(validDirectory, ticksSearchPattern, searchOption);
|
||||
foreach (string directory in directories)
|
||||
results.AddRange(Directory.GetFiles(directory, characterizationParameters.SearchPattern, SearchOption.TopDirectoryOnly));
|
||||
}
|
||||
return new(results);
|
||||
}
|
||||
|
||||
private static ReadOnlyCollection<FileInfo> GetCollection(CharacterizationParameters characterizationParameters, string equipmentDirectory, string searchPattern, DateTime startDateTime, DateTime endDateTime, ReadOnlyCollection<string> validDirectories)
|
||||
private static ReadOnlyCollection<FileInfo> GetCollection(CharacterizationParameters characterizationParameters, string equipmentDirectory, DateTime startDateTime, DateTime endDateTime, ReadOnlyCollection<string> validDirectories)
|
||||
{
|
||||
FileInfo[] results;
|
||||
ReadOnlyCollection<string> files = GetFiles(characterizationParameters, equipmentDirectory, searchPattern, startDateTime, endDateTime, validDirectories);
|
||||
ReadOnlyCollection<string> files = GetFiles(characterizationParameters, equipmentDirectory, 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();
|
||||
return new(results);
|
||||
@ -193,7 +187,7 @@ public class FileShareRepository : IFileShareRepository
|
||||
return new(results);
|
||||
}
|
||||
|
||||
private static ReadOnlyCollection<CharacterizationInfo> GetCharacterizationData(CharacterizationParameters characterizationParameters, string equipmentDirectory, string searchPattern)
|
||||
private static ReadOnlyCollection<CharacterizationInfo> GetCharacterizationData(CharacterizationParameters characterizationParameters, string equipmentDirectory)
|
||||
{
|
||||
List<CharacterizationInfo> results = [];
|
||||
string[] lines;
|
||||
@ -204,7 +198,7 @@ public class FileShareRepository : IFileShareRepository
|
||||
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();
|
||||
ReadOnlyCollection<string> validDirectories = GetValidDirectories(equipmentDirectory, startDateTime, endDateTime);
|
||||
ReadOnlyCollection<FileInfo> collection = GetCollection(characterizationParameters, equipmentDirectory, searchPattern, startDateTime, endDateTime, validDirectories);
|
||||
ReadOnlyCollection<FileInfo> collection = GetCollection(characterizationParameters, equipmentDirectory, startDateTime, endDateTime, validDirectories);
|
||||
foreach (FileInfo fileInfo in collection)
|
||||
{
|
||||
if (string.IsNullOrEmpty(fileInfo.DirectoryName))
|
||||
@ -232,21 +226,18 @@ public class FileShareRepository : IFileShareRepository
|
||||
ReadOnlyCollection<CharacterizationInfo> IFileShareRepository.GetArchiveData(CharacterizationParameters characterizationParameters)
|
||||
{
|
||||
List<CharacterizationInfo> results = [];
|
||||
string searchPattern;
|
||||
string equipmentDirectory;
|
||||
if (!string.IsNullOrEmpty(characterizationParameters.Area) && !string.IsNullOrEmpty(characterizationParameters.WaferSize))
|
||||
{
|
||||
searchPattern = characterizationParameters.SearchPattern is null ? "*" : characterizationParameters.SearchPattern;
|
||||
equipmentDirectory = Path.Combine(_AppSettings.EcCharacterizationSi, "WaferCounter", characterizationParameters.Area, characterizationParameters.WaferSize);
|
||||
if (Directory.Exists(equipmentDirectory))
|
||||
results.AddRange(GetCharacterizationData(characterizationParameters, equipmentDirectory, searchPattern));
|
||||
results.AddRange(GetCharacterizationData(characterizationParameters, equipmentDirectory));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(characterizationParameters.EquipmentId))
|
||||
{
|
||||
searchPattern = "*.json";
|
||||
equipmentDirectory = Path.Combine(_AppSettings.EcCharacterizationSi, "Archive", characterizationParameters.EquipmentId);
|
||||
if (Directory.Exists(equipmentDirectory))
|
||||
results.AddRange(GetCharacterizationData(characterizationParameters, equipmentDirectory, searchPattern));
|
||||
results.AddRange(GetCharacterizationData(characterizationParameters, equipmentDirectory));
|
||||
}
|
||||
return new(results);
|
||||
}
|
||||
|
||||
@ -155,11 +155,12 @@ public class WaferCounterRepository : IWaferCounterRepository
|
||||
{
|
||||
List<NginxFileSystemSortable> results = new();
|
||||
DateTime dateTime = DateTime.Now;
|
||||
string[] endsWithCollection = [".wc", ".pdsf"];
|
||||
ReadOnlyCollection<NginxFileSystemSortable> collection;
|
||||
long ticks = dateTime.AddSeconds(_AppSettings.WaferCounterTwoFileSecondsWait).Ticks;
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
{
|
||||
collection = _FileShareRepository.GetNginxFileSystemSortableCollection(httpClient, waferSizeUri, ".wc");
|
||||
collection = _FileShareRepository.GetNginxFileSystemSortableCollection(httpClient, waferSizeUri, endsWithCollection);
|
||||
results.AddRange(collection);
|
||||
if (results.Count > 0 || DateTime.Now.Ticks > ticks)
|
||||
break;
|
||||
@ -168,20 +169,35 @@ public class WaferCounterRepository : IWaferCounterRepository
|
||||
return results;
|
||||
}
|
||||
|
||||
private static WaferCounter? GetLastQuantityAndSlotMap(string waferSize, HttpClient httpClient, NginxFileSystemSortable nginxFileSystemSortable)
|
||||
private static WaferCounter? GetLastQuantityAndSlotMap(string area, string waferSize, HttpClient httpClient, NginxFileSystemSortable nginxFileSystemSortable)
|
||||
{
|
||||
WaferCounter? result;
|
||||
Task<string> value = httpClient.GetStringAsync(nginxFileSystemSortable.Uri);
|
||||
value.Wait();
|
||||
string? line1;
|
||||
string? line2;
|
||||
string[] lines = value.Result.Split("\r\n");
|
||||
if (lines.Length < 3)
|
||||
if (nginxFileSystemSortable.Name.EndsWith(".wc") && lines.Length > 2)
|
||||
{
|
||||
line1 = lines[^3];
|
||||
line2 = lines[^2];
|
||||
}
|
||||
else if (nginxFileSystemSortable.Name.EndsWith(".pdsf") && lines.Length > 14)
|
||||
{
|
||||
line1 = lines[7].Split('\t')[^1];
|
||||
line2 = lines[8].Split('\t')[^1];
|
||||
}
|
||||
else
|
||||
{
|
||||
line1 = null;
|
||||
line2 = null;
|
||||
}
|
||||
if (string.IsNullOrEmpty(line1) || string.IsNullOrEmpty(line2))
|
||||
result = WaferCounter.GetWaferCounter("Incomplete file length!");
|
||||
else
|
||||
{
|
||||
string text = string.Empty;
|
||||
string[] segments = nginxFileSystemSortable.Name.Split('-');
|
||||
Record record = GetRecord(lines[^3], lines[^2]);
|
||||
string equipmentId = segments.Length <= 1 ? nginxFileSystemSortable.Name : segments[1].Split('.')[0];
|
||||
Record record = GetRecord(line1, line2);
|
||||
if (string.IsNullOrEmpty(record.SlotMap) || record.SlotMap.Length != 25)
|
||||
result = WaferCounter.GetWaferCounter("Wrong length for slot-map!");
|
||||
else
|
||||
@ -189,7 +205,13 @@ public class WaferCounterRepository : IWaferCounterRepository
|
||||
if (record.Total != record.Check)
|
||||
result = WaferCounter.GetWaferCounter($"Checksum has failed. {record.Total} != {record.Check}");
|
||||
else
|
||||
result = new(nginxFileSystemSortable.DateTime, nginxFileSystemSortable.DateTime.ToString("yyyy-MM-dd hh:mm tt"), $"WC{waferSize}{equipmentId}", string.Empty, text, record.Total, record.SlotMap);
|
||||
result = new(DateTime: nginxFileSystemSortable.DateTime,
|
||||
DateTimeFormatted: nginxFileSystemSortable.DateTime.ToString("yyyy-MM-dd hh:mm tt"),
|
||||
EquipmentId: $"{area}-{waferSize}",
|
||||
Message: string.Empty,
|
||||
Text: text,
|
||||
Total: record.Total,
|
||||
SlotMap: record.SlotMap);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@ -207,7 +229,7 @@ public class WaferCounterRepository : IWaferCounterRepository
|
||||
else
|
||||
{
|
||||
string windowsFileSystemSafeText = _Regex.Replace(text, ".");
|
||||
result = GetLastQuantityAndSlotMap(waferSize, httpClient, nginxFileSystemSortableCollection[0]);
|
||||
result = GetLastQuantityAndSlotMap(area, waferSize, httpClient, nginxFileSystemSortableCollection[0]);
|
||||
for (int i = 0; i < nginxFileSystemSortableCollection.Count; i++)
|
||||
MoveFile(area, waferSize, result, windowsFileSystemSafeText, waferSizeDirectory, nginxFileSystemSortableCollection[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user