Compare commits
3 Commits
Fix-Event
...
InfinityQS
Author | SHA1 | Date | |
---|---|---|---|
e42636853d | |||
c711fd6774 | |||
9225b76253 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -337,7 +337,7 @@ ASALocalRun/
|
|||||||
!.vscode/tasks.json
|
!.vscode/tasks.json
|
||||||
!.vscode/launch.json
|
!.vscode/launch.json
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
!.vscode/thunder-tests/
|
!.vscode/thunder-collection_InfinityQS.json
|
||||||
|
|
||||||
# Libman.json
|
# Libman.json
|
||||||
/wwwroot/lib/*
|
/wwwroot/lib/*
|
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -4,6 +4,5 @@
|
|||||||
"**/.git": false
|
"**/.git": false
|
||||||
},
|
},
|
||||||
"thunder-client.saveToWorkspace": true,
|
"thunder-client.saveToWorkspace": true,
|
||||||
"thunder-client.workspaceRelativePath": ".vscode",
|
|
||||||
"coverage-gutters.coverageBaseDir": "../.vscode/TestResults/*"
|
"coverage-gutters.coverageBaseDir": "../.vscode/TestResults/*"
|
||||||
}
|
}
|
83
.vscode/tasks.json
vendored
83
.vscode/tasks.json
vendored
@ -1,50 +1,6 @@
|
|||||||
{
|
{
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"options": {
|
|
||||||
"env": {
|
|
||||||
"serverUserSecretsId": "6501aa0f-8499-4be5-96a9-e99b11323eeb"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
|
||||||
"label": "userSecretsInit",
|
|
||||||
"command": "dotnet",
|
|
||||||
"type": "process",
|
|
||||||
"args": [
|
|
||||||
"user-secrets",
|
|
||||||
"-p",
|
|
||||||
"${workspaceFolder}/Server/OI.Metrology.Server.csproj",
|
|
||||||
"init"
|
|
||||||
],
|
|
||||||
"problemMatcher": "$msCompile"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "userSecretsSet",
|
|
||||||
"command": "dotnet",
|
|
||||||
"type": "process",
|
|
||||||
"args": [
|
|
||||||
"user-secrets",
|
|
||||||
"-p",
|
|
||||||
"${workspaceFolder}/Server/OI.Metrology.Server.csproj",
|
|
||||||
"set",
|
|
||||||
"asdf",
|
|
||||||
"123"
|
|
||||||
],
|
|
||||||
"problemMatcher": "$msCompile"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "userSecretsMkLink",
|
|
||||||
"command": "cmd",
|
|
||||||
"type": "shell",
|
|
||||||
"args": [
|
|
||||||
"/c",
|
|
||||||
"mklink",
|
|
||||||
"/J",
|
|
||||||
".vscode\\UserSecrets",
|
|
||||||
"${userHome}\\AppData\\Roaming\\Microsoft\\UserSecrets\\$env:serverUserSecretsId"
|
|
||||||
],
|
|
||||||
"problemMatcher": "$msCompile"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"label": "buildServer",
|
"label": "buildServer",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
@ -69,45 +25,6 @@
|
|||||||
],
|
],
|
||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"label": "testDebug",
|
|
||||||
"command": "dotnet",
|
|
||||||
"type": "process",
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"/property:GenerateFullPaths=true",
|
|
||||||
"/consoleloggerparameters:NoSummary"
|
|
||||||
],
|
|
||||||
"problemMatcher": "$msCompile"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "testRelease",
|
|
||||||
"command": "dotnet",
|
|
||||||
"type": "process",
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"/property:GenerateFullPaths=true",
|
|
||||||
"/consoleloggerparameters:NoSummary",
|
|
||||||
"-c",
|
|
||||||
"Release"
|
|
||||||
],
|
|
||||||
"problemMatcher": "$msCompile"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "format",
|
|
||||||
"command": "dotnet",
|
|
||||||
"type": "process",
|
|
||||||
"args": [
|
|
||||||
"format",
|
|
||||||
"--report",
|
|
||||||
".vscode",
|
|
||||||
"--verbosity",
|
|
||||||
"detailed",
|
|
||||||
"--severity",
|
|
||||||
"warn"
|
|
||||||
],
|
|
||||||
"problemMatcher": "$msCompile"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"label": "old-watch",
|
"label": "old-watch",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
|
198
.vscode/thunder-tests/thunderActivity.json
vendored
198
.vscode/thunder-tests/thunderActivity.json
vendored
@ -1,198 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"_id": "646e3a9b-8fe9-4eb3-a532-f94270f752ac",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "http://localhost:5126/api/inbound/cde",
|
|
||||||
"url": "http://localhost:5126/api/inbound/cde",
|
|
||||||
"method": "POST",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-02-28T14:41:33.596Z",
|
|
||||||
"modified": "2023-02-28T15:19:48.924Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"SentToMetrology\": false,\n \"SentToSPC\": false,\n \"AutoOptimizeGain\": \"YES\",\n \"AutoProbeHeightSet\": \"NO\",\n \"Avg\": \"1824.053\",\n \"CellName\": \"CDE2\",\n \"DLRatio\": \"0.9680\",\n \"DataReject\": \"> 3.0Sigma\",\n \"Date\": \"02/27/2023 03:03:00 AM\",\n \"Engineer\": \"Engineer\",\n \"EquipId\": \"CDE2\",\n \"FileName\": \"0 C:\\\\4p_NT\\\\LSL8in.prj\\\\10PT_5mm.rcp\\\\3227D036.RsM 03:03 02/27/23\",\n \"FilePath\": \"\",\n \"Id\": \"-1\",\n \"Layer\": \"\",\n \"LotId\": \"LotID\",\n \"Op\": \"Operator\",\n \"PSN\": \"4628\",\n \"RDS\": \"577845\",\n \"Reactor\": \"20\",\n \"Recipe\": \"LSL8in \\\\ 10PT_5mm\",\n \"ResistivitySpec\": \"\",\n \"Run\": \"20-577845-4628\",\n \"SemiRadial\": \"1.55%\",\n \"StDev\": \"1.33%\",\n \"Temp\": \"19.2\",\n \"UniqueId\": \"21.16;1;95.0;1803.847;270.0_Point-1\",\n \"Zone\": null,\n \"Details\": [\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"21.16\",\n \"Pt\": \"1\",\n \"R\": \"95.0\",\n \"Rs\": \"1803.847\",\n \"T\": \"270.0\",\n \"UniqueId\": \"21.16;1;95.0;1803.847;270.0_Point-1\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"22.39\",\n \"Pt\": \"2\",\n \"R\": \"71.0\",\n \"Rs\": \"1858.424\",\n \"T\": \"270.0\",\n \"UniqueId\": \"22.39;2;71.0;1858.424;270.0_Point-2\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"21.07\",\n \"Pt\": \"3\",\n \"R\": \"47.0\",\n \"Rs\": \"1834.141\",\n \"T\": \"270.0\",\n \"UniqueId\": \"21.07;3;47.0;1834.141;270.0_Point-3\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"22.91\",\n \"Pt\": \"4\",\n \"R\": \"23.0\",\n \"Rs\": \"1803.609\",\n \"T\": \"270.0\",\n \"UniqueId\": \"22.91;4;23.0;1803.609;270.0_Point-4\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"21.94\",\n \"Pt\": \"5\",\n \"R\": \"0.0\",\n \"Rs\": \"1801.623\",\n \"T\": \"0.0\",\n \"UniqueId\": \"21.94;5;0.0;1801.623;0.0_Point-5\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"25.61\",\n \"Pt\": \"6\",\n \"R\": \"11.0\",\n \"Rs\": \"1803.997\",\n \"T\": \"90.0\",\n \"UniqueId\": \"25.61;6;11.0;1803.997;90.0_Point-6\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"24.73\",\n \"Pt\": \"7\",\n \"R\": \"35.0\",\n \"Rs\": \"1819.854\",\n \"T\": \"90.0\",\n \"UniqueId\": \"24.73;7;35.0;1819.854;90.0_Point-7\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"23.13\",\n \"Pt\": \"8\",\n \"R\": \"59.0\",\n \"Rs\": \"1855.965\",\n \"T\": \"90.0\",\n \"UniqueId\": \"23.13;8;59.0;1855.965;90.0_Point-8\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"23.44\",\n \"Pt\": \"9\",\n \"R\": \"83.0\",\n \"Rs\": \"1853.631\",\n \"T\": \"90.0\",\n \"UniqueId\": \"23.44;9;83.0;1853.631;90.0_Point-9\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"21.75\",\n \"Pt\": \"10\",\n \"R\": \"95.0\",\n \"Rs\": \"1805.438\",\n \"T\": \"90.0\",\n \"UniqueId\": \"21.75;10;95.0;1805.438;90.0_Point-10\"\n }\n ]\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "7f723103-2cd6-4d09-b780-28afe34b3cd7",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "Delete",
|
|
||||||
"url": "https://tfs.intra.infineon.com/tfs/manufacturingit/APC%20Trend/_apis/test/runs/413094?api-version=6.0",
|
|
||||||
"method": "DELETE",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-02T15:43:07.175Z",
|
|
||||||
"modified": "2023-03-02T15:49:54.662Z",
|
|
||||||
"headers": [
|
|
||||||
{
|
|
||||||
"name": "Authorization",
|
|
||||||
"value": "Basic OmtzZHJveW9xMmJsdGI2N2xzN3NmZGhyYXlrY3l6cGlmemtkZjNndGs1bnl4ZnZmZHBqa2E="
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "api-version",
|
|
||||||
"value": "6.0",
|
|
||||||
"isPath": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "2874b1ad-b298-48c1-8edb-6fd78ce7d2d9",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "Get",
|
|
||||||
"url": "https://tfs.intra.infineon.com/tfs/manufacturingit/Mesa_FI/_apis/test/runs?branchName=amaster&api-version=6.0",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-02T15:53:18.138Z",
|
|
||||||
"modified": "2023-03-02T16:12:27.892Z",
|
|
||||||
"headers": [
|
|
||||||
{
|
|
||||||
"name": "Authorization",
|
|
||||||
"value": "Basic OmtzZHJveW9xMmJsdGI2N2xzN3NmZGhyYXlrY3l6cGlmemtkZjNndGs1bnl4ZnZmZHBqa2E="
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "branchName",
|
|
||||||
"value": "amaster",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "api-version",
|
|
||||||
"value": "6.0",
|
|
||||||
"isPath": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "ed8728f5-9afa-4e69-bca3-9c059a9a831b",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "Patch",
|
|
||||||
"url": "https://tfs.intra.infineon.com/tfs/manufacturingit/Mesa_FI/_apis/test/runs/410737?api-version=6.0",
|
|
||||||
"method": "PATCH",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-02T15:53:18.138Z",
|
|
||||||
"modified": "2023-03-02T15:58:09.720Z",
|
|
||||||
"headers": [
|
|
||||||
{
|
|
||||||
"name": "Authorization",
|
|
||||||
"value": "Basic OmtzZHJveW9xMmJsdGI2N2xzN3NmZGhyYXlrY3l6cGlmemtkZjNndGs1bnl4ZnZmZHBqa2E="
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "api-version",
|
|
||||||
"value": "6.0",
|
|
||||||
"isPath": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"name\": \"MET08RESIHGCV\",\n \"comment\": \"40 passed\"\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "727621f0-63a3-4df2-9cfc-2610c532670d",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "OI-RDS",
|
|
||||||
"url": "http://messa020ec.ec.local/api/oiWizard/materials/rds/578941",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-02T18:20:01.561Z",
|
|
||||||
"modified": "2023-03-06T18:40:43.162Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.rds.rdsLayers",
|
|
||||||
"action": "count",
|
|
||||||
"value": "1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "4eafe190-e59e-4a3e-af76-356f62fde842",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "https://oi-metrology-viewer-prod.mes.infineon.com/api/tooltypes",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/tooltypes",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-07T17:20:54.044Z",
|
|
||||||
"modified": "2023-03-07T17:20:54.044Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "280ea9be-50e3-4813-8eb0-ffff739fe196",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeaders",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/headers",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-07T17:21:05.219Z",
|
|
||||||
"modified": "2023-03-07T19:35:11.146Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "6d8098aa-eb50-422e-b38d-32709d985e8e",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeaders-Dev",
|
|
||||||
"url": "http://mestsa008/api/export/headers",
|
|
||||||
"method": "POST",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-07T17:21:05.219Z",
|
|
||||||
"modified": "2023-03-08T18:18:04.054Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "61383ad6-ceb4-4d98-86c1-bf00c0e4204d",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeaders-localhost",
|
|
||||||
"url": "http://localhost:5126/api/export/headers",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-07T17:21:05.219Z",
|
|
||||||
"modified": "2023-03-08T19:05:54.744Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": -1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
}
|
|
||||||
]
|
|
23
.vscode/thunder-tests/thunderCollection.json
vendored
23
.vscode/thunder-tests/thunderCollection.json
vendored
@ -1,23 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"_id": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
|
||||||
"colName": "InfinityQS",
|
|
||||||
"created": "2023-02-27T20:07:11.913Z",
|
|
||||||
"sortNum": 10000,
|
|
||||||
"folders": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
|
|
||||||
"colName": "Export EC",
|
|
||||||
"created": "2023-03-08T17:16:29.420Z",
|
|
||||||
"sortNum": 20000,
|
|
||||||
"folders": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
|
|
||||||
"colName": "Export IFX",
|
|
||||||
"created": "2023-03-08T17:31:19.468Z",
|
|
||||||
"sortNum": 30000,
|
|
||||||
"folders": []
|
|
||||||
}
|
|
||||||
]
|
|
@ -30,11 +30,11 @@
|
|||||||
<PackageReference Include="Dapper" Version="2.0.123" />
|
<PackageReference Include="Dapper" Version="2.0.123" />
|
||||||
<PackageReference Include="EntityFramework" Version="6.4.4" />
|
<PackageReference Include="EntityFramework" Version="6.4.4" />
|
||||||
<PackageReference Include="jQuery" Version="3.6.3" />
|
<PackageReference Include="jQuery" Version="3.6.3" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
|
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
|
||||||
<PackageReference Include="Serilog.AspNetCore.Ingestion" Version="1.0.0-dev-00032" />
|
<PackageReference Include="Serilog.AspNetCore.Ingestion" Version="1.0.0-dev-00032" />
|
||||||
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
|
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
|
||||||
|
@ -1,82 +0,0 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
|
|
||||||
namespace OI.Metrology.Server.ApiControllers;
|
|
||||||
|
|
||||||
using OI.Metrology.Shared.DataModels;
|
|
||||||
using OI.Metrology.Shared.Models.Stateless;
|
|
||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
[Route("api/[controller]")]
|
|
||||||
public class ExportController : Controller, IExportController<IActionResult>
|
|
||||||
{
|
|
||||||
|
|
||||||
private readonly IExportRepository _ExportRepository;
|
|
||||||
|
|
||||||
public ExportController(IExportRepository exportRepository) =>
|
|
||||||
_ExportRepository = exportRepository;
|
|
||||||
|
|
||||||
private static string? GetJson(Stream stream)
|
|
||||||
{
|
|
||||||
string? result;
|
|
||||||
if (!stream.CanRead)
|
|
||||||
result = null;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Task<string> task = new StreamReader(stream).ReadToEndAsync();
|
|
||||||
result = task.Result;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static HeaderCommon GetHeaderCommon(Stream stream)
|
|
||||||
{
|
|
||||||
HeaderCommon? result;
|
|
||||||
string? json = GetJson(stream);
|
|
||||||
result = string.IsNullOrEmpty(json) ? null : JsonSerializer.Deserialize<HeaderCommon>(json);
|
|
||||||
result ??= new();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("export")]
|
|
||||||
public IActionResult GetExport() =>
|
|
||||||
Content(_ExportRepository.GetExport(GetHeaderCommon(Request.Body)));
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("headers")]
|
|
||||||
public IActionResult GetHeaders() =>
|
|
||||||
Json(_ExportRepository.GetHeaders(GetHeaderCommon(Request.Body)), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("logistics")]
|
|
||||||
public IActionResult GetLogistics() =>
|
|
||||||
Json(_ExportRepository.GetLogistics(GetHeaderCommon(Request.Body)), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("pdsf")]
|
|
||||||
[Route("processDataStandardFormat")]
|
|
||||||
public IActionResult GetProcessDataStandardFormat() =>
|
|
||||||
Content(_ExportRepository.GetProcessDataStandardFormat(GetHeaderCommon(Request.Body)));
|
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
[Route("export")]
|
|
||||||
public IActionResult PostExport() =>
|
|
||||||
Content(_ExportRepository.GetExport(GetHeaderCommon(Request.Body)));
|
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
[Route("headers")]
|
|
||||||
public IActionResult PostHeaders() =>
|
|
||||||
Json(_ExportRepository.GetHeaders(GetHeaderCommon(Request.Body)), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
[Route("logistics")]
|
|
||||||
public IActionResult PostLogistics() =>
|
|
||||||
Json(_ExportRepository.GetLogistics(GetHeaderCommon(Request.Body)), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
[Route("pdsf")]
|
|
||||||
[Route("processDataStandardFormat")]
|
|
||||||
public IActionResult PostProcessDataStandardFormat() =>
|
|
||||||
Content(_ExportRepository.GetProcessDataStandardFormat(GetHeaderCommon(Request.Body)));
|
|
||||||
|
|
||||||
}
|
|
@ -30,29 +30,9 @@ public partial class InboundController : ControllerBase, IInboundController<IAct
|
|||||||
_MetrologyRepository = metrologyRepository;
|
_MetrologyRepository = metrologyRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string? GetJson(Stream stream)
|
|
||||||
{
|
|
||||||
string? result;
|
|
||||||
if (!stream.CanRead)
|
|
||||||
result = null;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Task<string> task = new StreamReader(stream).ReadToEndAsync();
|
|
||||||
result = task.Result;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static JToken GetJToken(Stream stream)
|
|
||||||
{
|
|
||||||
string? json = GetJson(stream);
|
|
||||||
JToken jsonbody = string.IsNullOrEmpty(json) ? JToken.Parse("{}") : JToken.Parse(json);
|
|
||||||
return jsonbody;
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("{tooltype}")]
|
[Route("{tooltype}")]
|
||||||
public IActionResult Post(string tooltype)
|
public IActionResult Data(string tooltype, [FromBody] JToken jsonbody)
|
||||||
{
|
{
|
||||||
IPAddress? remoteIP = HttpContext.Connection.RemoteIpAddress;
|
IPAddress? remoteIP = HttpContext.Connection.RemoteIpAddress;
|
||||||
if (!_InboundRepository.IsIPAddressAllowed(_AppSettings.InboundApiAllowedIPList, remoteIP))
|
if (!_InboundRepository.IsIPAddressAllowed(_AppSettings.InboundApiAllowedIPList, remoteIP))
|
||||||
@ -62,7 +42,6 @@ public partial class InboundController : ControllerBase, IInboundController<IAct
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
JToken jsonbody = GetJToken(Request.Body);
|
|
||||||
DataResponse dataResponse = _InboundRepository.Data(_MetrologyRepository, _InboundDataService, tooltype, jsonbody);
|
DataResponse dataResponse = _InboundRepository.Data(_MetrologyRepository, _InboundDataService, tooltype, jsonbody);
|
||||||
if (!dataResponse.Errors.Any())
|
if (!dataResponse.Errors.Any())
|
||||||
return Ok(dataResponse);
|
return Ok(dataResponse);
|
||||||
|
@ -1 +0,0 @@
|
|||||||
asdf
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"Results": [],
|
|
||||||
"TotalRows": 0
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"Results": [],
|
|
||||||
"TotalRows": 0
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
asdf
|
|
@ -2,8 +2,7 @@ using System.Text.Json;
|
|||||||
|
|
||||||
namespace OI.Metrology.Server.Models;
|
namespace OI.Metrology.Server.Models;
|
||||||
|
|
||||||
public record AppSettings(string ApiExportPath,
|
public record AppSettings(string ApiLoggingContentTypes,
|
||||||
string ApiLoggingContentTypes,
|
|
||||||
string ApiLoggingPathPrefixes,
|
string ApiLoggingPathPrefixes,
|
||||||
string ApiLogPath,
|
string ApiLogPath,
|
||||||
string ApiUrl,
|
string ApiUrl,
|
||||||
|
@ -8,7 +8,6 @@ public class AppSettings
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
[Display(Name = "Api Export Path"), Required] public string ApiExportPath { get; set; }
|
|
||||||
[Display(Name = "Api Logging Content Types"), Required] public string ApiLoggingContentTypes { get; set; }
|
[Display(Name = "Api Logging Content Types"), Required] public string ApiLoggingContentTypes { get; set; }
|
||||||
[Display(Name = "Api Logging Path Prefixes"), Required] public string ApiLoggingPathPrefixes { get; set; }
|
[Display(Name = "Api Logging Path Prefixes"), Required] public string ApiLoggingPathPrefixes { get; set; }
|
||||||
[Display(Name = "Api Log Path"), Required] public string ApiLogPath { get; set; }
|
[Display(Name = "Api Log Path"), Required] public string ApiLogPath { get; set; }
|
||||||
@ -42,8 +41,6 @@ public class AppSettings
|
|||||||
Models.AppSettings result;
|
Models.AppSettings result;
|
||||||
if (appSettings is null)
|
if (appSettings is null)
|
||||||
throw new NullReferenceException(nameof(appSettings));
|
throw new NullReferenceException(nameof(appSettings));
|
||||||
if (appSettings.ApiExportPath is null)
|
|
||||||
throw new NullReferenceException(nameof(ApiExportPath));
|
|
||||||
if (appSettings.ApiLoggingContentTypes is null)
|
if (appSettings.ApiLoggingContentTypes is null)
|
||||||
throw new NullReferenceException(nameof(ApiLoggingContentTypes));
|
throw new NullReferenceException(nameof(ApiLoggingContentTypes));
|
||||||
if (appSettings.ApiLoggingPathPrefixes is null)
|
if (appSettings.ApiLoggingPathPrefixes is null)
|
||||||
@ -83,7 +80,6 @@ public class AppSettings
|
|||||||
if (appSettings.WorkingDirectoryName is null)
|
if (appSettings.WorkingDirectoryName is null)
|
||||||
throw new NullReferenceException(nameof(WorkingDirectoryName));
|
throw new NullReferenceException(nameof(WorkingDirectoryName));
|
||||||
result = new(
|
result = new(
|
||||||
appSettings.ApiExportPath,
|
|
||||||
appSettings.ApiLoggingContentTypes,
|
appSettings.ApiLoggingContentTypes,
|
||||||
appSettings.ApiLoggingPathPrefixes,
|
appSettings.ApiLoggingPathPrefixes,
|
||||||
appSettings.ApiLogPath,
|
appSettings.ApiLogPath,
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<UserSecretsId>6501aa0f-8499-4be5-96a9-e99b11323eeb</UserSecretsId>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="logs\**" />
|
<Compile Remove="logs\**" />
|
||||||
@ -28,14 +27,14 @@
|
|||||||
<PackageReference Include="Dapper" Version="2.0.123" />
|
<PackageReference Include="Dapper" Version="2.0.123" />
|
||||||
<PackageReference Include="EntityFramework" Version="6.4.4" />
|
<PackageReference Include="EntityFramework" Version="6.4.4" />
|
||||||
<PackageReference Include="jQuery" Version="3.6.3" />
|
<PackageReference Include="jQuery" Version="3.6.3" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.4" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.2" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||||
<PackageReference Include="Serilog.AspNetCore.Ingestion" Version="1.0.0-dev-00032" />
|
<PackageReference Include="Serilog.AspNetCore.Ingestion" Version="1.0.0-dev-00032" />
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
|
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
|
||||||
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
|
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
|
||||||
@ -77,18 +76,6 @@
|
|||||||
<None Include="Data\Tests\ClientSettings-GetIpAddress.json">
|
<None Include="Data\Tests\ClientSettings-GetIpAddress.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Data\Tests\Export-GetExport.txt">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Data\Tests\Export-GetHeaders.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Data\Tests\Export-GetLogistics.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Data\Tests\Export-GetProcessDataStandardFormat.pdsf">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Data\Tests\InfinityQS-GetCommandText.sql">
|
<None Include="Data\Tests\InfinityQS-GetCommandText.sql">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
@ -76,7 +76,6 @@ public class Program
|
|||||||
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSRepository, InfinityQSRepository>(_ => new(appSettings.MockRoot, sqlDbConnectionFactory));
|
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSRepository, InfinityQSRepository>(_ => new(appSettings.MockRoot, sqlDbConnectionFactory));
|
||||||
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSV2Repository, InfinityQSV2Repository>(_ => new(appSettings.MockRoot, sqlDbConnectionFactory));
|
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSV2Repository, InfinityQSV2Repository>(_ => new(appSettings.MockRoot, sqlDbConnectionFactory));
|
||||||
|
|
||||||
_ = webApplicationBuilder.Services.AddScoped<IExportRepository, ExportRepository>();
|
|
||||||
_ = webApplicationBuilder.Services.AddScoped<IAttachmentsService, AttachmentsService>();
|
_ = webApplicationBuilder.Services.AddScoped<IAttachmentsService, AttachmentsService>();
|
||||||
_ = webApplicationBuilder.Services.AddScoped<IInboundDataService, InboundDataService>();
|
_ = webApplicationBuilder.Services.AddScoped<IInboundDataService, InboundDataService>();
|
||||||
_ = webApplicationBuilder.Services.AddScoped<IMetrologyRepository, MetrologyRepository>();
|
_ = webApplicationBuilder.Services.AddScoped<IMetrologyRepository, MetrologyRepository>();
|
||||||
|
@ -1,143 +0,0 @@
|
|||||||
using OI.Metrology.Server.Models;
|
|
||||||
using OI.Metrology.Shared.DataModels;
|
|
||||||
using OI.Metrology.Shared.Models.Stateless;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace OI.Metrology.Server.Repository;
|
|
||||||
|
|
||||||
public class ExportRepository : IExportRepository
|
|
||||||
{
|
|
||||||
|
|
||||||
private readonly Serilog.ILogger _Log;
|
|
||||||
private readonly string _RepositoryName;
|
|
||||||
private readonly AppSettings _AppSettings;
|
|
||||||
private readonly Dictionary<string, Dictionary<long, HeaderCommon>> _RdsToHeaderCommonCollection;
|
|
||||||
|
|
||||||
public ExportRepository(AppSettings appSettings)
|
|
||||||
{
|
|
||||||
_AppSettings = appSettings;
|
|
||||||
_RdsToHeaderCommonCollection = new();
|
|
||||||
_RepositoryName = nameof(ExportRepository)[..^10];
|
|
||||||
_Log = Serilog.Log.ForContext<ExportRepository>();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string[] Get()
|
|
||||||
{
|
|
||||||
DateTime dateTime = DateTime.Now;
|
|
||||||
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}";
|
|
||||||
string lastWeekOfYear = $"{lastWeekDateTime:yyyy}_Week_{calendar.GetWeekOfYear(lastWeekDateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday):00}";
|
|
||||||
return new string[] { weekOfYear, lastWeekOfYear };
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<string> GetFiles(HeaderCommon headerCommon, string searchPattern)
|
|
||||||
{
|
|
||||||
List<string> results = new();
|
|
||||||
string directory;
|
|
||||||
string[] weeks = Get();
|
|
||||||
foreach (string weekYear in weeks)
|
|
||||||
{
|
|
||||||
if (headerCommon.ID < 1)
|
|
||||||
directory = Path.Combine(_AppSettings.ApiExportPath, weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}");
|
|
||||||
else
|
|
||||||
directory = Path.Combine(_AppSettings.ApiExportPath, weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}", $"-{headerCommon.ID}");
|
|
||||||
if (!Directory.Exists(directory))
|
|
||||||
continue;
|
|
||||||
results.AddRange(Directory.GetFiles(directory, searchPattern, SearchOption.AllDirectories));
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
string IExportRepository.GetExport(HeaderCommon headerCommon)
|
|
||||||
{
|
|
||||||
string result;
|
|
||||||
List<string> files = GetFiles(headerCommon, "*.txt");
|
|
||||||
if (files.Count != 1)
|
|
||||||
result = string.Empty;
|
|
||||||
else
|
|
||||||
result = File.ReadAllText(files.First());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<HeaderCommon[]> IExportRepository.GetHeaders(HeaderCommon headerCommon)
|
|
||||||
{
|
|
||||||
Result<HeaderCommon[]>? result;
|
|
||||||
List<HeaderCommon> results = new();
|
|
||||||
string json;
|
|
||||||
HeaderCommon? hc;
|
|
||||||
string? directory;
|
|
||||||
string directoryName;
|
|
||||||
JsonElement? jsonElement;
|
|
||||||
const string ticks = "Ticks";
|
|
||||||
JsonProperty[] jsonProperties;
|
|
||||||
List<string> files = GetFiles(headerCommon, "*.json");
|
|
||||||
foreach (string file in files)
|
|
||||||
{
|
|
||||||
json = File.ReadAllText(file);
|
|
||||||
hc = JsonSerializer.Deserialize<HeaderCommon>(json);
|
|
||||||
if (hc is null)
|
|
||||||
continue;
|
|
||||||
if (hc.ID < 1)
|
|
||||||
{
|
|
||||||
directory = Path.GetDirectoryName(file);
|
|
||||||
if (directory is null)
|
|
||||||
continue;
|
|
||||||
directoryName = Path.GetFileName(directory);
|
|
||||||
if (directoryName.Length < 1 || directoryName[0] != '-' || !long.TryParse(directoryName[1..], out long id))
|
|
||||||
continue;
|
|
||||||
hc.ID = id;
|
|
||||||
}
|
|
||||||
jsonElement = JsonSerializer.Deserialize<JsonElement>(json);
|
|
||||||
if (jsonElement is not null && jsonElement.Value.ValueKind == JsonValueKind.Object)
|
|
||||||
{
|
|
||||||
jsonProperties = (from l in jsonElement.Value.EnumerateObject() where l.Name == ticks select l).ToArray();
|
|
||||||
if (jsonProperties.Any() && long.TryParse(jsonProperties[0].Value.ToString(), out long ticksValue))
|
|
||||||
hc.Date = new(ticksValue);
|
|
||||||
}
|
|
||||||
results.Add(hc);
|
|
||||||
}
|
|
||||||
result = new()
|
|
||||||
{
|
|
||||||
Results = results.ToArray(),
|
|
||||||
TotalRows = results.Count,
|
|
||||||
};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<HeaderCommon[]> IExportRepository.GetLogistics(HeaderCommon headerCommon)
|
|
||||||
{
|
|
||||||
Result<HeaderCommon[]>? result;
|
|
||||||
List<HeaderCommon> results = new();
|
|
||||||
string json;
|
|
||||||
HeaderCommon? hc;
|
|
||||||
List<string> files = GetFiles(headerCommon, "*.json");
|
|
||||||
foreach (string file in files)
|
|
||||||
{
|
|
||||||
json = File.ReadAllText(file);
|
|
||||||
hc = JsonSerializer.Deserialize<HeaderCommon>(json);
|
|
||||||
if (hc is null)
|
|
||||||
continue;
|
|
||||||
results.Add(hc);
|
|
||||||
}
|
|
||||||
result = new()
|
|
||||||
{
|
|
||||||
Results = results.ToArray(),
|
|
||||||
TotalRows = results.Count,
|
|
||||||
};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
string IExportRepository.GetProcessDataStandardFormat(HeaderCommon headerCommon)
|
|
||||||
{
|
|
||||||
string result;
|
|
||||||
List<string> files = GetFiles(headerCommon, "*.pdsf");
|
|
||||||
if (files.Count != 1)
|
|
||||||
result = string.Empty;
|
|
||||||
else
|
|
||||||
result = File.ReadAllText(files.First());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -177,39 +177,6 @@ public class InfinityQSRepository : IInfinityQSRepository
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
string IInfinityQSRepository.GetCommandText(InfinityQSBase infinityQSBase)
|
|
||||||
{
|
|
||||||
StringBuilder result = new();
|
|
||||||
if (string.IsNullOrEmpty(infinityQSBase.PR_NAME))
|
|
||||||
throw new ArgumentException(nameof(infinityQSBase.PR_NAME));
|
|
||||||
if (string.IsNullOrEmpty(infinityQSBase.PD_NAME))
|
|
||||||
throw new ArgumentException(nameof(infinityQSBase.PD_NAME));
|
|
||||||
if (infinityQSBase.SE_SGTM is null)
|
|
||||||
throw new ArgumentException(nameof(infinityQSBase.SE_SGTM));
|
|
||||||
_ = result
|
|
||||||
.AppendLine(" select ")
|
|
||||||
.AppendLine(" ev.f_evnt [ev_evnt], ")
|
|
||||||
.AppendLine(" ev.f_sgtm [ev_sgtm], ")
|
|
||||||
.AppendLine(" dateadd(HH, -7, (dateadd(SS, convert(bigint, ev.f_sgtm), '19700101'))) [ev_utc7], ")
|
|
||||||
.AppendLine(" pr.f_name [pr_name], ")
|
|
||||||
.AppendLine(" pd.f_name [pd_name], ")
|
|
||||||
.AppendLine(" td.f_test [td_test], ")
|
|
||||||
.AppendLine(" td.f_name [td_name], ")
|
|
||||||
.AppendLine(" ev.f_name [ev_name] ")
|
|
||||||
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
|
|
||||||
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ")
|
|
||||||
.AppendLine(" on ev.f_prcs = pr.f_prcs ")
|
|
||||||
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
|
|
||||||
.AppendLine(" on ev.f_part = pd.f_part ")
|
|
||||||
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
|
|
||||||
.AppendLine(" on ev.f_test = td.f_test ")
|
|
||||||
.Append(" where pr.f_name = '").Append(infinityQSBase.PR_NAME).AppendLine("' ")
|
|
||||||
.Append(" and pd.f_name = '").Append(infinityQSBase.PD_NAME).AppendLine("' ")
|
|
||||||
.Append(" and ev.f_sgtm = ").Append(infinityQSBase.SE_SGTM).AppendLine(" ")
|
|
||||||
.AppendLine(" for json path ");
|
|
||||||
return result.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<InfinityQSEvent[]> IInfinityQSRepository.GetEvents(string subGroupId)
|
Result<InfinityQSEvent[]> IInfinityQSRepository.GetEvents(string subGroupId)
|
||||||
{
|
{
|
||||||
Result<InfinityQSEvent[]>? result;
|
Result<InfinityQSEvent[]>? result;
|
||||||
@ -229,7 +196,7 @@ public class InfinityQSRepository : IInfinityQSRepository
|
|||||||
results = Array.Empty<InfinityQSEvent>();
|
results = Array.Empty<InfinityQSEvent>();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string commandText = infinityQSRepository.GetCommandText(infinityQSBase);
|
string commandText = $"select * from [spcepiworld].[dbo].[evnt_inf] ev where ev.f_prcs = '{infinityQSBase.PR_NAME}' and ev.f_part = '{infinityQSBase.PD_NAME}' and ev.f_sgtm = {infinityQSBase.SE_SGTM} ";
|
||||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||||
results = JsonSerializer.Deserialize<InfinityQSEvent[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
results = JsonSerializer.Deserialize<InfinityQSEvent[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||||
if (results is null)
|
if (results is null)
|
||||||
|
@ -26,7 +26,7 @@ public class InfinityQSV2Repository : IInfinityQSV2Repository
|
|||||||
{
|
{
|
||||||
StringBuilder result = new();
|
StringBuilder result = new();
|
||||||
if (string.IsNullOrEmpty(subGroupId))
|
if (string.IsNullOrEmpty(subGroupId))
|
||||||
throw new ArgumentException(null, nameof(subGroupId));
|
throw new ArgumentException(nameof(subGroupId));
|
||||||
_ = result
|
_ = result
|
||||||
.AppendLine(" select ")
|
.AppendLine(" select ")
|
||||||
.AppendLine(" sd.f_sgrp sd_sgrp, ")
|
.AppendLine(" sd.f_sgrp sd_sgrp, ")
|
||||||
@ -50,7 +50,7 @@ public class InfinityQSV2Repository : IInfinityQSV2Repository
|
|||||||
StringBuilder result = new();
|
StringBuilder result = new();
|
||||||
const string dateTimeFormat = "yyyy-MM-dd HH:mm:ss";
|
const string dateTimeFormat = "yyyy-MM-dd HH:mm:ss";
|
||||||
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')) && dateTime.Length != dateTimeFormat.Length)
|
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')) && dateTime.Length != dateTimeFormat.Length)
|
||||||
throw new ArgumentException(null, nameof(dateTime));
|
throw new ArgumentException(nameof(dateTime));
|
||||||
_ = result
|
_ = result
|
||||||
.AppendLine(" select ")
|
.AppendLine(" select ")
|
||||||
.AppendLine(" se.f_sgrp se_sgrp, ")
|
.AppendLine(" se.f_sgrp se_sgrp, ")
|
||||||
@ -180,39 +180,6 @@ public class InfinityQSV2Repository : IInfinityQSV2Repository
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
string IInfinityQSV2Repository.GetCommandText(InfinityQSBaseV2 infinityQSBase)
|
|
||||||
{
|
|
||||||
StringBuilder result = new();
|
|
||||||
if (string.IsNullOrEmpty(infinityQSBase.Process))
|
|
||||||
throw new ArgumentException(nameof(infinityQSBase.Process));
|
|
||||||
if (string.IsNullOrEmpty(infinityQSBase.Part))
|
|
||||||
throw new ArgumentException(nameof(infinityQSBase.Part));
|
|
||||||
if (infinityQSBase.SubGroupDateTime is null)
|
|
||||||
throw new ArgumentException(nameof(infinityQSBase.SubGroupDateTime));
|
|
||||||
_ = result
|
|
||||||
.AppendLine(" select ")
|
|
||||||
.AppendLine(" ev.f_evnt [ev_evnt], ")
|
|
||||||
.AppendLine(" ev.f_sgtm [ev_sgtm], ")
|
|
||||||
.AppendLine(" dateadd(HH, -7, (dateadd(SS, convert(bigint, ev.f_sgtm), '19700101'))) [ev_utc7], ")
|
|
||||||
.AppendLine(" pr.f_name [pr_name], ")
|
|
||||||
.AppendLine(" pd.f_name [pd_name], ")
|
|
||||||
.AppendLine(" td.f_test [td_test], ")
|
|
||||||
.AppendLine(" td.f_name [td_name], ")
|
|
||||||
.AppendLine(" ev.f_name [ev_name] ")
|
|
||||||
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
|
|
||||||
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ")
|
|
||||||
.AppendLine(" on ev.f_prcs = pr.f_prcs ")
|
|
||||||
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
|
|
||||||
.AppendLine(" on ev.f_part = pd.f_part ")
|
|
||||||
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
|
|
||||||
.AppendLine(" on ev.f_test = td.f_test ")
|
|
||||||
.Append(" where pr.f_name = '").Append(infinityQSBase.Process).AppendLine("' ")
|
|
||||||
.Append(" and pd.f_name = '").Append(infinityQSBase.Part).AppendLine("' ")
|
|
||||||
.Append(" and ev.f_sgtm = ").Append(infinityQSBase.SubGroupDateTime).AppendLine(" ")
|
|
||||||
.AppendLine(" for json path ");
|
|
||||||
return result.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<InfinityQSEventV2[]> IInfinityQSV2Repository.GetEvents(string subGroupId)
|
Result<InfinityQSEventV2[]> IInfinityQSV2Repository.GetEvents(string subGroupId)
|
||||||
{
|
{
|
||||||
Result<InfinityQSEventV2[]>? result;
|
Result<InfinityQSEventV2[]>? result;
|
||||||
@ -232,7 +199,7 @@ public class InfinityQSV2Repository : IInfinityQSV2Repository
|
|||||||
collection = Array.Empty<InfinityQSEvent>();
|
collection = Array.Empty<InfinityQSEvent>();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string commandText = infinityQSV2Repository.GetCommandText(infinityQSBase);
|
string commandText = $"select * from [spcepiworld].[dbo].[evnt_inf] ev where ev.f_prcs = '{infinityQSBase.Process}' and ev.f_part = '{infinityQSBase.Part}' and ev.f_sgtm = {infinityQSBase.SubGroupDateTime} ";
|
||||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||||
collection = JsonSerializer.Deserialize<InfinityQSEvent[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
collection = JsonSerializer.Deserialize<InfinityQSEvent[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||||
if (collection is null)
|
if (collection is null)
|
||||||
|
@ -49,12 +49,6 @@
|
|||||||
<div class="col-xs-1">
|
<div class="col-xs-1">
|
||||||
<input type="button" class="btn" id="ReviewButton" value="Review" disabled />
|
<input type="button" class="btn" id="ReviewButton" value="Review" disabled />
|
||||||
</div>
|
</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">
|
<div class="col-xs-1">
|
||||||
<input type="button" class="btn" id="PinButton" value="Pin" disabled />
|
<input type="button" class="btn" id="PinButton" value="Pin" disabled />
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
{
|
{
|
||||||
"ApiExportPath": "\\\\messdv002.na.infineon.com\\Candela\\Archive\\API",
|
"xApiUrl": "~/api",
|
||||||
"ApiUrl": "~/api",
|
"ApiUrl": "http://localhost:5126/api",
|
||||||
|
"xxxApiUrl": "http://messa010ec.ec.local:50301/api",
|
||||||
|
"xxxxApiUrl": "http://localhost:50301/api",
|
||||||
|
"xxxxxApiUrl": "http://messa010ec.ec.local:50301/api",
|
||||||
|
"xConnectionString": "Data Source=messv01ec.ec.local\\PROD1,53959;Integrated Security=True;Initial Catalog=Metrology;",
|
||||||
"ConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;",
|
"ConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;",
|
||||||
"IsDevelopment": true,
|
"IsDevelopment": true,
|
||||||
"MockRoot": "",
|
"xMockRoot": "",
|
||||||
|
"MockRoot": "/Data/Tests",
|
||||||
"MonAResource": "OI_Metrology_Viewer_IFX",
|
"MonAResource": "OI_Metrology_Viewer_IFX",
|
||||||
"Oi2SqlConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;",
|
"Oi2SqlConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;",
|
||||||
"Serilog": {
|
"Serilog": {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"ApiExportPath": "\\\\messv02ecc1.ec.local\\EC_Metrology_Si\\Archive\\API",
|
|
||||||
"ApiLoggingContentTypes": "application/json",
|
"ApiLoggingContentTypes": "application/json",
|
||||||
"ApiLoggingPathPrefixes": "/api/inbound",
|
"ApiLoggingPathPrefixes": "/api/inbound",
|
||||||
"ApiUrl": "~/api",
|
"ApiUrl": "~/api",
|
||||||
|
@ -60,17 +60,17 @@ function DisplayWSMessage(severity, description, e, ex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$("#spanMessageText").text(description);
|
$("#spanMessageText").text(description);
|
||||||
if (e !== null && e.status === 403) {
|
if (e.status === 403) {
|
||||||
$("#spanMessageText").append("<br /><b>" + forbiddenMsg + "</b>");
|
$("#spanMessageText").append("<br /><b>" + forbiddenMsg + "</b>");
|
||||||
}
|
}
|
||||||
else if (e !== null && e.status === 444) {
|
else if (e.status === 444) {
|
||||||
$("#MessageModalContent").removeClass("modal-content-error");
|
$("#MessageModalContent").removeClass("modal-content-error");
|
||||||
$("#MessageModalContent").addClass("modal-content-info");
|
$("#MessageModalContent").addClass("modal-content-info");
|
||||||
$("#MessageModalTitle").text("");
|
$("#MessageModalTitle").text("");
|
||||||
$("#spanMessageText").text(expiredMsg);
|
$("#spanMessageText").text(expiredMsg);
|
||||||
}
|
}
|
||||||
else if (e !== null && e.responseText !== null) {
|
else if (e.responseText !== null) {
|
||||||
if (e !== null && e.responseText !== "") {
|
if (e.responseText !== "") {
|
||||||
try {
|
try {
|
||||||
wsError = jQuery.parseJSON(e.responseText);
|
wsError = jQuery.parseJSON(e.responseText);
|
||||||
if (wsError.Message !== null)
|
if (wsError.Message !== null)
|
||||||
@ -95,7 +95,7 @@ function DisplayWSMessage(severity, description, e, ex) {
|
|||||||
else {
|
else {
|
||||||
|
|
||||||
var msg = description + "\r\n";
|
var msg = description + "\r\n";
|
||||||
if (e !== null && e.responseText !== null) {
|
if (e.responseText !== null) {
|
||||||
if (e.responseText !== "") {
|
if (e.responseText !== "") {
|
||||||
wsError = jQuery.parseJSON(e.responseText);
|
wsError = jQuery.parseJSON(e.responseText);
|
||||||
if (wsError.ExceptionMessage !== null) {
|
if (wsError.ExceptionMessage !== null) {
|
||||||
@ -103,7 +103,7 @@ function DisplayWSMessage(severity, description, e, ex) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (e !== null && e.status === 403)
|
if (e.status === 403)
|
||||||
msg += forbiddenMsg;
|
msg += forbiddenMsg;
|
||||||
|
|
||||||
alert(msg);
|
alert(msg);
|
||||||
|
@ -217,16 +217,12 @@ function loadHeaderGridRunInfo() {
|
|||||||
function disableHeaderButtonsRunInfo() {
|
function disableHeaderButtonsRunInfo() {
|
||||||
$("#GetDataButton").prop("disabled", true);
|
$("#GetDataButton").prop("disabled", true);
|
||||||
$("#ReviewButton").prop("disabled", true);
|
$("#ReviewButton").prop("disabled", true);
|
||||||
$("#RecipeParametersButton").prop("disabled", true);
|
|
||||||
$("#ViewButton").prop("disabled", true);
|
|
||||||
$("#PinButton").prop("disabled", true);
|
$("#PinButton").prop("disabled", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableHeaderButtonsRunInfo() {
|
function enableHeaderButtonsRunInfo() {
|
||||||
$("#GetDataButton").prop("disabled", false);
|
$("#GetDataButton").prop("disabled", false);
|
||||||
$("#ReviewButton").prop("disabled", false);
|
$("#ReviewButton").prop("disabled", false);
|
||||||
$("#RecipeParametersButton").prop("disabled", false);
|
|
||||||
$("#ViewButton").prop("disabled", false);
|
|
||||||
$("#PinButton").prop("disabled", false);
|
$("#PinButton").prop("disabled", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -463,151 +459,10 @@ function reviewButtonRunInfo() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function recipeParametersButtonRunInfo() {
|
|
||||||
var selectedRow = $("#HeaderGrid").data("igGridSelection").selectedRow();
|
|
||||||
if (selectedRow !== null) {
|
|
||||||
loadDetailsRunInfo();
|
|
||||||
$("#RecipeParametersButton").prop("disabled", true);
|
|
||||||
var rowData = $("#HeaderGrid").data("igGrid").dataSource.dataView()[selectedRow.index];
|
|
||||||
var stringified = JSON.stringify(rowData);
|
|
||||||
stringified = stringified.replace(/"Tool":/gm, '"MesEntity":');
|
|
||||||
stringified = stringified.replace(/"Equipment ID":/gm, '"MesEntity":');
|
|
||||||
var jsonObject = JSON.parse(stringified);
|
|
||||||
DisplayWSMessage("info", "Recipe Parameters - Work In Progress ***", null);
|
|
||||||
$("#ModalHeaderGrid").igGrid({
|
|
||||||
dataSource: jsonObject,
|
|
||||||
dataSourceType: 'json',
|
|
||||||
features: [
|
|
||||||
{ name: 'Resizing' }
|
|
||||||
],
|
|
||||||
columns: [
|
|
||||||
{ headerText: "Tool", key: "MesEntity", dataType: "string", width: "10%" },
|
|
||||||
{ key: "Reactor", dataType: "string", width: "10%" },
|
|
||||||
{ key: "RDS", dataType: "string", width: "10%" },
|
|
||||||
{ key: "PSN", dataType: "string", width: "10%" },
|
|
||||||
{ key: "Layer", dataType: "string", width: "10%" },
|
|
||||||
{ key: "Zone", dataType: "string", width: "10%" }
|
|
||||||
]
|
|
||||||
});
|
|
||||||
var gridCreated = $("#ModalBodyGrid").data("igGrid");
|
|
||||||
if (gridCreated)
|
|
||||||
$("#ModalBodyGrid").igGrid("destroy");
|
|
||||||
$.getJSON('https://oi-prod-ec-api.mes.infineon.com/api/oiWizard/materials/rds/' + jsonObject.RDS, function (data) {
|
|
||||||
$("#RecipeParametersButton").prop("disabled", false);
|
|
||||||
var text = "";
|
|
||||||
for (var i = 0; i < data.rds.rdsLayers.length; i++) {
|
|
||||||
text = text
|
|
||||||
+ data.rds.rdsLayers[i].EpiTime
|
|
||||||
+ "\t" + data.rds.rdsLayers[i].EpiH2Flow
|
|
||||||
+ "\t" + data.rds.rdsLayers[i].TCSFlow
|
|
||||||
+ "\t" + data.rds.rdsLayers[i].DiluentAdjParam
|
|
||||||
+ "\t" + data.rds.rdsLayers[i].EpiH2Flow
|
|
||||||
+ "\t" + data.rds.rdsLayers[i].DopantFlow
|
|
||||||
+ "\t" + data.rds.rdsLayers[i].FOffset
|
|
||||||
+ "\t" + data.rds.rdsLayers[i].SOffset
|
|
||||||
+ "\t" + data.rds.rdsLayers[i].ROffset
|
|
||||||
+ "\t" + data.rds.rdsLayers[i].SuscEtch
|
|
||||||
+ "\r"
|
|
||||||
}
|
|
||||||
$("#textareaClipboard").val(text);
|
|
||||||
$("#ModalBodyGrid").igGrid({
|
|
||||||
dataSource: data.rds.rdsLayers,
|
|
||||||
features: [
|
|
||||||
{ name: 'Resizing' }
|
|
||||||
],
|
|
||||||
columns: [
|
|
||||||
{ headerText: "Dep Time", key: "EpiTime", dataType: "number", width: "10%" },
|
|
||||||
{ headerText: "H2", key: "EpiH2Flow", dataType: "number", width: "10%" },
|
|
||||||
{ headerText: "TCS", key: "TCSFlow", dataType: "number", width: "10%" },
|
|
||||||
{ headerText: "DIL", key: "DiluentAdjParam", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "SRC", key: "EpiH2Flow", dataType: "number", width: "10%" },
|
|
||||||
{ headerText: "INJ", key: "DopantFlow", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "F", key: "FOffset", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "S", key: "SOffset", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "R", key: "ROffset", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "Susc Etch", key: "SuscEtch", dataType: "string", width: "10%" },
|
|
||||||
],
|
|
||||||
responseDataKey: "Results",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function viewButtonRunInfo() {
|
|
||||||
var selectedRow = $("#HeaderGrid").data("igGridSelection").selectedRow();
|
|
||||||
if (selectedRow !== null) {
|
|
||||||
$("#ViewButton").prop("disabled", true);
|
|
||||||
loadDetailsRunInfo();
|
|
||||||
var rowData = $("#HeaderGrid").data("igGrid").dataSource.dataView()[selectedRow.index];
|
|
||||||
var stringified = JSON.stringify(rowData);
|
|
||||||
stringified = stringified.replace(/"Tool":/gm, '"MesEntity":');
|
|
||||||
stringified = stringified.replace(/"Equipment ID":/gm, '"MesEntity":');
|
|
||||||
var jsonObject = JSON.parse(stringified);
|
|
||||||
DisplayWSMessage("info", "View", null);
|
|
||||||
$("#ModalHeaderGrid").igGrid({
|
|
||||||
dataSource: jsonObject,
|
|
||||||
dataSourceType: 'json',
|
|
||||||
features: [
|
|
||||||
{ name: 'Resizing' }
|
|
||||||
],
|
|
||||||
columns: [
|
|
||||||
{ headerText: "Tool", key: "MesEntity", dataType: "string", width: "10%" },
|
|
||||||
{ key: "Reactor", dataType: "string", width: "10%" },
|
|
||||||
{ key: "RDS", dataType: "string", width: "10%" },
|
|
||||||
{ key: "PSN", dataType: "string", width: "10%" },
|
|
||||||
{ key: "Layer", dataType: "string", width: "10%" },
|
|
||||||
{ key: "Zone", dataType: "string", width: "10%" }
|
|
||||||
]
|
|
||||||
});
|
|
||||||
var gridCreated = $("#ModalBodyGrid").data("igGrid");
|
|
||||||
if (gridCreated)
|
|
||||||
$("#ModalBodyGrid").igGrid("destroy");
|
|
||||||
var headerId = $("#HeaderId").text();
|
|
||||||
var toolTypeID = $("#ToolTypeID").text();
|
|
||||||
var detailsURL = _apiUrl + "/tooltypes/" + toolTypeID + "/headers/" + headerId + "/data";
|
|
||||||
$.getJSON(detailsURL, function (data) {
|
|
||||||
var obj = {};
|
|
||||||
var text = "";
|
|
||||||
for (var i = 0; i < data.Results.length && i < 9; i++) {
|
|
||||||
if (data.Results[i].Thickness) {
|
|
||||||
text = text + data.Results[i].Thickness + "\t";
|
|
||||||
obj['Point' + (i + 1)] = data.Results[i].Thickness;
|
|
||||||
}
|
|
||||||
else if (data.Results[i].Rs) {
|
|
||||||
text = text + data.Results[i].Rs + "\t";
|
|
||||||
obj['Point' + (i + 1)] = data.Results[i].Rs;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
text = text + "\r";
|
|
||||||
$("#textareaClipboard").val(text);
|
|
||||||
$("#ModalBodyGrid").igGrid({
|
|
||||||
dataSource: obj,
|
|
||||||
dataSourceType: 'json',
|
|
||||||
features: [
|
|
||||||
{ name: 'Resizing' }
|
|
||||||
],
|
|
||||||
columns: [
|
|
||||||
{ headerText: "Point 1", key: "Point1", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "Point 2", key: "Point2", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "Point 3", key: "Point3", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "Point 4", key: "Point4", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "Point 5", key: "Point5", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "Point 6", key: "Point6", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "Point 7", key: "Point7", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "Point 8", key: "Point8", dataType: "string", width: "10%" },
|
|
||||||
{ headerText: "Point 9", key: "Point9", dataType: "string", width: "10%" },
|
|
||||||
]
|
|
||||||
});
|
|
||||||
$("#ViewButton").prop("disabled", false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function pinButtonRunInfo() {
|
function pinButtonRunInfo() {
|
||||||
var toolTypeId = $("#ToolTypeID").text();
|
var toolTypeId = $("#ToolTypeID").text();
|
||||||
var selectedRow = $("#HeaderGrid").data("igGridSelection").selectedRow();
|
var selectedRow = $("#HeaderGrid").data("igGridSelection").selectedRow();
|
||||||
if (selectedRow !== null) {
|
if (selectedRow !== null) {
|
||||||
loadDetailsRunInfo();
|
|
||||||
$("#PinButton").prop("disabled", true);
|
$("#PinButton").prop("disabled", true);
|
||||||
var rowData = $("#HeaderGrid").data("igGrid").dataSource.dataView()[selectedRow.index];
|
var rowData = $("#HeaderGrid").data("igGrid").dataSource.dataView()[selectedRow.index];
|
||||||
var stringified = JSON.stringify(rowData);
|
var stringified = JSON.stringify(rowData);
|
||||||
@ -619,13 +474,10 @@ function pinButtonRunInfo() {
|
|||||||
url: _apiUrl + '/pin/' + toolTypeId + "/markAsPinned",
|
url: _apiUrl + '/pin/' + toolTypeId + "/markAsPinned",
|
||||||
data: jsonObject,
|
data: jsonObject,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
var gridCreated = $("#ModalBodyGrid").data("igGrid");
|
|
||||||
if (gridCreated)
|
|
||||||
$("#ModalBodyGrid").igGrid("destroy");
|
|
||||||
DisplayWSMessage("info", "Marked as pinned", e);
|
DisplayWSMessage("info", "Marked as pinned", e);
|
||||||
// DisplayWSMessage("info", stringified, e);
|
// DisplayWSMessage("info", stringified, e);
|
||||||
$("#PinButton").prop("disabled", false);
|
$("#PinButton").prop("disabled", false);
|
||||||
$.getJSON(_apiUrl + '/pin/' + toolTypeId + "/pinned?biorad_id=" + _BioRadId + "&cde_id=" + _CdeId + "&rds=" + jsonObject.RDS, function (data) {
|
$.getJSON(_apiUrl + '/pin/' + toolTypeId + "/pinned?biorad_id=" + _BioRadId + "&cde_id=" + _CdeId + "&rds=" + rowData.RDS, function (data) {
|
||||||
$("#ModalHeaderGrid").igGrid({
|
$("#ModalHeaderGrid").igGrid({
|
||||||
dataSource: data,
|
dataSource: data,
|
||||||
features: [
|
features: [
|
||||||
@ -645,17 +497,7 @@ function pinButtonRunInfo() {
|
|||||||
});
|
});
|
||||||
var text = "";
|
var text = "";
|
||||||
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 + "\t" + data.Results[i].Point2 + "\t" + data.Results[i].Point3 + "\t" + data.Results[i].Point4 + "\t" + data.Results[i].Point5 + "\t" + data.Results[i].Point6 + "\t" + data.Results[i].Point7 + "\t" + data.Results[i].Point8 + "\t" + data.Results[i].Point9 + "\r";
|
||||||
+ data.Results[i].Point1
|
|
||||||
+ "\t" + data.Results[i].Point2
|
|
||||||
+ "\t" + data.Results[i].Point3
|
|
||||||
+ "\t" + data.Results[i].Point4
|
|
||||||
+ "\t" + data.Results[i].Point5
|
|
||||||
+ "\t" + data.Results[i].Point6
|
|
||||||
+ "\t" + data.Results[i].Point7
|
|
||||||
+ "\t" + data.Results[i].Point8
|
|
||||||
+ "\t" + data.Results[i].Point9
|
|
||||||
+ "\r";
|
|
||||||
}
|
}
|
||||||
$("#textareaClipboard").val(text);
|
$("#textareaClipboard").val(text);
|
||||||
$("#ModalBodyGrid").igGrid({
|
$("#ModalBodyGrid").igGrid({
|
||||||
@ -762,8 +604,6 @@ function initRunInfo(apiUrl, initialToolTypeID, initialHeaderId, initialHeaderAt
|
|||||||
$("#LoadHeadersButton").click(loadHeaderGridRunInfo);
|
$("#LoadHeadersButton").click(loadHeaderGridRunInfo);
|
||||||
$("#GetDataButton").click(loadDetailsRunInfo);
|
$("#GetDataButton").click(loadDetailsRunInfo);
|
||||||
$("#ReviewButton").click(reviewButtonRunInfo);
|
$("#ReviewButton").click(reviewButtonRunInfo);
|
||||||
$("#RecipeParametersButton").click(recipeParametersButtonRunInfo);
|
|
||||||
$("#ViewButton").click(viewButtonRunInfo);
|
|
||||||
$("#PinButton").click(pinButtonRunInfo);
|
$("#PinButton").click(pinButtonRunInfo);
|
||||||
$("#OIExportButton").click(oiExportButtonRunInfo);
|
$("#OIExportButton").click(oiExportButtonRunInfo);
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
|
@ -1,13 +1,27 @@
|
|||||||
namespace OI.Metrology.Shared.DataModels;
|
namespace OI.Metrology.Shared.DataModels;
|
||||||
|
|
||||||
public record InfinityQSEvent(int EV_EVNT,
|
public record InfinityQSEvent(int F_EVNT,
|
||||||
int EV_SGTM,
|
int F_CRTM,
|
||||||
string EV_UTC7,
|
int F_EDTM,
|
||||||
string PR_NAME,
|
int F_TYPE,
|
||||||
string PD_NAME,
|
string F_NAME,
|
||||||
int TD_TEST,
|
int F_EMPL,
|
||||||
string TD_NAME,
|
int F_EVTM,
|
||||||
string EV_NAME)
|
int F_PRCS,
|
||||||
|
int F_PART,
|
||||||
|
int F_TEST,
|
||||||
|
int F_SGTM,
|
||||||
|
int F_ACC,
|
||||||
|
int F_ACEM,
|
||||||
|
int F_ACTM,
|
||||||
|
int F_CAC,
|
||||||
|
int F_CAEM,
|
||||||
|
int F_CATM,
|
||||||
|
int F_FLAG,
|
||||||
|
int F_USER,
|
||||||
|
int F_DSBL,
|
||||||
|
int F_RFC,
|
||||||
|
int F_TRTM)
|
||||||
{
|
{
|
||||||
|
|
||||||
public static InfinityQSEventV2[] Convert(InfinityQSEvent[] collection)
|
public static InfinityQSEventV2[] Convert(InfinityQSEvent[] collection)
|
||||||
@ -20,25 +34,53 @@ public record InfinityQSEvent(int EV_EVNT,
|
|||||||
|
|
||||||
public static InfinityQSEventV2 Map(InfinityQSEvent item)
|
public static InfinityQSEventV2 Map(InfinityQSEvent item)
|
||||||
{
|
{
|
||||||
InfinityQSEventV2 result = new(item.EV_EVNT,
|
InfinityQSEventV2 result = new(item.F_EVNT,
|
||||||
item.EV_SGTM,
|
item.F_CRTM,
|
||||||
item.EV_UTC7,
|
item.F_EDTM,
|
||||||
item.PR_NAME,
|
item.F_TYPE,
|
||||||
item.PD_NAME,
|
item.F_NAME,
|
||||||
item.TD_TEST,
|
item.F_EMPL,
|
||||||
item.TD_NAME,
|
item.F_EVTM,
|
||||||
item.EV_NAME);
|
item.F_PRCS,
|
||||||
|
item.F_PART,
|
||||||
|
item.F_TEST,
|
||||||
|
item.F_SGTM,
|
||||||
|
item.F_ACC,
|
||||||
|
item.F_ACEM,
|
||||||
|
item.F_ACTM,
|
||||||
|
item.F_CAC,
|
||||||
|
item.F_CAEM,
|
||||||
|
item.F_CATM,
|
||||||
|
item.F_FLAG,
|
||||||
|
item.F_USER,
|
||||||
|
item.F_DSBL,
|
||||||
|
item.F_RFC,
|
||||||
|
item.F_TRTM);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public record InfinityQSEventV2(int EventId,
|
public record InfinityQSEventV2(int Evnt,
|
||||||
int SubGroupDateTimeId,
|
int Crtm,
|
||||||
string SubGroupDateTime,
|
int Edtm,
|
||||||
string Process,
|
int Type,
|
||||||
string Part,
|
string Name,
|
||||||
int VariableNumber,
|
int Empl,
|
||||||
string Variable,
|
int Evtm,
|
||||||
string Name)
|
int Prcs,
|
||||||
|
int Part,
|
||||||
|
int Test,
|
||||||
|
int Sgtm,
|
||||||
|
int Acc,
|
||||||
|
int Acem,
|
||||||
|
int Actm,
|
||||||
|
int Cac,
|
||||||
|
int Caem,
|
||||||
|
int Catm,
|
||||||
|
int Flag,
|
||||||
|
int User,
|
||||||
|
int Dsbl,
|
||||||
|
int Rfc,
|
||||||
|
int Trtm)
|
||||||
{ }
|
{ }
|
@ -1,24 +0,0 @@
|
|||||||
namespace OI.Metrology.Shared.Models.Stateless;
|
|
||||||
|
|
||||||
public interface IExportController<T>
|
|
||||||
{
|
|
||||||
|
|
||||||
enum Action : int
|
|
||||||
{
|
|
||||||
Index = 0,
|
|
||||||
Export = 1,
|
|
||||||
Headers = 2,
|
|
||||||
Logistics = 3
|
|
||||||
}
|
|
||||||
|
|
||||||
static string GetRouteName() => nameof(IExportController<T>)[1..^10];
|
|
||||||
T GetExport();
|
|
||||||
T GetHeaders();
|
|
||||||
T GetLogistics();
|
|
||||||
T GetProcessDataStandardFormat();
|
|
||||||
T PostExport();
|
|
||||||
T PostHeaders();
|
|
||||||
T PostLogistics();
|
|
||||||
T PostProcessDataStandardFormat();
|
|
||||||
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
using OI.Metrology.Shared.DataModels;
|
|
||||||
|
|
||||||
namespace OI.Metrology.Shared.Models.Stateless;
|
|
||||||
|
|
||||||
public interface IExportRepository
|
|
||||||
{
|
|
||||||
|
|
||||||
string GetExport(HeaderCommon headerCommon);
|
|
||||||
Result<HeaderCommon[]> GetHeaders(HeaderCommon headerCommon);
|
|
||||||
Result<HeaderCommon[]> GetLogistics(HeaderCommon headerCommon);
|
|
||||||
string GetProcessDataStandardFormat(HeaderCommon headerCommon);
|
|
||||||
|
|
||||||
}
|
|
@ -1,3 +1,5 @@
|
|||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace OI.Metrology.Shared.Models.Stateless;
|
namespace OI.Metrology.Shared.Models.Stateless;
|
||||||
|
|
||||||
public interface IInboundController<T>
|
public interface IInboundController<T>
|
||||||
@ -9,7 +11,7 @@ public interface IInboundController<T>
|
|||||||
}
|
}
|
||||||
|
|
||||||
static string GetRouteName() => nameof(IInboundController<T>)[1..^10];
|
static string GetRouteName() => nameof(IInboundController<T>)[1..^10];
|
||||||
T Post(string tooltype);
|
T Data(string tooltype, JToken jsonbody);
|
||||||
T AttachFile(string tooltype, long headerid, string datauniqueid = "");
|
T AttachFile(string tooltype, long headerid, string datauniqueid = "");
|
||||||
|
|
||||||
}
|
}
|
@ -6,7 +6,6 @@ public interface IInfinityQSRepository
|
|||||||
{
|
{
|
||||||
|
|
||||||
string GetCommandText(string subGroupId);
|
string GetCommandText(string subGroupId);
|
||||||
string GetCommandText(InfinityQSBase infinityQSBase);
|
|
||||||
string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime);
|
string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime);
|
||||||
Result<InfinityQSBase[]> GetData(string subGroupId);
|
Result<InfinityQSBase[]> GetData(string subGroupId);
|
||||||
Result<InfinityQSDescriptor[]> GetDescriptors(string subGroupId);
|
Result<InfinityQSDescriptor[]> GetDescriptors(string subGroupId);
|
||||||
|
@ -6,7 +6,6 @@ public interface IInfinityQSV2Repository
|
|||||||
{
|
{
|
||||||
|
|
||||||
string GetCommandText(string subGroupId);
|
string GetCommandText(string subGroupId);
|
||||||
string GetCommandText(InfinityQSBaseV2 infinityQSBase);
|
|
||||||
string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime);
|
string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime);
|
||||||
Result<InfinityQSBaseV2[]> GetData(string subGroupId);
|
Result<InfinityQSBaseV2[]> GetData(string subGroupId);
|
||||||
Result<InfinityQSDescriptorV2[]> GetDescriptors(string subGroupId);
|
Result<InfinityQSDescriptorV2[]> GetDescriptors(string subGroupId);
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
<DefineConstants>Linux</DefineConstants>
|
<DefineConstants>Linux</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Text.Json" Version="7.0.2" />
|
<PackageReference Include="System.Text.Json" Version="7.0.1" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -31,9 +31,9 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.4" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.1" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
|
||||||
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
|
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
|
||||||
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
|
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
|
||||||
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
|
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
|
||||||
|
@ -29,20 +29,12 @@ public class UnitTestAppSettingsController
|
|||||||
_ControllerName = nameof(Server.ApiControllers.AppSettingsController)[..^10];
|
_ControllerName = nameof(Server.ApiControllers.AppSettingsController)[..^10];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void NonThrowTryCatch()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{ throw new Exception(); }
|
|
||||||
catch (Exception) { }
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void TestControllerName()
|
public void TestControllerName()
|
||||||
{
|
{
|
||||||
_Logger.Information("Starting Web Application");
|
_Logger.Information("Starting Web Application");
|
||||||
Assert.AreEqual(IAppSettingsController<object>.GetRouteName(), _ControllerName);
|
Assert.AreEqual(IAppSettingsController<object>.GetRouteName(), _ControllerName);
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -53,7 +45,6 @@ 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>>();
|
||||||
appSettingsRepository.VerifyConnectionStrings();
|
appSettingsRepository.VerifyConnectionStrings();
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -64,7 +55,6 @@ public class UnitTestAppSettingsController
|
|||||||
AppSettings appSettings = serviceProvider.GetRequiredService<AppSettings>();
|
AppSettings appSettings = serviceProvider.GetRequiredService<AppSettings>();
|
||||||
Assert.IsNotNull(appSettings);
|
Assert.IsNotNull(appSettings);
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -76,7 +66,6 @@ public class UnitTestAppSettingsController
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -93,7 +82,6 @@ public class UnitTestAppSettingsController
|
|||||||
Assert.IsNotNull(json);
|
Assert.IsNotNull(json);
|
||||||
Assert.IsTrue(json != "[]");
|
Assert.IsTrue(json != "[]");
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -105,7 +93,6 @@ public class UnitTestAppSettingsController
|
|||||||
string result = appSettingsRepository.GetBuildNumberAndGitCommitSeven();
|
string result = appSettingsRepository.GetBuildNumberAndGitCommitSeven();
|
||||||
Assert.IsTrue(result is not null);
|
Assert.IsTrue(result is not null);
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -121,7 +108,6 @@ public class UnitTestAppSettingsController
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -54,8 +54,8 @@ public class UnitTestClientSettingsController
|
|||||||
{
|
{
|
||||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||||
_Logger.Information("Starting Web Application");
|
_Logger.Information("Starting Web Application");
|
||||||
#if DEBUG
|
|
||||||
string actionName = nameof(IClientSettingsController<object>.Action.Client);
|
string actionName = nameof(IClientSettingsController<object>.Action.Client);
|
||||||
|
#if DEBUG
|
||||||
HttpResponseMessage httpResponseMessage = await httpClient.GetAsync($"api/{_ControllerName}/{actionName}");
|
HttpResponseMessage httpResponseMessage = await httpClient.GetAsync($"api/{_ControllerName}/{actionName}");
|
||||||
Assert.AreEqual(HttpStatusCode.OK, httpResponseMessage.StatusCode);
|
Assert.AreEqual(HttpStatusCode.OK, httpResponseMessage.StatusCode);
|
||||||
Assert.AreEqual("application/json; charset=utf-8", httpResponseMessage.Content.Headers.ContentType?.ToString());
|
Assert.AreEqual("application/json; charset=utf-8", httpResponseMessage.Content.Headers.ContentType?.ToString());
|
||||||
|
@ -1,196 +0,0 @@
|
|||||||
using Microsoft.AspNetCore.Mvc.Testing;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using OI.Metrology.Shared.DataModels;
|
|
||||||
using OI.Metrology.Shared.Models.Stateless;
|
|
||||||
using Serilog;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace OI.Metrology.Tests;
|
|
||||||
|
|
||||||
[TestClass]
|
|
||||||
public class UnitTestExportController
|
|
||||||
{
|
|
||||||
|
|
||||||
#pragma warning disable CS8618
|
|
||||||
|
|
||||||
private static ILogger _Logger;
|
|
||||||
private static string _ControllerName;
|
|
||||||
private static TestContext _TestContext;
|
|
||||||
private static WebApplicationFactory<Server.Program> _WebApplicationFactory;
|
|
||||||
|
|
||||||
#pragma warning restore
|
|
||||||
|
|
||||||
[ClassInitialize]
|
|
||||||
public static void ClassInitAsync(TestContext testContext)
|
|
||||||
{
|
|
||||||
_TestContext = testContext;
|
|
||||||
_Logger = Log.ForContext<UnitTestExportController>();
|
|
||||||
_WebApplicationFactory = new WebApplicationFactory<Server.Program>();
|
|
||||||
_ControllerName = nameof(Server.ApiControllers.ExportController)[..^10];
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void NonThrowTryCatch()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{ throw new Exception(); }
|
|
||||||
catch (Exception) { }
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void TestControllerName()
|
|
||||||
{
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
Assert.AreEqual(IExportController<string>.GetRouteName(), _ControllerName);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static HeaderCommon GetHeaderCommon() =>
|
|
||||||
new() { PSN = "5008", Reactor = "61", RDS = "579487", ID = 1678209360 };
|
|
||||||
|
|
||||||
private static StringContent GetStringContent() =>
|
|
||||||
new(System.Text.Json.JsonSerializer.Serialize(GetHeaderCommon()), Encoding.UTF8, "application/json");
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void GetExport()
|
|
||||||
{
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
|
||||||
IExportRepository exportRepository = serviceProvider.GetRequiredService<IExportRepository>();
|
|
||||||
string result = exportRepository.GetExport(GetHeaderCommon());
|
|
||||||
Assert.IsNotNull(result);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public async Task GetExportApi()
|
|
||||||
{
|
|
||||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/export");
|
|
||||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetExport)}.txt"), result);
|
|
||||||
Assert.IsNotNull(result);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public async Task PostExportApi()
|
|
||||||
{
|
|
||||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/export", GetStringContent());
|
|
||||||
Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void GetHeaders()
|
|
||||||
{
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
|
||||||
IExportRepository exportRepository = serviceProvider.GetRequiredService<IExportRepository>();
|
|
||||||
Result<HeaderCommon[]> result = exportRepository.GetHeaders(GetHeaderCommon());
|
|
||||||
Assert.IsNotNull(result?.Results);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public async Task GetHeadersApi()
|
|
||||||
{
|
|
||||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/headers");
|
|
||||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetHeaders)}.json"), json);
|
|
||||||
Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json);
|
|
||||||
Assert.IsNotNull(result?.Results);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public async Task PostHeadersApi()
|
|
||||||
{
|
|
||||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/headers", GetStringContent());
|
|
||||||
Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void GetLogistics()
|
|
||||||
{
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
|
||||||
IExportRepository exportRepository = serviceProvider.GetRequiredService<IExportRepository>();
|
|
||||||
Result<HeaderCommon[]> result = exportRepository.GetLogistics(GetHeaderCommon());
|
|
||||||
Assert.IsNotNull(result?.Results);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public async Task GetLogisticsApi()
|
|
||||||
{
|
|
||||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/logistics");
|
|
||||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetLogistics)}.json"), json);
|
|
||||||
Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json);
|
|
||||||
Assert.IsNotNull(result?.Results);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public async Task PostLogisticsApi()
|
|
||||||
{
|
|
||||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/logistics", GetStringContent());
|
|
||||||
Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void GetProcessDataStandardFormat()
|
|
||||||
{
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
|
||||||
IExportRepository exportRepository = serviceProvider.GetRequiredService<IExportRepository>();
|
|
||||||
string result = exportRepository.GetProcessDataStandardFormat(GetHeaderCommon());
|
|
||||||
Assert.IsNotNull(result);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public async Task GetProcessDataStandardFormatApi()
|
|
||||||
{
|
|
||||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/processDataStandardFormat");
|
|
||||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetProcessDataStandardFormat)}.pdsf"), result);
|
|
||||||
Assert.IsNotNull(result);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public async Task PostProcessDataStandardFormatApi()
|
|
||||||
{
|
|
||||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
|
||||||
_Logger.Information("Starting Web Application");
|
|
||||||
HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/processDataStandardFormat", GetStringContent());
|
|
||||||
Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK);
|
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -28,25 +28,14 @@ public class UnitTestInfinityQSController
|
|||||||
_ControllerName = nameof(Server.ApiControllers.InfinityQSController)[..^10];
|
_ControllerName = nameof(Server.ApiControllers.InfinityQSController)[..^10];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void NonThrowTryCatch()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{ throw new Exception(); }
|
|
||||||
catch (Exception) { }
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void TestControllerName()
|
public void TestControllerName()
|
||||||
{
|
{
|
||||||
_Logger.Information("Starting Web Application");
|
_Logger.Information("Starting Web Application");
|
||||||
Assert.AreEqual(IInfinityQSController<string>.GetRouteName(), _ControllerName);
|
Assert.AreEqual(IInfinityQSController<string>.GetRouteName(), _ControllerName);
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetCommandText()
|
public void GetCommandText()
|
||||||
{
|
{
|
||||||
@ -56,12 +45,8 @@ public class UnitTestInfinityQSController
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task GetCommandTextApi()
|
public async Task GetCommandTextApi()
|
||||||
{
|
{
|
||||||
@ -71,12 +56,8 @@ public class UnitTestInfinityQSController
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetData()
|
public void GetData()
|
||||||
{
|
{
|
||||||
@ -92,12 +73,8 @@ public class UnitTestInfinityQSController
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task GetDataApi()
|
public async Task GetDataApi()
|
||||||
{
|
{
|
||||||
@ -109,12 +86,8 @@ public class UnitTestInfinityQSController
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetDescriptors()
|
public void GetDescriptors()
|
||||||
{
|
{
|
||||||
@ -127,12 +100,8 @@ public class UnitTestInfinityQSController
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task GetDescriptorsApi()
|
public async Task GetDescriptorsApi()
|
||||||
{
|
{
|
||||||
@ -144,12 +113,8 @@ public class UnitTestInfinityQSController
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetEvents()
|
public void GetEvents()
|
||||||
{
|
{
|
||||||
@ -159,12 +124,8 @@ public class UnitTestInfinityQSController
|
|||||||
Result<InfinityQSEvent[]> result = infinityQSRepository.GetEvents("1677273357");
|
Result<InfinityQSEvent[]> result = infinityQSRepository.GetEvents("1677273357");
|
||||||
Assert.IsNotNull(result?.Results);
|
Assert.IsNotNull(result?.Results);
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task GetEventsApi()
|
public async Task GetEventsApi()
|
||||||
{
|
{
|
||||||
@ -175,12 +136,8 @@ public class UnitTestInfinityQSController
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetHeader()
|
public void GetHeader()
|
||||||
{
|
{
|
||||||
@ -190,12 +147,8 @@ public class UnitTestInfinityQSController
|
|||||||
Result<InfinityQSBase[]> result = infinityQSRepository.GetHeader("1677273357");
|
Result<InfinityQSBase[]> result = infinityQSRepository.GetHeader("1677273357");
|
||||||
Assert.IsNotNull(result?.Results);
|
Assert.IsNotNull(result?.Results);
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task GetHeaderApi()
|
public async Task GetHeaderApi()
|
||||||
{
|
{
|
||||||
@ -206,7 +159,6 @@ public class UnitTestInfinityQSController
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -28,20 +28,12 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
_ControllerName = nameof(Server.ApiControllers.InfinityQSV2Controller)[..^10];
|
_ControllerName = nameof(Server.ApiControllers.InfinityQSV2Controller)[..^10];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void NonThrowTryCatch()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{ throw new Exception(); }
|
|
||||||
catch (Exception) { }
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void TestControllerName()
|
public void TestControllerName()
|
||||||
{
|
{
|
||||||
_Logger.Information("Starting Web Application");
|
_Logger.Information("Starting Web Application");
|
||||||
Assert.AreEqual(IInfinityQSV2Controller<string>.GetRouteName(), _ControllerName);
|
Assert.AreEqual(IInfinityQSV2Controller<string>.GetRouteName(), _ControllerName);
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -53,12 +45,8 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task GetCommandTextApi()
|
public async Task GetCommandTextApi()
|
||||||
{
|
{
|
||||||
@ -68,12 +56,8 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetData()
|
public void GetData()
|
||||||
{
|
{
|
||||||
@ -89,12 +73,8 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task GetDataApi()
|
public async Task GetDataApi()
|
||||||
{
|
{
|
||||||
@ -106,12 +86,8 @@ 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);
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetDescriptors()
|
public void GetDescriptors()
|
||||||
{
|
{
|
||||||
@ -124,12 +100,8 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task GetDescriptorsApi()
|
public async Task GetDescriptorsApi()
|
||||||
{
|
{
|
||||||
@ -141,12 +113,8 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetEvents()
|
public void GetEvents()
|
||||||
{
|
{
|
||||||
@ -156,12 +124,8 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
Result<InfinityQSEventV2[]> result = infinityQSV2Repository.GetEvents("1677273357");
|
Result<InfinityQSEventV2[]> result = infinityQSV2Repository.GetEvents("1677273357");
|
||||||
Assert.IsNotNull(result?.Results);
|
Assert.IsNotNull(result?.Results);
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task GetEventsApi()
|
public async Task GetEventsApi()
|
||||||
{
|
{
|
||||||
@ -172,12 +136,8 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
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.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetHeader()
|
public void GetHeader()
|
||||||
{
|
{
|
||||||
@ -187,12 +147,8 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
Result<InfinityQSBaseV2[]> result = infinityQSV2Repository.GetHeader("1677273357");
|
Result<InfinityQSBaseV2[]> result = infinityQSV2Repository.GetHeader("1677273357");
|
||||||
Assert.IsNotNull(result?.Results);
|
Assert.IsNotNull(result?.Results);
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
|
||||||
[Ignore]
|
|
||||||
#endif
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task GetHeaderApi()
|
public async Task GetHeaderApi()
|
||||||
{
|
{
|
||||||
@ -203,7 +159,6 @@ 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);
|
||||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
NonThrowTryCatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net7.0</TargetFrameworks>
|
<TargetFrameworks>net7.0</TargetFrameworks>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
@ -8,14 +8,14 @@
|
|||||||
<SupportedPlatform Include="browser" />
|
<SupportedPlatform Include="browser" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MudBlazor" Version="6.1.9" />
|
<PackageReference Include="MudBlazor" Version="6.1.8" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.4" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.2" />
|
||||||
<PackageReference Include="IgniteUI.Blazor" Version="22.2.24" />
|
<PackageReference Include="IgniteUI.Blazor" Version="22.2.24" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.BrowserConsole" Version="1.0.0" />
|
<PackageReference Include="Serilog.Sinks.BrowserConsole" Version="1.0.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.BrowserHttp" Version="1.0.0-dev-00032" />
|
<PackageReference Include="Serilog.Sinks.BrowserHttp" Version="1.0.0-dev-00032" />
|
||||||
<PackageReference Include="System.Net.Http.Json" Version="7.0.1" />
|
<PackageReference Include="System.Net.Http.Json" Version="7.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Shared\OI.Metrology.Shared.csproj" />
|
<ProjectReference Include="..\Shared\OI.Metrology.Shared.csproj" />
|
||||||
|
@ -15,23 +15,16 @@ trigger:
|
|||||||
- "ClientHub/*"
|
- "ClientHub/*"
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
name: Mesa-Windows-Service
|
name: Mesa-IIS
|
||||||
demands: OI-Metrology-Server-Development
|
demands: OI-Metrology-Server-Development
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
# solution: '**/*.sln'
|
# solution: '**/*.sln'
|
||||||
# buildPlatform: 'Any CPU'
|
# buildPlatform: 'Any CPU'
|
||||||
buildConfiguration: "Debug"
|
buildConfiguration: 'Debug'
|
||||||
ASPNETCORE_ENVIRONMENT: "Development"
|
ASPNETCORE_ENVIRONMENT: 'Development'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
|
||||||
set exeName=OI.Metrology.Server
|
|
||||||
echo %exeName%
|
|
||||||
echo ##vso[task.setvariable variable=ExeName;]%exeName%
|
|
||||||
echo $(ExeName)
|
|
||||||
displayName: ExeName
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set coreVersion=net7.0
|
set coreVersion=net7.0
|
||||||
echo %coreVersion%
|
echo %coreVersion%
|
||||||
@ -86,28 +79,13 @@ steps:
|
|||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Safe storage of app secrets - Server"
|
displayName: "Safe storage of app secrets - Server"
|
||||||
|
|
||||||
- script: |
|
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "IsDevelopment" true
|
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "MockRoot" "/Data/Tests"
|
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "URLs" "http://localhost:5002;"
|
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "MonAResource" "OI_Metrology_Viewer_IFX"
|
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "ApiExportPath" "\\messdv002.na.infineon.com\Candela\Archive\API"
|
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "ConnectionString" "Data Source=MESSAD1001\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;"
|
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "Oi2SqlConnectionString" "Data Source=MESSAD1001\TEST1,59583;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;"
|
|
||||||
workingDirectory: Server
|
|
||||||
displayName: "Safe storage of app secrets II - Server"
|
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
|
||||||
workingDirectory: Tests
|
|
||||||
displayName: "Core Build - Tests"
|
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Core Build - Server"
|
displayName: "Core Build - Server"
|
||||||
|
|
||||||
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
|
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
|
||||||
workingDirectory: "$(System.DefaultWorkingDirectory)/.vscode"
|
workingDirectory: "$(System.DefaultWorkingDirectory)/.vscode"
|
||||||
displayName: "PowerShell Script"
|
displayName: 'PowerShell Script'
|
||||||
|
|
||||||
- script: "dotnet test --configuration $(Configuration)"
|
- script: "dotnet test --configuration $(Configuration)"
|
||||||
workingDirectory: Tests
|
workingDirectory: Tests
|
||||||
@ -129,15 +107,6 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
testResultsFormat: VSTest
|
testResultsFormat: VSTest
|
||||||
testResultsFiles: "**/*.trx"
|
testResultsFiles: "**/*.trx"
|
||||||
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
|
||||||
searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
displayName: "Publish Test Results **/coverage.cobertura.xml"
|
|
||||||
inputs:
|
|
||||||
testResultsFormat: VSTest
|
|
||||||
testResultsFiles: "**/coverage.cobertura.xml"
|
|
||||||
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
|
||||||
searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
|
searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
|
||||||
|
|
||||||
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
|
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
|
||||||
@ -159,69 +128,16 @@ steps:
|
|||||||
SourceFolder: '$(Build.ArtifactStagingDirectory)\Server'
|
SourceFolder: '$(Build.ArtifactStagingDirectory)\Server'
|
||||||
TargetFolder: 'D:\$(CoreVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)\Server'
|
TargetFolder: 'D:\$(CoreVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)\Server'
|
||||||
|
|
||||||
- script: 'sc stop "$(Build.Repository.Name)-$(Configuration)"'
|
|
||||||
workingDirectory: Server
|
|
||||||
displayName: "Service Control - Stop"
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- script: 'sc delete "$(Build.Repository.Name)-$(Configuration)"'
|
|
||||||
workingDirectory: Server
|
|
||||||
displayName: "Service Control - Delete"
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: DownloadSecureFile@1
|
|
||||||
name: downloadSecureFileKDBX
|
|
||||||
displayName: "Download secure file"
|
|
||||||
inputs:
|
|
||||||
secureFile: "Infineon-NA.kdbx"
|
|
||||||
|
|
||||||
- script: echo "<$(downloadSecureFileKDBX.secureFilePath)>"
|
|
||||||
displayName: "Echo Path"
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
$data = @('$(downloadSecureFileKDBX.secureFilePath)', '-c:GetEntryString', '-Field:Password', '-refx-UUID:A6302662940458499454E35D28FCC9F7', '-pw-enc:AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAtBhT01pNnUGaN/uPLxZGvAAAAAACAAAAAAADZgAAwAAAABAAAAAM4xlYguhv7jzchU8dq9pVAAAAAASAAACgAAAAEAAAANS9rIoaYfNq5TwCmTrqElsgAAAA7O4J52FqCctXlCxYB2J5b/W4T+pZCN2zwFj7XCAFW6IUAAAAhQsBDOERAUZJdtSy8AfxwOAZflo=')
|
|
||||||
$data.count
|
|
||||||
$processStartInfo = New-Object System.Diagnostics.ProcessStartInfo
|
|
||||||
$processStartInfo.FileName = "C:\Users\meseafsvc\AppData\Local\IFXApps\KeePass-2.51.1---KPScript-2.51.1\KPScript.exe"
|
|
||||||
$processStartInfo.RedirectStandardError = $true
|
|
||||||
$processStartInfo.RedirectStandardOutput = $true
|
|
||||||
$processStartInfo.UseShellExecute = $false
|
|
||||||
$processStartInfo.Arguments = $data
|
|
||||||
$process = New-Object System.Diagnostics.Process
|
|
||||||
$process.StartInfo = $processStartInfo
|
|
||||||
$process.Start() | Out-Null
|
|
||||||
$process.WaitForExit()
|
|
||||||
$stdout = $process.StandardOutput.ReadToEnd()
|
|
||||||
$stderr = $process.StandardError.ReadToEnd()
|
|
||||||
Write-Host "stderr: $stderr"
|
|
||||||
Write-Host "exit code: " + $process.ExitCode
|
|
||||||
Write-Host "##vso[task.setvariable variable=pipelinePassword;]$stdout"
|
|
||||||
displayName: pipelinePassword
|
|
||||||
|
|
||||||
- script: 'sc create "$(Build.Repository.Name)-$(Configuration)" start= delayed-auto DisplayName= "$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)" binPath= D:\$(CoreVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)\Server\$(ExeName).exe obj= INFINEON\meseafsvc password="$(pipelinePassword)"'
|
|
||||||
workingDirectory: Server
|
|
||||||
displayName: "Service Control - Create"
|
|
||||||
|
|
||||||
- script: 'sc start "$(Build.Repository.Name)-$(Configuration)"'
|
|
||||||
workingDirectory: Server
|
|
||||||
displayName: "Service Control - Start"
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: "Publish Artifact: drop"
|
displayName: "Publish Artifact: drop"
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)'
|
- script: |
|
||||||
|
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||||
workingDirectory: Tests
|
workingDirectory: Tests
|
||||||
displayName: "Core Clean - Tests"
|
displayName: "Core Clean - Tests"
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)'
|
- script: |
|
||||||
|
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Core Clean - Server"
|
displayName: "Core Clean - Server"
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)'
|
|
||||||
workingDirectory: Server
|
|
||||||
displayName: "Core Clean - Server"
|
|
||||||
|
|
||||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\Debug\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
|
|
||||||
workingDirectory: "EAF Viewer"
|
|
||||||
displayName: "Force Fail"
|
|
||||||
|
@ -107,15 +107,6 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
testResultsFormat: VSTest
|
testResultsFormat: VSTest
|
||||||
testResultsFiles: "**/*.trx"
|
testResultsFiles: "**/*.trx"
|
||||||
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
|
||||||
searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
displayName: "Publish Test Results **/coverage.cobertura.xml"
|
|
||||||
inputs:
|
|
||||||
testResultsFormat: VSTest
|
|
||||||
testResultsFiles: "**/coverage.cobertura.xml"
|
|
||||||
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
|
||||||
searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
|
searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
|
||||||
|
|
||||||
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
|
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
|
||||||
|
9
thunder-tests/thunderCollection.json
Normal file
9
thunder-tests/thunderCollection.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"_id": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
||||||
|
"colName": "InfinityQS",
|
||||||
|
"created": "2023-02-27T20:07:11.913Z",
|
||||||
|
"sortNum": 10000,
|
||||||
|
"folders": []
|
||||||
|
}
|
||||||
|
]
|
1
thunder-tests/thunderEnvironment.json
Normal file
1
thunder-tests/thunderEnvironment.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -265,157 +265,5 @@
|
|||||||
"value": "2"
|
"value": "2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "0aafd6ed-26a6-4a07-825c-8c1fee603b6a",
|
|
||||||
"colId": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeaders",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/headers",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 10000,
|
|
||||||
"created": "2023-03-08T17:16:56.561Z",
|
|
||||||
"modified": "2023-03-08T17:17:39.783Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "af298148-482d-4822-80ba-1abb86e1f9c2",
|
|
||||||
"colId": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetExport",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/export",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 15000,
|
|
||||||
"created": "2023-03-08T17:17:47.597Z",
|
|
||||||
"modified": "2023-03-08T17:19:13.764Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "a787c81d-381e-451d-9d96-e607f06efdaf",
|
|
||||||
"colId": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetLogistics",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/logistics",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 30000,
|
|
||||||
"created": "2023-03-08T17:18:38.179Z",
|
|
||||||
"modified": "2023-03-08T17:19:21.874Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "7e19c7d4-2d93-46e1-88fd-ba5312885713",
|
|
||||||
"colId": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetProcessDataStandardFormat",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/pdsf",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 40000,
|
|
||||||
"created": "2023-03-08T17:18:49.042Z",
|
|
||||||
"modified": "2023-03-08T17:19:27.119Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "25eb571f-064c-4b3f-8c20-666c66c1b123",
|
|
||||||
"colId": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeaders",
|
|
||||||
"url": "https://mestsa008.infineon.com:50302/api/export/headers",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 10000,
|
|
||||||
"created": "2023-03-08T17:31:19.471Z",
|
|
||||||
"modified": "2023-03-08T18:48:51.819Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "f5feb8e3-0e82-4b47-a15e-97ef069a1539",
|
|
||||||
"colId": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetExport",
|
|
||||||
"url": "https://mestsa008.infineon.com:50302/api/export/export",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 15000,
|
|
||||||
"created": "2023-03-08T17:31:19.472Z",
|
|
||||||
"modified": "2023-03-08T17:31:19.472Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "7fddba99-14a2-4c6a-bf4a-4b94391929cf",
|
|
||||||
"colId": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetLogistics",
|
|
||||||
"url": "https://mestsa008.infineon.com:50302/api/export/logistics",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 30000,
|
|
||||||
"created": "2023-03-08T17:31:19.473Z",
|
|
||||||
"modified": "2023-03-08T17:31:19.473Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "07d5b0c3-684a-4cad-8a48-b164e8da87b0",
|
|
||||||
"colId": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetProcessDataStandardFormat",
|
|
||||||
"url": "https://mestsa008.infineon.com:50302/api/export/pdsf",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 40000,
|
|
||||||
"created": "2023-03-08T17:31:19.474Z",
|
|
||||||
"modified": "2023-03-08T17:31:19.474Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
Reference in New Issue
Block a user