Added View, Recipe Paramaters and Export

This commit is contained in:
2023-03-06 11:07:37 -07:00
parent e42636853d
commit 9e1171cf35
23 changed files with 664 additions and 22 deletions

View File

@ -60,17 +60,17 @@ function DisplayWSMessage(severity, description, e, ex) {
}
$("#spanMessageText").text(description);
if (e.status === 403) {
if (e !== null && e.status === 403) {
$("#spanMessageText").append("<br /><b>" + forbiddenMsg + "</b>");
}
else if (e.status === 444) {
else if (e !== null && e.status === 444) {
$("#MessageModalContent").removeClass("modal-content-error");
$("#MessageModalContent").addClass("modal-content-info");
$("#MessageModalTitle").text("");
$("#spanMessageText").text(expiredMsg);
}
else if (e.responseText !== null) {
if (e.responseText !== "") {
else if (e !== null && e.responseText !== null) {
if (e !== null && e.responseText !== "") {
try {
wsError = jQuery.parseJSON(e.responseText);
if (wsError.Message !== null)
@ -95,7 +95,7 @@ function DisplayWSMessage(severity, description, e, ex) {
else {
var msg = description + "\r\n";
if (e.responseText !== null) {
if (e !== null && e.responseText !== null) {
if (e.responseText !== "") {
wsError = jQuery.parseJSON(e.responseText);
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;
alert(msg);

View File

@ -217,12 +217,16 @@ function loadHeaderGridRunInfo() {
function disableHeaderButtonsRunInfo() {
$("#GetDataButton").prop("disabled", true);
$("#ReviewButton").prop("disabled", true);
$("#RecipeParametersButton").prop("disabled", true);
$("#ViewButton").prop("disabled", true);
$("#PinButton").prop("disabled", true);
}
function enableHeaderButtonsRunInfo() {
$("#GetDataButton").prop("disabled", false);
$("#ReviewButton").prop("disabled", false);
$("#RecipeParametersButton").prop("disabled", false);
$("#ViewButton").prop("disabled", false);
$("#PinButton").prop("disabled", false);
}
@ -459,10 +463,139 @@ 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/apidev/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].DiluentAdjParam + "\t" + data.rds.rdsLayers[i].DopantFlow + "\t" + data.rds.rdsLayers[i].HCLFlow + "\t" + data.rds.rdsLayers[i].BakeTime + "\t" + data.rds.rdsLayers[i].EpiH2Flow + "\t" + data.rds.rdsLayers[i].TCSFlow + "\t" + data.rds.rdsLayers[i].DCSFlow + "\t" + data.rds.rdsLayers[i].FOffset + "\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: "DopantFlow", key: "DopantFlow", dataType: "number", width: "10%" },
// { headerText: "HCLFlow", key: "HCLFlow", dataType: "string", width: "10%" },
// { headerText: "BakeTime", key: "BakeTime", dataType: "string", width: "10%" },
// { headerText: "DCSFlow", key: "DCSFlow", dataType: "string", width: "10%" },
// { headerText: "FOffset", key: "FOffset", 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() {
var toolTypeId = $("#ToolTypeID").text();
var selectedRow = $("#HeaderGrid").data("igGridSelection").selectedRow();
if (selectedRow !== null) {
loadDetailsRunInfo();
$("#PinButton").prop("disabled", true);
var rowData = $("#HeaderGrid").data("igGrid").dataSource.dataView()[selectedRow.index];
var stringified = JSON.stringify(rowData);
@ -474,10 +607,13 @@ function pinButtonRunInfo() {
url: _apiUrl + '/pin/' + toolTypeId + "/markAsPinned",
data: jsonObject,
success: function (e) {
var gridCreated = $("#ModalBodyGrid").data("igGrid");
if (gridCreated)
$("#ModalBodyGrid").igGrid("destroy");
DisplayWSMessage("info", "Marked as pinned", e);
// DisplayWSMessage("info", stringified, e);
$("#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({
dataSource: data,
features: [
@ -604,6 +740,8 @@ function initRunInfo(apiUrl, initialToolTypeID, initialHeaderId, initialHeaderAt
$("#LoadHeadersButton").click(loadHeaderGridRunInfo);
$("#GetDataButton").click(loadDetailsRunInfo);
$("#ReviewButton").click(reviewButtonRunInfo);
$("#RecipeParametersButton").click(recipeParametersButtonRunInfo);
$("#ViewButton").click(viewButtonRunInfo);
$("#PinButton").click(pinButtonRunInfo);
$("#OIExportButton").click(oiExportButtonRunInfo);
setInterval(function () {
@ -632,6 +770,6 @@ function copy() {
copyText.select();
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);
}