Open niclash opened 11 months ago
To modify the Scripts, the same principle of sending commands to Pulsar topic is used.
Topic: sensetif/main/configurations
sensetif/main/configurations
Key; 1:[orgId]:updateScript Value example:
{ "name": "theNameOfTheScriptNoSlashes", "language": "js", "code": "var example = 'a string'" }
The entire object will be stored in the keyValues store, under the type="scripts" and key=[language]:[name], e.g "js:myscript"
Additional fields that the UI probably needs to manage and store;
"description" = a human-readable description of what the script does.
Key; 1:[orgId]:deleteScript Value example:
{ "name": "scriptToBeDeleted", "language": "js" }
Key; 1:[orgId]:renameScript Value example:
{ "oldName": "formerScriptName", "newName": "newScriptName", "language": "js" }
To modify the Scripts, the same principle of sending commands to Pulsar topic is used.
Topic:
sensetif/main/configurations
Formats
Update script
Key; 1:[orgId]:updateScript Value example:
The entire object will be stored in the keyValues store, under the type="scripts" and key=[language]:[name], e.g "js:myscript"
Additional fields that the UI probably needs to manage and store;
"description" = a human-readable description of what the script does.
Delete script
Key; 1:[orgId]:deleteScript Value example:
Rename script
Key; 1:[orgId]:renameScript Value example: