diff --git a/docker-compose.yml b/docker-compose.yml
index ebdb40952..06011ad22 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,7 +3,7 @@ version: '3'
services:
api:
container_name: modoboa_api
- restart: unless-stopped
+ restart: unless-stopped
build:
context: .
dockerfile: docker/Dockerfile.dev
@@ -24,13 +24,12 @@ services:
front:
container_name: modoboa_front
- restart: unless-stopped
+ restart: unless-stopped
build:
context: .
dockerfile: docker/Dockerfile.front.dev
ports:
- 8080:8080
- command: ""
volumes:
- ./frontend/:/home/node/
command: "yarn serve"
diff --git a/frontend/src/api/imap_migration/migrations.js b/frontend/src/api/imap_migration/migrations.js
index 82f8ace12..52efac6f1 100644
--- a/frontend/src/api/imap_migration/migrations.js
+++ b/frontend/src/api/imap_migration/migrations.js
@@ -3,8 +3,8 @@ import repository from '@/api/repository'
const resource = 'migrations'
export default {
- getMigrations (query) {
- return repository.get(`/${resource}/`, query)
+ getMigrations (params) {
+ return repository.get(`/${resource}/`, { params })
},
getMigration (slug, query) {
return repository.get(`/${resource}/${slug}/`, query)
diff --git a/frontend/src/components/imap_migration/MigrationsList.vue b/frontend/src/components/imap_migration/MigrationsList.vue
index 879680551..96e886f65 100644
--- a/frontend/src/components/imap_migration/MigrationsList.vue
+++ b/frontend/src/components/imap_migration/MigrationsList.vue
@@ -26,13 +26,18 @@
:headers="headers"
:items="migrations"
:search="search"
- item-key="pk"
+ item-key="id"
:options.sync="options"
:server-items-length="totalMigrations"
:loading="loading"
class="elevation-1"
show-select
>
+
+
+ {{ item.mailbox.full_address }}
+
+
@@ -60,9 +65,9 @@ export default {
return {
migrations: [],
headers: [
- { text: this.$gettext('Provider'), value: 'provider' },
- { text: this.$gettext('Old account'), value: 'old_account' },
- { text: this.$gettext('New account'), value: 'new_account' },
+ { text: this.$gettext('Provider'), value: 'provider.name' },
+ { text: this.$gettext('Old account'), value: 'username' },
+ { text: this.$gettext('New account'), value: 'mailbox' },
{ text: this.$gettext('Actions'), value: 'actions', sortable: false, align: 'right' }
],
@@ -75,17 +80,10 @@ export default {
},
methods: {
deleteMigration (migration) {
- this.$dialog.confirm(
- this.$gettext('Remove this migration?'), {
- cancelText: this.$gettext('Cancel'),
- okText: this.$gettext('Proceed')
- }
- ).then(dialog => {
- Migration.deleteMigration(migration.id).then(response => {
- bus.$emit('notification', { msg: this.$gettext('Provider deleted') })
- this.migrations = this.migrations.filter(item => {
- return item.id !== migration.id
- })
+ Migration.deleteMigration(migration.id).then(response => {
+ bus.$emit('notification', { msg: this.$gettext('Migration deleted') })
+ this.migrations = this.migrations.filter(item => {
+ return item.id !== migration.id
})
})
},
@@ -97,6 +95,7 @@ export default {
}
Migration.getMigrations(query).then(response => {
this.migrations = response.data
+ this.totalMigrations = this.migrations.length
this.loading = false
})
},
diff --git a/frontend/src/components/imap_migration/ProviderAssociatedForm.vue b/frontend/src/components/imap_migration/ProviderAssociatedForm.vue
index 37f0c62d0..b8afa1401 100644
--- a/frontend/src/components/imap_migration/ProviderAssociatedForm.vue
+++ b/frontend/src/components/imap_migration/ProviderAssociatedForm.vue
@@ -3,11 +3,11 @@
{
if (response.status === 200) {
this.domains.push({
- name: this.domain.initialdomain,
+ name: this.domain.name,
new_domain: this.domain.new_domain
})
- this.$emit('input', this.domains)
this.$refs.observer.reset()
this.domain = {
- initialdomain: '',
+ name: '',
new_domain: ''
}
+ this.$emit('input', this.domains)
}
}).catch(error => {
this.$refs.observer.setErrors(error.response.data)
diff --git a/frontend/src/components/parameters/ParametersForm.vue b/frontend/src/components/parameters/ParametersForm.vue
index 6b5262535..f0babeaf1 100644
--- a/frontend/src/components/parameters/ParametersForm.vue
+++ b/frontend/src/components/parameters/ParametersForm.vue
@@ -27,6 +27,8 @@
v-model="parameters[param.name]"
:label="param.label"
:hint="param.help_text"
+ :error="formErrors[param.name] !== undefined"
+ :error-messages="formErrors[param.name]"
persistent-hint
v-if="param.widget === 'BooleanField'"
/>
diff --git a/frontend/src/views/identities/Account.vue b/frontend/src/views/identities/Account.vue
index 6556876ce..d0e841a61 100644
--- a/frontend/src/views/identities/Account.vue
+++ b/frontend/src/views/identities/Account.vue
@@ -33,6 +33,7 @@