/
Where/how do we store the custom fields?
Where/how do we store the custom fields?
And what should we store? This format might work:
[
{ "name" : "llp_port", "value" : 7000, "type" : "port"}
{ "name" : "private_key", "value" : "~/.ssh/keyfiles.pem", "type" : "path"}
{ "name" : "host_name", "value" : "concepts.interfaceware.com", "type" : "string"}
{ "name" : "timeout", "value" : 10000, "type" : "number"}
{ "name" : "retry", "value" : false, "type" : "bool"}
]
Types
path
Has a browse ellipsis
Stored as a string
Support ~/ home notation for easy defaults
port
Stored as a number (in fact an integer from 0 to 2^16-1)
Ports later can default to an unused port
string
Stored as a string
number - double - taking the lead that Lua/Javascript don’t distinguish between integers and doubles
Stored as a number
bool - true/false
Represented with a switch
Stored as true/false
Defaults can be stored in the template.
This configuration design gives us the ability to expand to have additional properties like if a field should be on the dashboard etc.
Related content
What should the API look like?
What should the API look like?
Read with this
Using Custom Fields in Scripts
Using Custom Fields in Scripts
More like this
How configurable should individual templates be?
How configurable should individual templates be?
Read with this
The Custom Fields
The Custom Fields
More like this
Custom Fields
Custom Fields
More like this
One model for how one can do custom fields
One model for how one can do custom fields
More like this