Compare commits
3 Commits
cb00addee9
...
7962463927
| Author | SHA1 | Date | |
|---|---|---|---|
| 7962463927 | |||
| f716de1a58 | |||
| 88cef2a56c |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -149,3 +149,4 @@ dist
|
|||||||
.yarn/install-state.gz
|
.yarn/install-state.gz
|
||||||
.pnp.*
|
.pnp.*
|
||||||
|
|
||||||
|
frontend/.tanstack/tmp/2249110e-da91fb0b1b87b6c4cc3e2c2cd25037fd
|
||||||
|
|||||||
@@ -249,7 +249,6 @@ export const runDatamartQuery = async (data: Data) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "psiDeliveryData":
|
case "psiDeliveryData":
|
||||||
datamartQuery = datamartQuery
|
datamartQuery = datamartQuery
|
||||||
.replace("[startDate]", `${data.options.startDate}`)
|
.replace("[startDate]", `${data.options.startDate}`)
|
||||||
|
|||||||
@@ -96,6 +96,28 @@ const servers: NewServerData[] = [
|
|||||||
serverLoc: "D$\\LST_V3",
|
serverLoc: "D$\\LST_V3",
|
||||||
buildNumber: 1,
|
buildNumber: 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "McDonough",
|
||||||
|
server: "USMCD1VMS006",
|
||||||
|
plantToken: "usmcd1",
|
||||||
|
idAddress: "10.193.0.26",
|
||||||
|
greatPlainsPlantCode: "10",
|
||||||
|
contactEmail: "",
|
||||||
|
contactPhone: "",
|
||||||
|
serverLoc: "D$\\LST_V3",
|
||||||
|
buildNumber: 82,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "St. Peters",
|
||||||
|
server: "USTP1VMS006",
|
||||||
|
plantToken: "usstp1",
|
||||||
|
idAddress: "10.37.0.26",
|
||||||
|
greatPlainsPlantCode: "45",
|
||||||
|
contactEmail: "",
|
||||||
|
contactPhone: "",
|
||||||
|
serverLoc: "D$\\LST_V3",
|
||||||
|
buildNumber: 1,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const serversChecks = async () => {
|
export const serversChecks = async () => {
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Login
|
|
||||||
type: http
|
|
||||||
seq: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
url: {{url}}/api/auth/sign-in/email
|
|
||||||
body: json
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
headers {
|
|
||||||
Origin: http://localhost:3000
|
|
||||||
}
|
|
||||||
|
|
||||||
body:json {
|
|
||||||
{
|
|
||||||
"email": "blake.matthes@alpla.com",
|
|
||||||
"password": "nova0511"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
script:post-response {
|
|
||||||
// // grab the raw Set-Cookie header
|
|
||||||
// const cookies = res.headers["set-cookie"];
|
|
||||||
|
|
||||||
// const sessionCookie = cookies[0].split(";")[0];
|
|
||||||
|
|
||||||
// // Save it as an environment variable
|
|
||||||
// bru.setEnvVar("session_cookie", sessionCookie);
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Register
|
|
||||||
type: http
|
|
||||||
seq: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
url: {{url}}/api/authentication/register
|
|
||||||
body: json
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
body:json {
|
|
||||||
{
|
|
||||||
"name":"Blake", // option when in the frontend as we will pass over as username if not added
|
|
||||||
"username": "matthes01",
|
|
||||||
"email": "blake.matthes@alpla.com",
|
|
||||||
"password": "nova0511"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
script:post-response {
|
|
||||||
// // grab the raw Set-Cookie header
|
|
||||||
// const cookies = res.headers["set-cookie"];
|
|
||||||
|
|
||||||
// const sessionCookie = cookies[0].split(";")[0];
|
|
||||||
|
|
||||||
// // Save it as an environment variable
|
|
||||||
// bru.setEnvVar("session_cookie", sessionCookie);
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: auth
|
|
||||||
seq: 5
|
|
||||||
}
|
|
||||||
|
|
||||||
auth {
|
|
||||||
mode: inherit
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: getSession
|
|
||||||
type: http
|
|
||||||
seq: 3
|
|
||||||
}
|
|
||||||
|
|
||||||
get {
|
|
||||||
url: {{url}}/api/auth/get-session
|
|
||||||
body: none
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "1",
|
|
||||||
"name": "lst_v3",
|
|
||||||
"type": "collection",
|
|
||||||
"ignore": [
|
|
||||||
"node_modules",
|
|
||||||
".git"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
docs {
|
|
||||||
All Api endpoints to the logistics support tool
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Get queries
|
|
||||||
type: http
|
|
||||||
seq: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
get {
|
|
||||||
url: {{url}}/api/datamart
|
|
||||||
body: none
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Run Query
|
|
||||||
type: http
|
|
||||||
seq: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
get {
|
|
||||||
url: {{url}}/api/datamart/:name?articles=118,120&startDate=2026-01-01&endDate=2026-12-31&all=x
|
|
||||||
body: none
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
params:query {
|
|
||||||
articles: 118,120
|
|
||||||
startDate: 2026-01-01
|
|
||||||
endDate: 2026-12-31
|
|
||||||
all: x
|
|
||||||
}
|
|
||||||
|
|
||||||
params:path {
|
|
||||||
name: deliveryByDateRange
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: datamart
|
|
||||||
seq: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
auth {
|
|
||||||
mode: inherit
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
vars {
|
|
||||||
url: http://localhost:3000/lst
|
|
||||||
readerIp: 10.44.14.215
|
|
||||||
}
|
|
||||||
vars:secret [
|
|
||||||
token
|
|
||||||
]
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Get All notifications.
|
|
||||||
type: http
|
|
||||||
seq: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
get {
|
|
||||||
url: {{url}}/api/notification
|
|
||||||
body: none
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
docs {
|
|
||||||
Passing all as a query param will return all queries active and none active
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Subscribe to notification
|
|
||||||
type: http
|
|
||||||
seq: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
url: {{url}}/api/notification/sub
|
|
||||||
body: json
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
body:json {
|
|
||||||
{
|
|
||||||
"userId":"m6AbQXFwOXoX3YKLfwWgq2LIdDqS5jqv",
|
|
||||||
"notificationId": "0399eb2a-39df-48b7-9f1c-d233cec94d2e",
|
|
||||||
"emails": ["blake.matthes@alpla.com","blake.matthes@alpla.com"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: notifications
|
|
||||||
seq: 7
|
|
||||||
}
|
|
||||||
|
|
||||||
auth {
|
|
||||||
mode: inherit
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: remove sub notification
|
|
||||||
type: http
|
|
||||||
seq: 4
|
|
||||||
}
|
|
||||||
|
|
||||||
delete {
|
|
||||||
url: {{url}}/api/notification/sub
|
|
||||||
body: json
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
body:json {
|
|
||||||
{
|
|
||||||
"userId":"0kHd6Kkdub4GW6rK1qa1yjWwqXtvykqT",
|
|
||||||
"notificationId": "0399eb2a-39df-48b7-9f1c-d233cec94d2e",
|
|
||||||
"emails": ["blake.mattes@alpla.com"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: subscriptions
|
|
||||||
type: http
|
|
||||||
seq: 5
|
|
||||||
}
|
|
||||||
|
|
||||||
get {
|
|
||||||
url: {{url}}/api/notification/sub
|
|
||||||
body: json
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: update notification
|
|
||||||
type: http
|
|
||||||
seq: 6
|
|
||||||
}
|
|
||||||
|
|
||||||
patch {
|
|
||||||
url: {{url}}/api/notification/:id
|
|
||||||
body: json
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
params:path {
|
|
||||||
id: 0399eb2a-39df-48b7-9f1c-d233cec94d2e
|
|
||||||
}
|
|
||||||
|
|
||||||
body:json {
|
|
||||||
{
|
|
||||||
"active" : true,
|
|
||||||
"options": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
docs {
|
|
||||||
Passing all as a query param will return all queries active and none active
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: update sub notification
|
|
||||||
type: http
|
|
||||||
seq: 3
|
|
||||||
}
|
|
||||||
|
|
||||||
patch {
|
|
||||||
url: {{url}}/api/notification/sub
|
|
||||||
body: json
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
body:json {
|
|
||||||
{
|
|
||||||
"userId":"m6AbQXFwOXoX3YKLfwWgq2LIdDqS5jqv",
|
|
||||||
"notificationId": "0399eb2a-39df-48b7-9f1c-d233cec94d2e",
|
|
||||||
"emails": ["cowchmonkey@gmail.com"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Printer Listenter
|
|
||||||
type: http
|
|
||||||
seq: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
url: {{url}}/api/ocp/printer/listener/line_1
|
|
||||||
body: json
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
body:json {
|
|
||||||
{
|
|
||||||
"message":"xnvjdhhgsdfr"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: ocp
|
|
||||||
seq: 9
|
|
||||||
}
|
|
||||||
|
|
||||||
auth {
|
|
||||||
mode: inherit
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: GetApt
|
|
||||||
type: http
|
|
||||||
seq: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
get {
|
|
||||||
url: {{url}}/api/opendock
|
|
||||||
body: none
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Sql Start
|
|
||||||
type: http
|
|
||||||
seq: 4
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
url: {{url}}/api/system/prodsql/start
|
|
||||||
body: none
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Sql restart
|
|
||||||
type: http
|
|
||||||
seq: 4
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
url: {{url}}/api/system/prodsql/restart
|
|
||||||
body: none
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Sql stop
|
|
||||||
type: http
|
|
||||||
seq: 4
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
url: {{url}}/api/system/prodsql/stop
|
|
||||||
body: none
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: prodSql
|
|
||||||
seq: 6
|
|
||||||
}
|
|
||||||
|
|
||||||
auth {
|
|
||||||
mode: inherit
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: rfidReaders
|
|
||||||
seq: 8
|
|
||||||
}
|
|
||||||
|
|
||||||
auth {
|
|
||||||
mode: inherit
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: reader
|
|
||||||
type: http
|
|
||||||
seq: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
url: https://usday1prod.alpla.net/lst/old/api/rfid/mgtevents/line3.1
|
|
||||||
body: json
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
body:json {
|
|
||||||
{}
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Config
|
|
||||||
type: http
|
|
||||||
seq: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
get {
|
|
||||||
url: https://{{readerIp}}/cloud/config
|
|
||||||
body: none
|
|
||||||
auth: bearer
|
|
||||||
}
|
|
||||||
|
|
||||||
auth:bearer {
|
|
||||||
token: {{token}}
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Login
|
|
||||||
type: http
|
|
||||||
seq: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
get {
|
|
||||||
url: https://{{readerIp}}/cloud/localRestLogin
|
|
||||||
body: none
|
|
||||||
auth: basic
|
|
||||||
}
|
|
||||||
|
|
||||||
auth:basic {
|
|
||||||
username: admin
|
|
||||||
password: Zebra123!
|
|
||||||
}
|
|
||||||
|
|
||||||
script:post-response {
|
|
||||||
const body = res.getBody();
|
|
||||||
|
|
||||||
if (body.message) {
|
|
||||||
bru.setEnvVar("token", body.message);
|
|
||||||
} else {
|
|
||||||
bru.setEnvVar("token", "error");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,237 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Update Config
|
|
||||||
type: http
|
|
||||||
seq: 3
|
|
||||||
}
|
|
||||||
|
|
||||||
put {
|
|
||||||
url: https://{{readerIp}}/cloud/config
|
|
||||||
body: json
|
|
||||||
auth: bearer
|
|
||||||
}
|
|
||||||
|
|
||||||
headers {
|
|
||||||
Content-Type: application/json
|
|
||||||
}
|
|
||||||
|
|
||||||
auth:bearer {
|
|
||||||
token: {{token}}
|
|
||||||
}
|
|
||||||
|
|
||||||
body:json {
|
|
||||||
{
|
|
||||||
"GPIO-LED": {
|
|
||||||
"GPODefaults": {
|
|
||||||
"1": "HIGH",
|
|
||||||
"2": "HIGH",
|
|
||||||
"3": "HIGH",
|
|
||||||
"4": "HIGH"
|
|
||||||
},
|
|
||||||
"LEDDefaults": {
|
|
||||||
"3": "GREEN"
|
|
||||||
},
|
|
||||||
"TAG_READ": [
|
|
||||||
{
|
|
||||||
"pin": 1,
|
|
||||||
"state": "HIGH",
|
|
||||||
"type": "GPO"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"READER-GATEWAY": {
|
|
||||||
"batching": [
|
|
||||||
{
|
|
||||||
"maxPayloadSizePerReport": 256000,
|
|
||||||
"reportingInterval": 2000
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"maxPayloadSizePerReport": 256000,
|
|
||||||
"reportingInterval": 2000
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"endpointConfig": {
|
|
||||||
"data": {
|
|
||||||
"event": {
|
|
||||||
"connections": [
|
|
||||||
{
|
|
||||||
"additionalOptions": {
|
|
||||||
"retention": {
|
|
||||||
"maxEventRetentionTimeInMin": 500,
|
|
||||||
"maxNumEvents": 150000,
|
|
||||||
"throttle": 100
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"description": "",
|
|
||||||
"name": "LST",
|
|
||||||
"options": {
|
|
||||||
"URL": "https://usday1prod.alpla.net/lst/old/api/rfid/taginfo/line3.4",
|
|
||||||
"security": {
|
|
||||||
"CACertificateFileLocation": "",
|
|
||||||
"authenticationOptions": {},
|
|
||||||
"authenticationType": "NONE",
|
|
||||||
"verifyHost": false,
|
|
||||||
"verifyPeer": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"type": "httpPost"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"additionalOptions": {
|
|
||||||
"retention": {
|
|
||||||
"maxEventRetentionTimeInMin": 500,
|
|
||||||
"maxNumEvents": 150000,
|
|
||||||
"throttle": 100
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"description": "",
|
|
||||||
"name": "mgt",
|
|
||||||
"options": {
|
|
||||||
"URL": "https://usday1prod.alpla.net/lst/old/api/rfid/mgtevents/line3.4",
|
|
||||||
"security": {
|
|
||||||
"CACertificateFileLocation": "",
|
|
||||||
"authenticationOptions": {},
|
|
||||||
"authenticationType": "NONE",
|
|
||||||
"verifyHost": false,
|
|
||||||
"verifyPeer": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"type": "httpPost"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"managementEventConfig": {
|
|
||||||
"errors": {
|
|
||||||
"antenna": false,
|
|
||||||
"cpu": {
|
|
||||||
"reportIntervalInSec": 1800,
|
|
||||||
"threshold": 90
|
|
||||||
},
|
|
||||||
"database": true,
|
|
||||||
"flash": {
|
|
||||||
"reportIntervalInSec": 1800,
|
|
||||||
"threshold": 90
|
|
||||||
},
|
|
||||||
"ntp": true,
|
|
||||||
"radio": true,
|
|
||||||
"radio_control": true,
|
|
||||||
"ram": {
|
|
||||||
"reportIntervalInSec": 1800,
|
|
||||||
"threshold": 90
|
|
||||||
},
|
|
||||||
"reader_gateway": true,
|
|
||||||
"userApp": {
|
|
||||||
"reportIntervalInSec": 1800,
|
|
||||||
"threshold": 120
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gpiEvents": true,
|
|
||||||
"gpoEvents": true,
|
|
||||||
"heartbeat": {
|
|
||||||
"fields": {
|
|
||||||
"radio_control": [
|
|
||||||
"ANTENNAS",
|
|
||||||
"RADIO_ACTIVITY",
|
|
||||||
"RADIO_CONNECTION",
|
|
||||||
"CPU",
|
|
||||||
"RAM",
|
|
||||||
"UPTIME",
|
|
||||||
"NUM_ERRORS",
|
|
||||||
"NUM_WARNINGS",
|
|
||||||
"NUM_TAG_READS",
|
|
||||||
"NUM_TAG_READS_PER_ANTENNA",
|
|
||||||
"NUM_DATA_MESSAGES_TXED",
|
|
||||||
"NUM_RADIO_PACKETS_RXED"
|
|
||||||
],
|
|
||||||
"reader_gateway": [
|
|
||||||
"NUM_DATA_MESSAGES_RXED",
|
|
||||||
"NUM_MANAGEMENT_EVENTS_TXED",
|
|
||||||
"NUM_DATA_MESSAGES_TXED",
|
|
||||||
"NUM_DATA_MESSAGES_RETAINED",
|
|
||||||
"NUM_DATA_MESSAGES_DROPPED",
|
|
||||||
"CPU",
|
|
||||||
"RAM",
|
|
||||||
"UPTIME",
|
|
||||||
"NUM_ERRORS",
|
|
||||||
"NUM_WARNINGS",
|
|
||||||
"INTERFACE_CONNECTION_STATUS",
|
|
||||||
"NOLOCKQ_DEPTH"
|
|
||||||
],
|
|
||||||
"system": [
|
|
||||||
"CPU",
|
|
||||||
"FLASH",
|
|
||||||
"NTP",
|
|
||||||
"RAM",
|
|
||||||
"SYSTEMTIME",
|
|
||||||
"TEMPERATURE",
|
|
||||||
"UPTIME",
|
|
||||||
"GPO",
|
|
||||||
"GPI",
|
|
||||||
"POWER_NEGOTIATION",
|
|
||||||
"POWER_SOURCE",
|
|
||||||
"MAC_ADDRESS",
|
|
||||||
"HOSTNAME"
|
|
||||||
],
|
|
||||||
"userapps": [
|
|
||||||
"STATUS",
|
|
||||||
"CPU",
|
|
||||||
"RAM",
|
|
||||||
"UPTIME",
|
|
||||||
"NUM_DATA_MESSAGES_RXED",
|
|
||||||
"NUM_DATA_MESSAGES_TXED",
|
|
||||||
"INCOMING_DATA_BUFFER_PERCENTAGE_REMAINING",
|
|
||||||
"OUTGOING_DATA_BUFFER_PERCENTAGE_REMAINING"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"interval": 60
|
|
||||||
},
|
|
||||||
"userappEvents": true,
|
|
||||||
"warnings": {
|
|
||||||
"cpu": {
|
|
||||||
"reportIntervalInSec": 1800,
|
|
||||||
"threshold": 80
|
|
||||||
},
|
|
||||||
"database": true,
|
|
||||||
"flash": {
|
|
||||||
"reportIntervalInSec": 1800,
|
|
||||||
"threshold": 80
|
|
||||||
},
|
|
||||||
"ntp": true,
|
|
||||||
"radio_api": true,
|
|
||||||
"radio_control": true,
|
|
||||||
"ram": {
|
|
||||||
"reportIntervalInSec": 1800,
|
|
||||||
"threshold": 80
|
|
||||||
},
|
|
||||||
"reader_gateway": true,
|
|
||||||
"temperature": {
|
|
||||||
"ambient": 75,
|
|
||||||
"pa": 105
|
|
||||||
},
|
|
||||||
"userApp": {
|
|
||||||
"reportIntervalInSec": 1800,
|
|
||||||
"threshold": 60
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"retention": [
|
|
||||||
{
|
|
||||||
"maxEventRetentionTimeInMin": 500,
|
|
||||||
"maxNumEvents": 150000,
|
|
||||||
"throttle": 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"maxEventRetentionTimeInMin": 500,
|
|
||||||
"maxNumEvents": 150000,
|
|
||||||
"throttle": 100
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: readerSpecific
|
|
||||||
}
|
|
||||||
|
|
||||||
auth {
|
|
||||||
mode: basic
|
|
||||||
}
|
|
||||||
|
|
||||||
auth:basic {
|
|
||||||
username: admin
|
|
||||||
password: Zebra123!
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Get Settings
|
|
||||||
type: http
|
|
||||||
seq: 3
|
|
||||||
}
|
|
||||||
|
|
||||||
get {
|
|
||||||
url: {{url}}/api/settings
|
|
||||||
body: none
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
docs {
|
|
||||||
returns all settings
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Status
|
|
||||||
type: http
|
|
||||||
seq: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
get {
|
|
||||||
url: {{url}}/api/stats
|
|
||||||
body: none
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: updateSetting
|
|
||||||
type: http
|
|
||||||
seq: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
patch {
|
|
||||||
url: {{url}}/api/settings/opendock_sync
|
|
||||||
body: json
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
body:json {
|
|
||||||
{
|
|
||||||
"value" : "1",
|
|
||||||
"active": "true"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
docs {
|
|
||||||
Allows the changing of a setting based on the parameter.
|
|
||||||
|
|
||||||
* when a setting that is being changed is a feature there will be some backgound logic that will stop that features processes and no long work.
|
|
||||||
|
|
||||||
* when the setting is being changed is system the entire app will do a full restart
|
|
||||||
|
|
||||||
* when a seeting is being changed and is standard nothing will happen until the next action is completed. example someone prints a label and you changed the default to 120 second from 90 seconds
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Active Jobs
|
|
||||||
type: http
|
|
||||||
seq: 5
|
|
||||||
}
|
|
||||||
|
|
||||||
get {
|
|
||||||
url: {{url}}/api/utils/croner
|
|
||||||
body: none
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Change job status
|
|
||||||
type: http
|
|
||||||
seq: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
patch {
|
|
||||||
url: {{url}}/api/utils/croner/stop
|
|
||||||
body: json
|
|
||||||
auth: inherit
|
|
||||||
}
|
|
||||||
|
|
||||||
body:json {
|
|
||||||
{
|
|
||||||
"name": "open-dock-monitor"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
settings {
|
|
||||||
encodeUrl: true
|
|
||||||
timeout: 0
|
|
||||||
}
|
|
||||||
@@ -48,7 +48,7 @@ export const Route = createFileRoute("/admin/servers")({
|
|||||||
const ServerTable = () => {
|
const ServerTable = () => {
|
||||||
const { data, refetch } = useSuspenseQuery(servers());
|
const { data, refetch } = useSuspenseQuery(servers());
|
||||||
const columnHelper = createColumnHelper<any>();
|
const columnHelper = createColumnHelper<any>();
|
||||||
|
const okToUpdate = ["localhost", "usmcd1olp082"];
|
||||||
const columns = [
|
const columns = [
|
||||||
columnHelper.accessor("name", {
|
columnHelper.accessor("name", {
|
||||||
header: ({ column }) => (
|
header: ({ column }) => (
|
||||||
@@ -75,81 +75,86 @@ const ServerTable = () => {
|
|||||||
),
|
),
|
||||||
cell: (i) => <span>{i.getValue()}</span>,
|
cell: (i) => <span>{i.getValue()}</span>,
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor("lastUpdated", {
|
|
||||||
header: ({ column }) => (
|
|
||||||
<SearchableHeader column={column} title="Last Update" />
|
|
||||||
),
|
|
||||||
cell: (i) => <span>{format(i.getValue(), "M/d/yyyy HH:mm")}</span>,
|
|
||||||
}),
|
|
||||||
columnHelper.accessor("buildNumber", {
|
|
||||||
header: ({ column }) => (
|
|
||||||
<SearchableHeader column={column} title="Build" />
|
|
||||||
),
|
|
||||||
cell: (i) => <span>{i.getValue()}</span>,
|
|
||||||
}),
|
|
||||||
columnHelper.accessor("update", {
|
|
||||||
header: ({ column }) => (
|
|
||||||
<SearchableHeader column={column} title="Update" searchable={false} />
|
|
||||||
),
|
|
||||||
filterFn: "includesString",
|
|
||||||
cell: (i) => {
|
|
||||||
// biome-ignore lint: just removing the lint for now to get this going will maybe fix later
|
|
||||||
const [activeToggle, setActiveToggle] = useState(false);
|
|
||||||
|
|
||||||
const onToggle = async () => {
|
|
||||||
setActiveToggle(true);
|
|
||||||
toast.success(
|
|
||||||
`${i.row.original.name} just started the upgrade monitor logs for errors.`,
|
|
||||||
);
|
|
||||||
try {
|
|
||||||
const res = await axios.post(
|
|
||||||
`/lst/api/admin/build/updateServer`,
|
|
||||||
{
|
|
||||||
server: i.row.original.server,
|
|
||||||
destination: i.row.original.serverLoc,
|
|
||||||
token: i.row.original.plantToken,
|
|
||||||
},
|
|
||||||
{ withCredentials: true },
|
|
||||||
);
|
|
||||||
|
|
||||||
if (res.data.success) {
|
|
||||||
toast.success(
|
|
||||||
`${i.row.original.name} has completed its upgrade.`,
|
|
||||||
);
|
|
||||||
refetch();
|
|
||||||
setActiveToggle(false);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
setActiveToggle(false);
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<div className="flex items-center space-x-2">
|
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
disabled={activeToggle}
|
|
||||||
onClick={() => onToggle()}
|
|
||||||
>
|
|
||||||
{activeToggle ? (
|
|
||||||
<span>
|
|
||||||
<Spinner />
|
|
||||||
</span>
|
|
||||||
) : (
|
|
||||||
<span>
|
|
||||||
<CircleFadingArrowUp />
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (okToUpdate.includes(window.location.hostname)) {
|
||||||
|
columns.push(
|
||||||
|
columnHelper.accessor("lastUpdated", {
|
||||||
|
header: ({ column }) => (
|
||||||
|
<SearchableHeader column={column} title="Last Update" />
|
||||||
|
),
|
||||||
|
cell: (i) => <span>{format(i.getValue(), "M/d/yyyy HH:mm")}</span>,
|
||||||
|
}),
|
||||||
|
columnHelper.accessor("buildNumber", {
|
||||||
|
header: ({ column }) => (
|
||||||
|
<SearchableHeader column={column} title="Build" />
|
||||||
|
),
|
||||||
|
cell: (i) => <span>{i.getValue()}</span>,
|
||||||
|
}),
|
||||||
|
columnHelper.accessor("update", {
|
||||||
|
header: ({ column }) => (
|
||||||
|
<SearchableHeader column={column} title="Update" searchable={false} />
|
||||||
|
),
|
||||||
|
filterFn: "includesString",
|
||||||
|
cell: (i) => {
|
||||||
|
// biome-ignore lint: just removing the lint for now to get this going will maybe fix later
|
||||||
|
const [activeToggle, setActiveToggle] = useState(false);
|
||||||
|
|
||||||
|
const onToggle = async () => {
|
||||||
|
setActiveToggle(true);
|
||||||
|
toast.success(
|
||||||
|
`${i.row.original.name} just started the upgrade monitor logs for errors.`,
|
||||||
|
);
|
||||||
|
try {
|
||||||
|
const res = await axios.post(
|
||||||
|
`/lst/api/admin/build/updateServer`,
|
||||||
|
{
|
||||||
|
server: i.row.original.server,
|
||||||
|
destination: i.row.original.serverLoc,
|
||||||
|
token: i.row.original.plantToken,
|
||||||
|
},
|
||||||
|
{ withCredentials: true },
|
||||||
|
);
|
||||||
|
|
||||||
|
if (res.data.success) {
|
||||||
|
toast.success(
|
||||||
|
`${i.row.original.name} has completed its upgrade.`,
|
||||||
|
);
|
||||||
|
refetch();
|
||||||
|
setActiveToggle(false);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
setActiveToggle(false);
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<div className="flex items-center space-x-2">
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
disabled={activeToggle}
|
||||||
|
onClick={() => onToggle()}
|
||||||
|
>
|
||||||
|
{activeToggle ? (
|
||||||
|
<span>
|
||||||
|
<Spinner />
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<span>
|
||||||
|
<CircleFadingArrowUp />
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return <LstTable data={data} columns={columns} />;
|
return <LstTable data={data} columns={columns} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -158,6 +163,7 @@ function RouteComponent() {
|
|||||||
|
|
||||||
const columnHelper = createColumnHelper<any>();
|
const columnHelper = createColumnHelper<any>();
|
||||||
|
|
||||||
|
console.log(window.location);
|
||||||
const logColumns = [
|
const logColumns = [
|
||||||
columnHelper.accessor("timestamp", {
|
columnHelper.accessor("timestamp", {
|
||||||
header: ({ column }) => (
|
header: ({ column }) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user