Added View, Recipe Paramaters and Export
This commit is contained in:
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]
|
||||
[Route("{tooltype}")]
|
||||
public IActionResult Data(string tooltype, [FromBody] JToken jsonbody)
|
||||
public IActionResult Post(string tooltype, [FromBody] JToken jsonbody)
|
||||
{
|
||||
IPAddress? remoteIP = HttpContext.Connection.RemoteIpAddress;
|
||||
if (!_InboundRepository.IsIPAddressAllowed(_AppSettings.InboundApiAllowedIPList, remoteIP))
|
||||
@ -42,6 +42,18 @@ public partial class InboundController : ControllerBase, IInboundController<IAct
|
||||
}
|
||||
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);
|
||||
if (!dataResponse.Errors.Any())
|
||||
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;
|
||||
|
||||
public record AppSettings(string ApiLoggingContentTypes,
|
||||
public record AppSettings(string ApiExportPath,
|
||||
string ApiLoggingContentTypes,
|
||||
string ApiLoggingPathPrefixes,
|
||||
string ApiLogPath,
|
||||
string ApiUrl,
|
||||
|
@ -8,6 +8,7 @@ public class AppSettings
|
||||
|
||||
#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 Path Prefixes"), Required] public string ApiLoggingPathPrefixes { get; set; }
|
||||
[Display(Name = "Api Log Path"), Required] public string ApiLogPath { get; set; }
|
||||
@ -41,6 +42,8 @@ public class AppSettings
|
||||
Models.AppSettings result;
|
||||
if (appSettings is null)
|
||||
throw new NullReferenceException(nameof(appSettings));
|
||||
if (appSettings.ApiExportPath is null)
|
||||
throw new NullReferenceException(nameof(ApiExportPath));
|
||||
if (appSettings.ApiLoggingContentTypes is null)
|
||||
throw new NullReferenceException(nameof(ApiLoggingContentTypes));
|
||||
if (appSettings.ApiLoggingPathPrefixes is null)
|
||||
@ -80,6 +83,7 @@ public class AppSettings
|
||||
if (appSettings.WorkingDirectoryName is null)
|
||||
throw new NullReferenceException(nameof(WorkingDirectoryName));
|
||||
result = new(
|
||||
appSettings.ApiExportPath,
|
||||
appSettings.ApiLoggingContentTypes,
|
||||
appSettings.ApiLoggingPathPrefixes,
|
||||
appSettings.ApiLogPath,
|
||||
|
@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup Label="Globals">
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
@ -13,6 +13,7 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<UserSecretsId>6501aa0f-8499-4be5-96a9-e99b11323eeb</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="logs\**" />
|
||||
@ -76,6 +77,18 @@
|
||||
<None Include="Data\Tests\ClientSettings-GetIpAddress.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</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">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
@ -76,6 +76,7 @@ public class Program
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSRepository, InfinityQSRepository>(_ => 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<IInboundDataService, InboundDataService>();
|
||||
_ = 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">
|
||||
<input type="button" class="btn" id="ReviewButton" value="Review" disabled />
|
||||
</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">
|
||||
<input type="button" class="btn" id="PinButton" value="Pin" disabled />
|
||||
</div>
|
||||
|
@ -1,14 +1,9 @@
|
||||
{
|
||||
"xApiUrl": "~/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;",
|
||||
"ApiExportPath": "\\\\messdv002.na.infineon.com\\Candela\\Archive\\API",
|
||||
"ApiUrl": "~/api",
|
||||
"ConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;",
|
||||
"IsDevelopment": true,
|
||||
"xMockRoot": "",
|
||||
"MockRoot": "/Data/Tests",
|
||||
"MockRoot": "",
|
||||
"MonAResource": "OI_Metrology_Viewer_IFX",
|
||||
"Oi2SqlConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;",
|
||||
"Serilog": {
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"AllowedHosts": "*",
|
||||
"ApiExportPath": "\\\\messv02ecc1.ec.local\\EC_Metrology_Si\\Archive\\API",
|
||||
"ApiLoggingContentTypes": "application/json",
|
||||
"ApiLoggingPathPrefixes": "/api/inbound",
|
||||
"ApiUrl": "~/api",
|
||||
|
@ -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);
|
||||
|
@ -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,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() {
|
||||
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 +619,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: [
|
||||
@ -497,7 +645,17 @@ function pinButtonRunInfo() {
|
||||
});
|
||||
var text = "";
|
||||
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);
|
||||
$("#ModalBodyGrid").igGrid({
|
||||
@ -604,6 +762,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 +792,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);
|
||||
}
|
Reference in New Issue
Block a user