2018-11-02 13:00:23 -05:00
|
|
|
<template>
|
2022-01-04 00:36:14 -06:00
|
|
|
<div class="zbcjwnqg">
|
2021-04-22 08:29:33 -05:00
|
|
|
<div class="selects" style="display: flex;">
|
2021-08-06 08:29:19 -05:00
|
|
|
<MkSelect v-model="chartSrc" style="margin: 0; flex: 1;">
|
2021-04-22 08:29:33 -05:00
|
|
|
<optgroup :label="$ts.federation">
|
2022-02-05 09:43:22 -06:00
|
|
|
<option value="federation">{{ $ts._charts.federation }}</option>
|
|
|
|
<option value="ap-request">{{ $ts._charts.apRequest }}</option>
|
2021-04-22 08:29:33 -05:00
|
|
|
</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">{{ $ts._charts.storageUsageIncDec }}</option>
|
|
|
|
</optgroup>
|
|
|
|
</MkSelect>
|
2021-10-21 15:36:48 -05:00
|
|
|
<MkSelect v-model="chartSpan" style="margin: 0 0 0 10px;">
|
2021-04-22 08:29:33 -05:00
|
|
|
<option value="hour">{{ $ts.perHour }}</option>
|
|
|
|
<option value="day">{{ $ts.perDay }}</option>
|
|
|
|
</MkSelect>
|
2020-02-16 11:21:27 -06:00
|
|
|
</div>
|
2022-01-04 00:36:14 -06:00
|
|
|
<div class="chart">
|
|
|
|
<MkChart :src="chartSrc" :span="chartSpan" :limit="chartLimit" :detailed="detailed"></MkChart>
|
|
|
|
</div>
|
2018-11-02 13:00:23 -05:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2022-01-04 00:36:14 -06:00
|
|
|
import { defineComponent, ref } from 'vue';
|
2021-11-11 11:02:25 -06:00
|
|
|
import MkSelect from '@/components/form/select.vue';
|
|
|
|
import MkChart from '@/components/chart.vue';
|
2018-11-02 13:00:23 -05:00
|
|
|
|
2020-10-17 06:12:00 -05:00
|
|
|
export default defineComponent({
|
2020-01-29 13:37:25 -06:00
|
|
|
components: {
|
2021-10-21 15:36:48 -05:00
|
|
|
MkSelect,
|
|
|
|
MkChart,
|
2020-01-29 13:37:25 -06:00
|
|
|
},
|
|
|
|
|
2020-08-09 01:51:02 -05:00
|
|
|
props: {
|
|
|
|
chartLimit: {
|
|
|
|
type: Number,
|
|
|
|
required: false,
|
|
|
|
default: 90
|
|
|
|
},
|
|
|
|
detailed: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2021-10-21 15:36:48 -05:00
|
|
|
setup() {
|
|
|
|
const chartSpan = ref<'hour' | 'day'>('hour');
|
2022-02-10 04:02:52 -06:00
|
|
|
const chartSrc = ref('active-users');
|
2018-11-02 13:00:23 -05:00
|
|
|
|
2021-10-21 15:36:48 -05:00
|
|
|
return {
|
|
|
|
chartSrc,
|
|
|
|
chartSpan,
|
|
|
|
};
|
2020-08-13 09:02:43 -05:00
|
|
|
},
|
2018-11-02 13:00:23 -05:00
|
|
|
});
|
|
|
|
</script>
|
2020-02-16 11:21:27 -06:00
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.zbcjwnqg {
|
2021-04-22 08:29:33 -05:00
|
|
|
> .selects {
|
2022-01-04 00:36:14 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
> .chart {
|
|
|
|
padding: 8px 0 0 0;
|
2020-02-16 11:21:27 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|