@@ -35,4 +35,12 @@ module.exports = {
count: true,
},
+ qnodesCount:{
+ parameters: {
+ query: {
+ time: "time",
+ },
+ service: "count",
+ }
};
@@ -1,6 +1,19 @@
module.exports = {
create: {
- requestBody: ["pid", "user", "pr", "ni", "virt", "res", "shr", "s", "cpu", "mem", "time", "command"],
+ requestBody: [
+ "pid",
+ "user",
+ "pr",
+ "ni",
+ "virt",
+ "res",
+ "shr",
+ "s",
+ "cpu",
+ "mem",
+ "time",
+ "command",
+ ],
destroy: {
params: ["!id"],
@@ -8,7 +21,20 @@ module.exports = {
update: {
show: {
parameters: {
@@ -19,10 +45,11 @@ module.exports = {
index: {
query: {
- pid:"pid",
- user:"user",
- pr:"pr",
- command:"command",
+ date: "date",
+ pid: "pid",
+ user: "user",
+ pr: "pr",
+ command: "command",
service: "query",
@@ -33,4 +60,12 @@ module.exports = {
+ topCount:{
@@ -53,6 +53,9 @@ module.exports = app => {
router.post('top', '/api/count/top/update/:id', controller.top.update);
// 集群节点初始查询
router.get('/api/count/servenode', controller.qnodes.index);
+ // 首页统计
+ router.get('/api/count/qnodesCount', controller.qnodes.qnodesCount);
+ router.get('/api/count/topCount', controller.top.topCount);
router.get('/api/count/util', controller.top.util);