Sha256: 4e9e05bd8ec06510cf1f1341977699afc5b80d8b635beaa40a2d0ab41adf5597

Contents?: true

Size: 930 Bytes

Versions: 21

Compression:

Stored size: 930 Bytes

Contents

import $ from 'jquery';
import * as classEditor from './src/foreman_class_edit';
import * as hostForm from './src/foreman_puppet_host_form';

export const registerLegacy = () => {
  window.tfm = Object.assign(window.tfm || {}, {
    classEditor,
    puppetEnc: {
      hostForm,
    },
  });

  // TODO: the checkForUnavailablePuppetclasses is very nasty
  $(document)
    .on('change', '.hostgroup-select', evt => {
      const form = $('form.host-form')[0];
      if (form && form.dataset.id) hostForm.updatePuppetclasses(evt.target);
    })
    .on('change', '.interface_domain', evt => {
      hostForm.reloadPuppetclassParams();
    })
    .on('change', '.host-architecture-os-select', evt => {
      hostForm.reloadPuppetclassParams();
    })
    .on('ContentLoad', evt => {
      hostForm.checkForUnavailablePuppetclasses();
    });
  $(window).on('load', evt => {
    hostForm.checkForUnavailablePuppetclasses();
  });
};

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
foreman_puppet-8.0.0 webpack/legacy.js
foreman_puppet-6.4.0 webpack/legacy.js
foreman_puppet-7.0.0 webpack/legacy.js
foreman_puppet-6.3.0 webpack/legacy.js
foreman_puppet-6.2.0 webpack/legacy.js
foreman_puppet-6.1.1 webpack/legacy.js
foreman_puppet-5.1.3 webpack/legacy.js
foreman_puppet-6.1.0 webpack/legacy.js
foreman_puppet-6.0.1 webpack/legacy.js
foreman_puppet-6.0.0 webpack/legacy.js
foreman_puppet-5.1.2 webpack/legacy.js
foreman_puppet-4.1.1 webpack/legacy.js
foreman_puppet-5.1.1 webpack/legacy.js
foreman_puppet-5.1.0 webpack/legacy.js
foreman_puppet-4.1.0 webpack/legacy.js
foreman_puppet-4.0.4 webpack/legacy.js
foreman_puppet-5.0.0 webpack/legacy.js
foreman_puppet-4.0.3 webpack/legacy.js
foreman_puppet-4.0.2 webpack/legacy.js
foreman_puppet-4.0.1 webpack/legacy.js