Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: option for configuring is_visible in globalConfig.json #1334

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ 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. |

2 changes: 1 addition & 1 deletion splunk_add_on_ucc_framework/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ def generate(
check_for_updates = "true"
supported_themes = ""
if global_config:
should_be_visible = True
should_be_visible = global_config.meta.get("isVisible", True)
if global_config.meta.get("checkForUpdates") is False:
check_for_updates = "false"
if global_config.meta.get("supportedThemes") is not None:
Expand Down
5 changes: 5 additions & 0 deletions splunk_add_on_ucc_framework/schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
1 change: 1 addition & 0 deletions ui/src/types/globalConfig/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const meta = z.object({
hideUCCVersion: z.boolean().optional(),
checkForUpdates: z.boolean().default(true).optional(),
searchViewDefault: z.boolean().default(false).optional(),
isVisible: z.boolean().default(true).optional(),
});

export type meta = z.infer<typeof meta>;
Loading