2018-11-03 03:00:23 +09:00
|
|
|
<template>
|
2021-04-22 22:29:33 +09:00
|
|
|
<div class="zbcjwnqg" style="margin-top: -8px;">
|
|
|
|
<div class="selects" style="display: flex;">
|
2021-08-06 22:29:19 +09:00
|
|
|
<MkSelect v-model="chartSrc" style="margin: 0; flex: 1;">
|
2021-04-22 22:29:33 +09:00
|
|
|
<optgroup :label="$ts.federation">
|
|
|
|
<option value="federation-instances">{{ $ts._charts.federationInstancesIncDec }}</option>
|
|
|
|
<option value="federation-instances-total">{{ $ts._charts.federationInstancesTotal }}</option>
|
|
|
|
</optgroup>
|
|
|
|
<optgroup :label="$ts.users">
|
|
|
|
<option value="users">{{ $ts._charts.usersIncDec }}</option>
|
|
|
|
<option value="users-total">{{ $ts._charts.usersTotal }}</option>
|
|
|
|
<option value="active-users">{{ $ts._charts.activeUsers }}</option>
|
|
|
|
</optgroup>
|
|
|
|
<optgroup :label="$ts.notes">
|
|
|
|
<option value="notes">{{ $ts._charts.notesIncDec }}</option>
|
|
|
|
<option value="local-notes">{{ $ts._charts.localNotesIncDec }}</option>
|
|
|
|
<option value="remote-notes">{{ $ts._charts.remoteNotesIncDec }}</option>
|
|
|
|
<option value="notes-total">{{ $ts._charts.notesTotal }}</option>
|
|
|
|
</optgroup>
|
|
|
|
<optgroup :label="$ts.drive">
|
|
|
|
<option value="drive-files">{{ $ts._charts.filesIncDec }}</option>
|
|
|
|
<option value="drive-files-total">{{ $ts._charts.filesTotal }}</option>
|
|
|
|
<option value="drive">{{ $ts._charts.storageUsageIncDec }}</option>
|
|
|
|
<option value="drive-total">{{ $ts._charts.storageUsageTotal }}</option>
|
|
|
|
</optgroup>
|
|
|
|
</MkSelect>
|
2021-10-22 05:36:48 +09:00
|
|
|
<MkSelect v-model="chartSpan" style="margin: 0 0 0 10px;">
|
2021-04-22 22:29:33 +09:00
|
|
|
<option value="hour">{{ $ts.perHour }}</option>
|
|
|
|
<option value="day">{{ $ts.perDay }}</option>
|
|
|
|
</MkSelect>
|
2020-02-17 02:21:27 +09:00
|
|
|
</div>
|
2021-10-22 05:36:48 +09:00
|
|
|
<MkChart :src="chartSrc" :span="chartSpan" :limit="chartLimit" :detailed="detailed"></MkChart>
|
2018-11-03 03:00:23 +09:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2021-10-22 05:36:48 +09:00
|
|
|
import { defineComponent, onMounted, ref, watch } from 'vue';
|
|
|
|
import MkSelect from '@client/components/form/select.vue';
|
|
|
|
import MkChart from '@client/components/chart.vue';
|
2021-03-23 17:30:14 +09:00
|
|
|
import * as os from '@client/os';
|
2021-10-22 05:36:48 +09:00
|
|
|
import { defaultStore } from '@client/store';
|
2018-11-03 03:00:23 +09:00
|
|
|
|
2020-10-17 20:12:00 +09:00
|
|
|
export default defineComponent({
|
2020-01-30 04:37:25 +09:00
|
|
|
components: {
|
2021-10-22 05:36:48 +09:00
|
|
|
MkSelect,
|
|
|
|
MkChart,
|
2020-01-30 04:37:25 +09:00
|
|
|
},
|
|
|
|
|
2020-08-09 15:51:02 +09:00
|
|
|
props: {
|
|
|
|
chartLimit: {
|
|
|
|
type: Number,
|
|
|
|
required: false,
|
|
|
|
default: 90
|
|
|
|
},
|
|
|
|
detailed: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2021-10-22 05:36:48 +09:00
|
|
|
setup() {
|
|
|
|
const chartSpan = ref<'hour' | 'day'>('hour');
|
|
|
|
const chartSrc = ref('notes');
|
2018-11-03 03:00:23 +09:00
|
|
|
|
2021-10-22 05:36:48 +09:00
|
|
|
return {
|
|
|
|
chartSrc,
|
|
|
|
chartSpan,
|
|
|
|
};
|
2020-08-13 23:02:43 +09:00
|
|
|
},
|
2018-11-03 03:00:23 +09:00
|
|
|
});
|
|
|
|
</script>
|
2020-02-17 02:21:27 +09:00
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.zbcjwnqg {
|
2021-04-22 22:29:33 +09:00
|
|
|
> .selects {
|
|
|
|
padding: 8px 16px 0 16px;
|
2020-02-17 02:21:27 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|