add api getAll method and fixed toolbar button positionning

This commit is contained in:
Axolotle 2020-08-08 15:04:49 +02:00
parent 182f4bf5cc
commit 7cda8b00bc
4 changed files with 13 additions and 6 deletions

View file

@ -42,7 +42,11 @@ export default {
}) })
}, },
post (uri, data) { getAll (uris) {
return Promise.all(uris.map((uri) => this.get(uri)))
},
post (uri, data = {}) {
return fetch('/api/' + uri, { return fetch('/api/' + uri, {
...this.options, ...this.options,
method: 'POST', method: 'POST',
@ -50,7 +54,7 @@ export default {
}).then(response => handleResponse(response)) }).then(response => handleResponse(response))
}, },
put (uri, data) { put (uri, data = {}) {
return fetch('/api/' + uri, { return fetch('/api/' + uri, {
...this.options, ...this.options,
method: 'PUT', method: 'PUT',
@ -58,7 +62,7 @@ export default {
}).then(response => handleResponse(response)) }).then(response => handleResponse(response))
}, },
delete (uri, data) { delete (uri, data = {}) {
return fetch('/api/' + uri, { return fetch('/api/' + uri, {
...this.options, ...this.options,
method: 'DELETE', method: 'DELETE',

View file

@ -93,7 +93,7 @@ body {
} }
@include media-breakpoint-up(md) { @include media-breakpoint-up(md) {
.btn-success { .btn ~ .btn {
margin-left: .5rem; margin-left: .5rem;
} }
} }

View file

@ -9,7 +9,7 @@
<icon :iname="cert.alert.icon" /> {{ $t('certificate_alert_' + cert.alert.trad) }} <icon :iname="cert.alert.icon" /> {{ $t('certificate_alert_' + cert.alert.trad) }}
</p> </p>
<dl class="dl-horizontal"> <dl>
<dt v-t="'certificate_authority'" /> <dt v-t="'certificate_authority'" />
<dd>{{ cert.type }} ({{ name }})</dd> <dd>{{ cert.type }} ({{ name }})</dd>
<hr> <hr>

View file

@ -7,7 +7,7 @@
<template v-slot:header> <template v-slot:header>
<h2><icon iname="globe" /> {{ $t('domain_dns_config') }}</h2> <h2><icon iname="globe" /> {{ $t('domain_dns_config') }}</h2>
</template> </template>
<pre><code>{{ dnsConfig }}</code></pre> <pre class="mb-0 p-3 bg-light"><code>{{ dnsConfig }}</code></pre>
</b-card> </b-card>
</div> </div>
</template> </template>
@ -38,4 +38,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.card-body {
padding: 0;
}
</style> </style>