mirror of
https://github.com/openziti/zrok.git
synced 2024-12-22 23:02:52 +01:00
hooks for disabling services/environments (#87)
This commit is contained in:
parent
a1879ea61b
commit
2b67b99643
@ -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>
|
||||
</>
|
||||
},
|
||||
{
|
||||
|
@ -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>
|
||||
</>
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user