From 76d1fc088e8b282ce576136c8c97f443d1bdb9cd Mon Sep 17 00:00:00 2001 From: Florian Sanders Date: Mon, 13 Jan 2025 17:32:51 +0100 Subject: [PATCH] refactor(cc-addon-elasticsearch-options): feedback Pierre (fixup later) --- .../cc-addon-elasticsearch-options.js | 2 +- .../cc-addon-elasticsearch-options.stories.js | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/components/cc-addon-elasticsearch-options/cc-addon-elasticsearch-options.js b/src/components/cc-addon-elasticsearch-options/cc-addon-elasticsearch-options.js index 59385af1c..82639a367 100644 --- a/src/components/cc-addon-elasticsearch-options/cc-addon-elasticsearch-options.js +++ b/src/components/cc-addon-elasticsearch-options/cc-addon-elasticsearch-options.js @@ -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) { diff --git a/src/components/cc-addon-elasticsearch-options/cc-addon-elasticsearch-options.stories.js b/src/components/cc-addon-elasticsearch-options/cc-addon-elasticsearch-options.stories.js index 715f02d69..20f979029 100644 --- a/src/components/cc-addon-elasticsearch-options/cc-addon-elasticsearch-options.stories.js +++ b/src/components/cc-addon-elasticsearch-options/cc-addon-elasticsearch-options.stories.js @@ -83,6 +83,32 @@ export const loading = makeStory(conf, { ], }); +export const loadingWithNoMonthlyCost = makeStory(conf, { + /** @type {Partial[]} */ + 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[]} */ items: [