Skip to content

Commit 731e495

Browse files
Merge pull request #59 from quick123official/hotfix/2.4.1
Hotfix/2.4.1
2 parents b681df6 + b6bca7b commit 731e495

File tree

5 files changed

+4155
-3754
lines changed

5 files changed

+4155
-3754
lines changed

src/pages/HostContent/index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,13 @@ class HostContent extends Component {
8989
let dbname = firstSplitString[0];
9090
let secondSplitString = firstSplitString[1].split(",");
9191
let thirdSplitString = secondSplitString[0].split("=");
92+
let dbIndex = i;
93+
if (dbname.startsWith("db")) {
94+
dbIndex = parseInt(dbname.substring(2));
95+
}
9296
dbTabs.push({
9397
key: "" + i,
98+
dbIndex: dbIndex,
9499
title: dbname,
95100
total: thirdSplitString[1],
96101
});
@@ -109,8 +114,9 @@ class HostContent extends Component {
109114
activeKey: activeKey,
110115
redisKey: { key: "", type: "" },
111116
});
117+
let dbIndex = this.state.dbTabs[activeKey].dbIndex;
112118
let redis = this.props.node.redis;
113-
redis.select(activeKey, (err, res) => {
119+
redis.select(dbIndex, (err, res) => {
114120
if (err) {
115121
message.error("" + err);
116122
Log.error(
@@ -178,7 +184,7 @@ class HostContent extends Component {
178184
HOST_KEY_SHOW_TYPE.TREE ? (
179185
<HostKeyTree
180186
node={this.props.node}
181-
db={tab.key}
187+
db={tab.dbIndex}
182188
updateHostKey={this.updateHostKey.bind(
183189
this
184190
)}
@@ -194,7 +200,7 @@ class HostContent extends Component {
194200
HOST_KEY_SHOW_TYPE.TABLE ? (
195201
<HostKey
196202
node={this.props.node}
197-
db={tab.key}
203+
db={tab.dbIndex}
198204
updateHostKey={this.updateHostKey.bind(
199205
this
200206
)}

src/pages/HostKeyHash/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ class HostKeyHash extends Component {
252252
pattern,
253253
err
254254
);
255+
this.setState({ loading: false });
255256
return;
256257
}
257258
let data = [];
@@ -452,11 +453,12 @@ class HostKeyHash extends Component {
452453
<Search
453454
style={{ width: 300 }}
454455
prefix="key :"
455-
enterButton={<Button>search</Button>}
456+
enterButton="Search"
456457
size="middle"
457458
value={this.state.search.field}
458459
onChange={this.onChangeSearch.bind(this)}
459460
onSearch={this.searchField.bind(this)}
461+
loading={this.state.loading}
460462
/>
461463
</Tooltip>
462464
<Button

src/pages/HostKeySet/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ class HostKeySet extends Component {
252252
} catch (err) {
253253
message.error("" + err);
254254
Log.error("HostKeySet searchSortSetByPatternRecursive error", err);
255+
this.setState({ loading: false });
255256
}
256257
}
257258
/**
@@ -411,11 +412,12 @@ class HostKeySet extends Component {
411412
defaultValue="*"
412413
style={{ width: 300 }}
413414
prefix="key :"
414-
enterButton={<Button>search</Button>}
415+
enterButton="Search"
415416
size="middle"
416417
value={this.state.search.searchMember}
417418
onChange={this.onChangeSearchMember.bind(this)}
418419
onSearch={this.searchSet.bind(this)}
420+
loading={this.state.loading}
419421
/>
420422
</Tooltip>
421423
<Button

src/pages/HostKeySortSet/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ class HostKeySortSet extends Component {
197197
(err) => {
198198
message.error("" + err);
199199
Log.error("HostKeySortSet fetchDataByPage error", err);
200+
this.setState({ loading: false });
200201
}
201202
);
202203
}
@@ -504,11 +505,12 @@ class HostKeySortSet extends Component {
504505
<Search
505506
style={{ width: 300 }}
506507
prefix="key :"
507-
enterButton={<Button>search</Button>}
508+
enterButton="Search"
508509
size="middle"
509510
value={this.state.search.searchMember}
510511
onChange={this.onChangeSearchMember.bind(this)}
511512
onSearch={this.searchSortSet.bind(this)}
513+
loading={this.state.loading}
512514
/>
513515
</Tooltip>
514516
<Button

0 commit comments

Comments
 (0)