Minor changes
This commit is contained in:
4128
frontend/package-lock.json
generated
4128
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -22,11 +22,13 @@
|
||||
"react-dom": "^18.1.0",
|
||||
"react-icons": "^4.4.0",
|
||||
"react-router-dom": "^6.3.0",
|
||||
"react-scripts": "5.0.1",
|
||||
"sass": "^1.52.3",
|
||||
"typescript": "^4.7.3",
|
||||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"react-scripts": "5.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
|
||||
@@ -38,6 +38,7 @@ function ServiceRow({ service, onClick, additional_buttons }:{ service:Service,
|
||||
await stopservice(service.id).then(res => {
|
||||
if(!res){
|
||||
okNotify(`Service ${service.id} stopped successfully!`,`The service ${service.name} has been stopped!`)
|
||||
updateInfo();
|
||||
}else{
|
||||
errorNotify(`An error as occurred during the stopping of the service ${service.id}`,`Error: ${res}`)
|
||||
}
|
||||
@@ -45,7 +46,6 @@ function ServiceRow({ service, onClick, additional_buttons }:{ service:Service,
|
||||
errorNotify(`An error as occurred during the stopping of the service ${service.id}`,`Error: ${err}`)
|
||||
})
|
||||
setButtonLoading(false);
|
||||
updateInfo();
|
||||
}
|
||||
|
||||
const startService = async () => {
|
||||
@@ -53,6 +53,7 @@ function ServiceRow({ service, onClick, additional_buttons }:{ service:Service,
|
||||
await startservice(service.id).then(res => {
|
||||
if(!res){
|
||||
okNotify(`Service ${service.id} started successfully!`,`The service ${service.name} has been started!`)
|
||||
updateInfo();
|
||||
}else{
|
||||
errorNotify(`An error as occurred during the starting of the service ${service.id}`,`Error: ${res}`)
|
||||
}
|
||||
@@ -60,7 +61,6 @@ function ServiceRow({ service, onClick, additional_buttons }:{ service:Service,
|
||||
errorNotify(`An error as occurred during the starting of the service ${service.id}`,`Error: ${err}`)
|
||||
})
|
||||
setButtonLoading(false)
|
||||
updateInfo();
|
||||
}
|
||||
|
||||
const pauseService = async () => {
|
||||
@@ -68,6 +68,7 @@ function ServiceRow({ service, onClick, additional_buttons }:{ service:Service,
|
||||
await pauseservice(service.id).then(res => {
|
||||
if(!res){
|
||||
okNotify(`Service ${service.id} paused successfully!`,`The service ${service.name} has been paused (Transparent mode)!`)
|
||||
updateInfo();
|
||||
}else{
|
||||
errorNotify(`An error as occurred during the pausing of the service ${service.id}`,`Error: ${res}`)
|
||||
}
|
||||
@@ -75,7 +76,7 @@ function ServiceRow({ service, onClick, additional_buttons }:{ service:Service,
|
||||
errorNotify(`An error as occurred during the pausing of the service ${service.id}`,`Error: ${err}`)
|
||||
})
|
||||
setButtonLoading(false)
|
||||
updateInfo();
|
||||
|
||||
}
|
||||
|
||||
return <>
|
||||
|
||||
@@ -62,26 +62,27 @@ function ServiceDetails() {
|
||||
|
||||
const deleteService = () => {
|
||||
deleteservice(serviceInfo.id).then(res => {
|
||||
if (!res)
|
||||
if (!res){
|
||||
okNotify("Service delete complete!",`The service ${serviceInfo.id} has been deleted!`)
|
||||
else
|
||||
updateInfo();
|
||||
}else
|
||||
errorNotify("An error occurred while deleting a service",`Error: ${res}`)
|
||||
}).catch(err => {
|
||||
errorNotify("An error occurred while deleting a service",`Error: ${err}`)
|
||||
})
|
||||
updateInfo();
|
||||
|
||||
}
|
||||
|
||||
const changePort = () => {
|
||||
regenport(serviceInfo.id).then(res => {
|
||||
if (!res)
|
||||
if (!res){
|
||||
okNotify("Service port regeneration completed!",`The service ${serviceInfo.id} has changed the internal port!`)
|
||||
else
|
||||
updateInfo();
|
||||
}else
|
||||
errorNotify("An error occurred while changing the internal service port",`Error: ${res}`)
|
||||
}).catch(err => {
|
||||
errorNotify("An error occurred while changing the internal service port",`Error: ${err}`)
|
||||
})
|
||||
updateInfo();
|
||||
}
|
||||
|
||||
return <div>
|
||||
|
||||
Reference in New Issue
Block a user