Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Domain/List.vue
Show All 14 Lines | <div class="container"> | ||||
<tr v-for="domain in domains" :key="domain.id" @click="$root.clickRecord"> | <tr v-for="domain in domains" :key="domain.id" @click="$root.clickRecord"> | ||||
<td> | <td> | ||||
<svg-icon icon="globe" :class="$root.domainStatusClass(domain)" :title="$root.domainStatusText(domain)"></svg-icon> | <svg-icon icon="globe" :class="$root.domainStatusClass(domain)" :title="$root.domainStatusText(domain)"></svg-icon> | ||||
<router-link :to="{ path: 'domain/' + domain.id }">{{ domain.namespace }}</router-link> | <router-link :to="{ path: 'domain/' + domain.id }">{{ domain.namespace }}</router-link> | ||||
</td> | </td> | ||||
<td class="buttons"></td> | <td class="buttons"></td> | ||||
</tr> | </tr> | ||||
</tbody> | </tbody> | ||||
<tfoot class="table-fake-body"> | |||||
<tr> | |||||
<td colspan="2">There are no domains in this account.</td> | |||||
</tr> | |||||
</tfoot> | |||||
</table> | </table> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
domains: [] | domains: [] | ||||
} | } | ||||
}, | }, | ||||
created() { | created() { | ||||
this.$root.startLoading() | |||||
axios.get('/api/v4/domains') | axios.get('/api/v4/domains') | ||||
.then(response => { | .then(response => { | ||||
this.$root.stopLoading() | |||||
this.domains = response.data | this.domains = response.data | ||||
}) | }) | ||||
.catch(this.$root.errorHandler) | .catch(this.$root.errorHandler) | ||||
} | } | ||||
} | } | ||||
</script> | </script> |