From adfd9879832b66cd6749fb530bf575ad1a18d053 Mon Sep 17 00:00:00 2001 From: soleksy-splunk <143183665+soleksy-splunk@users.noreply.github.com> Date: Fri, 4 Oct 2024 11:18:39 +0200 Subject: [PATCH] fix: use title for app conf (#1356) **Issue number:** https://splunk.atlassian.net/browse/ADDON-75546 ## Summary description was used instead of title, wrong text was displayed ### Changes change description into title > Please provide a summary of what's being changed ### User experience Title correctly displayed > Please describe what the user experience looks like before and after this change ## Checklist If your change doesn't seem to apply, please leave them unchecked. * [x] I have performed a self-review of this change * [x] Changes have been tested * [x] Changes are documented * [x] PR title follows [conventional commit semantics](https://www.conventionalcommits.org/en/v1.0.0/) --------- Co-authored-by: sgoral --- .../generators/conf_files/create_app_conf.py | 3 ++- .../Splunk_TA_UCCExample/default/app.conf | 4 ++-- .../package_global_config_everything/globalConfig.json | 4 ++-- .../package_global_config_everything/package/app.manifest | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/splunk_add_on_ucc_framework/generators/conf_files/create_app_conf.py b/splunk_add_on_ucc_framework/generators/conf_files/create_app_conf.py index 00aa02fec..0b1251018 100644 --- a/splunk_add_on_ucc_framework/generators/conf_files/create_app_conf.py +++ b/splunk_add_on_ucc_framework/generators/conf_files/create_app_conf.py @@ -47,6 +47,7 @@ def _set_attributes(self, **kwargs: Any) -> None: self.addon_version = kwargs["addon_version"] self.is_visible = str(kwargs["has_ui"]).lower() self.description = kwargs["app_manifest"].get_description() + self.title = kwargs["app_manifest"].get_title() self.author = kwargs["app_manifest"].get_authors()[0]["name"] self.build = str(int(time())) @@ -65,7 +66,7 @@ def generate_conf(self) -> Dict[str, str]: name=self.name, build=self.build, id=self.id, - label=self.description, + label=self.title, is_visible=self.is_visible, ) self.writer( diff --git a/tests/testdata/expected_addons/expected_output_global_config_everything/Splunk_TA_UCCExample/default/app.conf b/tests/testdata/expected_addons/expected_output_global_config_everything/Splunk_TA_UCCExample/default/app.conf index 8a88ee4ab..43eac7e46 100644 --- a/tests/testdata/expected_addons/expected_output_global_config_everything/Splunk_TA_UCCExample/default/app.conf +++ b/tests/testdata/expected_addons/expected_output_global_config_everything/Splunk_TA_UCCExample/default/app.conf @@ -6,11 +6,11 @@ state = enabled [launcher] author = Splunk Inc. version = 5.5.8R5fd76615 -description = Splunk Add-on for UCC Example +description = Some description of Splunk Add-on for UCC Example [ui] is_visible = true -label = Splunk Add-on for UCC Example +label = Title of Splunk Add-on for UCC Example supported_themes = light, dark [package] diff --git a/tests/testdata/test_addons/package_global_config_everything/globalConfig.json b/tests/testdata/test_addons/package_global_config_everything/globalConfig.json index 0336f633a..fc533e5fc 100644 --- a/tests/testdata/test_addons/package_global_config_everything/globalConfig.json +++ b/tests/testdata/test_addons/package_global_config_everything/globalConfig.json @@ -1622,10 +1622,10 @@ "meta": { "name": "Splunk_TA_UCCExample", "restRoot": "splunk_ta_uccexample", - "version": "5.49.0Rcc63ee532", + "version": "5.50.0R6465f0b6a", "displayName": "Splunk UCC test Add-on", "schemaVersion": "0.0.8", - "_uccVersion": "5.49.0", + "_uccVersion": "5.50.0", "supportedThemes": [ "light", "dark" diff --git a/tests/testdata/test_addons/package_global_config_everything/package/app.manifest b/tests/testdata/test_addons/package_global_config_everything/package/app.manifest index a99395790..e42e5a046 100644 --- a/tests/testdata/test_addons/package_global_config_everything/package/app.manifest +++ b/tests/testdata/test_addons/package_global_config_everything/package/app.manifest @@ -1,7 +1,7 @@ { "schemaVersion": "2.0.0", "info": { - "title": "Splunk Add-on for UCC Example", + "title": "Title of Splunk Add-on for UCC Example", "id": { "group": null, "name": "Splunk_TA_UCCExample", @@ -15,7 +15,7 @@ } ], "releaseDate": null, - "description": "Splunk Add-on for UCC Example", + "description": "Some description of Splunk Add-on for UCC Example", "classification": { "intendedAudience": null, "categories": [],