Browse Source

报表平台支持键值按编号搜索

master
Jimmy.Chai 4 years ago
parent
commit
f85211619d
  1. 5
      src/main/java/com/fr/plugin/db/redis/action/SearchKeysAction.java
  2. 5
      src/main/resources/com/fr/plugin/db/redis/locale/redis_en_US.properties
  3. 5
      src/main/resources/com/fr/plugin/db/redis/locale/redis_zh_CN.properties
  4. 14
      src/main/resources/com/fr/plugin/db/redis/web/redis.js

5
src/main/java/com/fr/plugin/db/redis/action/SearchKeysAction.java

@ -40,10 +40,11 @@ public class SearchKeysAction extends BaseHttpHandler {
String[] keys = new String[0]; String[] keys = new String[0];
String pattern = request.getParameter("pattern"); String pattern = request.getParameter("pattern");
String connectionName = request.getParameter("database"); String connectionName = request.getParameter("database");
if (StringKit.isNotEmpty(pattern) && StringKit.isNotEmpty(connectionName)) { String orderValue = request.getParameter("orderValue");
if (StringKit.isNotEmpty(pattern) && StringKit.isNotEmpty(connectionName) && StringKit.isNotEmpty(orderValue)) {
Connection connection = ConnectionKit.getConnection(connectionName); Connection connection = ConnectionKit.getConnection(connectionName);
if (connection instanceof RedisDatabaseConnection) { if (connection instanceof RedisDatabaseConnection) {
keys = connection.summary(pattern); keys = connection.summary(pattern, orderValue);
} }
} }
FlushKit.printAsJSON(response, JSONFactory.createJSON(Arrays.asList(keys))); FlushKit.printAsJSON(response, JSONFactory.createJSON(Arrays.asList(keys)));

5
src/main/resources/com/fr/plugin/db/redis/locale/redis_en_US.properties

@ -39,3 +39,8 @@ Plugin-Redis_Cluster_Config_Description=Input multiple hosts with commas separat
Plugin-Redis_Script_Engine_Type=Script Engine Type Plugin-Redis_Script_Engine_Type=Script Engine Type
Plugin-Redis_Script_Engine_Type_Default=Default Plugin-Redis_Script_Engine_Type_Default=Default
Plugin-Redis_Script_Engine_Type_V8=V8 Plugin-Redis_Script_Engine_Type_V8=V8
Plugin-Redis_Index=Index
Plugin-Redis_Set_Parameter=Parameter
Plugin-Redis_Set_Parameter_Name=Parameter Name
Plugin-Redis_Set_Parameter_Type=Parameter Type
Plugin-Redis_Set_Parameter_Value=Parameter Value

5
src/main/resources/com/fr/plugin/db/redis/locale/redis_zh_CN.properties

@ -60,3 +60,8 @@ Plugin-Redis_Parameter_Delete_Confirm=\u4F60\u786E\u5B9A\u51B3\u5B9A\u5220\u9664
Plugin-Redis_Parameter_Delete_Alert=\u5F53\u524D\u5217\u8868\u4E3A\u7A7A\u6216\u8005\u4F60\u6CA1\u6709\u9009\u4E2D\u4EFB\u4F55\u9879 Plugin-Redis_Parameter_Delete_Alert=\u5F53\u524D\u5217\u8868\u4E3A\u7A7A\u6216\u8005\u4F60\u6CA1\u6709\u9009\u4E2D\u4EFB\u4F55\u9879
Plugin-Redis_View=\u89C6\u56FE Plugin-Redis_View=\u89C6\u56FE
Plugin-Redis_Table=\u8868 Plugin-Redis_Table=\u8868
Plugin-Redis_Index=\u7f16\u53f7
Plugin-Redis_Set_Parameter=\u53c2\u6570
Plugin-Redis_Set_Parameter_Name=\u53c2\u6570\u540d
Plugin-Redis_Set_Parameter_Type=\u53c2\u6570\u7c7b\u578b
Plugin-Redis_Set_Parameter_Value=\u53c2\u6570\u503c

14
src/main/resources/com/fr/plugin/db/redis/web/redis.js

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save