mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-07-31 20:35:52 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| caf625afee | |||
| 2bad3865a3 | |||
| 3f7d248684 | |||
| 6e179e7cde | |||
| 87f248b8ec | |||
| 027140eccc | |||
| 92cf205c66 | |||
| fa3299840f | |||
| 2d4b183c14 | |||
| 03b20e11ca | |||
| e0e006e284 | |||
| a294a881ec | |||
| 53926082e7 | |||
| 5b5de6a89c | |||
| a11c991f83 | |||
| 839be6477d |
+21
-12
@@ -941,18 +941,27 @@ desktop/views/pages/admin/admin.unverify-user.vue:
|
|||||||
|
|
||||||
desktop/views/pages/admin/admin.chart.vue:
|
desktop/views/pages/admin/admin.chart.vue:
|
||||||
title: "チャート"
|
title: "チャート"
|
||||||
local-notes: "ローカルの投稿"
|
per-day: "1日ごと"
|
||||||
remote-notes: "リモートの投稿"
|
per-hour: "1時間ごと"
|
||||||
local-notes-total: "ローカルの投稿 (累計)"
|
notes: "投稿"
|
||||||
remote-notes-total: "リモートの投稿 (累計)"
|
users: "ユーザー"
|
||||||
local-users: "ローカルのユーザー"
|
drive: "ドライブ"
|
||||||
remote-users: "リモートのユーザー"
|
local-notes: "ローカルの投稿の増減"
|
||||||
local-users-total: "ローカルのユーザー (累計)"
|
remote-notes: "リモートの投稿の増減"
|
||||||
remote-users-total: "リモートのユーザー (累計)"
|
local-notes-total: "ローカルの投稿の累計"
|
||||||
local-drive: "ローカルのドライブ使用量"
|
remote-notes-total: "リモートの投稿の累計"
|
||||||
remote-drive: "リモートのドライブ使用量"
|
local-users: "ローカルのユーザーの増減"
|
||||||
local-drive-total: "ローカルのドライブ使用量 (累計)"
|
remote-users: "リモートのユーザーの増減"
|
||||||
remote-drive-total: "リモートのドライブ使用量 (累計)"
|
local-users-total: "ローカルのユーザーの累計"
|
||||||
|
remote-users-total: "リモートのユーザーの累計"
|
||||||
|
local-drive: "ローカルのドライブ使用量の増減"
|
||||||
|
remote-drive: "リモートのドライブ使用量の増減"
|
||||||
|
local-drive-total: "ローカルのドライブ使用量の累計"
|
||||||
|
remote-drive-total: "リモートのドライブ使用量の累計"
|
||||||
|
local-drive-files: "ローカルのドライブのファイル数の増減"
|
||||||
|
remote-drive-files: "リモートのドライブのファイル数の増減"
|
||||||
|
local-drive-files-total: "ローカルのドライブのファイル数の累計"
|
||||||
|
remote-drive-files-total: "リモートのドライブのファイル数の累計"
|
||||||
|
|
||||||
desktop/views/pages/deck/deck.tl-column.vue:
|
desktop/views/pages/deck/deck.tl-column.vue:
|
||||||
is-media-only: "メディア投稿のみ"
|
is-media-only: "メディア投稿のみ"
|
||||||
|
|||||||
+3
-2
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "8.2.0",
|
"version": "8.4.0",
|
||||||
"clientVersion": "1.0.8818",
|
"clientVersion": "1.0.8831",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
@@ -150,6 +150,7 @@
|
|||||||
"loader-utils": "1.1.0",
|
"loader-utils": "1.1.0",
|
||||||
"lodash.assign": "4.2.0",
|
"lodash.assign": "4.2.0",
|
||||||
"mecab-async": "0.1.2",
|
"mecab-async": "0.1.2",
|
||||||
|
"merge-options": "1.0.1",
|
||||||
"minio": "7.0.0",
|
"minio": "7.0.0",
|
||||||
"mkdirp": "0.5.1",
|
"mkdirp": "0.5.1",
|
||||||
"mocha": "5.2.0",
|
"mocha": "5.2.0",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { Line } from 'vue-chartjs';
|
import { Line } from 'vue-chartjs';
|
||||||
|
import * as mergeOptions from 'merge-options';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
extends: Line,
|
extends: Line,
|
||||||
@@ -21,16 +22,12 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
render() {
|
render() {
|
||||||
this.renderChart(this.data, Object.assign({
|
this.renderChart(this.data, mergeOptions({
|
||||||
responsive: false,
|
responsive: true,
|
||||||
|
maintainAspectRatio: false,
|
||||||
scales: {
|
scales: {
|
||||||
xAxes: [{
|
xAxes: [{
|
||||||
type: 'time',
|
type: 'time',
|
||||||
time: {
|
|
||||||
displayFormats: {
|
|
||||||
quarter: 'YYYY/MM/D h:mm'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
distribution: 'series'
|
distribution: 'series'
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,24 +3,36 @@
|
|||||||
<header>
|
<header>
|
||||||
<b>%i18n:@title%:</b>
|
<b>%i18n:@title%:</b>
|
||||||
<select v-model="chartType">
|
<select v-model="chartType">
|
||||||
<option value="local-users">%i18n:@local-users%</option>
|
<optgroup label="%i18n:@users%">
|
||||||
<option value="remote-users">%i18n:@remote-users%</option>
|
<option value="local-users">%i18n:@local-users%</option>
|
||||||
<option value="local-users-total">%i18n:@local-users-total%</option>
|
<option value="remote-users">%i18n:@remote-users%</option>
|
||||||
<option value="remote-users-total">%i18n:@remote-users-total%</option>
|
<option value="local-users-total">%i18n:@local-users-total%</option>
|
||||||
<option value="local-notes">%i18n:@local-notes%</option>
|
<option value="remote-users-total">%i18n:@remote-users-total%</option>
|
||||||
<option value="remote-notes">%i18n:@remote-notes%</option>
|
</optgroup>
|
||||||
<option value="local-notes-total">%i18n:@local-notes-total%</option>
|
<optgroup label="%i18n:@notes%">
|
||||||
<option value="remote-notes-total">%i18n:@remote-notes-total%</option>
|
<option value="local-notes">%i18n:@local-notes%</option>
|
||||||
<option value="local-drive">%i18n:@local-drive%</option>
|
<option value="remote-notes">%i18n:@remote-notes%</option>
|
||||||
<option value="remote-drive">%i18n:@remote-drive%</option>
|
<option value="local-notes-total">%i18n:@local-notes-total%</option>
|
||||||
<option value="local-drive-total">%i18n:@local-drive-total%</option>
|
<option value="remote-notes-total">%i18n:@remote-notes-total%</option>
|
||||||
<option value="remote-drive-total">%i18n:@remote-drive-total%</option>
|
</optgroup>
|
||||||
|
<optgroup label="%i18n:@drive%">
|
||||||
|
<option value="local-drive-files">%i18n:@local-drive-files%</option>
|
||||||
|
<option value="remote-drive-files">%i18n:@remote-drive-files%</option>
|
||||||
|
<option value="local-drive-files-total">%i18n:@local-drive-files-total%</option>
|
||||||
|
<option value="remote-drive-files-total">%i18n:@remote-drive-files-total%</option>
|
||||||
|
<option value="local-drive">%i18n:@local-drive%</option>
|
||||||
|
<option value="remote-drive">%i18n:@remote-drive%</option>
|
||||||
|
<option value="local-drive-total">%i18n:@local-drive-total%</option>
|
||||||
|
<option value="remote-drive-total">%i18n:@remote-drive-total%</option>
|
||||||
|
</optgroup>
|
||||||
</select>
|
</select>
|
||||||
<div>
|
<div>
|
||||||
<a @click="span = 'day'">Per DAY</a> | <a @click="span = 'hour'">Per HOUR</a>
|
<a @click="span = 'day'">%i18n:@per-day%</a> | <a @click="span = 'hour'">%i18n:@per-hour%</a>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<x-chart v-if="chart" :data="data[0]" :opts="data[1]" :width="720" :height="300"/>
|
<div>
|
||||||
|
<x-chart v-if="chart" :data="data[0]" :opts="data[1]"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -59,6 +71,10 @@ export default Vue.extend({
|
|||||||
case 'remote-drive': return this.driveChart(false, false);
|
case 'remote-drive': return this.driveChart(false, false);
|
||||||
case 'local-drive-total': return this.driveChart(true, true);
|
case 'local-drive-total': return this.driveChart(true, true);
|
||||||
case 'remote-drive-total': return this.driveChart(false, true);
|
case 'remote-drive-total': return this.driveChart(false, true);
|
||||||
|
case 'local-drive-files': return this.driveFilesChart(true, false);
|
||||||
|
case 'remote-drive-files': return this.driveFilesChart(false, false);
|
||||||
|
case 'local-drive-files-total': return this.driveFilesChart(true, true);
|
||||||
|
case 'remote-drive-files-total': return this.driveFilesChart(false, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stats(): any[] {
|
stats(): any[] {
|
||||||
@@ -76,11 +92,19 @@ export default Vue.extend({
|
|||||||
normal: local ? x.notes.local.diffs.normal : x.notes.remote.diffs.normal,
|
normal: local ? x.notes.local.diffs.normal : x.notes.remote.diffs.normal,
|
||||||
reply: local ? x.notes.local.diffs.reply : x.notes.remote.diffs.reply,
|
reply: local ? x.notes.local.diffs.reply : x.notes.remote.diffs.reply,
|
||||||
renote: local ? x.notes.local.diffs.renote : x.notes.remote.diffs.renote,
|
renote: local ? x.notes.local.diffs.renote : x.notes.remote.diffs.renote,
|
||||||
total: local ? x.notes.local.diff : x.notes.remote.diff
|
all: local ? x.notes.local.diff : x.notes.remote.diff
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
datasets: [{
|
datasets: [{
|
||||||
|
label: 'All',
|
||||||
|
fill: false,
|
||||||
|
borderColor: '#555',
|
||||||
|
borderWidth: 2,
|
||||||
|
pointBackgroundColor: '#fff',
|
||||||
|
lineTension: 0,
|
||||||
|
data: data.map(x => ({ t: x.date, y: x.all }))
|
||||||
|
}, {
|
||||||
label: 'Normal',
|
label: 'Normal',
|
||||||
fill: false,
|
fill: false,
|
||||||
borderColor: '#41ddde',
|
borderColor: '#41ddde',
|
||||||
@@ -107,6 +131,7 @@ export default Vue.extend({
|
|||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
},
|
},
|
||||||
|
|
||||||
notesTotalChart(local: boolean): any {
|
notesTotalChart(local: boolean): any {
|
||||||
const data = this.stats.slice().reverse().map(x => ({
|
const data = this.stats.slice().reverse().map(x => ({
|
||||||
date: new Date(x.date),
|
date: new Date(x.date),
|
||||||
@@ -116,7 +141,7 @@ export default Vue.extend({
|
|||||||
return [{
|
return [{
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: local ? 'Local Notes' : 'Remote Notes',
|
label: local ? 'Local Notes' : 'Remote Notes',
|
||||||
fill: false,
|
fill: true,
|
||||||
borderColor: '#f6584f',
|
borderColor: '#f6584f',
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointBackgroundColor: '#fff',
|
pointBackgroundColor: '#fff',
|
||||||
@@ -125,6 +150,7 @@ export default Vue.extend({
|
|||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
},
|
},
|
||||||
|
|
||||||
usersChart(local: boolean, total: boolean): any {
|
usersChart(local: boolean, total: boolean): any {
|
||||||
const data = this.stats.slice().reverse().map(x => ({
|
const data = this.stats.slice().reverse().map(x => ({
|
||||||
date: new Date(x.date),
|
date: new Date(x.date),
|
||||||
@@ -136,7 +162,7 @@ export default Vue.extend({
|
|||||||
return [{
|
return [{
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: local ? 'Local Users' : 'Remote Users',
|
label: local ? 'Local Users' : 'Remote Users',
|
||||||
fill: false,
|
fill: true,
|
||||||
borderColor: '#f6584f',
|
borderColor: '#f6584f',
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointBackgroundColor: '#fff',
|
pointBackgroundColor: '#fff',
|
||||||
@@ -145,10 +171,11 @@ export default Vue.extend({
|
|||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
},
|
},
|
||||||
|
|
||||||
driveChart(local: boolean, total: boolean): any {
|
driveChart(local: boolean, total: boolean): any {
|
||||||
const data = this.stats.slice().reverse().map(x => ({
|
const data = this.stats.slice().reverse().map(x => ({
|
||||||
date: new Date(x.date),
|
date: new Date(x.date),
|
||||||
count: local ?
|
size: local ?
|
||||||
total ? x.drive.local.totalSize : x.drive.local.diffSize :
|
total ? x.drive.local.totalSize : x.drive.local.diffSize :
|
||||||
total ? x.drive.remote.totalSize : x.drive.remote.diffSize
|
total ? x.drive.remote.totalSize : x.drive.remote.diffSize
|
||||||
}));
|
}));
|
||||||
@@ -156,12 +183,12 @@ export default Vue.extend({
|
|||||||
return [{
|
return [{
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: local ? 'Local Drive Usage' : 'Remote Drive Usage',
|
label: local ? 'Local Drive Usage' : 'Remote Drive Usage',
|
||||||
fill: false,
|
fill: true,
|
||||||
borderColor: '#f6584f',
|
borderColor: '#f6584f',
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointBackgroundColor: '#fff',
|
pointBackgroundColor: '#fff',
|
||||||
lineTension: 0,
|
lineTension: 0,
|
||||||
data: data.map(x => ({ t: x.date, y: x.count }))
|
data: data.map(x => ({ t: x.date, y: x.size }))
|
||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
scales: {
|
scales: {
|
||||||
@@ -174,7 +201,28 @@ export default Vue.extend({
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
}
|
},
|
||||||
|
|
||||||
|
driveFilesChart(local: boolean, total: boolean): any {
|
||||||
|
const data = this.stats.slice().reverse().map(x => ({
|
||||||
|
date: new Date(x.date),
|
||||||
|
count: local ?
|
||||||
|
total ? x.drive.local.totalCount : x.drive.local.diffCount :
|
||||||
|
total ? x.drive.remote.totalCount : x.drive.remote.diffCount
|
||||||
|
}));
|
||||||
|
|
||||||
|
return [{
|
||||||
|
datasets: [{
|
||||||
|
label: local ? 'Local Drive Files' : 'Remote Drive Files',
|
||||||
|
fill: false,
|
||||||
|
borderColor: '#f6584f',
|
||||||
|
borderWidth: 2,
|
||||||
|
pointBackgroundColor: '#fff',
|
||||||
|
lineTension: 0,
|
||||||
|
data: data.map(x => ({ t: x.date, y: x.count }))
|
||||||
|
}]
|
||||||
|
}];
|
||||||
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -192,4 +240,9 @@ export default Vue.extend({
|
|||||||
> *:last-child
|
> *:last-child
|
||||||
margin-left auto
|
margin-left auto
|
||||||
|
|
||||||
|
> div
|
||||||
|
> *
|
||||||
|
display block
|
||||||
|
height 300px
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ router.post('/signin', require('./private/signin').default);
|
|||||||
router.use(require('./service/github').routes());
|
router.use(require('./service/github').routes());
|
||||||
router.use(require('./service/twitter').routes());
|
router.use(require('./service/twitter').routes());
|
||||||
|
|
||||||
|
// Return 404 for unknown API
|
||||||
|
router.all('*', async ctx => {
|
||||||
|
ctx.status = 404;
|
||||||
|
});
|
||||||
|
|
||||||
// Register router
|
// Register router
|
||||||
app.use(router.routes());
|
app.use(router.routes());
|
||||||
|
|
||||||
|
|||||||
@@ -122,8 +122,7 @@ router.get('/notes/:note', async ctx => {
|
|||||||
router.get('*', async ctx => {
|
router.get('*', async ctx => {
|
||||||
await send(ctx, `app/base.html`, {
|
await send(ctx, `app/base.html`, {
|
||||||
root: client,
|
root: client,
|
||||||
maxage: ms('3 days'),
|
maxage: ms('5m')
|
||||||
immutable: true
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user