EquipmentName and error div

This commit is contained in:
2023-08-02 14:42:43 -07:00
parent 2b9e48c61c
commit 93eb6a08b4
2 changed files with 20 additions and 7 deletions

View File

@ -1,12 +1,14 @@
"use strict";
console.log(appSettings.OpenInsightApplicationProgrammingInterface);
document.getElementById("equipmentName").innerText = appSettings.EquipmentName;
var connection = new signalR.HubConnectionBuilder()
.withUrl("/NotificationHub")
.build();
connection.on("NotifyAll", function (data) {
document.getElementById("error").innerHTML = "";
if (!data.keyPressEvent || !data.lastScanServiceResultValue) {
if (!data.httpContentBody) {
document.getElementById("lastScanServiceResultValue").innerText = "";
@ -25,20 +27,25 @@ connection.on("NotifyAll", function (data) {
if (!postResult.MId) {
document.getElementById("mId").innerText = "";
} else {
document.getElementById(
"mId",
).innerText = `Use ${postResult.MId} for the wafer and input id`;
var mId = postResult.MId.replace(/\r\n/g, ' ');
if (mId.length == postResult.MId) {
document.getElementById("mId").innerText = `Use ${mId} for the wafer and input id`;
}
else {
document.getElementById("mId").innerText = "";
document.getElementById("error").innerHTML = mId;
}
}
if (!postResult.QaMetTests) {
document.getElementById("qaMetTests").innerText = data.httpContentBody;
} else {
var properties = [];
var qaMetTests = "";
for (const property in postResult)
for (const property in postResult.QaMetTests)
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 />";
for (var j = 0; j < postResult.QaMetTests[properties[i]].length; j++) {
qaMetTests += properties[i] + " - [" + postResult.QaMetTests[properties[i]][j].recipe + "] - [" + postResult.QaMetTests[properties[i]][j].recipePattern + "]<br />";
}
}
document.getElementById("qaMetTests").innerText = qaMetTests;