-
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.
* chore(code): update file, dir checks condition (#624) * chore(code): update file, dir checks condition * test(unit): updating test case as per source code * chore: update deps (#626) * docs: ADDON-59601 documentation for Custom Tab feature (#615) * docs: ADDON-59601 Added a custom tab feature doc * docs: ADDON-59601 Content updated * docs: ADDON-59601 Content updated * docs: ADDON-59459 Content updated (#618) * docs: ADDON-58705 Doc changes for the table action field (#612) Co-authored-by: Artem Rys <rysartem@gmail.com> * feat: move validators from ucc-ui to ucc-gen (#629) * feat: move validators from ucc-ui to ucc-gen Moved global config json duplicates validators from the ucc-ui repo to ucc-gen repo in python * added handling for children in autoCompleteFields * renamed temp variable to options * added tests for check duplicates in autoCompleteFields * added tests for all validators under tabs tag * fixed pre-commit * added tests for inputs * added comments to document the code * pre-commit for test file * changed the semantic release version * added typing into validator parameters added single quotes to validator exceptions * the code now compares the values in lowercase * adjusted the test to test capitalized duplicates * docs: include steps to download UCC UI [ci skip] (#632) * feat: update UCC UI to v1.21.0 (#633) --------- Co-authored-by: Hetang Modi <62056057+hetangmodi-crest@users.noreply.github.com> Co-authored-by: Tushar Balar <62089106+tbalar-splunk@users.noreply.github.com> Co-authored-by: Marcin Bruzda <94437843+mbruzda-splunk@users.noreply.github.com>
- Loading branch information
1 parent
c47584c
commit e2a389d
Showing
19 changed files
with
2,025 additions
and
155 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,80 @@ | ||
Custom Tab feature can be used to render any customized UI component in the TA. With this feature, the developer can design and render any complex input with ease. This is an advanced feature and can be leveraged with limitless functionalities. Modern TAs are receiving complex use cases and this feature will allow them to design the UI perfectly for their case without having to depend on the newer releases of UCC supporting their component. | ||
|
||
### Usage | ||
|
||
Use Custom Tab in the Configuration page: | ||
``` | ||
"configuration": { | ||
"title": "Configuration", | ||
"descriptions": "Set up your add-on", | ||
"tabs": [ | ||
{ | ||
"name": "account", | ||
"title": "Account", | ||
"entity": [], | ||
"table": {} | ||
}, | ||
{ | ||
"name": "logging", | ||
"title": "Logging", | ||
"entity": [] | ||
}, | ||
{ | ||
"name": "proxy", | ||
"title": "Proxy", | ||
"entity": [] | ||
}, | ||
{ | ||
"name": "custom_tab", | ||
"title": "Customized Tab", | ||
"customTab": { | ||
"src": "custom_tab", | ||
"type": "external" | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
### Properties | ||
|
||
| Property | Description | | ||
| -------- | -------------------------------------------------------------------------------------------------- | | ||
| tab | It is an object with the properties and values of a custom tab object from the global config file. | | ||
| el | The html element of the custom tab. | | ||
|
||
### Methods | ||
|
||
| Property | Description | | ||
| -------- | ------------------------------------------------------------------------ | | ||
| Render | This method should contain the rendering logic for the custom component. | | ||
|
||
### Example | ||
|
||
``` | ||
class CustomTab { | ||
/** | ||
* Custom Tab | ||
* @constructor | ||
* @param {Object} tab - tab details. | ||
* @param {element} el - The element of the custom menu. | ||
*/ | ||
constructor(tab, el) { | ||
this.tab = tab; | ||
this.el = el; | ||
} | ||
render() { | ||
this.el.innerHTML = `<h1 style="margin-top: 20px">${this.tab.title} - This is a custom component rendered from the TA</h1>` | ||
} | ||
} | ||
export default CustomTab; | ||
``` | ||
|
||
> Note: The Javascript file for the custom tab should be saved in the custom folder at `appserver/static/js/build/custom/`. | ||
### Output | ||
|
||
This is how Custom Tab looks: | ||
 |
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
Oops, something went wrong.