|
|
@ -1,7 +1,7 @@ |
|
|
|
package com.fr.plugin.db.redis.ui; |
|
|
|
package com.fr.plugin.db.redis.ui; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.FRContext; |
|
|
|
|
|
|
|
import com.fr.data.impl.Connection; |
|
|
|
import com.fr.data.impl.Connection; |
|
|
|
|
|
|
|
import com.fr.data.operator.DataOperator; |
|
|
|
import com.fr.design.data.datapane.connect.ConnectionComboBoxPanel; |
|
|
|
import com.fr.design.data.datapane.connect.ConnectionComboBoxPanel; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
@ -9,10 +9,9 @@ import com.fr.design.gui.itextfield.PlaceholderTextField; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.file.DatasourceManager; |
|
|
|
import com.fr.file.DatasourceManager; |
|
|
|
import com.fr.general.Inter; |
|
|
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.plugin.db.redis.ui.event.DataLoadedListener; |
|
|
|
|
|
|
|
import com.fr.plugin.db.redis.core.RedisDatabaseConnection; |
|
|
|
import com.fr.plugin.db.redis.core.RedisDatabaseConnection; |
|
|
|
|
|
|
|
import com.fr.plugin.db.redis.ui.event.DataLoadedListener; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
|
@ -22,8 +21,6 @@ import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class RedisDBConnectionChosePane extends BasicPane { |
|
|
|
public class RedisDBConnectionChosePane extends BasicPane { |
|
|
@ -100,8 +97,7 @@ public class RedisDBConnectionChosePane extends BasicPane { |
|
|
|
if (StringUtils.isEmpty(keysPattern)) { |
|
|
|
if (StringUtils.isEmpty(keysPattern)) { |
|
|
|
return ArrayUtils.EMPTY_STRING_ARRAY; |
|
|
|
return ArrayUtils.EMPTY_STRING_ARRAY; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Set<String> keys = connection.createRedisClient().keys(keysPattern); |
|
|
|
return DataOperator.getInstance().getTableSummary(connection, keysPattern); |
|
|
|
return keys.toArray(new String[keys.size()]); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|