OpenInsightApplicationProgrammingInterface
This commit is contained in:
parent
9717fcb3bf
commit
f54b93c0d6
@ -6,10 +6,18 @@ trigger:
|
|||||||
include:
|
include:
|
||||||
- "Server/*"
|
- "Server/*"
|
||||||
|
|
||||||
|
variables:
|
||||||
|
BuildConfiguration: "Release"
|
||||||
|
NugetSource: "https://eaf-prod.mes.infineon.com/v3/index.json"
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: Unity4
|
||||||
|
displayName: Unity4
|
||||||
pool:
|
pool:
|
||||||
name: Mesa-Linux
|
name: Mesa-Linux
|
||||||
demands: Barcode-Host
|
demands: Barcode-Host-Unity4
|
||||||
|
jobs:
|
||||||
|
- job: Unity4
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
echo $(Build.BuildId)
|
echo $(Build.BuildId)
|
||||||
@ -31,7 +39,7 @@ steps:
|
|||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Safe storage of app secrets - Server"
|
displayName: "Safe storage of app secrets - Server"
|
||||||
|
|
||||||
- script: "dotnet build --configuration Release --source https://eaf-prod.mes.infineon.com/v3/index.json"
|
- script: "dotnet build --configuration $(BuildConfiguration) --source $(NugetSource)"
|
||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Core Build - Server"
|
displayName: "Core Build - Server"
|
||||||
|
|
||||||
@ -39,10 +47,60 @@ steps:
|
|||||||
displayName: "stop barcode-host service"
|
displayName: "stop barcode-host service"
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
- script: "dotnet publish --configuration Release --output ~/Barcode-Host-$(Build.SourceVersion)-$(Build.BuildId)-Release --source https://eaf-prod.mes.infineon.com/v3/index.json"
|
- script: "dotnet publish --configuration $(BuildConfiguration) --output ~/Barcode-Host-$(Build.SourceVersion)-$(Build.BuildId)-$(BuildConfiguration)/Server --source $(NugetSource)"
|
||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Core Publish - Server"
|
displayName: "Core Publish - Server"
|
||||||
|
|
||||||
- script: "systemctl start barcode-host.service"
|
- script: "systemctl start barcode-host.service"
|
||||||
displayName: "start barcode-host service"
|
displayName: "start barcode-host service"
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
- script: "echo ln -s /home/$USER/Barcode-Host-$(Build.SourceVersion)-$(Build.BuildId)-$(BuildConfiguration)/Server /var/www/Barcode-Host/Server"
|
||||||
|
displayName: "Echo Symbolic Link Command"
|
||||||
|
|
||||||
|
- stage: Unity5
|
||||||
|
displayName: Unity5
|
||||||
|
pool:
|
||||||
|
name: Mesa-Linux
|
||||||
|
demands: Barcode-Host-Unity5
|
||||||
|
jobs:
|
||||||
|
- job: Unity5
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
echo $(Build.BuildId)
|
||||||
|
echo $(Build.Reason)
|
||||||
|
echo $(Build.Repository.Id)
|
||||||
|
echo $(Build.Repository.Name)
|
||||||
|
echo $(Build.SourceVersion)
|
||||||
|
displayName: "Echo Check"
|
||||||
|
|
||||||
|
- script: "dotnet nuget locals all --clear"
|
||||||
|
displayName: "Nuget Clear"
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
dotnet user-secrets init
|
||||||
|
dotnet user-secrets set "BuildNumber" "$(Build.BuildId)"
|
||||||
|
dotnet user-secrets set "BuildSourceVersion" "$(Build.SourceVersion)"
|
||||||
|
dotnet user-secrets list
|
||||||
|
workingDirectory: Server
|
||||||
|
displayName: "Safe storage of app secrets - Server"
|
||||||
|
|
||||||
|
- script: "dotnet build --configuration $(BuildConfiguration) --source $(NugetSource)"
|
||||||
|
workingDirectory: Server
|
||||||
|
displayName: "Core Build - Server"
|
||||||
|
|
||||||
|
- script: "systemctl stop barcode-host.service"
|
||||||
|
displayName: "stop barcode-host service"
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- script: "dotnet publish --configuration $(BuildConfiguration) --output ~/Barcode-Host-$(Build.SourceVersion)-$(Build.BuildId)-$(BuildConfiguration)/Server --source $(NugetSource)"
|
||||||
|
workingDirectory: Server
|
||||||
|
displayName: "Core Publish - Server"
|
||||||
|
|
||||||
|
- script: "systemctl start barcode-host.service"
|
||||||
|
displayName: "start barcode-host service"
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- script: "echo ln -s /home/$USER/Barcode-Host-$(Build.SourceVersion)-$(Build.BuildId)-$(BuildConfiguration)/Server /var/www/Barcode-Host/Server"
|
||||||
|
displayName: "Echo Symbolic Link Command"
|
||||||
|
@ -18,6 +18,7 @@ public record AppSettings(string BuildNumber,
|
|||||||
string MonAResource,
|
string MonAResource,
|
||||||
string MonASite,
|
string MonASite,
|
||||||
int NotifyMinimum,
|
int NotifyMinimum,
|
||||||
|
string OpenInsightApplicationProgrammingInterface,
|
||||||
string PostTo,
|
string PostTo,
|
||||||
int PostToEvery,
|
int PostToEvery,
|
||||||
string RootPassword,
|
string RootPassword,
|
||||||
|
@ -24,6 +24,7 @@ public class AppSettings
|
|||||||
[Display(Name = "MonA Resource"), Required] public string MonAResource { get; set; }
|
[Display(Name = "MonA Resource"), Required] public string MonAResource { get; set; }
|
||||||
[Display(Name = "MonA Site"), Required] public string MonASite { get; set; }
|
[Display(Name = "MonA Site"), Required] public string MonASite { get; set; }
|
||||||
[Display(Name = "Notify Minimum"), Required] public int? NotifyMinimum { 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 = "PostTo"), Required] public string PostTo { get; set; }
|
||||||
[Display(Name = "Post to Every"), Required] public int? PostToEvery { get; set; }
|
[Display(Name = "Post to Every"), Required] public int? PostToEvery { get; set; }
|
||||||
[Display(Name = "RootPassword"), Required] public string RootPassword { get; set; }
|
[Display(Name = "RootPassword"), Required] public string RootPassword { get; set; }
|
||||||
@ -48,6 +49,8 @@ public class AppSettings
|
|||||||
throw new NullReferenceException(nameof(appSettings));
|
throw new NullReferenceException(nameof(appSettings));
|
||||||
if (appSettings.BuildNumber is null)
|
if (appSettings.BuildNumber is null)
|
||||||
throw new NullReferenceException(nameof(BuildNumber));
|
throw new NullReferenceException(nameof(BuildNumber));
|
||||||
|
if (appSettings.BuildSourceVersion is null)
|
||||||
|
throw new NullReferenceException(nameof(BuildSourceVersion));
|
||||||
if (appSettings.ClearLastScanServiceAfter is null)
|
if (appSettings.ClearLastScanServiceAfter is null)
|
||||||
throw new NullReferenceException(nameof(ClearLastScanServiceAfter));
|
throw new NullReferenceException(nameof(ClearLastScanServiceAfter));
|
||||||
if (appSettings.Company is null)
|
if (appSettings.Company is null)
|
||||||
@ -62,8 +65,6 @@ public class AppSettings
|
|||||||
throw new NullReferenceException(nameof(ExpectedScanLengthB));
|
throw new NullReferenceException(nameof(ExpectedScanLengthB));
|
||||||
if (appSettings.FileShare is null)
|
if (appSettings.FileShare is null)
|
||||||
throw new NullReferenceException(nameof(FileShare));
|
throw new NullReferenceException(nameof(FileShare));
|
||||||
if (appSettings.BuildSourceVersion is null)
|
|
||||||
throw new NullReferenceException(nameof(BuildSourceVersion));
|
|
||||||
if (appSettings.IsDevelopment is null)
|
if (appSettings.IsDevelopment is null)
|
||||||
throw new NullReferenceException(nameof(IsDevelopment));
|
throw new NullReferenceException(nameof(IsDevelopment));
|
||||||
if (appSettings.IsStaging is null)
|
if (appSettings.IsStaging is null)
|
||||||
@ -78,6 +79,8 @@ public class AppSettings
|
|||||||
throw new NullReferenceException(nameof(MonASite));
|
throw new NullReferenceException(nameof(MonASite));
|
||||||
if (appSettings.NotifyMinimum is null)
|
if (appSettings.NotifyMinimum is null)
|
||||||
throw new NullReferenceException(nameof(NotifyMinimum));
|
throw new NullReferenceException(nameof(NotifyMinimum));
|
||||||
|
if (appSettings.OpenInsightApplicationProgrammingInterface is null)
|
||||||
|
throw new NullReferenceException(nameof(OpenInsightApplicationProgrammingInterface));
|
||||||
if (appSettings.PostTo is null)
|
if (appSettings.PostTo is null)
|
||||||
throw new NullReferenceException(nameof(PostTo));
|
throw new NullReferenceException(nameof(PostTo));
|
||||||
if (appSettings.PostToEvery is null)
|
if (appSettings.PostToEvery is null)
|
||||||
@ -111,6 +114,7 @@ public class AppSettings
|
|||||||
appSettings.MonAResource,
|
appSettings.MonAResource,
|
||||||
appSettings.MonASite,
|
appSettings.MonASite,
|
||||||
appSettings.NotifyMinimum.Value,
|
appSettings.NotifyMinimum.Value,
|
||||||
|
appSettings.OpenInsightApplicationProgrammingInterface,
|
||||||
appSettings.PostTo,
|
appSettings.PostTo,
|
||||||
appSettings.PostToEvery.Value,
|
appSettings.PostToEvery.Value,
|
||||||
appSettings.RootPassword,
|
appSettings.RootPassword,
|
||||||
|
@ -50,10 +50,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var appSettings = JSON.parse('@(System.Text.Json.JsonSerializer.Serialize(this.Model.AppSettings))');
|
var appSettings = JSON.parse('@(Html.Raw(System.Text.Json.JsonSerializer.Serialize(this.Model.AppSettings)))');
|
||||||
console.log(appSettings.BuildSourceVersion);
|
console.log(appSettings.BuildSourceVersion);
|
||||||
console.log(appSettings.BuildNumber);
|
console.log(appSettings.BuildNumber);
|
||||||
console.log(appSettings);
|
|
||||||
</script>
|
</script>
|
||||||
<script src="~/js/signalr/dist/browser/signalr.js?dateTime=2023-07-26---12-08-00"></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/notification.js?dateTime=2023-07-26---12-08-00"></script>
|
@ -7,13 +7,9 @@ public class NotificationModel : PageModel
|
|||||||
{
|
{
|
||||||
|
|
||||||
public AppSettings AppSettings { get; }
|
public AppSettings AppSettings { get; }
|
||||||
private readonly ILogger<NotificationModel> _Logger;
|
|
||||||
|
|
||||||
public NotificationModel(ILogger<NotificationModel> logger, AppSettings appSettings)
|
public NotificationModel(AppSettings appSettings) =>
|
||||||
{
|
|
||||||
_Logger = logger;
|
|
||||||
AppSettings = appSettings;
|
AppSettings = appSettings;
|
||||||
}
|
|
||||||
|
|
||||||
public void OnGet()
|
public void OnGet()
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"BuildNumber": "1",
|
"BuildNumber": "1",
|
||||||
|
"BuildSourceVersion": "1234567",
|
||||||
"Company": "Infineon Technologies Americas Corp.",
|
"Company": "Infineon Technologies Americas Corp.",
|
||||||
"ClearLastScanServiceAfter": 250,
|
"ClearLastScanServiceAfter": 250,
|
||||||
"DeviceNameEndsWith": "Symbol Bar Code Scanner",
|
"DeviceNameEndsWith": "Symbol Bar Code Scanner",
|
||||||
@ -8,7 +9,6 @@
|
|||||||
"ExpectedScanLengthB": 14,
|
"ExpectedScanLengthB": 14,
|
||||||
"ExpectedScanLengthBExample": "1TO172125.1.11",
|
"ExpectedScanLengthBExample": "1TO172125.1.11",
|
||||||
"FileShare": "",
|
"FileShare": "",
|
||||||
"GitCommitSeven": "1234567",
|
|
||||||
"LinuxDevicePath": "/proc/bus/input/devices",
|
"LinuxDevicePath": "/proc/bus/input/devices",
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
@ -24,6 +24,7 @@
|
|||||||
"MockRoot": "",
|
"MockRoot": "",
|
||||||
"MonAResource": "OI_Metrology_Viewer_EC",
|
"MonAResource": "OI_Metrology_Viewer_EC",
|
||||||
"MonASite": "auc",
|
"MonASite": "auc",
|
||||||
|
"OpenInsightApplicationProgrammingInterface": "https://oi-prod-ec-api.mes.infineon.com/api/oiWizard",
|
||||||
"PostTo": "",
|
"PostTo": "",
|
||||||
"PostToEvery": 1000,
|
"PostToEvery": 1000,
|
||||||
"SerialPortName": "/dev/ttyUSB0",
|
"SerialPortName": "/dev/ttyUSB0",
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
console.log(appSettings.OpenInsightApplicationProgrammingInterface);
|
||||||
|
|
||||||
var connection = new signalR.HubConnectionBuilder()
|
var connection = new signalR.HubConnectionBuilder()
|
||||||
.withUrl("/NotificationHub")
|
.withUrl("/NotificationHub")
|
||||||
.build();
|
.build();
|
||||||
@ -35,12 +37,9 @@ connection.on("NotifyAll", function (data) {
|
|||||||
if (postResult.Recipe != "Recipe") {
|
if (postResult.Recipe != "Recipe") {
|
||||||
document.getElementById("recipe").innerText = postResult.Recipe;
|
document.getElementById("recipe").innerText = postResult.Recipe;
|
||||||
} else {
|
} else {
|
||||||
$.getJSON(
|
$.getJSON(appSettings.OpenInsightApplicationProgrammingInterface + "/materials/rds/" + postResult.LotName,
|
||||||
"https://oi-prod-ec-api.mes.infineon.com/api/oiWizard/materials/rds/" +
|
|
||||||
postResult.LotName,
|
|
||||||
function (data) {
|
function (data) {
|
||||||
document.getElementById("recipe").innerText =
|
document.getElementById("recipe").innerText = data.rds.rdsLayers.length;
|
||||||
data.rds.rdsLayers.length;
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user