Sha256: 587c8fbb0d4e54356176ccabdcbb4e338cbb0c5262e411fd8f961df059ba4da0

Contents?: true

Size: 881 Bytes

Versions: 8

Compression:

Stored size: 881 Bytes

Contents

import { translate as __ } from 'foremanReact/common/I18n';
import { API_OPERATIONS, put } from 'foremanReact/redux/API';
import { errorToast } from '../../../../../scenes/Tasks/helpers';
import { foremanApi } from '../../../../../services/api';
import { uploadProfile } from '../../Tabs/RemoteExecutionActions';
import HOST_CV_AND_ENV_KEY from './HostContentViewConstants';

const updateHostContentViewAndEnvironment = (params, hostId, handleSuccess, handleError) => put({
  type: API_OPERATIONS.PUT,
  key: HOST_CV_AND_ENV_KEY,
  url: foremanApi.getApiUrl(`/hosts/${hostId}`),
  successToast: () => __('Host content view and environment updated'),
  handleSuccess,
  handleError,
  errorToast,
  params,
});

export const runSubmanRepos =
  (hostname, handleSuccess) => uploadProfile({
    hostname,
    handleSuccess,
  });

export default updateHostContentViewAndEnvironment;

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js
katello-4.15.0.rc1 webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js
katello-4.14.1 webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js
katello-4.14.0 webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js
katello-4.14.0.rc3 webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js
katello-4.14.0.rc2 webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js
katello-4.14.0.rc1.1 webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js
katello-4.14.0.rc1 webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js