Introduce per-instance chart (#4183)

* Introduce per-instance chart

* Implement chart view in client

* Handle note deleting

* More chart srcs

* Add drive stats

* Improve drive stats

* Fix bug

* Add icon
This commit is contained in:
syuilo 2019-02-08 16:58:57 +09:00 committed by GitHub
parent f35688bab8
commit 56275bcfcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 746 additions and 13 deletions

View file

@ -4,6 +4,7 @@ import request from '../../../remote/activitypub/request';
import { queueLogger } from '../../logger';
import { registerOrFetchInstanceDoc } from '../../../services/register-or-fetch-instance-doc';
import Instance from '../../../models/instance';
import instanceChart from '../../../services/chart/instance';
export default async (job: bq.Job, done: any): Promise<void> => {
const { host } = new URL(job.data.to);
@ -19,6 +20,8 @@ export default async (job: bq.Job, done: any): Promise<void> => {
latestStatus: 200
}
});
instanceChart.requestSent(i.host, true);
});
done();
@ -31,6 +34,8 @@ export default async (job: bq.Job, done: any): Promise<void> => {
latestStatus: res != null && res.hasOwnProperty('statusCode') ? res.statusCode : null
}
});
instanceChart.requestSent(i.host, false);
});
if (res != null && res.hasOwnProperty('statusCode')) {