summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/mirrors
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/mirrors')
-rw-r--r--app/assets/javascripts/mirrors/mirror_repos.js8
-rw-r--r--app/assets/javascripts/mirrors/ssh_mirror.js6
2 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/mirrors/mirror_repos.js b/app/assets/javascripts/mirrors/mirror_repos.js
index a26c8f85958..e59da18fb77 100644
--- a/app/assets/javascripts/mirrors/mirror_repos.js
+++ b/app/assets/javascripts/mirrors/mirror_repos.js
@@ -1,6 +1,6 @@
import $ from 'jquery';
import { debounce } from 'lodash';
-import { deprecatedCreateFlash as Flash } from '~/flash';
+import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
import { __ } from '~/locale';
import { hide } from '~/tooltips';
@@ -111,7 +111,11 @@ export default class MirrorRepos {
return axios
.put(this.mirrorEndpoint, payload)
.then(() => this.removeRow($target))
- .catch(() => Flash(__('Failed to remove mirror.')));
+ .catch(() =>
+ createFlash({
+ message: __('Failed to remove mirror.'),
+ }),
+ );
}
/* eslint-disable class-methods-use-this */
diff --git a/app/assets/javascripts/mirrors/ssh_mirror.js b/app/assets/javascripts/mirrors/ssh_mirror.js
index 15ded478405..5138c450feb 100644
--- a/app/assets/javascripts/mirrors/ssh_mirror.js
+++ b/app/assets/javascripts/mirrors/ssh_mirror.js
@@ -1,6 +1,6 @@
import $ from 'jquery';
import { escape } from 'lodash';
-import { deprecatedCreateFlash as Flash } from '~/flash';
+import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
import { backOff } from '~/lib/utils/common_utils';
import { __ } from '~/locale';
@@ -115,7 +115,9 @@ export default class SSHMirror {
const failureMessage = response.data
? response.data.message
: __('An error occurred while detecting host keys');
- Flash(failureMessage);
+ createFlash({
+ message: failureMessage,
+ });
$btnLoadSpinner.addClass('hidden');
this.$btnDetectHostKeys.enable();