admin-utilities-importv1.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template lang='pug'>
  2. v-card
  3. v-toolbar(flat, color='primary', dark, dense)
  4. .subtitle-1 {{ $t('admin:utilities.importv1Title') }}
  5. v-card-text
  6. .text-center
  7. img.animated.fadeInUp.wait-p1s(src='/svg/icon-software.svg')
  8. .body-2 Import from Wiki.js 1.x
  9. v-divider.my-4
  10. .body-2 Data from a Wiki.js 1.x installation can easily be imported using this tool. What do you want to import?
  11. v-checkbox(
  12. label='Content'
  13. value='content'
  14. color='deep-orange darken-2'
  15. v-model='importFilters'
  16. hide-details
  17. )
  18. v-checkbox(
  19. label='Uploads'
  20. value='uploads'
  21. color='deep-orange darken-2'
  22. v-model='importFilters'
  23. hide-details
  24. )
  25. v-checkbox(
  26. label='Users'
  27. value='users'
  28. color='deep-orange darken-2'
  29. v-model='importFilters'
  30. hide-details
  31. )
  32. v-divider.my-5
  33. v-text-field.mt-3(
  34. outlined
  35. label='MongoDB Connection String'
  36. hint='The connection string to connect to the Wiki.js 1.x MongoDB database.'
  37. persistent-hint
  38. v-model='dbConnStr'
  39. v-if='needDB'
  40. )
  41. v-text-field.mt-3(
  42. outlined
  43. label='Content Repo Path'
  44. hint='The full path to where the Wiki.js 1.x content is stored on disk.'
  45. persistent-hint
  46. v-model='contentPath'
  47. v-if='needDisk'
  48. )
  49. v-card-chin
  50. v-btn.px-3(depressed, color='deep-orange darken-2', :disabled='!needDB && !needDisk', @click='startImport').ml-0
  51. v-icon(left, color='white') mdi-database-import
  52. span.white--text Start Import
  53. v-dialog(
  54. v-model='isLoading'
  55. persistent
  56. max-width='350'
  57. )
  58. v-card(color='deep-orange darken-2', dark)
  59. v-card-text.pa-10.text-center
  60. semipolar-spinner.animated.fadeIn(
  61. :animation-duration='1500'
  62. :size='65'
  63. color='#FFF'
  64. style='margin: 0 auto;'
  65. )
  66. .mt-5.body-1.white--text Importing from Wiki.js 1.x...
  67. .caption Please wait
  68. </template>
  69. <script>
  70. import { SemipolarSpinner } from 'epic-spinners'
  71. export default {
  72. components: {
  73. SemipolarSpinner
  74. },
  75. data() {
  76. return {
  77. importFilters: ['content', 'uploads', 'users'],
  78. dbConnStr: 'mongodb://',
  79. contentPath: '/wiki-v1/repo',
  80. isLoading: false
  81. }
  82. },
  83. computed: {
  84. needDB() {
  85. return this.importFilters.indexOf('users') >= 0
  86. },
  87. needDisk() {
  88. return this.importFilters.indexOf('content') >= 0 || this.importFilters.indexOf('uploads') >= 0
  89. }
  90. },
  91. methods: {
  92. async startImport () {
  93. this.isLoading = true
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang='scss'>
  99. </style>