Removed debug console logs.
This commit is contained in:
@@ -52,7 +52,6 @@ AutoRunRuleForm = function(rule, modules, deleteFn, updateFn) {
|
||||
}
|
||||
|
||||
function removeModule(index) {
|
||||
console.log("Removing module.");
|
||||
// Remove element from execution_order and execution_delay arrays.
|
||||
newRule.modules.splice(index, 1);
|
||||
newRule.execution_delay.splice(index, 1);
|
||||
@@ -103,8 +102,6 @@ AutoRunRuleForm = function(rule, modules, deleteFn, updateFn) {
|
||||
chain_mode: formValues[chainModeComboId],
|
||||
execution_order: [...Array(newRule.modules.length).keys()],
|
||||
};
|
||||
console.log("UPDATED RULE.");
|
||||
console.log(JSON.stringify(updatedRule, null, 2));
|
||||
updateFn(updatedRule);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const areNotification = {
|
||||
const defaultRule = {
|
||||
"name": "Display an alert",
|
||||
"author": "mgeeky",
|
||||
"modules": [
|
||||
@@ -33,7 +33,6 @@ getCurrentRules = async function(token) {
|
||||
const rules = JSON.parse(data.rules);
|
||||
|
||||
if (data.success === true && Array.isArray(rules)) {
|
||||
console.log(rules);
|
||||
return rules;
|
||||
}
|
||||
|
||||
@@ -55,10 +54,6 @@ getModules = async function(token) {
|
||||
}
|
||||
const modules = await res.json();
|
||||
|
||||
// DEBUG log
|
||||
console.log("Successfully retrieved active modules:");
|
||||
console.log(modules);
|
||||
|
||||
return modules;
|
||||
|
||||
} catch(error) {
|
||||
@@ -122,7 +117,7 @@ AutoRunTab = function() {
|
||||
const res = await fetch(`/api/autorun/rule/add?token=${token}`, {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify(areNotification)
|
||||
body: JSON.stringify(defaultRule)
|
||||
});
|
||||
if (!res.ok) {
|
||||
console.error(`Failed when adding a new rule with status ${res.status}.`);
|
||||
|
||||
@@ -20,8 +20,6 @@ var re_execute_command_title = 'Re-execute command'
|
||||
function generate_form_input_field(form, input, value, disabled, zombie) {
|
||||
var input_field = null;
|
||||
var input_def = null;
|
||||
console.log("Input type: ");
|
||||
console.log(JSON.stringify(input, null, 2));
|
||||
|
||||
if (!input['ui_label']) input['ui_label'] = input['name'];
|
||||
if (!input['type']) input['type'] = 'textfield';
|
||||
@@ -35,8 +33,6 @@ function generate_form_input_field(form, input, value, disabled, zombie) {
|
||||
allowBlank: false,
|
||||
value: input['value']
|
||||
};
|
||||
console.log("Input Def:");
|
||||
console.log(JSON.stringify(input_def, null, 2));
|
||||
|
||||
// create the input field object based upon the type supplied
|
||||
switch(input['type'].toLowerCase()) {
|
||||
@@ -104,11 +100,9 @@ function generate_form_input_field(form, input, value, disabled, zombie) {
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Before setting values input field.");
|
||||
if(value) input_field.setValue(value);
|
||||
if(disabled) input_field.setDisabled(true);
|
||||
|
||||
console.log("Before adding input field to form values input field.");
|
||||
form.add(input_field);
|
||||
return input_field;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user