Esempio n. 1
0
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")
Esempio n. 2
0
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")
Esempio n. 3
0
 class form(View):  # noqa
     retirement_date = Calendar(name='retirementDate')
     remove_date = Image(locator='.//div[@id="retirement_date_div"]//a/img[@alt="Set to blank"]')
     retirement_warning = BootstrapSelect(id='retirementWarning')
     entities = View.nested(BaseNonInteractiveEntitiesView)
     save = Button('Save')
     cancel = Button('Cancel')
Esempio n. 4
0
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")
Esempio n. 5
0
 class form(View):  # noqa
     """The form portion of the view"""
     retirement_date = Calendar(name='retirementDate')
     # TODO This is just an anchor with an image, weaksauce
     # remove_date = Button()
     retirement_warning = BootstrapSelect(id='retirementWarning')
     save_button = Button('Save')
     cancel_button = Button('Cancel')
Esempio n. 6
0
class ServiceRetirementForm(MyServicesView):
    title = Text('#explorer_title_text')

    retirement_date = Calendar(
        VersionPick({
            Version.lowest(): 'retirementDate',
            '5.9': 'retirement_date_datepicker'
        }))
    retirement_warning = BootstrapSelect('retirement_warn')
Esempio n. 7
0
class ChartWidgetFormCommon(BaseDashboardWidgetFormCommon):
    # Chart Report
    filter = BootstrapSelect("repfilter_typ")
    # Timer
    run = BootstrapSelect("timer_typ")
    every = BootstrapSelect("timer_hours")
    time_zone = BootstrapSelect("time_zone")
    starting_date = Calendar("miq_date_1")
    starting_hour = BootstrapSelect("start_hour")
    starting_minute = BootstrapSelect("start_min")
Esempio n. 8
0
 class schedule(Tab):  # noqa
     TAB_NAME = 'Schedule'
     # Common
     # TODO radio widget # schedule_type = Radio('schedule__schedule_type')
     provision_date = Calendar('miq_date_1')
     provision_start_hour = BootstrapSelect('start_hour')
     provision_start_min = BootstrapSelect('start_min')
     power_on = Input(name='schedule__vm_auto_start')
     retirement = BootstrapSelect('schedule__retirement')
     retirement_warning = BootstrapSelect('schedule__retirement_warn')
     # Infra
     stateless = Input(name='schedule__stateless')
Esempio n. 9
0
class RSSWidgetFormCommon(BaseDashboardWidgetFormCommon):
    # RSS Feed Options
    type = BootstrapSelect("feed_type")
    url = BootstrapSelect("rss_feed")
    external = TextInput("txt_url")
    rows = BootstrapSelect("row_count")
    # Timer
    run = BootstrapSelect("timer_typ")
    every = BootstrapSelect("timer_hours")
    time_zone = BootstrapSelect("time_zone")
    starting_date = Calendar("miq_date_1")
    starting_hour = BootstrapSelect("start_hour")
    starting_minute = BootstrapSelect("start_min")
Esempio n. 10
0
 class schedule(Tab):  # noqa
     TAB_NAME = 'Schedule'
     # Common
     schedule_type = RadioGroup(locator=('//div[@id="schedule"]'
                                         '//div[./div[contains(@class, "radio")]]'))
     provision_date = Calendar('miq_date_1')
     provision_start_hour = BootstrapSelect('start_hour')
     provision_start_min = BootstrapSelect('start_min')
     power_on = Checkbox(name='schedule__vm_auto_start')
     retirement = BootstrapSelect('schedule__retirement')
     retirement_warning = BootstrapSelect('schedule__retirement_warn')
     # Infra
     stateless = Input(name='schedule__stateless')
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")
Esempio n. 12
0
class ReportWidgetFormCommon(BaseDashboardWidgetFormCommon):

    # Report Options
    filter = BootstrapSelect("filter_typ")
    subfilter = BootstrapSelect("subfilter_typ")
    repfilter = BootstrapSelect("repfilter_typ")
    column1 = BootstrapSelect("chosen_pivot1")
    column2 = BootstrapSelect("chosen_pivot2")
    column3 = BootstrapSelect("chosen_pivot3")
    column4 = BootstrapSelect("chosen_pivot4")
    row_count = BootstrapSelect("row_count")
    # Timer
    run = BootstrapSelect("timer_typ")
    every = BootstrapSelect("timer_hours")
    time_zone = BootstrapSelect("time_zone")
    starting_date = Calendar("miq_date_1")
    starting_hour = BootstrapSelect("start_hour")
    starting_minute = BootstrapSelect("start_min")
Esempio n. 13
0
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 field_date_form(View):  # noqa
     dropdown_select = BootstrapSelect("chosen_from_1")
     input_select_date = Calendar(name="miq_date_1_0")
     input_select_time = BootstrapSelect("miq_time_1_0")
 class date_specific_form_view(View):  # noqa
     date = Calendar(name="miq_date_1_0")
     time = BootstrapSelect("miq_time_1_0")
Esempio n. 16
0
class ServiceRetirementForm(MyServicesView):
    title = Text('#explorer_title_text')

    retirement_date = Calendar('retirementDate')
    retirement_warning = BootstrapSelect('retirement_warn')
Esempio n. 17
0
 class RetirementDateSelectionView(View):
     datetime_select = Calendar('retirement_date_datepicker')