ToolClass
This commit is contained in:
parent
f54b93c0d6
commit
2b9e48c61c
@ -11,12 +11,16 @@ type: "kanbn"
|
||||
# Azure Pipeline
|
||||
|
||||
```bash
|
||||
apt install putty-tools
|
||||
pscp D:/Tmp/phares/ag/vsts-agent-linux-x64-2.210.1.tar.gz unity4@unity4:/home/unity4/vsts-agent-linux-x64-2.210.1.tar.gz
|
||||
pscp D:/Tmp/phares/ag/vsts-agent-linux-x64-2.210.1.tar.gz unity5@unity5:/home/unity5/vsts-agent-linux-x64-2.210.1.tar.gz
|
||||
pscp D:/Tmp/phares/ag/vsts-agent-linux-x64-2.210.1.tar.gz room006@mescroom006:/home/room006/vsts-agent-linux-x64-2.210.1.tar.gz
|
||||
```
|
||||
|
||||
```bash
|
||||
apt-get install libicu66
|
||||
mv vsts-agent-linux-x64-2.210.1.tar.gz vsts-agent-linux-x64-2.210.1-unity4
|
||||
mkdir vsts-agent-linux-x64-2.210.1-unity4
|
||||
cd vsts-agent-linux-x64-2.210.1-unity4
|
||||
tar xvzf vsts-agent-linux-x64-2.210.1.tar.gz
|
||||
chown unity4 /home/unity4/vsts-agent-linux-x64-2.210.1-unity4 -R
|
||||
|
@ -43,7 +43,7 @@ public class UnitTestFileService
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
Server.Models.AppSettings appSettings = serviceProvider.GetRequiredService<Server.Models.AppSettings>();
|
||||
IFileService fileService = serviceProvider.GetRequiredService<IFileService>();
|
||||
Notification notification = new(KeyPressEvent: null, "Test", null);
|
||||
Notification notification = new(KeyPressEvent: null, "Test", appSettings.ToolClass, null);
|
||||
fileService.Write(appSettings.EquipmentName, appSettings.FileShare, calendar: null, notification);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
NonThrowTryCatch();
|
||||
|
@ -44,7 +44,7 @@ public class UnitTestPostService
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
Server.Models.AppSettings appSettings = serviceProvider.GetRequiredService<Server.Models.AppSettings>();
|
||||
IPostService postService = serviceProvider.GetRequiredService<IPostService>();
|
||||
Notification notification = new(KeyPressEvent: null, "Test", null);
|
||||
Notification notification = new(KeyPressEvent: null, "Test", appSettings.ToolClass, null);
|
||||
_ = postService.Post(appSettings.PostTo, httpClient, notification);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
NonThrowTryCatch();
|
||||
|
@ -137,7 +137,7 @@ public class TimedHostedService : IHostedService, IAggregateInputReader, IDispos
|
||||
Result<string> result = _LastScanService.GetScan();
|
||||
if (!string.IsNullOrEmpty(result.Results))
|
||||
{
|
||||
Notification notification = new(e, result.Results, null);
|
||||
Notification notification = new(e, result.Results, _AppSettings.ToolClass, null);
|
||||
_Notifications.Add(notification);
|
||||
_ = _HubContext.Clients.All.SendAsync(nameof(NotificationHub.NotifyAll), notification);
|
||||
}
|
||||
@ -250,7 +250,7 @@ public class TimedHostedService : IHostedService, IAggregateInputReader, IDispos
|
||||
throw new Exception(httpResponseMessage.Result.StatusCode.ToString());
|
||||
Task<string> content = httpResponseMessage.Result.Content.ReadAsStringAsync();
|
||||
content.Wait();
|
||||
Notification notification = new(null, null, content.Result);
|
||||
Notification notification = new(null, null, _AppSettings.ToolClass, content.Result);
|
||||
_ = _HubContext.Clients.All.SendAsync(nameof(NotificationHub.NotifyAll), notification);
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ public record AppSettings(string BuildNumber,
|
||||
string RootPassword,
|
||||
string SerialPortName,
|
||||
int ShareToEvery,
|
||||
string ToolClass,
|
||||
string URLs,
|
||||
string WorkingDirectoryName,
|
||||
int WriteToSerialEvery)
|
||||
|
@ -6,32 +6,31 @@ namespace Barcode.Host.Server.Models.Binder;
|
||||
public class AppSettings
|
||||
{
|
||||
|
||||
#nullable disable
|
||||
|
||||
[Display(Name = "Build Number"), Required] public string BuildNumber { get; set; }
|
||||
[Display(Name = "Build Source Version"), Required] public string BuildSourceVersion { get; set; }
|
||||
[Display(Name = "Build Number"), Required] public string? BuildNumber { get; set; }
|
||||
[Display(Name = "Build Source Version"), Required] public string? BuildSourceVersion { get; set; }
|
||||
[Display(Name = "Last Scan Service Clear After"), Required] public int? ClearLastScanServiceAfter { get; set; }
|
||||
[Display(Name = "Company"), Required] public string Company { get; set; }
|
||||
[Display(Name = "Device Name Ends With"), Required] public string DeviceNameEndsWith { get; set; }
|
||||
[Display(Name = "Equipment Name"), Required] public string EquipmentName { get; set; }
|
||||
[Display(Name = "Company"), Required] public string? Company { get; set; }
|
||||
[Display(Name = "Device Name Ends With"), Required] public string? DeviceNameEndsWith { get; set; }
|
||||
[Display(Name = "Equipment Name"), Required] public string? EquipmentName { get; set; }
|
||||
[Display(Name = "ExpectedScanLengthA"), Required] public int? ExpectedScanLengthA { get; set; }
|
||||
[Display(Name = "ExpectedScanLengthB"), Required] public int? ExpectedScanLengthB { get; set; }
|
||||
[Display(Name = "File Share"), Required] public string FileShare { get; set; }
|
||||
[Display(Name = "File Share"), Required] public string? FileShare { get; set; }
|
||||
[Display(Name = "Is Development"), Required] public bool? IsDevelopment { get; set; }
|
||||
[Display(Name = "Is Staging"), Required] public bool? IsStaging { get; set; }
|
||||
[Display(Name = "Linux Device Path"), Required] public string LinuxDevicePath { get; set; }
|
||||
[Display(Name = "Mock Root"), Required] public string MockRoot { get; set; }
|
||||
[Display(Name = "MonA Resource"), Required] public string MonAResource { get; set; }
|
||||
[Display(Name = "MonA Site"), Required] public string MonASite { get; set; }
|
||||
[Display(Name = "Linux Device Path"), Required] public string? LinuxDevicePath { get; set; }
|
||||
[Display(Name = "Mock Root"), Required] public string? MockRoot { get; set; }
|
||||
[Display(Name = "MonA Resource"), Required] public string? MonAResource { get; set; }
|
||||
[Display(Name = "MonA Site"), Required] public string? MonASite { get; set; }
|
||||
[Display(Name = "Notify Minimum"), Required] public int? NotifyMinimum { get; set; }
|
||||
[Display(Name = "OpenInsight Application Programming Interface"), Required] public string OpenInsightApplicationProgrammingInterface { get; set; }
|
||||
[Display(Name = "PostTo"), Required] public string PostTo { get; set; }
|
||||
[Display(Name = "OpenInsight Application Programming Interface"), Required] public string? OpenInsightApplicationProgrammingInterface { get; set; }
|
||||
[Display(Name = "PostTo"), Required] public string? PostTo { get; set; }
|
||||
[Display(Name = "Post to Every"), Required] public int? PostToEvery { get; set; }
|
||||
[Display(Name = "RootPassword"), Required] public string RootPassword { get; set; }
|
||||
[Display(Name = "Serial Port Name"), Required] public string SerialPortName { get; set; }
|
||||
[Display(Name = "RootPassword"), Required] public string? RootPassword { get; set; }
|
||||
[Display(Name = "Serial Port Name"), Required] public string? SerialPortName { get; set; }
|
||||
[Display(Name = "Share to Every"), Required] public int? ShareToEvery { get; set; }
|
||||
[Display(Name = "URLs"), Required] public string URLs { get; set; }
|
||||
[Display(Name = "Working Directory Name"), Required] public string WorkingDirectoryName { get; set; }
|
||||
[Display(Name = "ToolClass"), Required] public string? ToolClass { get; set; }
|
||||
[Display(Name = "URLs"), Required] public string? URLs { get; set; }
|
||||
[Display(Name = "Working Directory Name"), Required] public string? WorkingDirectoryName { get; set; }
|
||||
[Display(Name = "WriteToSerialEvery"), Required] public int? WriteToSerialEvery { get; set; }
|
||||
|
||||
#nullable restore
|
||||
@ -91,6 +90,8 @@ public class AppSettings
|
||||
throw new NullReferenceException(nameof(SerialPortName));
|
||||
if (appSettings.ShareToEvery is null)
|
||||
throw new NullReferenceException(nameof(ShareToEvery));
|
||||
if (appSettings.ToolClass is null)
|
||||
throw new NullReferenceException(nameof(ToolClass));
|
||||
if (appSettings.URLs is null)
|
||||
throw new NullReferenceException(nameof(URLs));
|
||||
if (appSettings.WorkingDirectoryName is null)
|
||||
@ -120,6 +121,7 @@ public class AppSettings
|
||||
appSettings.RootPassword,
|
||||
appSettings.SerialPortName,
|
||||
appSettings.ShareToEvery.Value,
|
||||
appSettings.ToolClass,
|
||||
appSettings.URLs,
|
||||
appSettings.WorkingDirectoryName,
|
||||
appSettings.WriteToSerialEvery.Value);
|
||||
|
@ -37,15 +37,7 @@
|
||||
<p> </p>
|
||||
<div class="row p-1">
|
||||
<div class="col-6">
|
||||
<h1 id="recipe" style="text-align:center"></h1>
|
||||
</div>
|
||||
</div>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<div class="row p-1">
|
||||
<div class="col-6">
|
||||
<h1 id="httpContentBody" style="text-align:center"></h1>
|
||||
<h1 id="qaMetTests" style="text-align:center"></h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -54,5 +46,5 @@
|
||||
console.log(appSettings.BuildSourceVersion);
|
||||
console.log(appSettings.BuildNumber);
|
||||
</script>
|
||||
<script src="~/js/signalr/dist/browser/signalr.js?dateTime=2023-07-26---12-08-00"></script>
|
||||
<script src="~/js/notification.js?dateTime=2023-07-26---12-08-00"></script>
|
||||
<script src="~/js/signalr/dist/browser/signalr.js?build_source_version=@(Html.Raw(this.Model.AppSettings.BuildSourceVersion))"></script>
|
||||
<script src="~/js/notification.js?build_source_version=@(Html.Raw(this.Model.AppSettings.BuildSourceVersion))"></script>
|
@ -67,6 +67,7 @@
|
||||
},
|
||||
"ShareToEvery": 1000,
|
||||
"RootPassword": "",
|
||||
"ToolClass": "FTIR",
|
||||
"URLs": "http://localhost:5003;",
|
||||
"WorkingDirectoryName": "IFXApps",
|
||||
"WriteToSerialEvery": 750
|
||||
|
@ -17,12 +17,10 @@ connection.on("NotifyAll", function (data) {
|
||||
}
|
||||
if (!data.httpContentBody) {
|
||||
if (!data.keyPressEvent || !data.lastScanServiceResultValue) {
|
||||
document.getElementById("httpContentBody").innerText = data;
|
||||
document.getElementById("mId").innerText = "";
|
||||
document.getElementById("recipe").innerText = "";
|
||||
document.getElementById("qaMetTests").innerText = "";
|
||||
}
|
||||
} else {
|
||||
document.getElementById("httpContentBody").innerText = data.httpContentBody;
|
||||
var postResult = JSON.parse(data.httpContentBody);
|
||||
if (!postResult.MId) {
|
||||
document.getElementById("mId").innerText = "";
|
||||
@ -31,19 +29,20 @@ connection.on("NotifyAll", function (data) {
|
||||
"mId",
|
||||
).innerText = `Use ${postResult.MId} for the wafer and input id`;
|
||||
}
|
||||
if (!postResult.Recipe) {
|
||||
document.getElementById("recipe").innerText = "";
|
||||
if (!postResult.QaMetTests) {
|
||||
document.getElementById("qaMetTests").innerText = data.httpContentBody;
|
||||
} else {
|
||||
if (postResult.Recipe != "Recipe") {
|
||||
document.getElementById("recipe").innerText = postResult.Recipe;
|
||||
} else {
|
||||
$.getJSON(appSettings.OpenInsightApplicationProgrammingInterface + "/materials/rds/" + postResult.LotName,
|
||||
function (data) {
|
||||
document.getElementById("recipe").innerText = data.rds.rdsLayers.length;
|
||||
},
|
||||
);
|
||||
var properties = [];
|
||||
var qaMetTests = "";
|
||||
for (const property in postResult)
|
||||
properties.push(property);
|
||||
for (var i = 0; i < properties.length; i++) {
|
||||
for (var j = 0; j < postResult[properties[i]].length; j++) {
|
||||
qaMetTests += properties[i] + " - [" + postResult[properties[i]][j].recipe + "] - [" + postResult[properties[i]][j].recipePattern + "]<br />";
|
||||
}
|
||||
}
|
||||
document.getElementById("qaMetTests").innerText = qaMetTests;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -2,4 +2,4 @@ using Barcode.Host.Shared.KeyboardMouse;
|
||||
|
||||
namespace Barcode.Host.Shared.Models;
|
||||
|
||||
public record Notification(KeyPressEvent? KeyPressEvent, string? LastScanServiceResultValue, string? HttpContentBody);
|
||||
public record Notification(KeyPressEvent? KeyPressEvent, string? LastScanServiceResultValue, string ToolClass, string? HttpContentBody);
|
Loading…
x
Reference in New Issue
Block a user