Skip to content

Commit

Permalink
Merge pull request #59 from quick123official/hotfix/2.4.1
Browse files Browse the repository at this point in the history
Hotfix/2.4.1
  • Loading branch information
quick123official authored Oct 30, 2021
2 parents b681df6 + b6bca7b commit 731e495
Show file tree
Hide file tree
Showing 5 changed files with 4,155 additions and 3,754 deletions.
12 changes: 9 additions & 3 deletions src/pages/HostContent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,13 @@ class HostContent extends Component {
let dbname = firstSplitString[0];
let secondSplitString = firstSplitString[1].split(",");
let thirdSplitString = secondSplitString[0].split("=");
let dbIndex = i;
if (dbname.startsWith("db")) {
dbIndex = parseInt(dbname.substring(2));
}
dbTabs.push({
key: "" + i,
dbIndex: dbIndex,
title: dbname,
total: thirdSplitString[1],
});
Expand All @@ -109,8 +114,9 @@ class HostContent extends Component {
activeKey: activeKey,
redisKey: { key: "", type: "" },
});
let dbIndex = this.state.dbTabs[activeKey].dbIndex;
let redis = this.props.node.redis;
redis.select(activeKey, (err, res) => {
redis.select(dbIndex, (err, res) => {
if (err) {
message.error("" + err);
Log.error(
Expand Down Expand Up @@ -178,7 +184,7 @@ class HostContent extends Component {
HOST_KEY_SHOW_TYPE.TREE ? (
<HostKeyTree
node={this.props.node}
db={tab.key}
db={tab.dbIndex}
updateHostKey={this.updateHostKey.bind(
this
)}
Expand All @@ -194,7 +200,7 @@ class HostContent extends Component {
HOST_KEY_SHOW_TYPE.TABLE ? (
<HostKey
node={this.props.node}
db={tab.key}
db={tab.dbIndex}
updateHostKey={this.updateHostKey.bind(
this
)}
Expand Down
4 changes: 3 additions & 1 deletion src/pages/HostKeyHash/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ class HostKeyHash extends Component {
pattern,
err
);
this.setState({ loading: false });
return;
}
let data = [];
Expand Down Expand Up @@ -452,11 +453,12 @@ class HostKeyHash extends Component {
<Search
style={{ width: 300 }}
prefix="key :"
enterButton={<Button>search</Button>}
enterButton="Search"
size="middle"
value={this.state.search.field}
onChange={this.onChangeSearch.bind(this)}
onSearch={this.searchField.bind(this)}
loading={this.state.loading}
/>
</Tooltip>
<Button
Expand Down
4 changes: 3 additions & 1 deletion src/pages/HostKeySet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ class HostKeySet extends Component {
} catch (err) {
message.error("" + err);
Log.error("HostKeySet searchSortSetByPatternRecursive error", err);
this.setState({ loading: false });
}
}
/**
Expand Down Expand Up @@ -411,11 +412,12 @@ class HostKeySet extends Component {
defaultValue="*"
style={{ width: 300 }}
prefix="key :"
enterButton={<Button>search</Button>}
enterButton="Search"
size="middle"
value={this.state.search.searchMember}
onChange={this.onChangeSearchMember.bind(this)}
onSearch={this.searchSet.bind(this)}
loading={this.state.loading}
/>
</Tooltip>
<Button
Expand Down
4 changes: 3 additions & 1 deletion src/pages/HostKeySortSet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class HostKeySortSet extends Component {
(err) => {
message.error("" + err);
Log.error("HostKeySortSet fetchDataByPage error", err);
this.setState({ loading: false });
}
);
}
Expand Down Expand Up @@ -504,11 +505,12 @@ class HostKeySortSet extends Component {
<Search
style={{ width: 300 }}
prefix="key :"
enterButton={<Button>search</Button>}
enterButton="Search"
size="middle"
value={this.state.search.searchMember}
onChange={this.onChangeSearchMember.bind(this)}
onSearch={this.searchSortSet.bind(this)}
loading={this.state.loading}
/>
</Tooltip>
<Button
Expand Down
Loading

0 comments on commit 731e495

Please sign in to comment.