ÎļþÃû´Ó sql/ry_20201021.sql ÐÞ¸Ä |
| | |
| | | insert into sys_menu values('110', '宿¶ä»»å¡', '2', '2', 'job', 'monitor/job/index', 1, 0, 'C', '0', '0', 'monitor:job:list', 'job', 'admin', sysdate(), '', null, '宿¶ä»»å¡èå');
|
| | | insert into sys_menu values('111', 'æ°æ®çæ§', '2', '3', 'druid', 'monitor/druid/index', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', sysdate(), '', null, 'æ°æ®çæ§èå');
|
| | | insert into sys_menu values('112', 'æå¡çæ§', '2', '4', 'server', 'monitor/server/index', 1, 0, 'C', '0', '0', 'monitor:server:list', 'server', 'admin', sysdate(), '', null, 'æå¡çæ§èå');
|
| | | insert into sys_menu values('113', '表åæå»º', '3', '1', 'build', 'tool/build/index', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', sysdate(), '', null, '表åæå»ºèå');
|
| | | insert into sys_menu values('114', '代ç çæ', '3', '2', 'gen', 'tool/gen/index', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 'admin', sysdate(), '', null, '代ç çæèå');
|
| | | insert into sys_menu values('115', 'ç³»ç»æ¥å£', '3', '3', 'swagger', 'tool/swagger/index', 1, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', 'admin', sysdate(), '', null, 'ç³»ç»æ¥å£èå');
|
| | | insert into sys_menu values('113', 'ç¼åçæ§', '2', '5', 'cache', 'monitor/cache/index', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', sysdate(), '', null, 'ç¼åçæ§èå');
|
| | | insert into sys_menu values('114', '表åæå»º', '3', '1', 'build', 'tool/build/index', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', sysdate(), '', null, '表åæå»ºèå');
|
| | | insert into sys_menu values('115', '代ç çæ', '3', '2', 'gen', 'tool/gen/index', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 'admin', sysdate(), '', null, '代ç çæèå');
|
| | | insert into sys_menu values('116', 'ç³»ç»æ¥å£', '3', '3', 'swagger', 'tool/swagger/index', 1, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', 'admin', sysdate(), '', null, 'ç³»ç»æ¥å£èå');
|
| | | -- ä¸çº§èå
|
| | | insert into sys_menu values('500', 'æä½æ¥å¿', '108', '1', 'operlog', 'monitor/operlog/index', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 'admin', sysdate(), '', null, 'æä½æ¥å¿èå');
|
| | | insert into sys_menu values('501', 'ç»å½æ¥å¿', '108', '2', 'logininfor', 'monitor/logininfor/index', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 'admin', sysdate(), '', null, 'ç»å½æ¥å¿èå');
|
| | |
| | | insert into sys_menu values('1053', 'ç¶æä¿®æ¹', '110', '5', '#', '', 1, 0, 'F', '0', '0', 'monitor:job:changeStatus', '#', 'admin', sysdate(), '', null, '');
|
| | | insert into sys_menu values('1054', 'ä»»å¡å¯¼åº', '110', '7', '#', '', 1, 0, 'F', '0', '0', 'monitor:job:export', '#', 'admin', sysdate(), '', null, '');
|
| | | -- 代ç çææé®
|
| | | insert into sys_menu values('1055', 'çææ¥è¯¢', '114', '1', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 'admin', sysdate(), '', null, '');
|
| | | insert into sys_menu values('1056', 'çæä¿®æ¹', '114', '2', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 'admin', sysdate(), '', null, '');
|
| | | insert into sys_menu values('1057', 'çæå é¤', '114', '3', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 'admin', sysdate(), '', null, '');
|
| | | insert into sys_menu values('1058', '导å
¥ä»£ç ', '114', '2', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 'admin', sysdate(), '', null, '');
|
| | | insert into sys_menu values('1059', 'é¢è§ä»£ç ', '114', '4', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 'admin', sysdate(), '', null, '');
|
| | | insert into sys_menu values('1060', 'çæä»£ç ', '114', '5', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 'admin', sysdate(), '', null, '');
|
| | | insert into sys_menu values('1055', 'çææ¥è¯¢', '115', '1', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 'admin', sysdate(), '', null, '');
|
| | | insert into sys_menu values('1056', 'çæä¿®æ¹', '115', '2', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 'admin', sysdate(), '', null, '');
|
| | | insert into sys_menu values('1057', 'çæå é¤', '115', '3', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 'admin', sysdate(), '', null, '');
|
| | | insert into sys_menu values('1058', '导å
¥ä»£ç ', '115', '2', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 'admin', sysdate(), '', null, '');
|
| | | insert into sys_menu values('1059', 'é¢è§ä»£ç ', '115', '4', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 'admin', sysdate(), '', null, '');
|
| | | insert into sys_menu values('1060', 'çæä»£ç ', '115', '5', '#', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 'admin', sysdate(), '', null, '');
|
| | |
|
| | |
|
| | | -- ----------------------------
|
| | |
| | | insert into sys_role_menu values ('2', '113');
|
| | | insert into sys_role_menu values ('2', '114');
|
| | | insert into sys_role_menu values ('2', '115');
|
| | | insert into sys_role_menu values ('2', '116');
|
| | | insert into sys_role_menu values ('2', '500');
|
| | | insert into sys_role_menu values ('2', '501');
|
| | | insert into sys_role_menu values ('2', '1000');
|
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.project.monitor.controller;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Properties;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.data.redis.core.RedisCallback;
|
| | | import org.springframework.data.redis.core.RedisTemplate;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.framework.web.domain.AjaxResult;
|
| | |
|
| | | /**
|
| | | * ç¼åçæ§
|
| | | * |
| | | * @author ruoyi
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/monitor/cache")
|
| | | public class CacheController
|
| | | {
|
| | | @Autowired
|
| | | private RedisTemplate<String, String> redisTemplate;
|
| | |
|
| | | @PreAuthorize("@ss.hasPermi('monitor:cache:list')")
|
| | | @GetMapping()
|
| | | public AjaxResult getInfo() throws Exception
|
| | | {
|
| | | Properties info = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info());
|
| | | Properties commandStats = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info("commandstats"));
|
| | | Object dbSize = redisTemplate.execute((RedisCallback<Object>) connection -> connection.dbSize());
|
| | |
|
| | | Map<String, Object> result = new HashMap<>(3);
|
| | | result.put("info", info);
|
| | | result.put("dbSize", dbSize);
|
| | |
|
| | | List<Map<String, String>> pieList = new ArrayList<>();
|
| | | commandStats.stringPropertyNames().forEach(key -> {
|
| | | Map<String, String> data = new HashMap<>(2);
|
| | | String property = commandStats.getProperty(key);
|
| | | data.put("name", StringUtils.removeStart(key, "cmdstat_"));
|
| | | data.put("value", StringUtils.substringBetween(property, "calls=", ",usec"));
|
| | | pieList.add(data);
|
| | | });
|
| | | result.put("commandStats", pieList);
|
| | | return AjaxResult.success(result);
|
| | | }
|
| | | }
|
| | |
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.framework.web.controller.BaseController;
|
| | | import com.ruoyi.framework.web.domain.AjaxResult;
|
| | | import com.ruoyi.framework.web.domain.Server;
|
| | |
|
| | |
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/monitor/server")
|
| | | public class ServerController extends BaseController
|
| | | public class ServerController
|
| | | {
|
| | | @PreAuthorize("@ss.hasPermi('monitor:server:list')")
|
| | | @GetMapping()
|