-
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.
fix: custom row loading on many tabs (#1336)
- Loading branch information
1 parent
7ce9ecf
commit f124b5e
Showing
13 changed files
with
213 additions
and
32 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
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 |
---|---|---|
|
@@ -21,4 +21,5 @@ redirect_url = | |
refresh_token = | ||
token = | ||
url = | ||
username = | ||
username = | ||
text_test = |
65 changes: 65 additions & 0 deletions
65
...obal_config_everything/Splunk_TA_UCCExample/bin/splunk_ta_uccexample_rh_custom_row_tab.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,65 @@ | ||
|
||
import import_declare_test | ||
|
||
from splunktaucclib.rest_handler.endpoint import ( | ||
field, | ||
validator, | ||
RestModel, | ||
SingleModel, | ||
) | ||
from splunktaucclib.rest_handler import admin_external, util | ||
from splunktaucclib.rest_handler.admin_external import AdminExternalHandler | ||
import logging | ||
|
||
util.remove_http_proxy_env_vars() | ||
|
||
|
||
fields = [ | ||
field.RestField( | ||
'example_help_link', | ||
required=False, | ||
encrypted=False, | ||
default=None, | ||
validator=None | ||
), | ||
field.RestField( | ||
'config1_help_link', | ||
required=False, | ||
encrypted=False, | ||
default=None, | ||
validator=None | ||
), | ||
field.RestField( | ||
'config2_help_link', | ||
required=False, | ||
encrypted=False, | ||
default=None, | ||
validator=None | ||
), | ||
field.RestField( | ||
'text_test', | ||
required=True, | ||
encrypted=False, | ||
default=None, | ||
validator=validator.String( | ||
max_len=100, | ||
min_len=1, | ||
) | ||
) | ||
] | ||
model = RestModel(fields, name=None) | ||
|
||
|
||
endpoint = SingleModel( | ||
'splunk_ta_uccexample_custom_row_tab', | ||
model, | ||
config_name='custom_row_tab' | ||
) | ||
|
||
|
||
if __name__ == '__main__': | ||
logging.getLogger().addHandler(logging.NullHandler()) | ||
admin_external.handle( | ||
endpoint, | ||
handler=AdminExternalHandler, | ||
) |
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
1 change: 1 addition & 0 deletions
1
..._addons/expected_output_global_config_everything/Splunk_TA_UCCExample/default/server.conf
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
[shclustering] | ||
conf_replication_include.splunk_ta_uccexample_settings = true | ||
conf_replication_include.splunk_ta_uccexample_account = true | ||
conf_replication_include.splunk_ta_uccexample_custom_row_tab = true | ||
conf_replication_include.splunk_ta_uccexample_oauth = true |
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
25 changes: 25 additions & 0 deletions
25
...al_config_everything/package/appserver/static/js/build/custom/custom_input_row_replace.js
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,25 @@ | ||
class CustomInputRow { | ||
/** | ||
* Custom Row Cell | ||
* @constructor | ||
* @param {Object} globalConfig - Global configuration. | ||
* @param {string} serviceName - Input service name. | ||
* @param {element} el - The element of the custom cell. | ||
* @param {Object} row - custom row object, | ||
* use this.row.<field_name>, where <field_name> is a field name | ||
*/ | ||
constructor(globalConfig, serviceName, el, row) { | ||
this.globalConfig = globalConfig; | ||
this.serviceName = serviceName; | ||
this.el = el; | ||
this.row = row; | ||
} | ||
|
||
render() { | ||
const content_html_template = "Custom Input Row"; | ||
this.el.innerHTML = content_html_template; | ||
return this; | ||
} | ||
} | ||
|
||
export default CustomInputRow; |
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