Sha256: a55d9322a6038e95b2a2f3c50f0d8154c43efaca73da05b2aadf2737407f4917
Contents?: true
Size: 850 Bytes
Versions: 8
Compression:
Stored size: 850 Bytes
Contents
import React from 'react'; import { post } from 'foremanReact/redux/API'; import { translate as __ } from 'foremanReact/common/I18n'; import { insightsCloudUrl } from './InsightsCloudSyncHelpers'; import { INSIGHTS_CLOUD_SYNC } from './InsightsCloudSyncConstants'; import { foremanUrl } from '../ForemanRhCloudHelpers'; export const syncInsights = () => post({ key: INSIGHTS_CLOUD_SYNC, url: insightsCloudUrl('tasks'), successToast: response => ( <span> {__('Recommendation sync has started: ')} <a target="_blank" rel="noopener noreferrer" href={foremanUrl(`/foreman_tasks/tasks/${response.data?.task?.id}`)} > {__('view the task in progress')} </a> </span> ), errorToast: error => `${__('Recommendation sync has failed: ')} ${error}`, });
Version data entries
8 entries across 8 versions & 1 rubygems