2020-05-24 15:31:27 +02:00
|
|
|
<template>
|
|
|
|
<migration
|
2020-09-05 22:35:52 +02:00
|
|
|
:identifier="identifier"
|
|
|
|
:name="name"
|
2021-09-04 21:26:38 +02:00
|
|
|
:is-file-migrator="isFileMigrator"
|
2020-05-24 15:31:27 +02:00
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-09-05 22:35:52 +02:00
|
|
|
import Migration from '../../components/migrator/migration'
|
2021-09-04 21:26:38 +02:00
|
|
|
import {getMigratorFromSlug} from '../../helpers/migrator'
|
2020-05-24 15:31:27 +02:00
|
|
|
|
2020-09-05 22:35:52 +02:00
|
|
|
export default {
|
|
|
|
name: 'migrateService',
|
|
|
|
components: {
|
|
|
|
Migration,
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
name: '',
|
|
|
|
identifier: '',
|
2021-09-04 21:26:38 +02:00
|
|
|
isFileMigrator: false,
|
2020-09-05 22:35:52 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
2021-06-24 01:24:57 +02:00
|
|
|
this.setTitle(this.$t('migrate.titleService', {name: this.name}))
|
2020-09-05 22:35:52 +02:00
|
|
|
},
|
|
|
|
created() {
|
2021-09-04 21:26:38 +02:00
|
|
|
try {
|
|
|
|
const {name, identifier, isFileMigrator} = getMigratorFromSlug(this.$route.params.service)
|
|
|
|
this.name = name
|
|
|
|
this.identifier = identifier
|
|
|
|
this.isFileMigrator = isFileMigrator
|
|
|
|
} catch (e) {
|
2021-08-20 15:17:19 +02:00
|
|
|
this.$router.push({name: 'not-found'})
|
2020-09-05 22:35:52 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
2020-05-24 15:31:27 +02:00
|
|
|
</script>
|
|
|
|
|