Skip to content

Commit

Permalink
refactor(cc-addon-elasticsearch-options): feedback Pierre (fixup later)
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-sanders-cc committed Jan 13, 2025
1 parent b4ef1ba commit 76d1fc0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class CcAddonElasticsearchOptions extends LitElement {
*
* @param {boolean} skeleton - Whether the component is in loading state
* @param {boolean} hasMonthlyCost - Whether monthly cost should be included
* @param {Flavor|FlavorWithMonthlyCost} [flavor] - The flavor object to return if not in skeleton state
* @param {Flavor|FlavorWithMonthlyCost} flavor - The flavor object to return if not in skeleton state
* @returns {Flavor|FlavorWithMonthlyCost} The appropriate flavor object
*/
_getElasticsearchOptionFlavor(skeleton, hasMonthlyCost, flavor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,32 @@ export const loading = makeStory(conf, {
],
});

export const loadingWithNoMonthlyCost = makeStory(conf, {
/** @type {Partial<CcAddonElasticsearchOptions>[]} */
items: [
{
state: {
type: 'loading',
hasMonthlyCost: false,
options: [
{
name: 'kibana',
enabled: false,
},
{
name: 'apm',
enabled: false,
},
{
name: 'encryption',
enabled: false,
},
],
},
},
],
});

export const dataLoadedWithPreselectedKibana = makeStory(conf, {
/** @type {Partial<CcAddonElasticsearchOptions>[]} */
items: [
Expand Down

0 comments on commit 76d1fc0

Please sign in to comment.