Skip to content

Commit

Permalink
chore: merge develop into main (#1381)
Browse files Browse the repository at this point in the history
  • Loading branch information
lplonka-splunk authored Oct 16, 2024
2 parents 9563fc5 + 4e43c27 commit 6d97b78
Show file tree
Hide file tree
Showing 118 changed files with 6,099 additions and 2,756 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ omit =
splunk_add_on_ucc_framework/templates/input.module-template

[report]
fail_under = 78.5
fail_under = 81
2 changes: 1 addition & 1 deletion .github/workflows/automatic_doc_generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
generate-docs:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
isPR: ${{ github.event.pull_request.base.ref == 'develop' || github.event.pull_request.base.ref == 'main' }}
steps:
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:

jobs:
meta:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
matrix_supportedSplunk: ${{ steps.matrix.outputs.supportedSplunk }}
steps:
Expand All @@ -26,7 +26,7 @@ jobs:

fossa-scan:
continue-on-error: true
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: |
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
failed: ${{ env.failed }}

pre-commit:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -68,7 +68,7 @@ jobs:
SEMGREP_KEY: ${{ secrets.SEMGREP_PUBLISH_TOKEN }}

compliance-copyrights:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: apache/[email protected]
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
needs:
- fossa-scan
- build-ui
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
path: dist/

test-unit:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
name: test-smoke ${{ matrix.python-version }}
needs:
- build-ui
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
failed: ${{ env.failed }}

build-test-addon:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- build-ui
steps:
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:

test-ui:
name: test-ui Splunk ${{ matrix.splunk.version }} -m ${{ matrix.test-mark }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:

appinspect-for-expected-outputs:
name: splunk-appinspect ${{ matrix.tags }} tests/testdata/expected_addons/expected_output_global_config_everything/Splunk_TA_UCCExample
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
Expand Down Expand Up @@ -332,7 +332,7 @@ jobs:
- build-test-addon-openapi-client
- storybook-screenshots
- bot-updates
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
NEEDS: ${{ toJson(needs) }}
steps:
Expand Down Expand Up @@ -365,7 +365,7 @@ jobs:
- semgrep
- pre-commit
- all-checks
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: "! github.event.pull_request.head.repo.fork "
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -407,7 +407,7 @@ jobs:
build-test-addon-openapi-client:
name: build-test-addon-openapi-client Splunk ${{ matrix.splunk.version }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- meta
- build-test-addon
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build-ui:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ui
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- "release/**"
jobs:
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: write
pages: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/storybook-visual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
run:
working-directory: ui
shell: bash
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
isPR: ${{ github.event.pull_request.base.ref == 'develop' || github.event.pull_request.base.ref == 'main' }}
steps:
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.3.2
hooks:
- id: pyupgrade
args:
Expand All @@ -31,17 +31,17 @@ repos:
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
rev: v1.4.1
hooks:
- id: mypy
exclude: (^docs/|^splunk_add_on_ucc_framework/commands/imports.py)
additional_dependencies: ['types-PyYAML']
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 5.0.4
hooks:
- id: flake8
exclude: (^splunk_add_on_ucc_framework/commands/init_template/|^splunk_add_on_ucc_framework/commands/imports.py)
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.40.0
rev: v0.42.0
hooks:
- id: markdownlint
1 change: 1 addition & 0 deletions docs/advanced/oauth_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Auth can be used inside the entity tag. Use `type: "oauth"` in the entity list a
- `encrypted` should be true if the user wants that particular field encrypted, otherwise, there is no need to have this parameter.
- `required` specifies whether the field is required or not. The default value is true.
- `defaultValue` is the initial input value (string, number, or boolean).
- `validators` array that is used to validate the values of fields using various [validators](../entity/validators.md).
- `options`:
+ `placeholder`: (RENOUNCED) The placeholder for the field.
+ `disableonEdit`: When the form is in edit mode, the field becomes unable to be edited. The default value is false.
Expand Down
1 change: 1 addition & 0 deletions docs/configurations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ proxy configuration, and logging level configuration.
| [restHandlerModule](../advanced/custom_rest_handler.md) | string | It specify name of the REST handler script that implements the custom actions to be performed on CRUD operations for the given input. (Use with restHandlerClass) |
| [restHandlerClass](../advanced/custom_rest_handler.md) | string | It specify name of the class present in the restHandlerModule, which implements methods like handleCreate, handleEdit, handleList, handleDelete and is child class of splunktaucclib.rest_handler.admin_external.AdminExternalHandler. (Use with restHandlerModule) |
| customTab | Object | This property allows you to enable the [custom tab](../custom_ui_extensions/custom_tab.md) feature. |
| hideForPlatform | string | Defines for which platform element should be hidden from UI perspective. Currently only two platforms are supported `cloud` or `enterprise`. |

### Tab components

Expand Down
4 changes: 4 additions & 0 deletions docs/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,3 +435,7 @@ e.g. of globalConfig.json:

the above configuration will create the following filter query:
`...source=*license_usage.log type=Usage (st IN ("*addon123*","my_custom_condition*"))...`

> Note:
> * In the Data Ingestion table, the first column displays the `View by` options list. When you click on any row in this column, a modal opens, showing detailed information such as `Data volume` and the `Number of events` over time, visualized in charts. The modal allows you to adjust the options via a dropdown to view data for different View by options. This enables dynamic exploration of data trends for various selected inputs.
14 changes: 13 additions & 1 deletion docs/entity/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -505,14 +505,25 @@ The Oauth type entity enables us to use Oauth2.0 for user authentication. Visit
## `Interval`

A [Text](#text) field used to specify [interval](https://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf#Scripted_Input:)
value, i.e. a number greater than or equal to 0, or -1.
value, i.e. a number greater than or equal to 0, CRON interval or -1.

<h3> Options </h3>

| Property | Type | Description |
| -------- | ---------------------------- | ----------------------- |
| range | list of numbers (2 elements) | Range of allowed values |


Supported CRON schedule:

* "<minute> <hour> <day of month> <month> <day of week>"
* Cron special characters are acceptable. ("*", ",", "/", "-" )

Names of months or days are not supported.

Note: Range option is not supposed to be used with CRON interval.


See the following example:

```json
Expand All @@ -526,6 +537,7 @@ See the following example:
}
```


## `Index`

A field used to specify [index](https://docs.splunk.com/Splexicon:Index).
Expand Down
17 changes: 9 additions & 8 deletions docs/entity/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Entity
## Entity Properties

| Property | Type | Description | Default Value |
|------------------------------------------------------------------|---------------------------|----------------------------------------------------------------------------------------------------------------------------------|---------------|
| ---------------------------------------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| field<span class="required-asterisk">\*</span> | string | To define a particular entity field. | - |
| label<span class="required-asterisk">\*</span> | string | It represents a caption for a field in a user interface. | - |
| [type](./components.md)<span class="required-asterisk">\*</span> | string | To specify the type of entity to be rendered in inputs or configuration form. | - |
Expand All @@ -26,10 +26,11 @@ title: Entity

This section describes common options that can be used within the `options` object in entity properties.

| Property | Type | Description | Default Value |
|---------------------|---------|----------------------------------------------------------------------------------------|---------------|
| display | boolean | It chooses whether or not to display the field. | true |
| disableonEdit | boolean | When the form is in edit mode, the field becomes unable to be edited. | false |
| enable | boolean | The enable property sets whether a field is enabled or not. | true |
| requiredWhenVisible | boolean | It makes the field required on the UI when it appears. It is used only for visibility. | false |
| placeholder | string | (`Renounced`) The grey text is shown when the input is empty. | - |
| Property | Type | Description | Default Value |
| ------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| display | boolean | It chooses whether or not to display the field. | true |
| disableonEdit | boolean | When the form is in edit mode, the field becomes unable to be edited. | false |
| enable | boolean | The enable property sets whether a field is enabled or not. | true |
| requiredWhenVisible | boolean | It makes the field required on the UI when it appears. It is used only for visibility. | false |
| hideForPlatform | string | Defines for which platform element should be hidden from UI perspective. Currently only two platforms are supported `cloud` or `enterprise`. | - |
| placeholder | string | (`Renounced`) The grey text is shown when the input is empty. | - |
5 changes: 3 additions & 2 deletions docs/inputs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ provided, a dropdown field will appear on the Inputs page. In contrast, a button
### Properties

| Property | Type | Description |
|---------------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| title<span class="required-asterisk">\*</span> | string | - |
| description | string | It provides a brief summary of an inputs page. |
| [subDescription](../advanced/sub_description.md) | object | It provides broader description of an inputs page. |
Expand All @@ -24,7 +24,7 @@ provided, a dropdown field will appear on the Inputs page. In contrast, a button
### Services Properties

| Property | Type | Description |
|-----------------------------------------------------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name<span class="required-asterisk">\*</span> | string | It defines the particular service name. |
| title<span class="required-asterisk">\*</span> | string | It shows the title of the service. |
| subTitle | string | It shows the subtitle (or additional information) of the service. |
Expand All @@ -39,6 +39,7 @@ provided, a dropdown field will appear on the Inputs page. In contrast, a button
| restHandlerName | string | It specify name of the REST handler script, that provides fields, models and validators for the fields supported under the specified input and any specific actions to be performed on CRUD operations for the given input. (Do NOT use with restHandlerModule or restHandlerClass) |
| [restHandlerModule](../advanced/custom_rest_handler.md) | string | It specify name of the REST handler script that implements the custom actions to be performed on CRUD operations for the given input. (Use with restHandlerClass) |
| [restHandlerClass](../advanced/custom_rest_handler.md) | string | It specify name of the class present in the restHandlerModule, which implements methods like handleCreate, handleEdit, handleList, handleDelete and is child class of splunktaucclib.rest_handler.admin_external.AdminExternalHandler. (Use with restHandlerModule) |
| hideForPlatform | string | Defines for which platform element should be hidden from UI perspective. Currently only two platforms are supported `cloud` or `enterprise`. |

### Usage

Expand Down
Loading

0 comments on commit 6d97b78

Please sign in to comment.