Sha256: b21781982a76fc9fc4c76fb460eaf8da54bfdf54b6167dd6e1816e22acf9c1cb
Contents?: true
Size: 549 Bytes
Versions: 13
Compression:
Stored size: 549 Bytes
Contents
import { foremanUrl } from 'foremanReact/common/helpers'; import { sprintf, translate as __ } from 'foremanReact/common/I18n'; import { post } from 'foremanReact/redux/API'; export const runFeature = (hostId, feature, label) => dispatch => { const url = foremanUrl( `/job_invocations?feature=${feature}&host_ids%5B%5D=${hostId}` ); const successToast = () => sprintf(__('%s job has been invoked'), label); const errorToast = ({ message }) => message; dispatch(post({ key: feature.toUpperCase(), url, successToast, errorToast })); };
Version data entries
13 entries across 13 versions & 1 rubygems