webpack/scenes/RedHatRepositories/components/RepositorySetRepository/RepositorySetRepository.js in katello-3.12.3 vs webpack/scenes/RedHatRepositories/components/RepositorySetRepository/RepositorySetRepository.js in katello-3.13.0.rc1
- old
+ new
@@ -1,13 +1,12 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { ListView, Spinner, OverlayTrigger, Tooltip, Icon, FieldLevelHelp } from 'patternfly-react';
-import { sprintf } from 'foremanReact/common/I18n';
+import { sprintf, translate as __ } from 'foremanReact/common/I18n';
import { yStream } from '../RepositorySetRepositoriesHelpers';
-import { notify } from '../../../../move_to_foreman/foreman_toast_notifications';
import '../../index.scss';
class RepositorySetRepository extends Component {
constructor(props) {
super(props);
@@ -40,11 +39,11 @@
}, true)
);
this.notifyEnabled = (data) => {
const repoName = data.output.repository.name;
- notify({
+ window.tfm.toastNotifications.notify({
message: sprintf(__("Repository '%(repoName)s' has been enabled."), { repoName }),
type: 'success',
});
};
@@ -101,10 +100,10 @@
this.state.error
? [
<ListView.InfoItem key="error" stacked className="list-error-danger">
{this.state.error.displayMessage}
</ListView.InfoItem>,
- ]
+ ]
: null
}
actions={
<Spinner loading={this.props.loading} inline>
<OverlayTrigger