Cosmetical changes

This commit is contained in:
emanuele-f 2020-01-17 12:21:01 +01:00
parent f150b6c6f1
commit 324d43c149

View file

@ -1,3 +1,5 @@
// 2020 - ntop.org
/**
* This function return true if the status code is different from 200
*/
@ -15,6 +17,8 @@
return is_different;
}
/* ******************************************************* */
/**
* This function select the correct tab for script filtering
*/
@ -41,6 +45,8 @@ const select_script_filter = (enabled_count) => {
}
}
/* ******************************************************* */
// Templates and template builder
const generate_checkbox_enabled = (id, enabled, callback) => {
@ -59,6 +65,8 @@ const generate_checkbox_enabled = (id, enabled, callback) => {
return $checkbox_enabled;
}
/* ******************************************************* */
const generate_input_box = (input_settings, has_container, change_callback) => {
const $input_box = $(`
@ -80,6 +88,8 @@ const generate_input_box = (input_settings, has_container, change_callback) => {
return $input_box;
}
/* ******************************************************* */
const generate_radio_buttons = (name, enabled, settings, has_container, change_callback) => {
const $radio_buttons = $(`
@ -103,9 +113,10 @@ const generate_radio_buttons = (name, enabled, settings, has_container, change_c
}
return $radio_buttons;
}
/* ******************************************************* */
const apply_edits_script = (template_data, script_subdir, script_key) => {
const $apply_btn = $('#btn-apply');
@ -177,6 +188,8 @@ const reset_script_defaults = (script_key, script_subdir, callback_reset) => {
})
}
/* ******************************************************* */
const ThresholdCross = (gui, hooks, script_subdir, script_key) => {
const $table_editor = $("#script-config-editor");
@ -379,6 +392,8 @@ const ThresholdCross = (gui, hooks, script_subdir, script_key) => {
}
}
/* ******************************************************* */
const ItemsList = (gui, hooks, script_subdir, script_key) => {
const $table_editor = $("#script-config-editor");
@ -489,6 +504,8 @@ const ItemsList = (gui, hooks, script_subdir, script_key) => {
}
}
/* ******************************************************* */
const LongLived = (gui, hooks, script_subdir, script_key) => {
const $table_editor = $("#script-config-editor");
@ -617,6 +634,8 @@ const LongLived = (gui, hooks, script_subdir, script_key) => {
}
}
/* ******************************************************* */
const ElephantFlows = (gui, hooks, script_subdir, script_key) => {
const $table_editor = $("#script-config-editor");
@ -748,6 +767,8 @@ const ElephantFlows = (gui, hooks, script_subdir, script_key) => {
}
}
/* ******************************************************* */
const EmptyTemplate = (gui = null, hooks = null, script_subdir = null, script_key = null) => {
return {
apply_click_event: function() {},
@ -756,6 +777,8 @@ const EmptyTemplate = (gui = null, hooks = null, script_subdir = null, script_ke
}
}
/* ******************************************************* */
const TemplateBuilder = ({gui, hooks}, script_subdir, script_key) => {
// get template name
@ -778,6 +801,8 @@ const TemplateBuilder = ({gui, hooks}, script_subdir, script_key) => {
return template_chosen;
}
/* ******************************************************* */
// End templates and template builder
$(document).ready(function() {