INNER CODE UNIT · JavaScript

DeployButton

MAIF/otoroshi · otoroshi/javascript/src/extensions/catalogs/index.js:11

    class DeployButton extends Component {
      state = {
        loading: false,
        result: null,
      };

      handleDeploy = () => {
        const { rawValue } = this.props;
        if (!rawValue || !rawValue.id) return;
        this.setState({ loading: true, result: null }, () => {
          fetch('/extensions/remote-catalogs/_deploy', {
            method: 'POST',
            credentials: 'include',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify([{ id: rawValue.id, args: rawValue.test_deploy_args || {} }]),
          })
            .then((r) => r.json())
            .then((data) => {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…