Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
8ce50cceb7 | |||
9b4bbf4275 | |||
9e1171cf35 | |||
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-collection_InfinityQS.json
|
!.vscode/thunder-tests/
|
||||||
|
|
||||||
# Libman.json
|
# Libman.json
|
||||||
/wwwroot/lib/*
|
/wwwroot/lib/*
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -3,5 +3,7 @@
|
|||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
"**/.git": false
|
"**/.git": false
|
||||||
},
|
},
|
||||||
|
"thunder-client.saveToWorkspace": true,
|
||||||
|
"thunder-client.workspaceRelativePath": ".vscode",
|
||||||
"coverage-gutters.coverageBaseDir": "../.vscode/TestResults/*"
|
"coverage-gutters.coverageBaseDir": "../.vscode/TestResults/*"
|
||||||
}
|
}
|
39
.vscode/tasks.json
vendored
39
.vscode/tasks.json
vendored
@ -25,6 +25,45 @@
|
|||||||
],
|
],
|
||||||
"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",
|
||||||
|
124
.vscode/thunder-collection_InfinityQS.json
vendored
124
.vscode/thunder-collection_InfinityQS.json
vendored
@ -1,124 +0,0 @@
|
|||||||
{
|
|
||||||
"client": "Thunder Client",
|
|
||||||
"collectionName": "InfinityQS",
|
|
||||||
"dateExported": "2023-02-25T03:56:25.916Z",
|
|
||||||
"version": "1.1",
|
|
||||||
"folders": [],
|
|
||||||
"requests": [
|
|
||||||
{
|
|
||||||
"_id": "9be11307-792b-4177-8ad5-58ee6e1f1ccb",
|
|
||||||
"colId": "3d9b2497-1dd7-43dd-91de-2e33b22ebab8",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetCommandText",
|
|
||||||
"url": "http://messa010ec.ec.local:50301/api/InfinityQS/commandText/?sub_group_id=1677273357&process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 14:15:00",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 20000,
|
|
||||||
"created": "2023-02-24T23:17:08.397Z",
|
|
||||||
"modified": "2023-02-25T03:56:15.342Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "sub_group_id",
|
|
||||||
"value": "1677273357",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "process",
|
|
||||||
"value": "61",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "job",
|
|
||||||
"value": "CDE5",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "part",
|
|
||||||
"value": "5012",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lot",
|
|
||||||
"value": "575908",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "date_time",
|
|
||||||
"value": "2023-02-24 14:15:00",
|
|
||||||
"isPath": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "Content-Length",
|
|
||||||
"custom": "",
|
|
||||||
"action": ">",
|
|
||||||
"value": "100"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "a9c9329f-3694-4a7c-8e34-f3bbf19ba00b",
|
|
||||||
"colId": "3d9b2497-1dd7-43dd-91de-2e33b22ebab8",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetData",
|
|
||||||
"url": "http://messa010ec.ec.local:50301/api/InfinityQS/1677273357/data",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 40000,
|
|
||||||
"created": "2023-02-24T23:18:20.077Z",
|
|
||||||
"modified": "2023-02-25T03:40:56.375Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.",
|
|
||||||
"action": "count",
|
|
||||||
"value": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "13ceb9e6-c6d7-425b-8156-73e518c97d31",
|
|
||||||
"colId": "3d9b2497-1dd7-43dd-91de-2e33b22ebab8",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetEvents",
|
|
||||||
"url": "http://messa010ec.ec.local:50301/api/InfinityQS/1677273357/events",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 42500,
|
|
||||||
"created": "2023-02-24T23:19:03.654Z",
|
|
||||||
"modified": "2023-02-25T03:55:48.678Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.",
|
|
||||||
"action": "count",
|
|
||||||
"value": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "1ca7f294-13bd-42c5-b9cf-087352fd7043",
|
|
||||||
"colId": "3d9b2497-1dd7-43dd-91de-2e33b22ebab8",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeader",
|
|
||||||
"url": "http://messa010ec.ec.local:50301/api/InfinityQS/1677273357/header",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 45000,
|
|
||||||
"created": "2023-02-25T03:42:07.567Z",
|
|
||||||
"modified": "2023-02-25T03:42:18.066Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.",
|
|
||||||
"action": "count",
|
|
||||||
"value": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
127
.vscode/thunder-tests/thunderActivity.json
vendored
Normal file
127
.vscode/thunder-tests/thunderActivity.json
vendored
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"_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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
9
.vscode/thunder-tests/thunderCollection.json
vendored
Normal file
9
.vscode/thunder-tests/thunderCollection.json
vendored
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
.vscode/thunder-tests/thunderEnvironment.json
vendored
Normal file
1
.vscode/thunder-tests/thunderEnvironment.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
[]
|
269
.vscode/thunder-tests/thunderclient.json
vendored
Normal file
269
.vscode/thunder-tests/thunderclient.json
vendored
Normal file
@ -0,0 +1,269 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"_id": "acbbcc8d-3daf-43be-9081-f4be2f8a95b9",
|
||||||
|
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
||||||
|
"containerId": "",
|
||||||
|
"name": "GetCommandText",
|
||||||
|
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/commandText/?sub_group_id=1677273357&process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 14:15:00",
|
||||||
|
"method": "GET",
|
||||||
|
"sortNum": 20000,
|
||||||
|
"created": "2023-02-27T20:07:11.921Z",
|
||||||
|
"modified": "2023-02-27T20:07:11.921Z",
|
||||||
|
"headers": [],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "sub_group_id",
|
||||||
|
"value": "1677273357",
|
||||||
|
"isPath": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "process",
|
||||||
|
"value": "61",
|
||||||
|
"isPath": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "job",
|
||||||
|
"value": "CDE5",
|
||||||
|
"isPath": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "part",
|
||||||
|
"value": "5012",
|
||||||
|
"isPath": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lot",
|
||||||
|
"value": "575908",
|
||||||
|
"isPath": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "date_time",
|
||||||
|
"value": "2023-02-24 14:15:00",
|
||||||
|
"isPath": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"type": "Content-Length",
|
||||||
|
"custom": "",
|
||||||
|
"action": ">",
|
||||||
|
"value": "100"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "29e56599-0093-481e-9386-9e6c1bb828a8",
|
||||||
|
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
||||||
|
"containerId": "",
|
||||||
|
"name": "GetCommandTextV2",
|
||||||
|
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 14:15:00",
|
||||||
|
"method": "GET",
|
||||||
|
"sortNum": 30000,
|
||||||
|
"created": "2023-02-27T20:07:11.923Z",
|
||||||
|
"modified": "2023-02-27T20:07:11.923Z",
|
||||||
|
"headers": [],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "process",
|
||||||
|
"value": "61",
|
||||||
|
"isPath": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "job",
|
||||||
|
"value": "CDE5",
|
||||||
|
"isPath": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "part",
|
||||||
|
"value": "5012",
|
||||||
|
"isPath": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lot",
|
||||||
|
"value": "575908",
|
||||||
|
"isPath": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "date_time",
|
||||||
|
"value": "2023-02-24 14:15:00",
|
||||||
|
"isPath": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"type": "Content-Length",
|
||||||
|
"custom": "",
|
||||||
|
"action": ">",
|
||||||
|
"value": "100"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "2810520f-7a8b-4282-a593-92da3043e491",
|
||||||
|
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
||||||
|
"containerId": "",
|
||||||
|
"name": "GetData",
|
||||||
|
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/data",
|
||||||
|
"method": "GET",
|
||||||
|
"sortNum": 40000,
|
||||||
|
"created": "2023-02-27T20:07:11.924Z",
|
||||||
|
"modified": "2023-02-27T20:07:11.924Z",
|
||||||
|
"headers": [],
|
||||||
|
"params": [],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"type": "json-query",
|
||||||
|
"custom": "json.",
|
||||||
|
"action": "count",
|
||||||
|
"value": "2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "8628d1b1-cedb-45e3-9958-0ba4e233a2ac",
|
||||||
|
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
||||||
|
"containerId": "",
|
||||||
|
"name": "GetDataV2",
|
||||||
|
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/data",
|
||||||
|
"method": "GET",
|
||||||
|
"sortNum": 41250,
|
||||||
|
"created": "2023-02-27T20:07:11.925Z",
|
||||||
|
"modified": "2023-02-27T20:07:11.925Z",
|
||||||
|
"headers": [],
|
||||||
|
"params": [],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"type": "json-query",
|
||||||
|
"custom": "json.",
|
||||||
|
"action": "count",
|
||||||
|
"value": "2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "55c863ce-b828-4cdb-8a72-26da369c44ee",
|
||||||
|
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
||||||
|
"containerId": "",
|
||||||
|
"name": "GetDescriptors",
|
||||||
|
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/descriptors",
|
||||||
|
"method": "GET",
|
||||||
|
"sortNum": 41875,
|
||||||
|
"created": "2023-02-27T20:07:11.926Z",
|
||||||
|
"modified": "2023-02-27T20:07:11.926Z",
|
||||||
|
"headers": [],
|
||||||
|
"params": [],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"type": "json-query",
|
||||||
|
"custom": "json.",
|
||||||
|
"action": "count",
|
||||||
|
"value": "2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "b25fade2-44b5-4897-94a6-e31062c27e58",
|
||||||
|
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
||||||
|
"containerId": "",
|
||||||
|
"name": "GetDescriptorsV2",
|
||||||
|
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/descriptors",
|
||||||
|
"method": "GET",
|
||||||
|
"sortNum": 42187.5,
|
||||||
|
"created": "2023-02-27T20:07:11.927Z",
|
||||||
|
"modified": "2023-02-27T20:07:11.927Z",
|
||||||
|
"headers": [],
|
||||||
|
"params": [],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"type": "json-query",
|
||||||
|
"custom": "json.",
|
||||||
|
"action": "count",
|
||||||
|
"value": "2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "f24e826e-578c-45fe-a80a-ce31f0a13dfc",
|
||||||
|
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
||||||
|
"containerId": "",
|
||||||
|
"name": "GetEvents",
|
||||||
|
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/events",
|
||||||
|
"method": "GET",
|
||||||
|
"sortNum": 42500,
|
||||||
|
"created": "2023-02-27T20:07:11.928Z",
|
||||||
|
"modified": "2023-02-27T20:07:11.928Z",
|
||||||
|
"headers": [],
|
||||||
|
"params": [],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"type": "json-query",
|
||||||
|
"custom": "json.",
|
||||||
|
"action": "count",
|
||||||
|
"value": "2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "81118bd8-5919-4501-aa34-eaa2f4baeabf",
|
||||||
|
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
||||||
|
"containerId": "",
|
||||||
|
"name": "GetEventsV2",
|
||||||
|
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/events",
|
||||||
|
"method": "GET",
|
||||||
|
"sortNum": 43750,
|
||||||
|
"created": "2023-02-27T20:07:11.929Z",
|
||||||
|
"modified": "2023-02-27T20:07:11.929Z",
|
||||||
|
"headers": [],
|
||||||
|
"params": [],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"type": "json-query",
|
||||||
|
"custom": "json.",
|
||||||
|
"action": "count",
|
||||||
|
"value": "2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "26ded486-79ad-4fc8-b526-98187b8fde91",
|
||||||
|
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
||||||
|
"containerId": "",
|
||||||
|
"name": "GetHeader",
|
||||||
|
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/header",
|
||||||
|
"method": "GET",
|
||||||
|
"sortNum": 45000,
|
||||||
|
"created": "2023-02-27T20:07:11.930Z",
|
||||||
|
"modified": "2023-02-27T20:07:11.930Z",
|
||||||
|
"headers": [],
|
||||||
|
"params": [],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"type": "json-query",
|
||||||
|
"custom": "json.",
|
||||||
|
"action": "count",
|
||||||
|
"value": "2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "b8ee8160-6ca2-4276-be91-d1f6f2dd90dc",
|
||||||
|
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
||||||
|
"containerId": "",
|
||||||
|
"name": "GetHeaderV2",
|
||||||
|
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/header",
|
||||||
|
"method": "GET",
|
||||||
|
"sortNum": 55000,
|
||||||
|
"created": "2023-02-27T20:07:11.931Z",
|
||||||
|
"modified": "2023-02-27T20:07:11.931Z",
|
||||||
|
"headers": [],
|
||||||
|
"params": [],
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"type": "json-query",
|
||||||
|
"custom": "json.",
|
||||||
|
"action": "count",
|
||||||
|
"value": "2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
39
Server/ApiControllers/ExportController.cs
Normal file
39
Server/ApiControllers/ExportController.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[Route("export")]
|
||||||
|
public IActionResult GetExport(HeaderCommon headerCommon) =>
|
||||||
|
Content(_ExportRepository.GetExport(headerCommon));
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[Route("headers")]
|
||||||
|
public IActionResult GetHeaders(HeaderCommon headerCommon) =>
|
||||||
|
Json(_ExportRepository.GetHeaders(headerCommon), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[Route("logistics")]
|
||||||
|
public IActionResult GetLogistics(HeaderCommon headerCommon) =>
|
||||||
|
Json(_ExportRepository.GetLogistics(headerCommon), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[Route("pdsf")]
|
||||||
|
[Route("processDataStandardFormat")]
|
||||||
|
public IActionResult GetProcessDataStandardFormat(HeaderCommon headerCommon) =>
|
||||||
|
Content(_ExportRepository.GetProcessDataStandardFormat(headerCommon));
|
||||||
|
|
||||||
|
}
|
@ -32,7 +32,7 @@ public partial class InboundController : ControllerBase, IInboundController<IAct
|
|||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("{tooltype}")]
|
[Route("{tooltype}")]
|
||||||
public IActionResult Data(string tooltype, [FromBody] JToken jsonbody)
|
public IActionResult Post(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))
|
||||||
@ -42,6 +42,18 @@ public partial class InboundController : ControllerBase, IInboundController<IAct
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (jsonbody is null || !jsonbody.Any())
|
||||||
|
{
|
||||||
|
if (!Request.Body.CanRead)
|
||||||
|
jsonbody = JToken.Parse("{}");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using Stream stream = Request.Body;
|
||||||
|
_ = stream.Seek(0, SeekOrigin.Begin);
|
||||||
|
string json = new StreamReader(stream).ReadToEnd();
|
||||||
|
jsonbody = JToken.Parse(json);
|
||||||
|
}
|
||||||
|
}
|
||||||
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
Server/Data/Tests/Export-GetExport.txt
Normal file
1
Server/Data/Tests/Export-GetExport.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
asdf
|
4
Server/Data/Tests/Export-GetHeaders.json
Normal file
4
Server/Data/Tests/Export-GetHeaders.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"Results": [],
|
||||||
|
"TotalRows": 0
|
||||||
|
}
|
4
Server/Data/Tests/Export-GetLogistics.json
Normal file
4
Server/Data/Tests/Export-GetLogistics.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"Results": [],
|
||||||
|
"TotalRows": 0
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
asdf
|
@ -2,7 +2,8 @@ using System.Text.Json;
|
|||||||
|
|
||||||
namespace OI.Metrology.Server.Models;
|
namespace OI.Metrology.Server.Models;
|
||||||
|
|
||||||
public record AppSettings(string ApiLoggingContentTypes,
|
public record AppSettings(string ApiExportPath,
|
||||||
|
string ApiLoggingContentTypes,
|
||||||
string ApiLoggingPathPrefixes,
|
string ApiLoggingPathPrefixes,
|
||||||
string ApiLogPath,
|
string ApiLogPath,
|
||||||
string ApiUrl,
|
string ApiUrl,
|
||||||
|
@ -8,6 +8,7 @@ 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; }
|
||||||
@ -41,6 +42,8 @@ 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)
|
||||||
@ -80,6 +83,7 @@ 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,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<SccProjectName>SAK</SccProjectName>
|
<SccProjectName>SAK</SccProjectName>
|
||||||
<SccProvider>SAK</SccProvider>
|
<SccProvider>SAK</SccProvider>
|
||||||
@ -13,6 +13,7 @@
|
|||||||
<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\**" />
|
||||||
@ -76,6 +77,18 @@
|
|||||||
<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,6 +76,7 @@ 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>();
|
||||||
|
150
Server/Repositories/ExportRepository.cs
Normal file
150
Server/Repositories/ExportRepository.cs
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
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 string _MockRoot;
|
||||||
|
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;
|
||||||
|
_MockRoot = appSettings.MockRoot;
|
||||||
|
_RdsToHeaderCommonCollection = new();
|
||||||
|
_RepositoryName = nameof(ExportRepository)[..^10];
|
||||||
|
_Log = Serilog.Log.ForContext<ExportRepository>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string[] Get()
|
||||||
|
{
|
||||||
|
DateTime dateTime = DateTime.Now;
|
||||||
|
Calendar calendar = new CultureInfo("en-US").Calendar;
|
||||||
|
string weekOfYear = calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||||
|
string lastWeekOfYear = calendar.GetWeekOfYear(dateTime.AddDays(7), CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("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)
|
||||||
|
{
|
||||||
|
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.TopDirectoryOnly));
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
string IExportRepository.GetExport(HeaderCommon headerCommon)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
if (!string.IsNullOrEmpty(_MockRoot))
|
||||||
|
result = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IExportRepository.GetExport)}.txt"));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
if (!string.IsNullOrEmpty(_MockRoot))
|
||||||
|
{
|
||||||
|
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IExportRepository.GetHeaders)}.json"));
|
||||||
|
result = JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json);
|
||||||
|
if (result is null)
|
||||||
|
throw new NullReferenceException(nameof(result));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<HeaderCommon[]> IExportRepository.GetLogistics(HeaderCommon headerCommon)
|
||||||
|
{
|
||||||
|
Result<HeaderCommon[]>? result;
|
||||||
|
if (!string.IsNullOrEmpty(_MockRoot))
|
||||||
|
{
|
||||||
|
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IExportRepository.GetLogistics)}.json"));
|
||||||
|
result = JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json);
|
||||||
|
if (result is null)
|
||||||
|
throw new NullReferenceException(nameof(result));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
if (!string.IsNullOrEmpty(_MockRoot))
|
||||||
|
result = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IExportRepository.GetProcessDataStandardFormat)}.pdsf"));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<string> files = GetFiles(headerCommon, "*.pdsf");
|
||||||
|
if (files.Count != 1)
|
||||||
|
result = string.Empty;
|
||||||
|
else
|
||||||
|
result = File.ReadAllText(files.First());
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -49,6 +49,12 @@
|
|||||||
<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,14 +1,9 @@
|
|||||||
{
|
{
|
||||||
"xApiUrl": "~/api",
|
"ApiExportPath": "\\\\messdv002.na.infineon.com\\Candela\\Archive\\API",
|
||||||
"ApiUrl": "http://localhost:5126/api",
|
"ApiUrl": "~/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,
|
||||||
"xMockRoot": "",
|
"MockRoot": "",
|
||||||
"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,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"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.status === 403) {
|
if (e !== null && e.status === 403) {
|
||||||
$("#spanMessageText").append("<br /><b>" + forbiddenMsg + "</b>");
|
$("#spanMessageText").append("<br /><b>" + forbiddenMsg + "</b>");
|
||||||
}
|
}
|
||||||
else if (e.status === 444) {
|
else if (e !== null && 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.responseText !== null) {
|
else if (e !== null && e.responseText !== null) {
|
||||||
if (e.responseText !== "") {
|
if (e !== null && 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.responseText !== null) {
|
if (e !== null && 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.status === 403)
|
if (e !== null && e.status === 403)
|
||||||
msg += forbiddenMsg;
|
msg += forbiddenMsg;
|
||||||
|
|
||||||
alert(msg);
|
alert(msg);
|
||||||
|
@ -217,12 +217,16 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,10 +463,151 @@ 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('http://messa020ec.ec.local/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);
|
||||||
@ -474,10 +619,13 @@ 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=" + rowData.RDS, function (data) {
|
$.getJSON(_apiUrl + '/pin/' + toolTypeId + "/pinned?biorad_id=" + _BioRadId + "&cde_id=" + _CdeId + "&rds=" + jsonObject.RDS, function (data) {
|
||||||
$("#ModalHeaderGrid").igGrid({
|
$("#ModalHeaderGrid").igGrid({
|
||||||
dataSource: data,
|
dataSource: data,
|
||||||
features: [
|
features: [
|
||||||
@ -497,7 +645,17 @@ 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 + 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";
|
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";
|
||||||
}
|
}
|
||||||
$("#textareaClipboard").val(text);
|
$("#textareaClipboard").val(text);
|
||||||
$("#ModalBodyGrid").igGrid({
|
$("#ModalBodyGrid").igGrid({
|
||||||
@ -604,6 +762,8 @@ 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 () {
|
||||||
@ -632,6 +792,6 @@ function copy() {
|
|||||||
copyText.select();
|
copyText.select();
|
||||||
copyText.setSelectionRange(0, 99999); // For mobile devices
|
copyText.setSelectionRange(0, 99999); // For mobile devices
|
||||||
|
|
||||||
// Copy the text inside the text field
|
// Copy the text inside the text field
|
||||||
navigator.clipboard.writeText(copyText.value);
|
navigator.clipboard.writeText(copyText.value);
|
||||||
}
|
}
|
22
Shared/Models/Stateless/IExportController.cs
Normal file
22
Shared/Models/Stateless/IExportController.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using OI.Metrology.Shared.DataModels;
|
||||||
|
|
||||||
|
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(HeaderCommon headerCommon);
|
||||||
|
T GetHeaders(HeaderCommon headerCommon);
|
||||||
|
T GetLogistics(HeaderCommon headerCommon);
|
||||||
|
T GetProcessDataStandardFormat(HeaderCommon headerCommon);
|
||||||
|
|
||||||
|
}
|
13
Shared/Models/Stateless/IExportRepository.cs
Normal file
13
Shared/Models/Stateless/IExportRepository.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
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);
|
||||||
|
|
||||||
|
}
|
@ -11,7 +11,7 @@ public interface IInboundController<T>
|
|||||||
}
|
}
|
||||||
|
|
||||||
static string GetRouteName() => nameof(IInboundController<T>)[1..^10];
|
static string GetRouteName() => nameof(IInboundController<T>)[1..^10];
|
||||||
T Data(string tooltype, JToken jsonbody);
|
T Post(string tooltype, JToken jsonbody);
|
||||||
T AttachFile(string tooltype, long headerid, string datauniqueid = "");
|
T AttachFile(string tooltype, long headerid, string datauniqueid = "");
|
||||||
|
|
||||||
}
|
}
|
132
Tests/UnitTestExportController.cs
Normal file
132
Tests/UnitTestExportController.cs
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc.Testing;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using OI.Metrology.Shared.DataModels;
|
||||||
|
using OI.Metrology.Shared.Models.Stateless;
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
|
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];
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void TestControllerName()
|
||||||
|
{
|
||||||
|
_Logger.Information("Starting Web Application");
|
||||||
|
Assert.AreEqual(IExportController<string>.GetRouteName(), _ControllerName);
|
||||||
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static HeaderCommon GetHeaderCommon() =>
|
||||||
|
new() { PSN = "5008", Reactor = "39", RDS = "578918", ID = 1 };
|
||||||
|
|
||||||
|
[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");
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public async Task GetExportApi()
|
||||||
|
{
|
||||||
|
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||||
|
_Logger.Information("Starting Web Application");
|
||||||
|
string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/headers");
|
||||||
|
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetExport)}.txt"), result);
|
||||||
|
Assert.IsNotNull(result);
|
||||||
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
|
}
|
||||||
|
|
||||||
|
[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");
|
||||||
|
}
|
||||||
|
|
||||||
|
[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");
|
||||||
|
}
|
||||||
|
|
||||||
|
[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");
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public async Task GetLogisticsApi()
|
||||||
|
{
|
||||||
|
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(GetLogistics)}.json"), json);
|
||||||
|
Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json);
|
||||||
|
Assert.IsNotNull(result?.Results);
|
||||||
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
|
}
|
||||||
|
|
||||||
|
[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");
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public async Task GetProcessDataStandardFormatApi()
|
||||||
|
{
|
||||||
|
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||||
|
_Logger.Information("Starting Web Application");
|
||||||
|
string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/headers");
|
||||||
|
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetProcessDataStandardFormat)}.pdsf"), result);
|
||||||
|
Assert.IsNotNull(result);
|
||||||
|
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -107,6 +107,7 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
testResultsFormat: VSTest
|
testResultsFormat: VSTest
|
||||||
testResultsFiles: "**/*.trx"
|
testResultsFiles: "**/*.trx"
|
||||||
|
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
|
||||||
|
@ -107,6 +107,7 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
testResultsFormat: VSTest
|
testResultsFormat: VSTest
|
||||||
testResultsFiles: "**/*.trx"
|
testResultsFiles: "**/*.trx"
|
||||||
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user