// SMARTFOXSERVER 3 ADMIN TOOL'S SERVER CONFIGURATOR MODULE
// Server configuration settings descriptor file
// 
// The "category" attribute indicates in which tab on the interface (if a TabNavigator is used) the parameter will be displayed. If missing a default category is used.

//-------------------------------------------
// GENERAL SETTINGS
//-------------------------------------------

// SERVER NAME
{
	"name":"serverName",
	"label":"Server name",
	"tooltip":"Custom name assigned to the server, for easier identification in case of environments running multiple SmartFoxServer instances. The name is displayed in the title bar of all modules, together with the server's address and port",
	"type":"TextInput",
	"value":"{$BasicValue=serverSettings.serverName}"
},

// SOCKET ADDRESSES
{
	"name":"socketAddresses",
	"label":"Socket addresses",
	"tooltip":"SmartFoxServer's communication address, port and protocol; removing the address/port to which you are currently connected will prevent the AdminTool reconnection after the server restart. Addresses and ports must be physically available on the hardware; using ports in the 0-1024 range requires starting SmartFoxServer as a Root user",
	"type":"DataGrid",
	"defaultListItem":
	[
		{
			"name":"address",
			"label":"IP address",
			"tooltip":"IP address used by SmartFoxServer",
			"type":"ComboBox",
			"value":"127.0.0.1",
			"dataProvider":"{$BasicValue=adminHelper.availableSocketAddresses}"
		},
		{
			"name":"port",
			"label":"Port",
			"tooltip":"Port used by SmartFoxServer",
			"type":"NumericStepper",
			"value":9933,
			"attributes":
			{
				"min":0,
				"max":65535
			}
		},
		{
			"name":"type",
			"label":"Type",
			"tooltip":"Communication protocol",
			"type":"ComboBox",
			"value":"TCP",
			"dataProvider":"TCP,UDP"
		}
	],
	"listValues":{$List=socketAddresses, instance=serverSettings, fields=address;port;type},
	"clazz":"ServerSettings$SocketAddress",
	"denyEmpty":true
},

// SESSION MAX IDLE TIME
{
	"name":"sessionMaxIdleTime",
	"label":"Session maximum idle time",
	"tooltip":"Maximum idle time for a session (in seconds), after which the client is disconnected; setting a value between 10 and 30 seconds is recommended",
	"type":"NumericStepper",
	"value":{$BasicValue=serverSettings.sessionMaxIdleTime},
	"attributes":
	{
		"min":5,
		"max":2147483647
	}
},

// USER MAX IDLE TIME
{
	"name":"userMaxIdleTime",
	"label":"User maximum idle time",
	"tooltip":"Maximum idle time for a logged user (in seconds), after which the user is disconnected; this value must be greater than the session maximum idle time",
	"type":"NumericStepper",
	"value":{$BasicValue=serverSettings.userMaxIdleTime},
	"attributes":
	{
		"min":5,
		"max":2147483647
	}
},

// PROTOCOL COMPRESSION THRESHOLD
{
	"name":"protocolCompressionThreshold",
	"label":"Protocol compression threshold",
	"tooltip":"Specifies the minimum message size (in bytes) that triggers the protocol compression; recommended values are those equal to or greater than 1024 bytes",
	"type":"NumericStepper",
	"value":{$BasicValue=serverSettings.protocolCompressionThreshold},
	"attributes":
	{
		"min":256,
		"max":2147483647
	}
},

// USE FRIENDLY EXCEPTIONS
{
	"name":"useFriendlyExceptions",
	"label":"User-friendly exceptions",
	"tooltip":"Extends system exception messages with extra details, where applicable",
	"type":"CheckBox",
	"value":{$BasicValue=serverSettings.useFriendlyExceptions}
},

// USE DEBUG MODE
{
	"name":"useDebugMode",
	"label":"Use debug-mode",
	"tooltip":"Adds the full stack trace to each Server exception; recommended",
	"type":"CheckBox",
	"value":{$BasicValue=serverSettings.useDebugMode}
},

// GHOST HUNTER TASK
{
	"name":"ghostHunterEnabled",
	"label":"Enable Ghost Hunter",
	"tooltip":"Runs a background task at regular intervals to detect ghost users and remove them",
	"type":"CheckBox",
	"value":{$BasicValue=serverSettings.ghostHunterEnabled}
},

// START EXTENSION FILE MONITOR
{
	"name":"startExtensionFileMonitor",
	"label":"Start Extension file monitor",
	"tooltip":"Enable realtime monitoring and reloading of Extensions",
	"type":"CheckBox",
	"value":{$BasicValue=serverSettings.startExtensionFileMonitor}
},

// EXTENSION REMOTE DEBUG
{
	"name":"extensionRemoteDebug",
	"label":"Extensions remote debug",
	"tooltip":"Enable remote debugging of Extensions",
	"type":"CheckBox",
	"value":{$BasicValue=serverSettings.extensionRemoteDebug}
},

//-------------------------------------------
// IP FILTER SETTINGS
//-------------------------------------------

// MAX CONNECTIONS PER IP ADDRESS
{
	"name":"ipFilter.maxConnectionsPerAddress",
	"label":"Maximum connections per IP address",
	"tooltip":"Maximum number of connections coming from the same client IP address",
	"category":"IP Filter",
	"type":"NumericStepper",
	"value":{$BasicValue=ipFilter.maxConnectionsPerAddress},
	"attributes":
	{
		"min":1,
		"max":2147483647
	}
},

// IP ADDRESS BLACK LIST
{
	"name":"ipFilter.addressBlackList",
	"label":"IP addresses black-list",
	"tooltip":"The black-list prevents the connection attempts coming from the listed client IP addresses",
	"category":"IP Filter",
	"type":"DataGrid",
	"defaultListItem":
	[
		{
			"name":"ipAddress",
			"label":"IP address",
			"tooltip":"Client IP address",
			"type":"TextInput",
			"value":"",
			"validator":"ip"
		}
	],
	"listValues":{$List=addressBlackList, instance=ipFilter, createField=ipAddress}
},

// IP ADDRESS WHITE LIST
{
	"name":"ipFilter.addressWhiteList",
	"label":"IP addresses white-list",
	"tooltip":"The white-list overrides the maximum connections per IP address limit, allowing any number of connections coming from the listed client IP addresses",
	"category":"IP Filter",
	"type":"DataGrid",
	"defaultListItem":
	[
		{
			"name":"ipAddress",
			"label":"IP address",
			"tooltip":"Client IP address",
			"type":"TextInput",
			"value":"",
			"validator":"ip"
		}
	],
	"listValues":{$List=addressWhiteList, instance=ipFilter, createField=ipAddress}
},

//-------------------------------------------
// BAN USER MANAGER
//-------------------------------------------

// AUTO-REMOVE
{
	"name":"bannedUserManager.isAutoRemove",
	"label":"Auto-remove",
	"tooltip":"Automatically remove banned users from the ban list when their ban-timeframe expires",
	"category":"Ban Manager",
	"type":"CheckBox",
	"value":{$BasicValue=bannedUserManager.isAutoRemove}
},

// PERSISTENT
{
	"name":"bannedUserManager.isPersistent",
	"label":"Persistent",
	"tooltip":"Persistently store the banned user list so that it's not lost across SmartFoxServer restarts (recommended)",
	"category":"Ban Manager",
	"type":"CheckBox",
	"value":{$BasicValue=bannedUserManager.isPersistent}
},

// CUSTOM PERSISTENCE CLASS NAME
{
	"name":"bannedUserManager.customPersistenceClass",
	"label":"Custom persistence class name",
	"tooltip":"Allows to provide a custom class to implement banned user list persistence",
	"category":"Ban Manager",
	"type":"TextInput",
	"value":"{$BasicValue=bannedUserManager.customPersistenceClass}",
	"attributes":
	{
		"pattern":"[a-zA-Z0-9._]+"
	}
},

//-------------------------------------------
// WEB SERVER
//-------------------------------------------

// ACTIVE
{
	"name":"webServer.isActive",
	"label":"Activate",
	"tooltip":"Enable/disable the embedded web server",
	"category":"Web Server",
	"type":"CheckBox",
	"value":{$BasicValue=webServer.isActive}
},

// ENABLE HTTP MODULE
{
	"name":"webServer.enableHttp",
	"label":"Enable HTTP",
	"tooltip":"Enable/disable the HTTP module in the embedded web server",
	"category":"Web Server",
	"type":"CheckBox",
	"value":{$BasicValue=webServer.enableHttp}
},

// HTTP/WS PORT
{
	"name":"webServer.httpPort",
	"label":"HTTP/WS port",
	"tooltip":"TCP port used by the embedded web server for HTTP and WS communication\n\n<b>NOTE</b>\nThe entered value is ignored if HTTP module is disabled",
	"category":"Web Server",
	"type":"NumericStepper",
	"value":{$BasicValue=webServer.httpPort},
	"attributes":
	{
		"min":0,
		"max":65535
	}
},

// ENABLE HTTPS MODULE
{
	"name":"webServer.enableHttps",
	"label":"Enable HTTPS",
	"tooltip":"Enable/disable the HTTPS module in the embedded web server",
	"category":"Web Server",
	"type":"CheckBox",
	"value":{$BasicValue=webServer.enableHttps}
},

// HTTPS/WSS PORT
{
	"name":"webServer.httpsPort",
	"label":"HTTPS/WSS port",
	"tooltip":"TCP port used by the embedded web server for HTTPS and WSS communication\n\n<b>NOTE</b>\nThe entered value is ignored if HTTPS module is disabled",
	"category":"Web Server",
	"type":"NumericStepper",
	"value":{$BasicValue=webServer.httpsPort},
	"attributes":
	{
		"min":0,
		"max":65535
	}
},

// ENABLE WS/WSS COMMUNICATION
{
	"name":"webServer.isWSActive",
	"label":"Enable WS/WSS",
	"tooltip":"Enable/disable the WebSocket communication (both WS and WSS) through the HTTP/S modules; requires one of the two modules (or both) to be active",
	"category":"Web Server",
	"type":"CheckBox",
	"value":{$BasicValue=webServer.isWSActive}
},

// ENABLE X-FORWARDED-FOR DIRECTIVE
{
	"name":"webServer.isXForwardedForActive",
	"label":"Enable X-Forwarded-For",
	"tooltip":"Enable this feature only if your server is behind a proxy/firewall supporting the X-Forwarded-For directive. It allows to detect the original IP address of the remote client",
	"category":"Web Server",
	"type":"CheckBox",
	"value":{$BasicValue=webServer.isXForwardedForActive}
},

// ENABLE X-FORWARDED-FOR DIRECTIVE
{
	"name":"webServer.isCFHeaderActive",
	"label":"Enable CF-Connecting-IP",
	"tooltip":"Enable CloudFlare's CF-Connecting-IP header. This allows to detect the original IP address of the remote client when SFS is behind a CloudFlare proxy",
	"category":"Web Server",
	"type":"CheckBox",
	"value":{$BasicValue=webServer.isCFHeaderActive}
},

// ALLOWED WEBSOCKET ORIGINS
{
	"name":"webServer.allowedWebsocketOrigins",
	"label":"Allowed client origins",
	"tooltip":"List of origins from which the client should be allowed to connect; it should represent only the URL(s) where the client can be downloaded from",
	"category":"Web server",
	"type":"DataGrid",
	"defaultListItem":
	[
		{
			"name":"origin",
			"label":"Valid origins",
			"tooltip":"Origin URL",
			"type":"TextInput",
			"value":"",
			"validator":"notNull"
		}
	],
	"listValues":{$List=allowedWebsocketOrigins, instance=webServer, createField=origin}
},

// CUSTOM HTTP HEADERS
{
	"name":"webServer.customHttpHeaders",
	"label":"Custom HTTP Headers",
	"tooltip":"A list of custom HTTP headers to be extracted when the client connects via Websocket or BlueBox. They can be later read via Extension from the relative Session object.",
	"category":"Web server",
	"type":"DataGrid",
	"defaultListItem":
	[
		{
			"name":"header",
			"label":"HTTP header names",
			"tooltip":"Name of the header to extract",
			"type":"TextInput",
			"value":"",
			"validator":"notNull"
		}
	],
	"listValues":{$List=customHttpHeaders, instance=webServer, createField=header}
},

// TOMCAT STATUS ACCESS
{
	"name":"webServer.tomcatUsers",
	"label":"Tomcat users",
	"tooltip":"The credentials to enter the advanced web server status console, accessible from the AdminTool's Dashboard module",
	"category":"Web server",
	"type":"DataGrid",
	"defaultListItem":
	[
		{
			"name":"id",
			"value":-1,
			"edit":false
		},
		{
			"name":"username",
			"label":"Username",
			"tooltip":"Tomcat's username",
			"type":"TextInput",
			"value":"",
			"validator":"notNull"
		},
		{
			"name":"newPassword",
			"label":"Password",
			"tooltip":"Tomcat's password",
			"type":"TextInput",
			"value":"",
			"validator":"pwd",
			"attributes":
			{
				"type":"password"
			}
		}
	],
	"listValues":{$List=tomcatUsers, instance=webServer, fields=id;username;newPassword},
	"clazz":"TomcatUser",
	"autoIncrement":"id"
},

// BLUEBOX POLLING TIMEOUT
{
	"name":"webServer.blueBoxPollingTimeout",
	"label":"BlueBox polling timeout",
	"tooltip":"The amount of seconds after which a client connected through the BlueBox is considered disconnected if he doesn't send a polling request",
	"category":"Web Server",
	"type":"NumericStepper",
	"value":{$BasicValue=webServer.blueBoxPollingTimeout},
	"attributes":
	{
		"min":25,
		"max":40
	},
	"separator":
	{
		"pos":"before",
		"text":"\n<b>BlueBox Settings</b>"
	}
},

// BLUEBOX MESSAGES QUEUE SIZE
{
	"name":"webServer.blueBoxMsgQueueSize",
	"label":"BlueBox messages queue size",
	"tooltip":"The maximum amount of messages that can be queued for each client connected through the BlueBox",
	"category":"Web Server",
	"type":"NumericStepper",
	"value":{$BasicValue=webServer.blueBoxMsgQueueSize},
	"attributes":
	{
		"min":20,
		"max":100
	}
},

// UPLOAD COOLDOWN TIME
{
	"name":"webServer.uploadCooldownSec",
	"label":"Upload Cooldown Seconds",
	"tooltip":"The number of seconds between two uploads (0 = no cooldown). Upload requests sent too early will be refused",
	"category":"Web Server",
	"type":"NumericStepper",
	"value":{$BasicValue=webServer.uploadCooldownSec},
	"attributes":
	{
		"min":0,
		"max":100000
	},
	"separator":
	{
		"pos":"before",
		"text":"\n<b>Upload Settings</b>"
	}
},

// UPLOAD MAX REQ PER USER
{
	"name":"webServer.maxUploadsPerUser",
	"label":"Max uploads per User",
	"tooltip":"The maximum number of uploads available to each User. NOTE: This is not intended across all sessions, but only the current one",
	"category":"Web Server",
	"type":"NumericStepper",
	"value":{$BasicValue=webServer.maxUploadsPerUser},
	"attributes":
	{
		"min":1,
		"max":10000
	}
},


// UPLOAD MAX REFUSED UPLOADS
{
	"name":"webServer.maxRefusedUploads",
	"label":"Max refused uploads",
	"tooltip":"The maximum number of refused uploads per User. When the value is exceeded the User gets kicked out for spamming",
	"category":"Web Server",
	"type":"NumericStepper",
	"value":{$BasicValue=webServer.maxRefusedUploads},
	"attributes":
	{
		"min":1,
		"max":10
	}
},

//-------------------------------------------
// DATABASE
//-------------------------------------------

// EMBEDDED DB PORT VALUE
{
	"name":"hsqlDB.port",
	"label":"Local TCP port",
	"tooltip":"The local TCP port used to communicate with the embedded database",
	"category":"Database",
	"type":"NumericStepper",
	"value":{$BasicValue=hsqlDB.port},
	"attributes":
	{
		"min":10000,
		"max":40000
	},
	"separator":
	{
		"pos":"before",
		"text":"<b>Embedded HSQL Database</b>"
	}
},

// EMBEDDED DB NO TRACES
{
	"name":"hsqlDB.noTraces",
	"label":"No traces",
	"tooltip":"When active silence database debug messages (recommended)",
	"category":"Database",
	"type":"CheckBox",
	"value":{$BasicValue=hsqlDB.noTraces}
},

// EXTERNAL DB HOST
{
	"name":"externalDB.host",
	"label":"Host",
	"tooltip":"The external HSQLDB database server to use instead of the embedded one",
	"category":"Database",
	"type":"TextInput",
	"value":"{$BasicValue=externalDB.host}",
	"validator":"ip",
	"separator":
	{
		"pos":"before",
		"text":"\n<b>External HSQL Database</b>\nIf available, the usage of the external database can be enabled for specific services supporting it."
	}
},

// EXTERNAL DB PORT
{
	"name":"externalDB.port",
	"label":"TCP port",
	"tooltip":"The external TCP port used to communicate with the database",
	"category":"Database",
	"type":"NumericStepper",
	"value":{$BasicValue=externalDB.port},
	"attributes":
	{
		"min":0,
		"max":65535
	}
},

// EXTERNAL DB USER
{
	"name":"externalDB.user",
	"label":"User",
	"tooltip":"The username to connect to the external HSQLDB instance",
	"category":"Database",
	"type":"TextInput",
	"value":"{$BasicValue=externalDB.user}"
},

// EXTERNAL DB PASS
{
	"name":"externalDB.password",
	"label":"Password",
	"tooltip":"The username to connect to the external HSQLDB instance",
	"category":"Database",
	"type":"TextInput",
	"value":"{$BasicValue=externalDB.pwdPlaceholder}",
	"validator":"pwd",
	"attributes":
	{
		"type":"password"
	}
},

// EXTERNAL DB NO TRACES
{
	"name":"externalDB.noTraces",
	"label":"No traces",
	"tooltip":"When active silence database debug messages (recommended)",
	"category":"Database",
	"type":"CheckBox",
	"value":{$BasicValue=externalDB.noTraces}
},

//-------------------------------------------
// AUDIO SETTINGS
//-------------------------------------------

// ACTIVE
{
	"name":"audio.isActive",
	"label":"Activate",
	"tooltip":"Enable/disable server's audio streaming feature",
	"category":"Audio Streaming",
	"type":"CheckBox",
	"value":{$BasicValue=audio.isActive}
},

// BITRATE
{
	"name":"audio.bitrate",
	"label":"Bitrate",
	"tooltip":"Audio encoding bitrate affects the amount of data used to represent the audio; higher bitrates provide a more accurate representation of the signal and better audio quality",
	"category":"Audio Streaming",
	"type":"ComboBox",
	"value":{$BasicValue=audio.bitrate},
	"dataProvider":"{$BasicValue=audio.validBitrates}"
},

// DELAY UPPER THRESHOLD
{
	"name":"audio.delayUpperThreshold",
	"label":"Delay upper threshold",
	"tooltip":"Audio queue size in milliseconds above which pitch shifting is activated to speed playback and reduce latency",
	"category":"Audio Streaming",
	"type":"NumericStepper",
	"value":{$BasicValue=audio.delayUpperThreshold},
	"attributes":
	{
		"min":120
	}
},

// DELAY LOWER THRESHOLD
{
	"name":"audio.delayLowerThreshold",
	"label":"Delay lower threshold",
	"tooltip":"Audio queue size in milliseconds below which pitch shifting is deactivated (to speed playback and reduce latency)",
	"category":"Audio Streaming",
	"type":"NumericStepper",
	"value":{$BasicValue=audio.delayLowerThreshold},
	"attributes":
	{
		"min":0
	}
},

//-------------------------------------------
// MAILER
//-------------------------------------------

// ACTIVE
{
	"name":"mailer.isActive",
	"label":"Activate",
	"tooltip":"Enable/disable the email service",
	"category":"Mailer",
	"type":"CheckBox",
	"value":{$BasicValue=mailer.isActive}
},

// MAIL HOST
{
	"name":"mailer.mailHost",
	"label":"Mail host",
	"tooltip":"The SMTP server host name or IP address",
	"category":"Mailer",
	"type":"TextInput",
	"value":"{$BasicValue=mailer.mailHost}",
	"validator":"notNull"
},

// SMTP PORT
{
	"name":"mailer.smtpPort",
	"label":"SMTP port",
	"tooltip":"The SMTP server port",
	"category":"Mailer",
	"type":"NumericStepper",
	"value":{$BasicValue=mailer.smtpPort},
	"attributes":
	{
		"min":0,
		"max":65535
	}
},

// MAIL USER
{
	"name":"mailer.mailUser",
	"label":"Mail username",
	"tooltip":"A valid account to connect to the SMTP server",
	"category":"Mailer",
	"type":"TextInput",
	"value":"{$BasicValue=mailer.mailUser}",
	"validator":"notNull"
},

// MAIL PASSWORD
{
	"name":"mailer.mailPass",
	"label":"Mail password",
	"tooltip":"The SMTP server account password",
	"category":"Mailer",
	"type":"TextInput",
	"value":"{$BasicValue=mailer.pwdPlaceholder}",
	"attributes":
	{
		"type":"password"
	}
},

// USE SSL
{
	"name":"mailer.useSSL",
	"label":"Use SSL",
	"tooltip":"Secure the connection between SmartFoxServer and the configured email server",
	"category":"Mailer",
	"type":"CheckBox",
	"value":{$BasicValue=mailer.useSSL}
},

// DEBUG
{
	"name":"mailer.isDebug",
	"label":"Enable debug",
	"tooltip":"Enable logging of SMTP exchange for debug purpose (stdout is used)",
	"category":"Mailer",
	"type":"CheckBox",
	"value":{$BasicValue=mailer.isDebug}
},

//-------------------------------------------
// REMOTE ADMIN
//-------------------------------------------

// ADMINISTRATORS
{
	"name":"remoteAdmin.administrators",
	"label":"Administrators",
	"tooltip":"The access credentials and permissions of SmartFoxServer administrators; removing all the administrators is not permitted as this would prevent further interacting with the server after the configuration submission",
	"category":"Remote Admin",
	"immediate":true,
	"type":"DataGrid",
	"defaultListItem":
	[
		{
			"name":"id",
			"value":-1,
			"edit":false
		},
		{
			"name":"login",
			"label":"Login",
			"tooltip":"Administrator's username",
			"type":"TextInput",
			"value":"",
			"validator":"notNull"
		},
		{
			"name":"newPassword",
			"label":"Password",
			"tooltip":"Administrator's password",
			"type":"TextInput",
			"value":"",
			"validator":"pwd",
			"attributes":
			{
				"type":"password"
			}
		},
		{
			"name":"allowHalt",
			"label":"Allow halt/restart",
			"tooltip":"Allow administrator to halt or restart the server",
			"type":"CheckBox",
			"value":true
		},
		{
			"name":"disabledModulesString",
			"label":"Disabled modules",
			"tooltip":"The list of AdminTool's modules that the administrator is NOT allowed to access",
			"type":"DualList",
			"value":"",
			"dataProvider":"{$BasicValue=adminHelper.allModules}"
		}
	],
	"listValues":{$List=administrators, instance=remoteAdmin, fields=id;login;newPassword;allowHalt;disabledModulesString},
	"clazz":"AdminUser",
	"denyEmpty":true,
	"autoIncrement":"id"
},

// ENABLE PASSWORD HASHING
{
	"name":"remoteAdmin.hashPasswords",
	"label":"Enable password hashing",
	"tooltip":"Store the administrator passwords in the local configuration as hashes, rather than in clear",
	"category":"Remote Admin",
	"immediate":true,
	"type":"CheckBox",
	"value":{$BasicValue=remoteAdmin.hashPasswords},
	"trigger":true
},

// ALLOWED REMOTE ADDRESSES
{
	"name":"remoteAdmin.allowedRemoteAddresses",
	"label":"Allowed client IP addresses",
	"tooltip":"List of client IP addresses or IP ranges which are allowed to access the SmartFoxServer's administration; leave the list empty to skip this check on administrator login",
	"category":"Remote Admin",
	"immediate":true,
	"type":"DataGrid",
	"defaultListItem":
	[
		{
			"name":"ipAddress",
			"label":"IP address or range",
			"tooltip":"Client IP address or range",
			"type":"TextInput",
			"value":"",
			"validator":"ipRange"
		}
	],
	"listValues":{$List=allowedRemoteAddresses, instance=remoteAdmin, createField=ipAddress}
},

// ADMIN TCP PORT
{
	"name":"remoteAdmin.adminTcpPort",
	"label":"Administration port",
	"tooltip":"Port number used for administration; set it to -1 to skip this check on administrator login",
	"category":"Remote Admin",
	"immediate":true,
	"type":"NumericStepper",
	"value":{$BasicValue=remoteAdmin.adminTcpPort},
	"attributes":
	{
		"min":-1,
		"max":65535
	}
},

// USE ENCRYPTION
{
	"name":"remoteAdmin.useEncryption",
	"label":"Use encryption",
	"tooltip":"Enable connection encryption for the Admin Tool; after the restart, the 'Use encryption' checkbox on the login screen must be flagged in order to be able to establish a connection with the server",
	"category":"Remote Admin",
	"type":"CheckBox",
	"value":{$BasicValue=remoteAdmin.useEncryption}
},

//-------------------------------------------
// ANALYTICS MODULE SETTINGS
//-------------------------------------------

// IS ACTIVE
{
	"name":"analytics.isActive",
	"label":"Active",
	"tooltip":"When turned ON the server will track a number of server metrics (connections, visits, rooms created/joined/removed, etc...) and store them for further analysis.",
	"category":"Analytics",
	"type":"CheckBox",
	"value":{$BasicValue=analytics.isActive}
},

// LOG QUERY TIMES
{
	"name":"analytics.logQueryTimes",
	"label":"Log Query Times",
	"tooltip":"Log SQL insertion times",
	"category":"Analytics",
	"type":"CheckBox",
	"value":{$BasicValue=analytics.logQueryTimes}
},

//-------------------------------------------
// GEOLOCATION DB
//-------------------------------------------

// GEOLOCATION DATABASE DOWNLOAD PATH
{
	"name":"geolocationDB.downloadPath",
	"label":"Database download URL",
	"tooltip":"The URL of the DB-IP geolocation database, used by SmartFoxServer when a database update is triggered by clicking the button in this view; by default the path points to the <em>lite</em> version of the database (<em>yyyy</em> and <em>mm</em> are set to the current year and month respectively); you can change it to the commercial database download path if you own a license",
	"category":"Geolocation DB",
	"immediate":true,
	"type":"TextInputGroup",
	"value":"{$BasicValue=geolocationDB.downloadPath}",
	"prefix":"{$BasicValue=geolocationDB.downloadDomain}",
	"validator":"notNull"
},

// INSTALLED DATABASE
{
	"name":"adminHelper.geoDbRelease",
	"label":"Geolocation database",
	"tooltip":"Name of the currently active geolocation database",
	"category":"Geolocation DB",
	"type":"TextInput",
	"value":"{$BasicValue=adminHelper.geoDbRelease}",
	"edit":false
},

//-------------------------------------------
// JVM SETTINGS
//-------------------------------------------

// JVM OPTIONS
{
	"name":"adminHelper.vmOptions",
	"label":"JVM options",
	"tooltip":"A list of additional settings to fine tune the Java Virtual Machine when running the SmartFoxServer process \n\n<b>IMPORTANT</b>\nThe following options are mandatory; if missing, SmartFoxServer execution could be negatively affected:\n<i>-Dfile.encoding=UTF-8</i>",
	"category":"JVM Settings",
	"type":"DataGrid",
	"defaultListItem":
	[
		{
			"name":"option",
			"label":"Option",
			"tooltip":"JVM option",
			"type":"TextInput",
			"value":"",
			"validator":"notNull"
		}
	],
	"listValues":{$List=vmOptions, instance=adminHelper, createField=option}
},

// JVM CLASSPATH
{
	"name":"adminHelper.vmClasspath",
	"label":"JVM classpath",
	"tooltip":"A list of search paths for classes and resources used by SmartFoxServer and its custom Extensions \n\n<b>IMPORTANT</b>\nThe following paths are mandatory; if missing, you won't be able to run SmartFoxServer:\n<i>./\nlib/*\nlib/apache-tomcat/bin/*\nextensions/_shared/*</i>",
	"category":"JVM Settings",
	"type":"DataGrid",
	"defaultListItem":
	[
		{
			"name":"path",
			"label":"Path",
			"tooltip":"JVM classpath",
			"type":"TextInput",
			"value":"",
			"validator":"notNull"
		}
	],
	"listValues":{$List=vmClasspath, instance=adminHelper, createField=path}
}