mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Add copy modules in bulk function
This commit is contained in:
parent
bb686bcbd7
commit
03a2e16015
@ -88,6 +88,33 @@ def delete_modules_in_bulk(driver,agent_name_list,module_name_list,select_agent_
|
|||||||
driver.find_element_by_id("submit-go").click()
|
driver.find_element_by_id("submit-go").click()
|
||||||
|
|
||||||
|
|
||||||
|
def copy_modules_in_bulk(driver,owner_agent_name,module_name_list,destiny_agents_list):
|
||||||
|
|
||||||
|
# module_name_list is a list of modules to copy
|
||||||
|
|
||||||
|
click_menu_element(driver,"Module operations")
|
||||||
|
|
||||||
|
driver.find_element_by_id("option").click()
|
||||||
|
Select(driver.find_element_by_id("option")).select_by_visible_text("Copy modules in bulk")
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
|
driver.find_element_by_id("source_id_agent").click()
|
||||||
|
|
||||||
|
Select(driver.find_element_by_id("source_id_agent")).select_by_visible_text(owner_agent_name)
|
||||||
|
|
||||||
|
time.sleep(3)
|
||||||
|
|
||||||
|
for module_name in module_name_list:
|
||||||
|
Select(driver.find_element_by_id("target_modules")).select_by_visible_text(module_name)
|
||||||
|
|
||||||
|
for agent_name in destiny_agents_list:
|
||||||
|
Select(driver.find_element_by_id("destiny_id_agent")).select_by_visible_text(agent_name)
|
||||||
|
|
||||||
|
|
||||||
|
driver.find_element_by_id("submit-go").click()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def edit_modules_in_bulk(driver,module_name_list,agent_name_list,new_module_group=None,new_min=None,new_max=None,ff_threshold_list=None):
|
def edit_modules_in_bulk(driver,module_name_list,agent_name_list,new_module_group=None,new_min=None,new_max=None,ff_threshold_list=None):
|
||||||
|
|
||||||
#ff_threshold_list example: ff_threshold_list = [normal value,warning value,critical value] -> Mode Change each status
|
#ff_threshold_list example: ff_threshold_list = [normal value,warning value,critical value] -> Mode Change each status
|
||||||
|
Loading…
x
Reference in New Issue
Block a user