blob: 33ba73317f8298433c0b50cc22ae10115a5a6116 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
<script>
import { GlLoadingIcon } from '@gitlab/ui';
import API from '~/api';
import { createAlert } from '~/flash';
import { DEFAULT_ERROR } from '../utils/error_messages';
export default {
components: {
GlLoadingIcon,
},
props: {
id: {
type: Number,
required: true,
},
},
data() {
return {
loading: true,
error: null,
};
},
async mounted() {
try {
const {
data: { import_error: importError },
} = await API.project(this.id);
this.error = importError;
} catch (e) {
createAlert({ message: DEFAULT_ERROR });
this.error = null;
} finally {
this.loading = false;
}
},
};
</script>
<template>
<gl-loading-icon v-if="loading" size="md" />
<pre
v-else
><code>{{ error || s__('BulkImport|No additional information provided.') }}</code></pre>
</template>
|