예제 #1
0
class EditEventView(ControlExplorerView):
    title = Text("#explorer_title_text")

    true_actions = MultiBoxSelect(
        "formtest",
        number=1,
        move_into=".//a[@data-submit='choices_chosen_true_div']/img",
        move_from=".//a[@data-submit='members_chosen_true_div']/img",
        available_items="choices_chosen_true",
        chosen_items="members_chosen_true")

    false_actions = MultiBoxSelect(
        "formtest",
        number=2,
        move_into=".//a[@data-submit='choices_chosen_false_div']/img",
        move_from=".//a[@data-submit='members_chosen_false_div']/img",
        available_items="choices_chosen_false",
        chosen_items="members_chosen_false")

    save_button = Button("Save")
    reset_button = Button("Reset")
    cancel_button = Button("Cancel")

    @property
    def is_displayed(self):
        return (self.in_control_explorer
                and self.title.text == 'Editing Event "{}"'.format(
                    self.context["object"].testing_event))
예제 #2
0
class PolicyProfileFormCommon(ControlExplorerView):
    title = Text("#explorer_title_text")

    description = Input(name="description")
    notes = TextInput(name="notes")
    policies = MultiBoxSelect()
    cancel_button = Button("Cancel")
예제 #3
0
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 PolicyProfileFormCommon(ControlExplorerView):
    title = Text("#explorer_title_text")

    description = Input(name="description")
    notes = TextInput(name="notes")
    policies = MultiBoxSelect(
        "formtest",
        move_into=".//a[@data-submit='choices_chosen_div']/img",
        move_from=".//a[@data-submit='members_chosen_div']/img")

    cancel_button = Button("Cancel")
예제 #5
0
 class form(View):  # noqa
     """The form portion of the view"""
     custom_identifier = TextInput(id='custom_1')
     description = TextInput(id='description')
     parent_vm = BootstrapSelect(id='chosen_parent')
     # MultiBoxSelect element only has table ID in CFME 5.8+
     # https://bugzilla.redhat.com/show_bug.cgi?id=1463265
     child_vms = MultiBoxSelect(id='child-vm-select')
     save_button = Button('Save')
     reset_button = Button('Reset')
     cancel_button = Button('Cancel')
예제 #6
0
class EditPolicyConditionAssignments(ControlExplorerView):
    title = Text("#explorer_title_text")
    conditions = MultiBoxSelect()
    cancel_button = Button("Cancel")
    save_button = Button("Save")

    @property
    def is_displayed(self):
        return (self.in_control_explorer and self.title.text
                == 'Editing {} {} Policy "{}" Condition Assignments'.format(
                    self.context["object"].PRETTY, self.context["object"].TYPE,
                    self.context["object"].description))
예제 #7
0
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")
예제 #8
0
class EditPolicyConditionAssignments(ControlExplorerView):
    title = Text("#explorer_title_text")
    conditions = MultiBoxSelect()
    cancel_button = Button("Cancel")
    save_button = Button("Save")

    @property
    def supposed_title(self):
        if BZ(1531468, forced_streams=["5.9"]).blocks:
            return 'Editing {} {} "{}" Condition Assignments'
        else:
            return 'Editing {} {} Policy "{}" Condition Assignments'

    @property
    def is_displayed(self):
        return (self.in_control_explorer
                and self.title.text == self.supposed_title.format(
                    self.context["object"].PRETTY, self.context["object"].TYPE,
                    self.context["object"].description))
예제 #9
0
class EditPolicyConditionAssignments(ControlExplorerView):
    title = Text("#explorer_title_text")

    move_into_button = Button(
        title="Move selected Conditions into this Policy")
    move_from_button = Button(
        title="Remove selected Conditions from this Policy")

    conditions = MultiBoxSelect("formtest",
                                move_into=move_into_button,
                                move_from=move_from_button)

    cancel_button = Button("Cancel")
    save_button = Button("Save")

    @property
    def is_displayed(self):
        return (self.in_control_explorer and self.title.text
                == 'Editing {} {} Policy "{}" Condition Assignments'.format(
                    self.context["object"].PRETTY, self.context["object"].TYPE,
                    self.context["object"].description))
예제 #10
0
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')