class SchedulesFormCommon(CloudIntelReportsView): # Basic Information title = Text("#explorer_title_text") name = TextInput(name="name") description = TextInput(name="description") active = Checkbox("enabled") # Report Selection filter1 = BootstrapSelect("filter_typ") filter2 = BootstrapSelect("subfilter_typ") filter3 = BootstrapSelect("repfilter_typ") # Timer run = BootstrapSelect("timer_typ") time_zone = BootstrapSelect("time_zone") starting_date = Calendar("miq_date_1") hour = BootstrapSelect("start_hour") minute = BootstrapSelect("start_min") # Email emails_send = Checkbox("send_email_cb") emails = AlertEmail() send_if_empty = Checkbox("send_if_empty") send_txt = Checkbox("send_txt") send_csv = Checkbox("send_csv") send_pdf = Checkbox("send_pdf") # Buttons cancel_button = Button("Cancel")
class AlertFormCommon(ControlExplorerView): description = Input(name="description") active = Checkbox("enabled_cb") based_on = BootstrapSelect("miq_alert_db") @View.nested class evaluate(View): # noqa type = BootstrapSelect("exp_name") # Real Time Performance Parameters performance_field = BootstrapSelect("perf_column") performance_field_operator = BootstrapSelect("select_operator") performance_field_value = Input(name="value_threshold") performance_trend = BootstrapSelect("trend_direction") performance_time_threshold = BootstrapSelect("rt_time_threshold") # Hardware Reconfigured Parameters hardware_attribute = BootstrapSelect("select_hdw_attr") operator = BootstrapSelect("select_operator") def fill(self, values): new_values = dict(type=values[0], **values[1]) return View.fill(self, new_values) driving_event = BootstrapSelect("exp_event") notification_frequency = BootstrapSelect("repeat_time") snmp_trap_send = Checkbox("send_snmp_cb") snmp_trap = SNMPForm() timeline_event = Checkbox("send_evm_event_cb") mgmt_event_send = Checkbox("send_event_cb") mgmt_event = Input("event_name") cancel_button = Button("Cancel") emails_send = Checkbox("send_email_cb") emails = AlertEmail()
class SchedulesFormCommon(CloudIntelReportsView): flash = FlashMessages('.//div[@id="flash_msg_div"]') # Basic Information title = Text("#explorer_title_text") name = TextInput(name="name") description = TextInput(name="description") active = Checkbox("enabled") # Report Selection filter1 = BootstrapSelectRetry("filter_typ") filter2 = BootstrapSelectRetry("subfilter_typ") filter3 = BootstrapSelectRetry("repfilter_typ") # Timer run = BootstrapSelect("timer_typ") # Adding timer for hour, day, week, and zone because there is no single element # for the timer_interval. timer_hour = BootstrapSelect("timer_hours") timer_day = BootstrapSelect("timer_days") timer_month = BootstrapSelect("timer_months") timer_week = BootstrapSelect("timer_weeks") time_zone = BootstrapSelect("time_zone") starting_date = Calendar("miq_date_1") hour = BootstrapSelect("start_hour") minute = BootstrapSelect("start_min") # Email emails_send = Checkbox("send_email_cb") from_email = TextInput(name="from") emails = AlertEmail() send_if_empty = Checkbox("send_if_empty") send_txt = Checkbox("send_txt") send_csv = Checkbox("send_csv") send_pdf = Checkbox("send_pdf") # Buttons cancel_button = Button("Cancel")
class SchedulesFormCommon(CloudIntelReportsView): flash = FlashMessages( './/div[@id="flash_msg_div"]/div[@id="flash_text_div" or ' 'contains(@class, "flash_text_div")] | ' './/div[starts-with(@class, "flash_text_div") or @id="flash_text_div"]' ) # Basic Information title = Text("#explorer_title_text") name = TextInput(name="name") description = TextInput(name="description") active = Checkbox("enabled") # Report Selection filter1 = BootstrapSelectRetry("filter_typ") filter2 = BootstrapSelectRetry("subfilter_typ") filter3 = BootstrapSelectRetry("repfilter_typ") # Timer run = BootstrapSelect("timer_typ") time_zone = BootstrapSelect("time_zone") starting_date = Calendar("miq_date_1") hour = BootstrapSelect("start_hour") minute = BootstrapSelect("start_min") # Email emails_send = Checkbox("send_email_cb") emails = AlertEmail() send_if_empty = Checkbox("send_if_empty") send_txt = Checkbox("send_txt") send_csv = Checkbox("send_csv") send_pdf = Checkbox("send_pdf") # Buttons cancel_button = Button("Cancel")
class AlertFormCommon(ControlExplorerView): description = Input(name="description") active = Checkbox("enabled_cb") severity = BootstrapSelect("miq_alert_severity") based_on = BootstrapSelect("miq_alert_db") @View.nested class evaluate(View): # noqa type = BootstrapSelect("exp_name") # Real Time Performance Parameters performance_field = BootstrapSelect("perf_column") performance_field_operator = BootstrapSelect("select_operator") performance_field_value = Input(name="value_threshold") performance_trend = BootstrapSelect("trend_direction") performance_time_threshold = BootstrapSelect("rt_time_threshold") # Hardware Reconfigured Parameters hardware_attribute = BootstrapSelect("select_hdw_attr") operator = BootstrapSelect("select_operator") # Expression Parameters expression = ExpressionEditor( "//button[normalize-space(.)='Define Expression']") def fill(self, values): if isinstance(values, str): new_values = dict(type=values) elif isinstance(values, (list, tuple)): new_values = dict(type=values[0], **values[1]) else: raise TypeError("Evaluate part should be a string or tuple.") return View.fill(self, new_values) driving_event = BootstrapSelect("exp_event") notification_frequency = BootstrapSelect("repeat_time") snmp_trap_send = Checkbox("send_snmp_cb") snmp_trap = SNMPForm() timeline_event = Checkbox("send_evm_event_cb") mgmt_event_send = Checkbox("send_event_cb") mgmt_event = Input("event_name") cancel_button = Button("Cancel") emails_send = Checkbox("send_email_cb") emails = AlertEmail()
class email(View): # noqa # Email emails_send = Checkbox("send_email_cb") from_email = TextInput(name="from") to_emails = AlertEmail()
class email(View): # noqa # Email emails_send = Checkbox("send_email_cb") from_email = TextInput(name="from") to_emails = AlertEmail() user_email = VolatileBootstrapSelect("user_email")