mirror of
https://github.com/openziti/zrok.git
synced 2025-04-10 00:48:53 +02:00
tunnel.Untunnel -> service.Unshare (#102)
This commit is contained in:
parent
82d9f6f6ed
commit
ead71b1fa5
@ -2,13 +2,13 @@ import DataTable from 'react-data-table-component';
|
|||||||
import {Sparklines, SparklinesLine, SparklinesSpots} from 'react-sparklines';
|
import {Sparklines, SparklinesLine, SparklinesSpots} from 'react-sparklines';
|
||||||
import {mdiCloseOutline} from "@mdi/js";
|
import {mdiCloseOutline} from "@mdi/js";
|
||||||
import Icon from "@mdi/react";
|
import Icon from "@mdi/react";
|
||||||
import * as tunnel from './api/tunnel';
|
import * as service from './api/service';
|
||||||
|
|
||||||
const Services = (props) => {
|
const Services = (props) => {
|
||||||
const humanizeDuration = require("humanize-duration")
|
const humanizeDuration = require("humanize-duration")
|
||||||
const untunnelService = (envId, svcName) => {
|
const unshareService = (envId, svcName) => {
|
||||||
if(window.confirm('really disable service "' + svcName +'"?')) {
|
if(window.confirm('really disable service "' + svcName +'"?')) {
|
||||||
tunnel.untunnel({body: {zId: envId, svcName: svcName}}).then(resp => {
|
service.unshare({body: {zId: envId, svcName: svcName}}).then(resp => {
|
||||||
console.log(resp)
|
console.log(resp)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ const Services = (props) => {
|
|||||||
{
|
{
|
||||||
name: 'Actions',
|
name: 'Actions',
|
||||||
selector: row => <>
|
selector: row => <>
|
||||||
<button data-value={row.name} onClick={e => untunnelService(props.envId, row.name)} title={"Disable Service '"+row.name+"'"}>
|
<button data-value={row.name} onClick={e => unshareService(props.envId, row.name)} title={"Un-share Service '"+row.name+"'"}>
|
||||||
<Icon path={mdiCloseOutline} size={0.7}/>
|
<Icon path={mdiCloseOutline} size={0.7}/>
|
||||||
</button>
|
</button>
|
||||||
</>
|
</>
|
||||||
|
Loading…
Reference in New Issue
Block a user