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 AutomateSimulationView(BaseLoggedInPage): @property def is_displayed(self): return ( self.logged_in_as_current_user and self.navigation.currently_selected == automate_menu_name( self.context['object'].appliance) + ['Simulation']) instance = BootstrapSelect('instance_name') message = Input(name='object_message') request = Input(name='object_request') target_type = BootstrapSelect('target_class') target_object = BootstrapSelect('target_id') execute_methods = Checkbox(name='readonly') avp = AttributeValueForm('attribute_', 'value_') submit_button = Button(title='Submit Automation Simulation with the specified options') result_tree = ManageIQTree(tree_id='ae_simulation_treebox')
class ScheduleAddEditEntities(View): """ Schedule configuration fields on the shedule configuration page """ # Basic Information name = Input(name="name") description = Input(name="description") active = Checkbox("enabled") # Action type action_type = BootstrapSelect('action_typ') items_analysis = View.nested(ItemsAnalysisEntities) database_backup = View.nested(DatabaseBackupEntities) # Timer run_type = BootstrapSelect("timer_typ") time_zone = BootstrapSelect("time_zone") start_date = Calendar("start_date") start_hour = BootstrapSelect("start_hour") start_minute = BootstrapSelect("start_min") # After selecting action_type == automation tasks request = Input(name='object_request') object_type = BootstrapSelect('target_class') object_selection = BootstrapSelect('target_id') attribute_value_pairs = AttributeValueForm("attribute_", "value_")
class advanced(PotentiallyInvisibleTab): # noqa @View.nested class enablement(View): # noqa title = Text('//*[@id="ab_form"]/div[1]/h3') define_exp = Text( locator='//*[@id="form_enablement_expression_div"]//a/button') expression = ExpressionEditor() disabled_text = Input(id="disabled_text") @View.nested class visibility(View): # noqa title = Text('//*[@id="ab_form"]/h3[2]') define_exp = Text( locator='//*[@id="form_visibility_expression_div"]//a/button') expression = ExpressionEditor() system = BootstrapSelect("instance_name") message = Input(name="object_message") request = Input(name="object_request") attributes = AttributeValueForm("attribute_", "value_") role_show = BootstrapSelect(id="visibility_typ") roles = RolesSelector( locator="//label[contains(text(),'User Roles')]/../div/table")