This commit is contained in:
Mike Phares 2023-07-27 12:37:24 -07:00
parent 0111a25e69
commit 9717fcb3bf
37 changed files with 425 additions and 43 deletions

View File

@ -19,23 +19,24 @@ dateFormat: mm/dd
## In Progress
- [post-only-once](tasks/post-only-once.md)
- [publish](tasks/publish.md)
- [roll-out](tasks/roll-out.md)
- [self-signed-certificate](tasks/self-signed-certificate.md)
- [azure-pipeline](tasks/azure-pipeline.md)
- [update-os](tasks/update-os.md)
- [self-signed-certificate](tasks/self-signed-certificate.md)
- [roll-out](tasks/roll-out.md)
- [publish](tasks/publish.md)
- [post-only-once](tasks/post-only-once.md)
## Done
- [configure-ufw](tasks/configure-ufw.md)
- [create-as-service](tasks/create-as-service.md)
- [install-net-7-0](tasks/install-net-7-0.md)
- [install-ubuntu-frame](tasks/install-ubuntu-frame.md)
- [install-vscode-extensions](tasks/install-vscode-extensions.md)
- [pull-repo](tasks/pull-repo.md)
- [run-secrets-task](tasks/run-secrets-task.md)
- [run-test-ports](tasks/run-test-ports.md)
- [setup-nginx](tasks/setup-nginx.md)
- [run-test-ports](tasks/run-test-ports.md)
- [run-secrets-task](tasks/run-secrets-task.md)
- [pull-repo](tasks/pull-repo.md)
- [install-vscode-extensions](tasks/install-vscode-extensions.md)
- [install-ubuntu-frame](tasks/install-ubuntu-frame.md)
- [install-net-7-0](tasks/install-net-7-0.md)
- [create-as-service](tasks/create-as-service.md)
- [configure-ufw](tasks/configure-ufw.md)
## Archive

View File

@ -1,4 +1,8 @@
---
status: "1-Backlog"
created: "2023-06-23T22:41:35.812Z"
updated: "2023-07-27T18:05:52.706Z"
type: "kanbn"
---
# apt-get-install

View File

@ -0,0 +1,55 @@
---
created: "2023-07-27T18:04:46.640Z"
updated: "2023-07-27T18:05:52.731Z"
assigned: ""
progress: 0
started: "2023-07-27T18:04:48.076Z"
status: "3-In Progress"
type: "kanbn"
---
# Azure Pipeline
```bash
pscp D:/Tmp/phares/ag/vsts-agent-linux-x64-2.210.1.tar.gz unity4@unity4:/home/unity4/vsts-agent-linux-x64-2.210.1.tar.gz
pscp D:/Tmp/phares/ag/vsts-agent-linux-x64-2.210.1.tar.gz unity5@unity5:/home/unity5/vsts-agent-linux-x64-2.210.1.tar.gz
```
```bash
mv vsts-agent-linux-x64-2.210.1.tar.gz vsts-agent-linux-x64-2.210.1-unity4
cd vsts-agent-linux-x64-2.210.1-unity4
tar xvzf vsts-agent-linux-x64-2.210.1.tar.gz
chown unity4 /home/unity4/vsts-agent-linux-x64-2.210.1-unity4 -R
chgrp unity4 /home/unity4/vsts-agent-linux-x64-2.210.1-unity4 -R
./config.sh --url https://tfs.intra.infineon.com/tfs/manufacturingit --pool Mesa-Linux --auth negotiate --userName infineon@phares
./config.sh --url https://tfs.intra.infineon.com/tfs/manufacturingit --pool Mesa-Linux --auth pat --token asdf
```
```bash
sudo -i
echo >/etc/systemd/system/vsts-agent-linux.service && nano /etc/systemd/system/vsts-agent-linux.service
```
```conf
[Unit]
Description=vsts-agent-linux
After=multi-user.target
[Service]
User=unity4
WorkingDirectory= /home/unity4/vsts-agent-linux-x64-2.210.1-unity4
ExecStart=/home/unity4/vsts-agent-linux-x64-2.210.1-unity4/run.sh
Restart=always
[Install]
WantedBy=multi-user.target
```
```bash
systemctl daemon-reload
systemctl enable vsts-agent-linux.service
systemctl start vsts-agent-linux.service
systemctl status vsts-agent-linux.service
systemctl stop vsts-agent-linux.service
journalctl -fu vsts-agent-linux.service
journalctl --rotate
journalctl --vacuum-time=1s
```

View File

@ -1,4 +1,8 @@
---
status: "4-Done"
created: "2023-07-25T17:31:10.375Z"
updated: "2023-07-27T18:05:52.733Z"
type: "kanbn"
---
# configure-ufw
@ -36,6 +40,7 @@ ufw enable
ufw status numbered
ufw disable
```
```conf
Status: active

View File

@ -1,4 +1,8 @@
---
status: "4-Done"
created: "2023-06-06T02:52:34.344Z"
updated: "2023-07-27T18:05:52.738Z"
type: "kanbn"
---
# Create as Service
@ -7,6 +11,7 @@
sudo -i
echo >/etc/systemd/system/barcode-host.service && nano /etc/systemd/system/barcode-host.service
```
```conf
[Unit]
Description=Barcode Server
@ -22,6 +27,7 @@ Environment=ASPNETCORE_ENVIRONMENT=Production
[Install]
WantedBy=multi-user.target
```
```bash
systemctl daemon-reload
systemctl enable barcode-host.service

View File

@ -1,9 +1,14 @@
---
status: "2-Todo"
created: "2023-07-25T17:33:20.243Z"
updated: "2023-07-27T18:05:52.708Z"
type: "kanbn"
---
# epi-pro-scan
```bash
```
## Sub-tasks

View File

@ -1,4 +1,8 @@
---
status: "4-Done"
created: "2023-06-06T02:52:34.346Z"
updated: "2023-07-27T18:05:52.739Z"
type: "kanbn"
---
# Install .net 7.0

View File

@ -1,4 +1,8 @@
---
status: "4-Done"
created: "2023-06-06T02:52:34.347Z"
updated: "2023-07-27T18:05:52.740Z"
type: "kanbn"
---
# install-ubuntu-frame

View File

@ -1,4 +1,8 @@
---
status: "4-Done"
created: "2023-06-06T02:52:34.348Z"
updated: "2023-07-27T18:05:52.741Z"
type: "kanbn"
---
# install-vscode-extensions

View File

@ -1,4 +1,8 @@
---
status: "1-Backlog"
created: "2023-06-23T22:41:35.814Z"
updated: "2023-07-27T18:05:52.707Z"
type: "kanbn"
---
# netplan
@ -6,6 +10,7 @@
```bash
ip link
```
```echo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
@ -13,12 +18,14 @@ ip link
link/ether 6c:0b:84:e3:94:11 brd ff:ff:ff:ff:ff:ff
altname enp0s31f6
```
```bash
https://ubuntu.com/server/docs/network-configuration
ip a
ip address show eno1
echo >/etc/netplan/99_config.yaml && nano /etc/netplan/99_config.yaml
```
```bash
network:
version: 2
@ -33,6 +40,7 @@ network:
nameservers:
addresses: [192.168.0.1, 8.8.8.8, 4.4.4.4]
```
```bash
network:
version: 2
@ -47,11 +55,13 @@ network:
nameservers:
addresses: [192.168.0.1, 8.8.8.8, 4.4.4.4]
```
```bash
netplan apply
ip addr flush eno1
# soft reset
```
```bash
network:
version: 2
@ -66,6 +76,7 @@ network:
nameservers:
addresses: [10.95.128.11, 10.64.152.171, 8.8.8.8, 4.4.4.4]
```
```bash
network:
version: 2

View File

@ -1,4 +1,8 @@
---
status: "3-In Progress"
created: "2023-07-25T17:33:20.245Z"
updated: "2023-07-27T18:05:52.709Z"
type: "kanbn"
---
# post-only-once

View File

@ -1,4 +1,8 @@
---
status: "3-In Progress"
created: "2023-07-25T17:31:10.379Z"
updated: "2023-07-27T18:05:52.711Z"
type: "kanbn"
---
# publish

View File

@ -1,4 +1,8 @@
---
status: "4-Done"
created: "2023-06-06T02:52:34.351Z"
updated: "2023-07-27T18:05:52.742Z"
type: "kanbn"
---
# Pull Repo

View File

@ -1,4 +1,8 @@
---
status: "3-In Progress"
created: "2023-06-08T20:40:12.526Z"
updated: "2023-07-27T18:05:52.712Z"
type: "kanbn"
---
# roll-out

View File

@ -1,4 +1,8 @@
---
status: "4-Done"
created: "2023-07-25T18:25:05.485Z"
updated: "2023-07-27T18:05:52.743Z"
type: "kanbn"
---
# run-secrets-task

View File

@ -1,4 +1,8 @@
---
status: "4-Done"
created: "2023-06-06T02:52:34.353Z"
updated: "2023-07-27T18:05:52.744Z"
type: "kanbn"
---
# run-test-ports
@ -6,9 +10,11 @@
```bash
ls -l /dev/ttyUSB*
```
```echo
# crw-rw---- 1 root dialout 188, 0 Jun 3 14:54 /dev/ttyUSB0
```
```bash
sudo -i
adduser unity4 dialout

View File

@ -1,4 +1,8 @@
---
status: "3-In Progress"
created: "2023-07-25T17:31:10.382Z"
updated: "2023-07-27T18:05:52.713Z"
type: "kanbn"
---
# self-signed-certificate
@ -7,6 +11,7 @@
sudo -i
echo >/etc/hosts && nano /etc/hosts
```
```conf
127.0.0.1 localhost
127.0.1.1 unity4
@ -17,6 +22,7 @@ echo >/etc/hosts && nano /etc/hosts
10.95.176.46 eaf-dev.mes.infineon.com
10.95.128.35 eaf-prod.mes.infineon.com
10.95.128.34 eaf-staging.mes.infineon.com
10.95.128.122 oi-prod-ec-api.mes.infineon.com
10.95.176.124 eaf-dev-reporting.mes.infineon.com
10.95.128.37 oi-metrology-viewer-prod.mes.infineon.com
# The following lines are desirable for IPv6 capable hosts
@ -26,6 +32,7 @@ ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
```
```bash
sudo -i
apt-get install -y ca-certificates

View File

@ -1,4 +1,8 @@
---
status: "4-Done"
created: "2023-06-08T20:40:12.528Z"
updated: "2023-07-27T18:05:52.745Z"
type: "kanbn"
---
# setup-nginx
@ -6,6 +10,7 @@
```bash
echo >/etc/nginx/sites-available/default && nano /etc/nginx/sites-available/default
```
```conf
server {
listen 80 default_server;
@ -18,6 +23,7 @@ server {
}
}
```
```bash
systemctl restart nginx
lsof -i -P -n | grep LISTEN
@ -26,6 +32,7 @@ nginx -t
nginx -s reload
echo >/etc/nginx/sites-available/Barcode-Host-Server && nano /etc/nginx/sites-available/Barcode-Host-Server
```
```conf
server {
listen 80 default_server;
@ -38,9 +45,11 @@ server {
}
}
```
```bash
echo >/home/unity4/localhost.conf && nano /home/unity4/localhost.conf
```
```conf
[req]
default_bits = 2048
@ -75,11 +84,13 @@ DNS.1 = unity4
DNS.2 = localhost
DNS.3 = 127.0.0.1
```
```bash
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/localhost.key -out /etc/nginx/localhost.crt -config /home/unity4/localhost.conf
ls /etc/nginx
echo >/etc/nginx/sites-available/Barcode-Host-Server && nano /etc/nginx/sites-available/Barcode-Host-Server
```
```conf
server {
server_name _;
@ -99,6 +110,7 @@ server {
}
}
```
```bash
ln -s /etc/nginx/sites-available/Barcode-Host-Server /etc/nginx/sites-enabled/Barcode-Host-Server
nginx -t
@ -106,6 +118,7 @@ nginx -s reload
links https://localhost/api/lastscan
links https://unity4/api/lastscan
```
```conf
# C:\Windows\System32\drivers\etc\hosts
192.168.0.204 unity4

View File

@ -1,4 +1,8 @@
---
status: "5-Archive"
created: "2023-06-08T20:40:12.529Z"
updated: "2023-07-27T18:05:52.746Z"
type: "kanbn"
---
# signalr

View File

@ -1,4 +1,8 @@
---
status: "3-In Progress"
created: "2023-07-25T17:31:10.383Z"
updated: "2023-07-27T18:05:52.714Z"
type: "kanbn"
---
# update-os

16
.prettierignore Normal file
View File

@ -0,0 +1,16 @@
# to exclude Obsidian workspace settings (including plugin and hotkey configurations)
.obsidian/*
!.obsidian/hotkeys.json
!.obsidian/app.json
!.obsidian/community-plugins.json
!.obsidian/core-plugins.json
!.obsidian/graph.json
!.obsidian/appearance.json
**/.vscode/*
*.json
*.zip
Server/wwwroot/js/signalr/dist/browser/signalr.js

View File

@ -1,4 +1,8 @@
{
"files.eol": "\n",
"[markdown]": {
"editor.wordWrap": "off"
},
"cSpell.enabled": false,
"thunder-client.saveToWorkspace": true,
"thunder-client.workspaceRelativePath": ".vscode",
@ -7,6 +11,9 @@
"editor.wordWrap": "off"
},
"files.exclude": {
"**/.git": false
"**/node_modules": true
},
"files.watcherExclude": {
"**/node_modules": true
}
}

30
.vscode/tasks.json vendored
View File

@ -165,6 +165,36 @@
"type": "shell",
"command": "& Get-ChildItem . -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }",
"problemMatcher": []
},
{
"label": "File-Folder-Helper AOT s Set metadata",
"type": "shell",
"command": "& L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net7.0/win-x64/publish/File-Folder-Helper.exe .kanbn",
"problemMatcher": []
},
{
"label": "File-Folder-Helper AOT s M tasks",
"type": "shell",
"command": "& L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net7.0/win-x64/publish/File-Folder-Helper.exe s M .kanbn/tasks",
"problemMatcher": []
},
{
"label": "Kanbn Console",
"type": "npm",
"script": "kanbn.board",
"problemMatcher": []
},
{
"label": "Kanbn Write Boad",
"type": "shell",
"command": "& kanbn board -j | L:/Git/kanbn2md/kanbn2md.exe >.kanbn/board.md",
"problemMatcher": []
},
{
"label": "Kanbn Write json",
"type": "npm",
"script": "kanbn.board.json",
"problemMatcher": []
}
]
}

48
Barcode-Host.yml Normal file
View File

@ -0,0 +1,48 @@
trigger:
branches:
include:
- master
paths:
include:
- "Server/*"
pool:
name: Mesa-Linux
demands: Barcode-Host
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 Release --source https://eaf-prod.mes.infineon.com/v3/index.json"
workingDirectory: Server
displayName: "Core Build - Server"
- script: "systemctl stop barcode-host.service"
displayName: "stop barcode-host service"
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"
workingDirectory: Server
displayName: "Core Publish - Server"
- script: "systemctl start barcode-host.service"
displayName: "start barcode-host service"
enabled: false

View File

@ -43,7 +43,7 @@ public class UnitTestFileService
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
Server.Models.AppSettings appSettings = serviceProvider.GetRequiredService<Server.Models.AppSettings>();
IFileService fileService = serviceProvider.GetRequiredService<IFileService>();
Notification notification = new(KeyPressEvent: null, "Test");
Notification notification = new(KeyPressEvent: null, "Test", null);
fileService.Write(appSettings.EquipmentName, appSettings.FileShare, calendar: null, notification);
_Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();

View File

@ -44,7 +44,7 @@ public class UnitTestPostService
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
Server.Models.AppSettings appSettings = serviceProvider.GetRequiredService<Server.Models.AppSettings>();
IPostService postService = serviceProvider.GetRequiredService<IPostService>();
Notification notification = new(KeyPressEvent: null, "Test");
Notification notification = new(KeyPressEvent: null, "Test", null);
_ = postService.Post(appSettings.PostTo, httpClient, notification);
_Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();

View File

@ -68,7 +68,7 @@ public class TimedHostedService : IHostedService, IAggregateInputReader, IDispos
string? methodName = IMethodName.GetActualAsyncMethodName();
using (LogContext.PushProperty("MethodName", methodName))
{
_Logger.LogInformation($"Timed Hosted Service: {_AppSettings.GitCommitSeven}:{Environment.ProcessId} running.");
_Logger.LogInformation($"Timed Hosted Service: {_AppSettings.BuildSourceVersion}:{Environment.ProcessId} running.");
if (!string.IsNullOrEmpty(_AppSettings.SerialPortName))
_SerialService.Open();
#if Linux
@ -98,7 +98,7 @@ public class TimedHostedService : IHostedService, IAggregateInputReader, IDispos
string? methodName = IMethodName.GetActualAsyncMethodName();
using (LogContext.PushProperty("MethodName", methodName))
{
_Logger.LogInformation($"Timed Hosted Service: {_AppSettings.GitCommitSeven}:{Environment.ProcessId} is stopping.");
_Logger.LogInformation($"Timed Hosted Service: {_AppSettings.BuildSourceVersion}:{Environment.ProcessId} is stopping.");
for (short i = 0; i < short.MaxValue; i++)
{
Thread.Sleep(500);

View File

@ -3,6 +3,7 @@ using System.Text.Json;
namespace Barcode.Host.Server.Models;
public record AppSettings(string BuildNumber,
string BuildSourceVersion,
int ClearLastScanServiceAfter,
string Company,
string DeviceNameEndsWith,
@ -10,7 +11,6 @@ public record AppSettings(string BuildNumber,
int ExpectedScanLengthA,
int ExpectedScanLengthB,
string FileShare,
string GitCommitSeven,
bool IsDevelopment,
bool IsStaging,
string LinuxDevicePath,

View File

@ -9,6 +9,7 @@ public class AppSettings
#nullable disable
[Display(Name = "Build Number"), Required] public string BuildNumber { get; set; }
[Display(Name = "Build Source Version"), Required] public string BuildSourceVersion { get; set; }
[Display(Name = "Last Scan Service Clear After"), Required] public int? ClearLastScanServiceAfter { get; set; }
[Display(Name = "Company"), Required] public string Company { get; set; }
[Display(Name = "Device Name Ends With"), Required] public string DeviceNameEndsWith { get; set; }
@ -16,7 +17,6 @@ public class AppSettings
[Display(Name = "ExpectedScanLengthA"), Required] public int? ExpectedScanLengthA { get; set; }
[Display(Name = "ExpectedScanLengthB"), Required] public int? ExpectedScanLengthB { get; set; }
[Display(Name = "File Share"), Required] public string FileShare { get; set; }
[Display(Name = "Git Commit Seven"), Required] public string GitCommitSeven { get; set; }
[Display(Name = "Is Development"), Required] public bool? IsDevelopment { get; set; }
[Display(Name = "Is Staging"), Required] public bool? IsStaging { get; set; }
[Display(Name = "Linux Device Path"), Required] public string LinuxDevicePath { get; set; }
@ -62,8 +62,8 @@ public class AppSettings
throw new NullReferenceException(nameof(ExpectedScanLengthB));
if (appSettings.FileShare is null)
throw new NullReferenceException(nameof(FileShare));
if (appSettings.GitCommitSeven is null)
throw new NullReferenceException(nameof(GitCommitSeven));
if (appSettings.BuildSourceVersion is null)
throw new NullReferenceException(nameof(BuildSourceVersion));
if (appSettings.IsDevelopment is null)
throw new NullReferenceException(nameof(IsDevelopment));
if (appSettings.IsStaging is null)
@ -96,6 +96,7 @@ public class AppSettings
throw new NullReferenceException(nameof(WriteToSerialEvery));
result = new(
appSettings.BuildNumber,
appSettings.BuildSourceVersion,
appSettings.ClearLastScanServiceAfter.Value,
appSettings.Company,
appSettings.DeviceNameEndsWith,
@ -103,7 +104,6 @@ public class AppSettings
appSettings.ExpectedScanLengthA.Value,
appSettings.ExpectedScanLengthB.Value,
appSettings.FileShare,
appSettings.GitCommitSeven,
appSettings.IsDevelopment.Value,
appSettings.IsStaging.Value,
appSettings.LinuxDevicePath,

View File

@ -1,20 +1,59 @@
@page
@model NotificationModel
<div class="container">
<div class="row p-1">
<div class="col-6">
<h3 style="text-align:center"></h3>
</div>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="row p-1">
<div class="col-6">
<h1 style="text-align:center">Scan RDS barcode before starting BioRad</h1>
</div>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="row p-1">
<div class="col-6">
<h1 id="lastScanServiceResultValue" style="text-align:center"></h1>
</div>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="row p-1">
<div class="col-6">
<h1 id="mId" style="text-align:center"></h1>
</div>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="row p-1">
<div class="col-6">
<h1 id="recipe" style="text-align:center"></h1>
</div>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="row p-1">
<div class="col-6">
<h1 id="httpContentBody" style="text-align:center"></h1>
</div>
</div>
</div>
<script src="~/js/signalr/dist/browser/signalr.js"></script>
<script src="~/js/notification.js"></script>
<script>
var appSettings = JSON.parse('@(System.Text.Json.JsonSerializer.Serialize(this.Model.AppSettings))');
console.log(appSettings.BuildSourceVersion);
console.log(appSettings.BuildNumber);
console.log(appSettings);
</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>

View File

@ -1,16 +1,22 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using Barcode.Host.Server.Models;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace Barcode.Host.Server.Pages;
public class NotificationModel : PageModel
{
public AppSettings AppSettings { get; }
private readonly ILogger<NotificationModel> _Logger;
public NotificationModel(ILogger<NotificationModel> logger) =>
public NotificationModel(ILogger<NotificationModel> logger, AppSettings appSettings)
{
_Logger = logger;
AppSettings = appSettings;
}
public void OnGet()
{
}
}

View File

@ -17,7 +17,8 @@ a {
border-color: #1861ac;
}
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
@ -31,7 +32,7 @@ a {
}
.box-shadow {
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
}
button.accept-policy {

View File

@ -8,8 +8,14 @@ html {
}
}
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
box-shadow:
0 0 0 0.1rem white,
0 0 0 0.25rem #258cfb;
}
html {
@ -19,4 +25,4 @@ html {
body {
margin-bottom: 60px;
}
}

View File

@ -1,19 +1,56 @@
"use strict";
var connection = new signalR.HubConnectionBuilder().withUrl("/NotificationHub").build();
var connection = new signalR.HubConnectionBuilder()
.withUrl("/NotificationHub")
.build();
connection.on("NotifyAll", function (data) {
if (data.keyPressEvent && data.lastScanServiceResultValue) {
var innerText = `${data.keyPressEvent.dateTime} - [${data.lastScanServiceResultValue}]`;
document.getElementById("lastScanServiceResultValue").innerText = innerText;
if (!data.keyPressEvent || !data.lastScanServiceResultValue) {
if (!data.httpContentBody) {
document.getElementById("lastScanServiceResultValue").innerText = "";
}
else if (data.httpContentBody) {
var innerText = `${data.httpContentBody}]`; //JSON.parse() // JSON.stringify()
document.getElementById("httpContentBody").innerText = innerText;
} else {
var innerText = `${data.keyPressEvent.dateTime} - [${data.lastScanServiceResultValue}]`;
document.getElementById("lastScanServiceResultValue").innerText = innerText;
}
if (!data.httpContentBody) {
if (!data.keyPressEvent || !data.lastScanServiceResultValue) {
document.getElementById("httpContentBody").innerText = data;
document.getElementById("mId").innerText = "";
document.getElementById("recipe").innerText = "";
}
} else {
document.getElementById("httpContentBody").innerText = data.httpContentBody;
var postResult = JSON.parse(data.httpContentBody);
if (!postResult.MId) {
document.getElementById("mId").innerText = "";
} else {
document.getElementById(
"mId",
).innerText = `Use ${postResult.MId} for the wafer and input id`;
}
if (!postResult.Recipe) {
document.getElementById("recipe").innerText = "";
} else {
if (postResult.Recipe != "Recipe") {
document.getElementById("recipe").innerText = postResult.Recipe;
} else {
$.getJSON(
"https://oi-prod-ec-api.mes.infineon.com/api/oiWizard/materials/rds/" +
postResult.LotName,
function (data) {
document.getElementById("recipe").innerText =
data.rds.rdsLayers.length;
},
);
}
}
}
});
connection.start().then(function () {
}).catch(function (err) {
connection
.start()
.then(function () {})
.catch(function (err) {
return console.error(err.toString());
});
});

View File

@ -4,7 +4,7 @@ public interface IAppSettingsRepository<T>
{
T GetAppSettings();
string GetBuildNumberAndGitCommitSeven();
string GetBuildNumberAndBuildSourceVersion();
void VerifyConnectionStrings();
}

27
package-lock.json generated Normal file
View File

@ -0,0 +1,27 @@
{
"name": "Barcode-Host",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"devDependencies": {
"prettier": "^3.0.0"
}
},
"node_modules/prettier": {
"version": "3.0.0",
"resolved": "http://localhost:4873/prettier/-/prettier-3.0.0.tgz",
"integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
}
}
}

12
package.json Normal file
View File

@ -0,0 +1,12 @@
{
"scripts": {
"prettier.check": "prettier . --check",
"prettier.write": "prettier . --write",
"kanbn.board": "kanbn board",
"kanbn.board.json": "kanbn board -j > .kanbn/board.json",
"garbage-collect": "git gc"
},
"devDependencies": {
"prettier": "^3.0.0"
}
}