2019-06-30 19:18:26 +00:00
|
|
|
<template lang='pug'>
|
2019-09-16 03:20:40 +00:00
|
|
|
v-card
|
2019-06-30 19:18:26 +00:00
|
|
|
v-toolbar(flat, color='primary', dark, dense)
|
2019-08-03 04:48:55 +00:00
|
|
|
.subtitle-1 {{ $t('admin:utilities.importv1Title') }}
|
2019-06-30 19:18:26 +00:00
|
|
|
v-card-text
|
2019-09-16 03:20:40 +00:00
|
|
|
.text-center
|
2019-06-30 19:18:26 +00:00
|
|
|
img.animated.fadeInUp.wait-p1s(src='/svg/icon-software.svg')
|
|
|
|
.body-2 Import from Wiki.js 1.x
|
|
|
|
v-divider.my-4
|
2019-09-16 03:20:40 +00:00
|
|
|
.body-2 Data from a Wiki.js 1.x installation can easily be imported using this tool. What do you want to import?
|
2019-06-30 19:18:26 +00:00
|
|
|
v-checkbox(
|
|
|
|
label='Content'
|
|
|
|
value='content'
|
|
|
|
color='deep-orange darken-2'
|
|
|
|
v-model='importFilters'
|
|
|
|
hide-details
|
|
|
|
)
|
|
|
|
v-checkbox(
|
|
|
|
label='Uploads'
|
|
|
|
value='uploads'
|
|
|
|
color='deep-orange darken-2'
|
|
|
|
v-model='importFilters'
|
|
|
|
hide-details
|
|
|
|
)
|
|
|
|
v-checkbox(
|
|
|
|
label='Users'
|
|
|
|
value='users'
|
|
|
|
color='deep-orange darken-2'
|
|
|
|
v-model='importFilters'
|
|
|
|
hide-details
|
|
|
|
)
|
2019-09-16 03:20:40 +00:00
|
|
|
v-divider.my-5
|
2019-06-30 19:18:26 +00:00
|
|
|
v-text-field.mt-3(
|
2019-09-16 03:20:40 +00:00
|
|
|
outlined
|
2019-06-30 19:18:26 +00:00
|
|
|
label='MongoDB Connection String'
|
|
|
|
hint='The connection string to connect to the Wiki.js 1.x MongoDB database.'
|
|
|
|
persistent-hint
|
|
|
|
v-model='dbConnStr'
|
|
|
|
v-if='needDB'
|
|
|
|
)
|
|
|
|
v-text-field.mt-3(
|
2019-09-16 03:20:40 +00:00
|
|
|
outlined
|
2019-06-30 19:18:26 +00:00
|
|
|
label='Content Repo Path'
|
|
|
|
hint='The full path to where the Wiki.js 1.x content is stored on disk.'
|
|
|
|
persistent-hint
|
|
|
|
v-model='contentPath'
|
|
|
|
v-if='needDisk'
|
|
|
|
)
|
|
|
|
v-card-chin
|
2019-09-16 03:20:40 +00:00
|
|
|
v-btn.px-3(depressed, color='deep-orange darken-2', :disabled='!needDB && !needDisk', @click='startImport').ml-0
|
|
|
|
v-icon(left, color='white') mdi-database-import
|
2019-06-30 19:18:26 +00:00
|
|
|
span.white--text Start Import
|
2019-09-16 03:20:40 +00:00
|
|
|
v-dialog(
|
|
|
|
v-model='isLoading'
|
|
|
|
persistent
|
|
|
|
max-width='350'
|
|
|
|
)
|
|
|
|
v-card(color='deep-orange darken-2', dark)
|
|
|
|
v-card-text.pa-10.text-center
|
|
|
|
semipolar-spinner.animated.fadeIn(
|
|
|
|
:animation-duration='1500'
|
|
|
|
:size='65'
|
|
|
|
color='#FFF'
|
|
|
|
style='margin: 0 auto;'
|
|
|
|
)
|
|
|
|
.mt-5.body-1.white--text Importing from Wiki.js 1.x...
|
|
|
|
.caption Please wait
|
2019-06-30 19:18:26 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-09-16 03:20:40 +00:00
|
|
|
import { SemipolarSpinner } from 'epic-spinners'
|
|
|
|
|
2019-06-30 19:18:26 +00:00
|
|
|
export default {
|
2019-09-16 03:20:40 +00:00
|
|
|
components: {
|
|
|
|
SemipolarSpinner
|
|
|
|
},
|
2019-06-30 19:18:26 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2019-09-16 03:20:40 +00:00
|
|
|
importFilters: ['content', 'uploads', 'users'],
|
2019-06-30 19:18:26 +00:00
|
|
|
dbConnStr: 'mongodb://',
|
2019-09-16 03:20:40 +00:00
|
|
|
contentPath: '/wiki-v1/repo',
|
|
|
|
isLoading: false
|
2019-06-30 19:18:26 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
needDB() {
|
|
|
|
return this.importFilters.indexOf('users') >= 0
|
|
|
|
},
|
|
|
|
needDisk() {
|
|
|
|
return this.importFilters.indexOf('content') >= 0 || this.importFilters.indexOf('uploads') >= 0
|
|
|
|
}
|
2019-09-16 03:20:40 +00:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
async startImport () {
|
|
|
|
this.isLoading = true
|
|
|
|
}
|
2019-06-30 19:18:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang='scss'>
|
|
|
|
|
|
|
|
</style>
|