mirror of
https://github.com/openziti/zrok.git
synced 2024-11-22 16:13:47 +01:00
delete environment action (#142)
This commit is contained in:
parent
c474094766
commit
ee89cb6b36
@ -1,6 +1,15 @@
|
||||
import {Button} from "react-bootstrap";
|
||||
import * as identity from "../../../api/environment";
|
||||
|
||||
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 (
|
||||
<div class={"actions-tab"}>
|
||||
<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
|
||||
will still need to terminate backends and <code>disable</code> your local environment.
|
||||
</p>
|
||||
<Button variant={"danger"}>Delete '{props.environment.description}'</Button>
|
||||
<Button variant={"danger"} onClick={() => deleteEnvironment(props.environment.zId)}>Delete '{props.environment.description}'</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user