mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-04 12:24:09 +01:00
WIP.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1 class="title">Add domain</h1>
|
||||
<form>
|
||||
<b-field label="Name">
|
||||
<b-input v-model="domain.name"></b-input>
|
||||
</b-field>
|
||||
<b-field label="Quota">
|
||||
<b-input v-model="domain.quota"></b-input>
|
||||
</b-field>
|
||||
<b-field>
|
||||
<button class="button is-primary" @click="saveDomain">Save</button>
|
||||
</b-field>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from '@/api'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
domain: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
saveDomain () {
|
||||
api.createDomain(this.domain).then(response => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<h1 class="title">Domains</h1>
|
||||
</div>
|
||||
<div class="column">
|
||||
<router-link :to="{ name: 'DomainAdd' }">Add</router-link>
|
||||
</div>
|
||||
</div>
|
||||
<b-table :data="domains" checkable>
|
||||
<template slot-scope="props">
|
||||
<b-table-column field="name" label="Name">
|
||||
{{ props.row.name }}
|
||||
</b-table-column>
|
||||
<b-table-column field="quota" label="Quota">
|
||||
<progress class="progress is-primary">30%</progress>
|
||||
</b-table-column>
|
||||
</template>
|
||||
</b-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from '@/api'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
domains: [],
|
||||
columns: [
|
||||
{
|
||||
field: 'name',
|
||||
label: 'Name'
|
||||
},
|
||||
{
|
||||
field: 'quota',
|
||||
label: 'Quota'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
api.getDomains().then(response => {
|
||||
this.domains = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user