Ready to demo
This commit is contained in:
0
Server/.vscode/settings.json
vendored
Normal file
0
Server/.vscode/settings.json
vendored
Normal file
2
Server/.vscode/tasks.json
vendored
2
Server/.vscode/tasks.json
vendored
@ -44,7 +44,7 @@
|
||||
"args": [
|
||||
"watch",
|
||||
"--launch-profile",
|
||||
"https",
|
||||
"http",
|
||||
"run",
|
||||
"--project",
|
||||
"${workspaceFolder}/OI.Metrology.Server.csproj",
|
||||
|
@ -50,11 +50,11 @@ public class PinRepository : IPinRepository
|
||||
return new(bioRadHeader, cdeHeader);
|
||||
}
|
||||
|
||||
private static Pinned? GetPinned(IMetrologyRepository metrologyRepository, HeaderCommon bioRadHeader, int points, int column)
|
||||
private static Pinned? GetPinned(IMetrologyRepository metrologyRepository, HeaderCommon headerCommon, int points, int column)
|
||||
{
|
||||
Pinned? result;
|
||||
List<string> values;
|
||||
System.Data.DataTable dataTable = metrologyRepository.GetData((int)bioRadHeader.ToolTypeID, bioRadHeader.ID);
|
||||
System.Data.DataTable dataTable = metrologyRepository.GetData((int)headerCommon.ToolTypeID, headerCommon.ID);
|
||||
if (dataTable.Rows.Count <= points || dataTable.Columns.Count <= column)
|
||||
result = null;
|
||||
else
|
||||
@ -69,7 +69,7 @@ public class PinRepository : IPinRepository
|
||||
if (values.Count <= points)
|
||||
result = null;
|
||||
else
|
||||
result = new(bioRadHeader, values);
|
||||
result = new(headerCommon, values);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -92,7 +92,7 @@ public class PinRepository : IPinRepository
|
||||
{
|
||||
const int points = 9;
|
||||
List<Pinned> results = new();
|
||||
(HeaderCommon? cdeHeader, HeaderCommon? bioRadHeader) = GetBoth(rds, bioRadId, cdeId);
|
||||
(HeaderCommon? bioRadHeader, HeaderCommon? cdeHeader) = GetBoth(rds, bioRadId, cdeId);
|
||||
if (bioRadHeader is not null)
|
||||
{
|
||||
const int thickness = 5;
|
||||
|
@ -1,6 +1,8 @@
|
||||
{
|
||||
"ApiUrl": "http://messa010ec.ec.local:50301/api",
|
||||
"ConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;",
|
||||
"xApiUrl": "http://messa010ec.ec.local:50301/api",
|
||||
"ApiUrl": "http://localhost:5126/api",
|
||||
"ConnectionString": "Data Source=messv01ec.ec.local\\PROD1,53959;Integrated Security=True;Initial Catalog=Metrology;",
|
||||
"xConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;",
|
||||
"IsDevelopment": true,
|
||||
"xMockRoot": "/Data/Tests",
|
||||
"MockRoot": "",
|
||||
|
@ -123,9 +123,17 @@ function ConstructMessageDialog() {
|
||||
' <span id="spanMessageText"></span> ' +
|
||||
' <table id="ModalHeaderGrid"></table> ' +
|
||||
' <table id="ModalBodyGrid"></table> ' +
|
||||
' <textarea type="text" value="Hello World" id="textareaClipboard" style="display:none"></textarea> ' +
|
||||
' </div> ' +
|
||||
' <div class="modal-footer"> ' +
|
||||
' <button type="button" data-dismiss="modal">OK</button> ' +
|
||||
' <div class="row" style="margin-top: 10px; margin-bottom: 20px;"> ' +
|
||||
' <div class="col-xs-1"> ' +
|
||||
' <button type="button" data-dismiss="modal" onclick="copy()">Copy</button> ' +
|
||||
' </div> ' +
|
||||
' <div class="col-xs-1"> ' +
|
||||
' <button type="button" data-dismiss="modal">OK</button> ' +
|
||||
' </div> ' +
|
||||
' </div> ' +
|
||||
' </div> ' +
|
||||
' </div> ' +
|
||||
'</div>';
|
||||
|
@ -465,14 +465,19 @@ function pinButtonRunInfo() {
|
||||
if (selectedRow !== null) {
|
||||
$("#PinButton").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);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://localhost:5126/api" + '/pin/' + toolTypeId + "/markAsPinned",
|
||||
data: rowData,
|
||||
url: _apiUrl + '/pin/' + toolTypeId + "/markAsPinned",
|
||||
data: jsonObject,
|
||||
success: function (e) {
|
||||
DisplayWSMessage("info", "Marked as pinned", e);
|
||||
// DisplayWSMessage("info", stringified, e);
|
||||
$("#PinButton").prop("disabled", false);
|
||||
$.getJSON("http://localhost:5126/api" + '/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=" + rowData.RDS, function (data) {
|
||||
$("#ModalHeaderGrid").igGrid({
|
||||
dataSource: data,
|
||||
features: [
|
||||
@ -481,6 +486,7 @@ function pinButtonRunInfo() {
|
||||
columns: [
|
||||
{ key: "ID", dataType: "number", hidden: true, },
|
||||
{ key: "ToolTypeID", dataType: "number", hidden: true, },
|
||||
{ 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%" },
|
||||
@ -489,6 +495,11 @@ function pinButtonRunInfo() {
|
||||
],
|
||||
responseDataKey: "Results",
|
||||
});
|
||||
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";
|
||||
}
|
||||
$("#textareaClipboard").val(text);
|
||||
$("#ModalBodyGrid").igGrid({
|
||||
dataSource: data,
|
||||
features: [
|
||||
@ -497,14 +508,15 @@ function pinButtonRunInfo() {
|
||||
columns: [
|
||||
{ key: "ID", dataType: "number", hidden: true, },
|
||||
{ key: "ToolTypeID", dataType: "number", hidden: true, },
|
||||
{ key: "PointA", dataType: "number", width: "10%" },
|
||||
{ key: "PointB", dataType: "number", width: "10%" },
|
||||
{ key: "PointC", dataType: "number", width: "10%" },
|
||||
{ key: "PointD", dataType: "number", width: "10%" },
|
||||
{ key: "PointE", dataType: "number", width: "10%" },
|
||||
{ key: "PointF", dataType: "number", width: "10%" },
|
||||
{ key: "PointG", dataType: "number", width: "10%" },
|
||||
{ key: "PointI", dataType: "number", width: "10%" },
|
||||
{ headerText: "Point 1", key: "Point1", dataType: "number", width: "10%" },
|
||||
{ headerText: "Point 2", key: "Point2", dataType: "number", width: "10%" },
|
||||
{ headerText: "Point 3", key: "Point3", dataType: "number", width: "10%" },
|
||||
{ headerText: "Point 4", key: "Point4", dataType: "number", width: "10%" },
|
||||
{ headerText: "Point 5", key: "Point5", dataType: "number", width: "10%" },
|
||||
{ headerText: "Point 6", key: "Point6", dataType: "number", width: "10%" },
|
||||
{ headerText: "Point 7", key: "Point7", dataType: "number", width: "10%" },
|
||||
{ headerText: "Point 8", key: "Point8", dataType: "number", width: "10%" },
|
||||
{ headerText: "Point 9", key: "Point9", dataType: "number", width: "10%" },
|
||||
],
|
||||
responseDataKey: "Results",
|
||||
});
|
||||
@ -611,4 +623,15 @@ function triggerFileDownload(fileName, url) {
|
||||
}
|
||||
|
||||
function initIndex() {
|
||||
}
|
||||
|
||||
function copy() {
|
||||
var copyText = document.getElementById("textareaClipboard");
|
||||
|
||||
// Select the text field
|
||||
copyText.select();
|
||||
copyText.setSelectionRange(0, 99999); // For mobile devices
|
||||
|
||||
// Copy the text inside the text field
|
||||
navigator.clipboard.writeText(copyText.value);
|
||||
}
|
Reference in New Issue
Block a user