From 4075cf48adc7517f153f4b45cac50b7e20b44b6e Mon Sep 17 00:00:00 2001 From: Benni0 Date: Mon, 9 Sep 2024 16:32:51 +0200 Subject: [PATCH] feat: option for configuring is_visible in globalConfig.json --- docs/metadata.md | 1 + splunk_add_on_ucc_framework/commands/build.py | 2 ++ splunk_add_on_ucc_framework/schema/schema.json | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/docs/metadata.md b/docs/metadata.md index 57b51d9475..cdf3c50618 100644 --- a/docs/metadata.md +++ b/docs/metadata.md @@ -20,3 +20,4 @@ Metadata contains general information about add-on build. | defaultView | string | Define which view should be loaded on TA load. One of `"inputs"`, `"configuration"`, `"dashboard"` or `"search"`. Default `configuration`. | | [os-dependentLibraries](./advanced/os-dependent_libraries.md) | array | This feature allows you to download and unpack libraries with appropriate binaries for the indicated operating system during the build process. | | supported_themes | array | This feature is allows you provide the themes supported by your add-on. Supported values: `light`, `dark`. No default. | +| isVisible | boolean | This option allows you to create apps which are not visible by default by setting isVisible=false. | \ No newline at end of file diff --git a/splunk_add_on_ucc_framework/commands/build.py b/splunk_add_on_ucc_framework/commands/build.py index 224ce04e5d..d68a0666e8 100644 --- a/splunk_add_on_ucc_framework/commands/build.py +++ b/splunk_add_on_ucc_framework/commands/build.py @@ -642,6 +642,8 @@ def generate( supported_themes = "" if global_config: should_be_visible = True + if global_config.meta.get("isVisible") is not None: + should_be_visible = global_config.meta.get("isVisible") if global_config.meta.get("checkForUpdates") is False: check_for_updates = "false" if global_config.meta.get("supportedThemes") is not None: diff --git a/splunk_add_on_ucc_framework/schema/schema.json b/splunk_add_on_ucc_framework/schema/schema.json index 8bc755dd9c..db3d76941f 100644 --- a/splunk_add_on_ucc_framework/schema/schema.json +++ b/splunk_add_on_ucc_framework/schema/schema.json @@ -1740,6 +1740,11 @@ "default": true, "description": "Ability to configure app.conf->package.check_for_updates from globalConfig file." }, + "isVisible": { + "type": "boolean", + "default": true, + "description": "Ability to configure app.conf->ui.is_visible from globalConfig file." + }, "defaultView": { "type": "string", "description": "Define which view should be loaded on TA load.",