From c1520763c67f1f2e676f803a404be945583535b4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 3 Nov 2018 13:30:57 +0900 Subject: [PATCH] :art: --- src/client/app/admin/views/charts.vue | 3 ++ src/client/app/admin/views/cpu-memory.vue | 63 ++++++++++++++++++----- 2 files changed, 52 insertions(+), 14 deletions(-) diff --git a/src/client/app/admin/views/charts.vue b/src/client/app/admin/views/charts.vue index 0fe5b7c812..5c6b362fcf 100644 --- a/src/client/app/admin/views/charts.vue +++ b/src/client/app/admin/views/charts.vue @@ -154,6 +154,9 @@ export default Vue.extend({ }, toolbar: { show: false + }, + zoom: { + enabled: false } }, dataLabels: { diff --git a/src/client/app/admin/views/cpu-memory.vue b/src/client/app/admin/views/cpu-memory.vue index 6cd8a91f4a..c78efacb17 100644 --- a/src/client/app/admin/views/cpu-memory.vue +++ b/src/client/app/admin/views/cpu-memory.vue @@ -1,7 +1,18 @@ @@ -18,7 +29,8 @@ export default Vue.extend({ cpuChart: null, memChart: null, cpuP: '', - memP: '' + memP: '', + meta: null }; }, @@ -34,6 +46,10 @@ export default Vue.extend({ }, mounted() { + (this as any).os.getMeta().then(meta => { + this.meta = meta; + }); + this.connection.on('stats', this.onStats); this.connection.on('statsLog', this.onStatsLog); this.connection.send('requestLog', { @@ -52,6 +68,9 @@ export default Vue.extend({ }, toolbar: { show: false + }, + zoom: { + enabled: false } }, dataLabels: { @@ -64,6 +83,9 @@ export default Vue.extend({ curve: 'straight', width: 2 }, + tooltip: { + enabled: false + }, series: [{ data: [] }], @@ -71,6 +93,9 @@ export default Vue.extend({ type: 'numeric', labels: { show: false + }, + tooltip: { + enabled: false } }, yaxis: { @@ -80,16 +105,8 @@ export default Vue.extend({ } }; - this.cpuChart = new ApexCharts(this.$refs.cpu, Object.assign({}, chartOpts, { - title: { - text: 'CPU' - } - })); - this.memChart = new ApexCharts(this.$refs.mem, Object.assign({}, chartOpts, { - title: { - text: 'MEM' - } - })); + this.cpuChart = new ApexCharts(this.$refs.cpu, chartOpts); + this.memChart = new ApexCharts(this.$refs.mem, chartOpts); this.cpuChart.render(); this.memChart.render(); @@ -123,7 +140,7 @@ export default Vue.extend({ > div display block flex 1 - padding 24px 16px 12px 16px + padding 20px 16px 0 16px box-shadow 0 2px 4px rgba(0, 0, 0, 0.1) background var(--face) border-radius 8px @@ -131,4 +148,22 @@ export default Vue.extend({ &:first-child margin-right 16px + > header + display flex + padding 0 4px + margin-bottom -8px + color #555 + font-size 14px + + > span + &:last-child + margin-left auto + opacity 0.7 + + > span + opacity 0.7 + + > div + margin-bottom -8px +