class ActionFormCommon(ControlExplorerView): description = Input("description") action_type = BootstrapSelect("miq_action_type") snapshot_name = Input("snapshot_name") analysis_profile = BootstrapSelect("analysis_profile") alerts_to_evaluate = MultiBoxSelect() snapshot_age = BootstrapSelect("snapshot_age") parent_type = BootstrapSelect("parent_type") cpu_number = BootstrapSelect("cpu_value") memory_amount = Input("memory_value") email_sender = Input("from") email_recipient = Input("to") vcenter_attr_name = Input("attribute") vcenter_attr_value = Input("value") tag = VersionPicker({ Version.lowest(): ManageIQTree("action_tags_treebox"), "5.11": SectionedBootstrapSelect("tag") }) remove_tag = CheckboxSelect("action_options_div") run_ansible_playbook = View.nested(RunAnsiblePlaybookFromView) automation_message = Input("object_message") automation_request = Input("object_request") attribute_value_pair = AttributeValueForm('attribute_', 'value_') cancel_button = Button("Cancel")
class purpose(Tab): # noqa TAB_NAME = 'Purpose' apply_tags = VersionPick({ Version.lowest(): CheckboxSelect('//div[@id="all_tags_treebox"]//ul'), '5.7': BootstrapTreeview('all_tags_treebox') })
class tabs(View): # noqa # Extra Toolbar # Only on 'All' type tabs, but for access it doesn't make sense to access the tab for a # toolbar button cancel = Button(title='Cancel the selected task') # Form Buttons apply = Button('Apply') reset = Button('Reset') default = Button('Default') # Filters zone = BootstrapSelect(id='chosen_zone') period = BootstrapSelect(id='time_period') user = BootstrapSelect(id='user_choice') # This checkbox search_root captures all the filter options # It will break for status if/when there is second checkbox selection field added # It's the lowest level div with an id that captures the status checkboxes status = CheckboxSelect(search_root='tasks_options_div') state = BootstrapSelect(id='state_choice') @View.nested class mytasks(Tab): # noqa TAB_NAME = VersionPick({ Version.lowest(): 'My VM and Container Analysis Tasks', '5.9': 'My Tasks' }) table = Table(table_loc) @View.nested class myothertasks(Tab): # noqa TAB_NAME = VersionPick({ '5.9': 'My Tasks', Version.lowest(): 'My Other UI Tasks' }) table = Table(table_loc) @View.nested class alltasks(Tab): # noqa TAB_NAME = VersionPick({ '5.9': 'All Tasks', Version.lowest(): "All VM and Container Analysis Tasks" }) table = Table(table_loc) @View.nested class allothertasks(Tab): # noqa TAB_NAME = "All Other Tasks" table = Table(table_loc)
class EditPolicyEventAssignments(ControlExplorerView): title = Text("#explorer_title_text") events = CheckboxSelect("policy_info_div") cancel_button = Button("Cancel") save_button = Button("Save") @property def is_displayed(self): return (self.in_control_explorer and self.title.text == 'Editing {} {} Policy "{}" Event Assignments'.format( self.context["object"].PRETTY, self.context["object"].TYPE, self.context["object"].description))
class ActionFormCommon(ControlExplorerView): description = Input("description") action_type = BootstrapSelect("miq_action_type") snapshot_name = Input("snapshot_name") analysis_profile = BootstrapSelect("analysis_profile") alerts_to_evaluate = MultiBoxSelect() snapshot_age = BootstrapSelect("snapshot_age") parent_type = BootstrapSelect("parent_type") cpu_number = BootstrapSelect("cpu_value") memory_amount = Input("memory_value") email_sender = Input("from") email_recipient = Input("to") vcenter_attr_name = Input("attribute") vcenter_attr_value = Input("value") tag = ManageIQTree("action_tags_treebox") remove_tag = CheckboxSelect("action_options_div") run_ansible_playbook = View.nested(RunAnsiblePlaybookFromView) cancel_button = Button("Cancel")
class ActionFormCommon(ControlExplorerView): description = Input("description") action_type = BootstrapSelect("miq_action_type") snapshot_name = Input("snapshot_name") analysis_profile = BootstrapSelect("analysis_profile") alerts_to_evaluate = MultiBoxSelect( "formtest", move_into=".//a[@data-submit='choices_chosen_div']/img", move_from=".//a[@data-submit='members_chosen_div']/img") snapshot_age = BootstrapSelect("snapshot_age") parent_type = BootstrapSelect("parent_type") cpu_number = BootstrapSelect("cpu_value") memory_amount = Input("memory_value") email_sender = Input("from") email_recipient = Input("to") vcenter_attr_name = Input("attribute") vcenter_attr_value = Input("value") tag = ManageIQTree("action_tags_treebox") remove_tag = CheckboxSelect("action_options_div") cancel_button = Button('Cancel')
class tabs(View): # noqa # Extra Toolbar # Only on 'All' type tabs, but for access it doesn't make sense to access the tab for a # toolbar button cancel = Button(title='Cancel the selected task') # Form Buttons apply = Button('Apply') reset = Button('Reset') default = Button('Default') # Filters zone = BootstrapSelect(id='chosen_zone') period = BootstrapSelect(id='time_period') user = BootstrapSelect(id='user_choice') # This checkbox search_root captures all the filter options # It will break for status if/when there is second checkbox selection field added # It's the lowest level div with an id that captures the status checkboxes status = CheckboxSelect(search_root='tasks_options_div') state = BootstrapSelect(id='state_choice') @View.nested class mytasks(WaitTab): # noqa TAB_NAME = 'My Tasks' table = Table('//div[@id="gtl_div"]//table') @View.nested class myothertasks(WaitTab): # noqa TAB_NAME = 'My Tasks' table = Table('//div[@id="gtl_div"]//table') @View.nested class alltasks(WaitTab): # noqa TAB_NAME = 'All Tasks' table = Table('//div[@id="gtl_div"]//table') @View.nested class allothertasks(WaitTab): # noqa TAB_NAME = "All Other Tasks" table = Table('//div[@id="gtl_div"]//table')
class categories(WaitTab): # noqa TAB_NAME = 'Category' tab_form = CheckboxSelect(search_root='form_div')
class form(View): # noqa auto_select = CheckboxSelect('auto_select_host') block_migration = CheckboxSelect('block_migration') disk_overcommit = CheckboxSelect('disk_over_commit') submit_button = Button('Submit') cancel_button = Button('Cancel')
class form(View): # noqa auto_select = CheckboxSelect('auto_select_host') shared_storage = CheckboxSelect('on_shared_storage') submit_button = Button('Submit') cancel_button = Button('Cancel')