-
-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refa(status): support incremental reload
- Loading branch information
Showing
16 changed files
with
95 additions
and
108 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,66 @@ | ||
import { registerPage } from '~/client' | ||
import Database from './database/index.vue' | ||
|
||
import './home' | ||
import './index.scss' | ||
|
||
registerPage({ | ||
path: '/database', | ||
name: '数据库', | ||
icon: 'database', | ||
order: 410, | ||
fields: ['meta'], | ||
component: Database, | ||
import { Card, registerView } from '~/client' | ||
import {} from '@koishijs/plugin-status/src' | ||
import LoadChart from './components/load-chart.vue' | ||
|
||
import './charts' | ||
|
||
registerView({ | ||
type: 'numeric', | ||
component: Card.numeric({ | ||
title: '近期消息频率', | ||
icon: 'history', | ||
fields: ['stats'], | ||
content({ stats }) { | ||
return Object.values(stats.botSend).reduce((sum, value) => sum + value, 0).toFixed(1) + ' / d' | ||
}, | ||
}), | ||
}) | ||
|
||
registerView({ | ||
id: 'database', | ||
type: 'numeric', | ||
component: Card.numeric({ | ||
title: '数据库体积', | ||
icon: 'database', | ||
type: 'size', | ||
fields: ['meta'], | ||
content: ({ meta }) => meta.databaseSize, | ||
}), | ||
}) | ||
|
||
registerView({ | ||
id: 'assets', | ||
type: 'numeric', | ||
component: Card.numeric({ | ||
title: '资源服务器', | ||
icon: 'hdd', | ||
type: 'size', | ||
fields: ['meta'], | ||
content: ({ meta }) => meta.assetSize, | ||
}), | ||
}) | ||
|
||
registerView({ | ||
type: 'numeric', | ||
component: Card.numeric({ | ||
title: '活跃用户数量', | ||
icon: 'heart', | ||
fields: ['meta'], | ||
content: ({ meta }) => meta.activeUsers, | ||
}), | ||
}) | ||
|
||
registerView({ | ||
type: 'numeric', | ||
component: Card.numeric({ | ||
title: '活跃群数量', | ||
icon: 'users', | ||
fields: ['meta'], | ||
content: ({ meta }) => meta.activeGuilds, | ||
}), | ||
}) | ||
|
||
registerView({ | ||
type: 'home', | ||
component: LoadChart, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters