Ready to release
This commit is contained in:
@ -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
|
||||
|
@ -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">
|
||||
|
||||
|
@ -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">
|
||||
|
||||
|
@ -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">
|
||||
|
||||
|
@ -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">
|
||||
|
||||
|
@ -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">
|
||||
|
||||
|
@ -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">
|
||||
|
||||
|
@ -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">
|
||||
|
||||
|
@ -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">
|
||||
|
||||
|
@ -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">
|
||||
|
||||
|
@ -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">
|
||||
|
||||
|
@ -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">
|
||||
|
||||
|
@ -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">
|
||||
|
||||
|
@ -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">
|
||||
|
||||
|
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
|
@ -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
|
50
Tests/.vscode/tc_col_metrology-viewer.http
vendored
50
Tests/.vscode/tc_col_metrology-viewer.http
vendored
@ -1,51 +1,57 @@
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com/api/tooltypes
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4433/api/tooltypes
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com/api/export/export
|
||||
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/api/inbound/SRP
|
||||
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/api/export/pdsf
|
||||
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
|
||||
|
||||
###
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com/api/export/logistics
|
||||
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/api/export/logistics
|
||||
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/api/export/headers
|
||||
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/api/InfinityQS/1677273357/header
|
||||
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/api/InfinityQS/1677273357/events
|
||||
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
|
||||
|
||||
###
|
||||
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
|
||||
GET https://oi-metrology-viewer-prod.mes.infineon.com:4436:4433/api/AppSettings/App
|
||||
Accept: application/json
|
||||
|
@ -8,7 +8,7 @@ using System.Text;
|
||||
namespace OI.Metrology.Tests;
|
||||
|
||||
[TestClass]
|
||||
public class UnitInboundController : BaseTestClass
|
||||
public class UnitTestInboundController : BaseTestClass
|
||||
{
|
||||
|
||||
#pragma warning disable CS8618
|
@ -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();
|
||||
|
@ -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(l) && !nginxFileSystemSortable.Name.EndsWith(l)))
|
||||
continue;
|
||||
results.Add(nginxFileSystemSortable);
|
||||
}
|
||||
|
@ -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