-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.js
15 lines (12 loc) · 2.77 KB
/
settings.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var settings = {
api_url:'http://localhost:3001',
account_confirm_url:'http://localhost:3000/account/confirm',
//use this site to create these from code:
defaultControlsJavascript: '%3Cscript%3E%0Afunction%20getConfiguration()%0A%7B%0A%20%20%2F%2F%20the%20configuration%20object%20is%20stored%20%0A%20%20var%20configObject%20%3D%20%7B%7D%3B%0A%20%20%0A%20%20%2F*%0A%20%20%20ie%3A%0A%20%20%20configObject%5B%27userName%27%5D%20%3D%20%24(%27%23txtUserName%27).val()%3B%0A%20%20%20configObject%5B%27password%27%5D%20%3D%20%24(%27%23txtPassword%27).val()%3B%0A%20%20*%2F%0A%20%20configObject%5B%27MemoryThreshold%27%5D%20%3D%20%24(%27%23txt_memory_threshold%27).val()%3B%0A%20%20%0A%20%20return%20configObject%3B%0A%7D%0A%0Afunction%20setConfiguration(configObject)%0A%7B%09%0A%20%20%2F%2F%20this%20method%20is%20called%20when%20the%20bot%20configuration%20is%20first%20loaded%20from%20the%20step%0A%20%20%09%24(%27body%27).data(%27configObject%27%2C%20configObject)%3B%0A%09%24(%27%23txt_memory_threshold%27).val(configObject%5B%27MemoryThreshold%27%5D)%3B%0A%7D%0A%3C%2Fscript%3E%0A%3Cdiv%20class%3D%27header_light%27%3EStandard%20Configuration%20Items%3C%2Fdiv%3E%0A%3Cdiv%20class%3D%27panel_light%27%3E%0A%3Ctable%20class%3D%27table_config_items%27%20cellpadding%3D%275%27%3E%0A%20%20%20%3Ctr%3E%0A%20%20%20%20%20%3Ctd%3EMemory%20Threshold%3C%2Ftd%3E%3Ctd%3E%3Cinput%20id%3D%27txt_memory_threshold%27%20type%3D%27text%27%20class%3D%27small_text%27%20value%3D%2720%27%20%2F%3E%3C%2Ftd%3E%3Ctd%20style%3D%27text-align%3Aleft%27%3EMB%3C%2Ftd%3E%0A%20%20%3C%2Ftr%3E%0A%3C%2Ftable%3E%0A%3C%2Fdiv%3E',
defaultInstructionsJavascript: 'var%20execute%20%3D%20function(process%2C%20data%2C%20done)%0A%09%7B%0A%09%09var%20robotExecute%20%3D%20function()%0A%09%09%7B%0A%09%09%09var%20currentData%20%3D%20%7Bmessage%3A%22Step%20%22%20%2B%20this.currentStepIndex%20%2B%20%22%27s%20data%22%7D%3B%0A%09%09%09%0A%09%09%09if%20(data%20!%3D%20null)%0A%09%09%09%09currentData%20%3D%20%7Bmessage%3A%22Step%20%22%20%2B%20this.currentStepIndex%20%2B%20%22%27s%20data%2C%20the%20previous%20data%20message%3A%20%22%20%2B%20data.message%7D%3B%0A%09%09%09%0A%09%09%09%2F*%0A%09%09%09%20Robot%20code%20goes%20in%20here%0A%09%09%09%20*%2F%0A%09%09%09%0A%09%09%09this.logStep(process%2C%20currentData%2C%20function()%7B%0A%09%09%09%09done(process%2C%20currentData)%3B%0A%09%09%09%7D)%3B%0A%09%09%09%0A%09%09%7D.bind(this)%3B%0A%09%09%0A%09%09this.log(process%2C%20%22Step%20%22%20%2B%20this.currentStepIndex%20%2B%20%22%20started%22%2C%20%22info%22%2C%20robotExecute)%3B%0A%09%7D%0A%0Aexports.execute%20%3D%20execute%3B%20',
defaultComponentJavascript: 'var%20component%20%3D%20%7B%0A%2F%2Fadd%20your%20methods%2C%20properties%20here%0A%7D%0A%0Amodule.exports.component%20%3D%20component%3B%20'
};
exports.getSetting = function(key)
{
return settings[key];
}