|
|
|
@ -342,7 +342,7 @@ const exportData = () => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchFederationChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/federation', { limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/federation', { limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'Received',
|
|
|
|
@ -392,7 +392,7 @@ const fetchFederationChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchApRequestChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/ap-request', { limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/ap-request', { limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'In',
|
|
|
|
@ -414,7 +414,7 @@ const fetchApRequestChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchNotesChart = async (type: string): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/notes', { limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/notes', { limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'All',
|
|
|
|
@ -461,7 +461,7 @@ const fetchNotesChart = async (type: string): Promise<typeof chartData> => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchNotesTotalChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/notes', { limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/notes', { limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'Combined',
|
|
|
|
@ -480,7 +480,7 @@ const fetchNotesTotalChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchUsersChart = async (total: boolean): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/users', { limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/users', { limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'Combined',
|
|
|
|
@ -508,7 +508,7 @@ const fetchUsersChart = async (total: boolean): Promise<typeof chartData> => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchActiveUsersChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/active-users', { limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/active-users', { limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'Read & Write',
|
|
|
|
@ -560,7 +560,7 @@ const fetchActiveUsersChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchDriveChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/drive', { limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/drive', { limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
bytes: true,
|
|
|
|
|
series: [{
|
|
|
|
@ -596,7 +596,7 @@ const fetchDriveChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchDriveFilesChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/drive', { limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/drive', { limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'All',
|
|
|
|
@ -631,7 +631,7 @@ const fetchDriveFilesChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchInstanceRequestsChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/instance', { host: props.args.host, limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/instance', { host: props.args.host, limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'In',
|
|
|
|
@ -653,7 +653,7 @@ const fetchInstanceRequestsChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchInstanceUsersChart = async (total: boolean): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/instance', { host: props.args.host, limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/instance', { host: props.args.host, limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'Users',
|
|
|
|
@ -668,7 +668,7 @@ const fetchInstanceUsersChart = async (total: boolean): Promise<typeof chartData
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchInstanceNotesChart = async (total: boolean): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/instance', { host: props.args.host, limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/instance', { host: props.args.host, limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'Notes',
|
|
|
|
@ -683,7 +683,7 @@ const fetchInstanceNotesChart = async (total: boolean): Promise<typeof chartData
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchInstanceFfChart = async (total: boolean): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/instance', { host: props.args.host, limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/instance', { host: props.args.host, limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'Following',
|
|
|
|
@ -706,7 +706,7 @@ const fetchInstanceFfChart = async (total: boolean): Promise<typeof chartData> =
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchInstanceDriveUsageChart = async (total: boolean): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/instance', { host: props.args.host, limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/instance', { host: props.args.host, limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
bytes: true,
|
|
|
|
|
series: [{
|
|
|
|
@ -722,7 +722,7 @@ const fetchInstanceDriveUsageChart = async (total: boolean): Promise<typeof char
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchInstanceDriveFilesChart = async (total: boolean): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/instance', { host: props.args.host, limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/instance', { host: props.args.host, limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'Drive files',
|
|
|
|
@ -737,7 +737,7 @@ const fetchInstanceDriveFilesChart = async (total: boolean): Promise<typeof char
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchPerUserNotesChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/user/notes', { userId: props.args.user.id, limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/user/notes', { userId: props.args.user.id, limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [...(props.args.withoutAll ? [] : [{
|
|
|
|
|
name: 'All',
|
|
|
|
@ -769,7 +769,7 @@ const fetchPerUserNotesChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchPerUserFollowingChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/user/following', { userId: props.args.user.id, limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/user/following', { userId: props.args.user.id, limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'Local',
|
|
|
|
@ -784,7 +784,7 @@ const fetchPerUserFollowingChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchPerUserFollowersChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/user/following', { userId: props.args.user.id, limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/user/following', { userId: props.args.user.id, limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'Local',
|
|
|
|
@ -799,7 +799,7 @@ const fetchPerUserFollowersChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const fetchPerUserDriveChart = async (): Promise<typeof chartData> => {
|
|
|
|
|
const raw = await os.api('charts/user/drive', { userId: props.args.user.id, limit: props.limit, span: props.span });
|
|
|
|
|
const raw = await os.apiGet('charts/user/drive', { userId: props.args.user.id, limit: props.limit, span: props.span });
|
|
|
|
|
return {
|
|
|
|
|
series: [{
|
|
|
|
|
name: 'Inc',
|
|
|
|
|