Show some charts in control panel

This commit is contained in:
syuilo 2018-08-18 03:52:24 +09:00
parent cd09fa5a28
commit bc34ac82cf
10 changed files with 413 additions and 151 deletions

View file

@ -0,0 +1,33 @@
<template>
<div>
<header>%i18n:@title%</header>
<x-chart v-if="data" :data="data" type="local"/>
<x-chart v-if="data" :data="data" type="remote"/>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import XChart from "./admin.users-chart.chart.vue";
export default Vue.extend({
components: {
XChart
},
data() {
return {
data: null
};
},
created() {
(this as any).api('aggregation/users').then(res => {
this.data = res;
});
}
});
</script>
<style lang="stylus" scoped>
@import '~const.styl'
</style>