mirror of
https://github.com/openziti/zrok.git
synced 2025-06-25 04:02:15 +02:00
delete environment action (#142)
This commit is contained in:
parent
c474094766
commit
ee89cb6b36
@ -1,6 +1,15 @@
|
|||||||
import {Button} from "react-bootstrap";
|
import {Button} from "react-bootstrap";
|
||||||
|
import * as identity from "../../../api/environment";
|
||||||
|
|
||||||
const ActionsTab = (props) => {
|
const ActionsTab = (props) => {
|
||||||
|
const deleteEnvironment = (envZId) => {
|
||||||
|
if(window.confirm("Really delete environment '" + envZId + "' and all shares within?")) {
|
||||||
|
identity.disable({body: {identity: envZId}}).then(resp => {
|
||||||
|
console.log(resp);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={"actions-tab"}>
|
<div class={"actions-tab"}>
|
||||||
<h3>Delete your environment '{props.environment.description}' ({props.environment.zId})?</h3>
|
<h3>Delete your environment '{props.environment.description}' ({props.environment.zId})?</h3>
|
||||||
@ -8,7 +17,7 @@ const ActionsTab = (props) => {
|
|||||||
This will remove all shares from this environment, and will remove the environment from the network. You
|
This will remove all shares from this environment, and will remove the environment from the network. You
|
||||||
will still need to terminate backends and <code>disable</code> your local environment.
|
will still need to terminate backends and <code>disable</code> your local environment.
|
||||||
</p>
|
</p>
|
||||||
<Button variant={"danger"}>Delete '{props.environment.description}'</Button>
|
<Button variant={"danger"} onClick={() => deleteEnvironment(props.environment.zId)}>Delete '{props.environment.description}'</Button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user