Skip to content

Commit

Permalink
HCK-9271: hide the bucket selection window if the connection has a pr…
Browse files Browse the repository at this point in the history
…eselected bucket (#46)
  • Loading branch information
serhii-filonenko authored Dec 27, 2024
1 parent 93c54ae commit 7148eb3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion reverse_engineering/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ const getDatabases = async (connectionInfo, appLogger, callback, app) => {
try {
const cluster = await connectionHelper.connect({ connectionInfo, app });
const buckets = await clusterHelper.getBucketsForReverse({ cluster });
const bucketNames = buckets.map(bucket => bucket.name);
const selectedBucket = connectionInfo.couchbase_bucket;
const bucketNames = buckets
.map(bucket => bucket.name)
.filter(bucketName => !selectedBucket || bucketName === selectedBucket);

callback(null, bucketNames);
} catch (error) {
Expand Down

0 comments on commit 7148eb3

Please sign in to comment.