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.