diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-11-04 11:08:03 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-11-04 11:08:03 +0900 |
| commit | 449b9f7fa0b2ccb985c670c0330c87be4b118d2a (patch) | |
| tree | cc6352042c15caafd0da6a8613ab8c4ba6494b9b /src/client/app/admin | |
| parent | 絵文字を作成した/更新した時にupdateAtを更新するように (diff) | |
| download | sharkey-449b9f7fa0b2ccb985c670c0330c87be4b118d2a.tar.gz sharkey-449b9f7fa0b2ccb985c670c0330c87be4b118d2a.tar.bz2 sharkey-449b9f7fa0b2ccb985c670c0330c87be4b118d2a.zip | |
[Client] Improve admin panel
Diffstat (limited to 'src/client/app/admin')
| -rw-r--r-- | src/client/app/admin/views/ap-log.vue | 9 | ||||
| -rw-r--r-- | src/client/app/admin/views/charts.vue | 40 | ||||
| -rw-r--r-- | src/client/app/admin/views/cpu-memory.vue | 3 | ||||
| -rw-r--r-- | src/client/app/admin/views/dashboard.vue | 10 |
4 files changed, 46 insertions, 16 deletions
diff --git a/src/client/app/admin/views/ap-log.vue b/src/client/app/admin/views/ap-log.vue index 175a8c1117..6bc4a2f92d 100644 --- a/src/client/app/admin/views/ap-log.vue +++ b/src/client/app/admin/views/ap-log.vue @@ -67,7 +67,7 @@ export default Vue.extend({ height 250px overflow auto box-shadow 0 2px 4px rgba(0, 0, 0, 0.1) - background var(--face) + background var(--adminDashboardCardBg) border-radius 8px > table @@ -76,10 +76,11 @@ export default Vue.extend({ overflow auto border-spacing 0 border-collapse collapse - color #555 + color var(--adminDashboardCardFg) + font-size 15px thead - border-bottom solid 2px #eee + border-bottom solid 2px var(--adminDashboardCardDivider) tr th @@ -89,7 +90,7 @@ export default Vue.extend({ tbody tr &:nth-child(odd) - background #fbfbfb + background rgba(0, 0, 0, 0.025) th, td padding 8px 16px diff --git a/src/client/app/admin/views/charts.vue b/src/client/app/admin/views/charts.vue index 0527840f6d..041f419cf5 100644 --- a/src/client/app/admin/views/charts.vue +++ b/src/client/app/admin/views/charts.vue @@ -39,6 +39,7 @@ <script lang="ts"> import Vue from 'vue'; +import * as tinycolor from 'tinycolor2'; import * as ApexCharts from 'apexcharts'; const limit = 90; @@ -147,7 +148,7 @@ export default Vue.extend({ this.chartInstance.destroy(); } - this.chartInstance = new ApexCharts(this.$refs.chart, Object.assign({ + this.chartInstance = new ApexCharts(this.$refs.chart, { chart: { type: 'area', height: 300, @@ -168,17 +169,41 @@ export default Vue.extend({ }, grid: { clipMarkers: false, + borderColor: 'rgba(0, 0, 0, 0.1)' }, stroke: { curve: 'straight', width: 2 }, + legend: { + labels: { + color: tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--text')).toRgbString() + }, + }, xaxis: { - type: 'datetime' + type: 'datetime', + labels: { + style: { + colors: tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--text')).toRgbString() + } + }, + axisBorder: { + color: 'rgba(0, 0, 0, 0.1)' + }, + axisTicks: { + color: 'rgba(0, 0, 0, 0.1)' + }, }, yaxis: { - } - }, this.data)); + labels: { + formatter: this.data.bytes ? v => Vue.filter('bytes')(v, 0) : v => Vue.filter('number')(v), + style: { + color: tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--text')).toRgbString() + } + } + }, + series: this.data.series + }); this.chartInstance.render(); }, @@ -286,6 +311,7 @@ export default Vue.extend({ driveChart(): any { return { + bytes: true, series: [{ name: 'All', data: this.format( @@ -314,6 +340,7 @@ export default Vue.extend({ driveTotalChart(): any { return { + bytes: true, series: [{ name: 'Combined', data: this.format(sum(this.stats.drive.local.totalSize, this.stats.drive.remote.totalSize)) @@ -396,6 +423,7 @@ export default Vue.extend({ networkUsageChart(): any { return { + bytes: true, series: [{ name: 'Incoming', data: this.format(this.stats.network.incomingBytes) @@ -424,8 +452,8 @@ export default Vue.extend({ margin 0 8px padding 0 0 8px 0 font-size 1em - color #555 - border-bottom solid 1px #eee + color var(--adminDashboardCardFg) + border-bottom solid 1px var(--adminDashboardCardDivider) > b margin-right 8px diff --git a/src/client/app/admin/views/cpu-memory.vue b/src/client/app/admin/views/cpu-memory.vue index beb452a360..f76f3de305 100644 --- a/src/client/app/admin/views/cpu-memory.vue +++ b/src/client/app/admin/views/cpu-memory.vue @@ -79,6 +79,7 @@ export default Vue.extend({ }, grid: { clipMarkers: false, + borderColor: 'rgba(0, 0, 0, 0.1)' }, stroke: { curve: 'straight', @@ -153,7 +154,7 @@ export default Vue.extend({ display flex padding 0 8px margin-bottom -16px - color #555 + color var(--adminDashboardCardFg) font-size 14px > span diff --git a/src/client/app/admin/views/dashboard.vue b/src/client/app/admin/views/dashboard.vue index dde11f72f7..4b271b398c 100644 --- a/src/client/app/admin/views/dashboard.vue +++ b/src/client/app/admin/views/dashboard.vue @@ -128,8 +128,8 @@ export default Vue.extend({ display flex margin-bottom 16px padding-bottom 16px - border-bottom solid 1px #ccc - color #777 + border-bottom solid 1px var(--adminDashboardHeaderBorder) + color var(--adminDashboardHeaderFg) font-size 14px > p @@ -154,9 +154,9 @@ export default Vue.extend({ flex 1 max-width 300px margin-right 16px - color var(--text) + color var(--adminDashboardCardFg) box-shadow 0 2px 4px rgba(0, 0, 0, 0.1) - background var(--face) + background var(--adminDashboardCardBg) border-radius 8px &:last-child @@ -192,7 +192,7 @@ export default Vue.extend({ > div:last-child display flex padding 6px 16px - border-top solid 1px #eee + border-top solid 1px var(--adminDashboardCardDivider) > span font-size 70% |