hooks for disabling services/environments (#87)

This commit is contained in:
Michael Quigley 2022-11-02 12:55:44 -04:00
parent a1879ea61b
commit 2b67b99643
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 17 additions and 2 deletions

View File

@ -5,6 +5,12 @@ import {mdiCloseOutline} from "@mdi/js";
const Environments = (props) => {
const humanizeDuration = require("humanize-duration")
const disableEnvironment = (envId) => {
console.log(envId)
if(window.confirm('really disable environment "' + envId +'"?')) {
console.log("will delete environment: " + envId)
}
}
const columns = [
{
@ -30,7 +36,9 @@ const Environments = (props) => {
{
name: 'Actions',
selector: row => <>
<button title={"Disable Environment '"+row.environment.zId+"'"}><Icon path={mdiCloseOutline} size={0.7}/></button>
<button data-value={row.environment.zId} onClick={e => disableEnvironment(row.environment.zId)} title={"Disable Environment '"+row.environment.zId+"'"}>
<Icon path={mdiCloseOutline} size={0.7}/>
</button>
</>
},
{

View File

@ -5,6 +5,11 @@ import Icon from "@mdi/react";
const Services = (props) => {
const humanizeDuration = require("humanize-duration")
const untunnelService = (svcName) => {
if(window.confirm('really disable service "' + svcName +'"?')) {
console.log("will disable serivce: " + svcName)
}
}
const columns = [
{
@ -20,7 +25,9 @@ const Services = (props) => {
{
name: 'Actions',
selector: row => <>
<button title={"Disable Service '"+row.name+"'"}><Icon path={mdiCloseOutline} size={0.7}/></button>
<button data-value={row.name} onClick={e => untunnelService(row.name)} title={"Disable Service '"+row.name+"'"}>
<Icon path={mdiCloseOutline} size={0.7}/>
</button>
</>
},
{