-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
What was done: * Support for `textarea` component * Support for `file` component * Support for custom REST handlers for modular inputs * Fixed some bugs
- Loading branch information
Showing
58 changed files
with
4,378 additions
and
461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# Components supported by UCC | ||
|
||
Components are used by UCC to render the Inputs and Configuration pages. Here is | ||
the list of the supported components. | ||
|
||
## `custom` | ||
|
||
TBD | ||
|
||
## `text` | ||
|
||
TBD | ||
|
||
## `textarea` | ||
|
||
Underlying `@splunk/react-ui` component: [`TextArea`](https://splunkui.splunk.com/Packages/react-ui/TextArea). | ||
|
||
`textarea` component is very similar to `text` component, but allows to have a | ||
multi-line input for text. | ||
|
||
Example usage below: | ||
|
||
```json | ||
{ | ||
"type": "textarea", | ||
"label": "Textarea Field", | ||
"field": "textarea_field", | ||
"help": "Help message", | ||
"options": { | ||
"rowsMin": 3, | ||
"rowsMax": 15 | ||
}, | ||
"required": true | ||
} | ||
``` | ||
|
||
This is how it looks like in the UI: | ||
|
||
 | ||
|
||
## `singleSelect` | ||
|
||
TBD | ||
|
||
## `checkbox` | ||
|
||
TBD | ||
|
||
## `multipleSelect` | ||
|
||
TBD | ||
|
||
## `radio` | ||
|
||
TBD | ||
|
||
## `placeholder` | ||
|
||
TBD | ||
|
||
## `oauth` | ||
|
||
TBD | ||
|
||
## `helpLink` | ||
|
||
TBD | ||
|
||
## `file` | ||
|
||
Underlying `@splunk/react-ui` component: [`File`](https://splunkui.splunk.com/Packages/react-ui/File). | ||
|
||
The current implementation of the `file` component only supports `JSON` files | ||
and accepts only 1 file (can be dragged into). | ||
|
||
Usage example below: | ||
|
||
```json | ||
{ | ||
"type": "file", | ||
"label": "SA certificate", | ||
"help": "Upload service account's certificate", | ||
"field": "service_account", | ||
"options": { | ||
"fileSupportMessage": "Support message" | ||
}, | ||
"validators": [ | ||
{ | ||
"type": "file", | ||
"supportedFileTypes": [ | ||
"json" | ||
] | ||
} | ||
], | ||
"encrypted": true, | ||
"required": true | ||
} | ||
``` | ||
|
||
> Note: `validators` field should be present for the file input exactly as it is in the example above. | ||
This is how it looks like in the UI: | ||
|
||
 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
splunk_add_on_ucc_framework/commands/rest_builder/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# | ||
# Copyright 2021 Splunk Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# |
Oops, something went wrong.