diff --git a/website/app/templates/home.html b/website/app/templates/home.html index c1d9514e..43ca69b6 100644 --- a/website/app/templates/home.html +++ b/website/app/templates/home.html @@ -58,9 +58,14 @@ + +
+ + +
- -
+ +

Config

[[module.name]]

@@ -99,6 +104,8 @@ const cp_entries = ref(1) const queries = ref() + let own_config_bool = false + async function fetchQuery(){ const res = await fetch('/get_query') @@ -224,7 +231,10 @@ for(let el in loc_list){ for(let index in modules_list.value){ if(modules_list.value[index].name == loc_list[el]){ - if(modules_list.value[index].request_on_query){ + if (own_config_bool){ + config_query.value.push(modules_list.value[index]) + } + else if(modules_list.value[index].request_on_query){ config_query.value.push(modules_list.value[index]) } break @@ -232,7 +242,7 @@ } } }) - } + } }) $('#input_select').on('select2:open', function (e) { @@ -266,6 +276,36 @@ cp_entries.value -= 1 } + + function own_config(){ + own_config_bool = !own_config_bool + if(own_config_bool){ + let loc_list = $('#modules_select').val() + config_query.value = [] + for(let el in loc_list){ + for(let index in modules_list.value){ + if(modules_list.value[index].name == loc_list[el]){ + config_query.value.push(modules_list.value[index]) + break + } + } + } + }else{ + let loc_list = $('#modules_select').val() + config_query.value = [] + for(let el in loc_list){ + for(let index in modules_list.value){ + if(modules_list.value[index].name == loc_list[el]){ + if(modules_list.value[index].request_on_query){ + config_query.value.push(modules_list.value[index]) + } + break + } + } + } + } + } + return { message_list, @@ -282,7 +322,8 @@ checked_attr, add_entry, delete_entry, - generateCoreFormatUI + generateCoreFormatUI, + own_config } } }).mount('.container-fluid')