INNER CODE UNIT · JavaScript
UndeployButton
MAIF/otoroshi · otoroshi/javascript/src/extensions/catalogs/index.js:180
class UndeployButton extends Component {
state = {
loading: false,
result: null,
};
handleUndeploy = () => {
const { rawValue } = this.props;
if (!rawValue || !rawValue.id) return;
if (
!window.confirm('Are you sure you want to undeploy all entities managed by this catalog?')
)
return;
this.setState({ loading: true, result: null }, () => {
fetch('/extensions/remote-catalogs/_undeploy', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },