Skip to content

Commit ef7cb5f

Browse files
committed
#RI-2686 - show all modules for redisStack in tooltip
#RI-2723 - add display names for some command groups # - remove deprecated PluginSDK methods
1 parent 5873a2f commit ef7cb5f

File tree

4 files changed

+6
-42
lines changed

4 files changed

+6
-42
lines changed

redisinsight/ui/src/components/database-overview/DatabaseOverview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ const DatabaseOverview = (props: Props) => {
197197
)}
198198
<MoreInfoPopover
199199
metrics={metrics.hidden}
200-
modules={modules.hidden}
200+
modules={isRediStack ? [...modules.hidden, ...modules.visible] : modules.hidden}
201201
/>
202202
</div>
203203
</EuiFlexItem>

redisinsight/ui/src/constants/commands.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ export enum CommandGroup {
6464
TDigest = 'tdigest',
6565
CMS = 'cms',
6666
TopK = 'topk',
67+
BloomFilter = 'bf',
68+
CuckooFilter = 'cf'
6769
}
6870

6971
export enum CommandPrefix {

redisinsight/ui/src/constants/keys.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ export const GROUP_TYPES_DISPLAY = Object.freeze({
4545
[CommandGroup.CMS]: 'CMS',
4646
[CommandGroup.TDigest]: 'TDigest',
4747
[CommandGroup.TopK]: 'TopK',
48+
[CommandGroup.BloomFilter]: 'Bloom Filter',
49+
[CommandGroup.CuckooFilter]: 'Cuckoo Filter',
4850
})
4951

5052
// Enums don't allow to use dynamic key

redisinsight/ui/src/plugins/pluginImport.ts

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ export const importPluginScript = () => (config) => {
3333
parent.dispatchEvent(event)
3434
}
3535

36-
const deprecatedMethodWarning = (methodName: string) => {
37-
console.warn(
38-
// eslint-disable-next-line max-len
39-
`Calling ${methodName} via window.PluginSDK has been deprecated and will be removed in v. 2.0.6.`
40-
+ '\nUse https://www.npmjs.com/package/redisinsight-plugin-sdk instead.'
41-
)
42-
}
43-
4436
const providePluginSDK = () => {
4537
globalThis.PluginSDK = {
4638
setHeaderText: (text) => {
@@ -63,39 +55,7 @@ export const importPluginScript = () => (config) => {
6355
iframeId,
6456
error,
6557
})
66-
},
67-
executeRedisCommand: (command = '') => new Promise((resolve, reject) => {
68-
deprecatedMethodWarning('executeRedisCommand')
69-
const { callbacks } = globalThis.state
70-
callbacks[callbacks.counter] = { resolve, reject }
71-
sendMessageToMain({
72-
event: events.EXECUTE_REDIS_COMMAND,
73-
iframeId,
74-
command,
75-
requestId: callbacks.counter++
76-
})
77-
}),
78-
getState: () => new Promise((resolve, reject) => {
79-
deprecatedMethodWarning('getState')
80-
const { callbacks } = globalThis.state
81-
callbacks[callbacks.counter] = { resolve, reject }
82-
sendMessageToMain({
83-
event: events.GET_STATE,
84-
iframeId,
85-
requestId: callbacks.counter++
86-
})
87-
}),
88-
setState: (state: any) => new Promise((resolve, reject) => {
89-
deprecatedMethodWarning('setState')
90-
const { callbacks } = globalThis.state
91-
callbacks[callbacks.counter] = { resolve, reject }
92-
sendMessageToMain({
93-
event: events.SET_STATE,
94-
iframeId,
95-
state,
96-
requestId: callbacks.counter++
97-
})
98-
})
58+
}
9959
}
10060
}
10161

0 commit comments

Comments
 (0)