diff --git a/src/client/app/admin/views/charts.vue b/src/client/app/admin/views/charts.vue index ce611ae17..0527840f6 100644 --- a/src/client/app/admin/views/charts.vue +++ b/src/client/app/admin/views/charts.vue @@ -138,6 +138,10 @@ export default Vue.extend({ }, methods: { + setSrc(src) { + this.src = src; + }, + render() { if (this.chartInstance) { this.chartInstance.destroy(); diff --git a/src/client/app/admin/views/dashboard.vue b/src/client/app/admin/views/dashboard.vue index 00cfbac9d..dde11f72f 100644 --- a/src/client/app/admin/views/dashboard.vue +++ b/src/client/app/admin/views/dashboard.vue @@ -19,6 +19,7 @@
%fa:home% %i18n:@this-instance% + %fa:chart-bar R%
@@ -31,6 +32,7 @@
%fa:home% %i18n:@this-instance% + %fa:chart-bar R%
@@ -43,6 +45,7 @@
%fa:home% %i18n:@this-instance% + %fa:chart-bar R%
@@ -55,12 +58,13 @@
%fa:globe% %i18n:@federated% + %fa:chart-bar R%
- +
@@ -85,6 +89,7 @@ export default Vue.extend({ XCharts, XApLog }, + data() { return { stats: null, @@ -92,6 +97,7 @@ export default Vue.extend({ meta: null }; }, + created() { this.connection = (this as any).os.stream.useSharedConnection('serverStats'); @@ -103,8 +109,15 @@ export default Vue.extend({ this.stats = stats; }); }, + beforeDestroy() { this.connection.dispose(); + }, + + methods: { + setChartSrc(src) { + this.$refs.charts.setSrc(src); + } } }); @@ -177,6 +190,7 @@ export default Vue.extend({ color var(--primary) > div:last-child + display flex padding 6px 16px border-top solid 1px #eee @@ -184,6 +198,10 @@ export default Vue.extend({ font-size 70% opacity 0.7 + &:last-child + margin-left auto + cursor pointer + > .charts margin-bottom 16px