Skip to content

Commit

Permalink
fix default mode on elasticsearch (#659)
Browse files Browse the repository at this point in the history
Signed-off-by: SamiulSourav <[email protected]>
Co-authored-by: Al Asad Nur Riyad <[email protected]>
  • Loading branch information
SamiulSourav and Al Asad Nur Riyad authored Nov 14, 2024
1 parent da73eb5 commit b4ad615
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 9 additions & 1 deletion charts/kubedbcom-elasticsearch-editor-options/ui/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,15 @@ function getAdminOptions({ getValue, model, watchDependency }, type) {
if (options.length === 0) {
return fetchOptions({ model, getValue }, type)
}

if (type.endsWith('/mode')) {
return (
options?.map((item) => ({
description: modeDetails[item]?.description || '',
text: modeDetails[item]?.text || '',
value: item,
})) || []
)
}
return options
}

Expand Down
10 changes: 1 addition & 9 deletions charts/kubedbcom-perconaxtradb-editor-options/ui/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,15 +698,7 @@ function getAdminOptions({ getValue, model, watchDependency }, type) {
if (options.length === 0) {
return fetchOptions({ model, getValue }, type)
}
if (type.endsWith('/mode')) {
return (
options?.map((item) => ({
description: modeDetails[item]?.description || '',
text: modeDetails[item]?.text || '',
value: item,
})) || []
)
}

return options
}

Expand Down

0 comments on commit b4ad615

Please sign in to comment.