Ejemplo n.º 1
0
class GenericFormTemplate(GatewayForm):
    # When updating the form, remember to make the corresponding changes to the workflow pages
    workflow_name = 'delete_alias_record_example'
    workflow_permission = 'delete_alias_record_example_page'
    configuration = Configuration(workflow_name=workflow_name,
                                  permissions=workflow_permission,
                                  label='Configuration',
                                  required=True,
                                  coerce=int,
                                  validators=[],
                                  is_disabled_on_start=False,
                                  on_complete=['call_view'],
                                  enable_on_complete=['view'])

    view = View(workflow_name=workflow_name,
                permissions=workflow_permission,
                label='View',
                required=True,
                one_off=True,
                on_complete=['call_zone'],
                enable_on_complete=['zone'])

    zone = Zone(workflow_name=workflow_name,
                permissions=workflow_permission,
                label='Zone',
                required=True,
                enable_on_complete=['alias_record'])

    alias_record = AliasRecord(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label='Alias Record',
        required=True,
        on_complete=['populate_alias_record_data'],
        enable_on_complete=['name', 'linked_record', 'submit'])

    name = CustomStringField(label='Name', readonly=True)

    linked_record = CustomStringField(label='Linked Record', readonly=True)

    submit = SubmitField(label='Delete')
Ejemplo n.º 2
0
class GenericFormTemplate(GatewayForm):
    """ Form to generate HTML and Javascript for the update_alias_record_example workflow

    Note:
        When updating the form, remember to make the corresponding changes to the workflow pages
    """
    workflow_name = 'update_alias_record_example'
    workflow_permission = 'update_alias_record_example_page'
    configuration = Configuration(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label='Configuration',
        required=True,
        coerce=int,
        is_disabled_on_start=False,
        on_complete=['call_view'],
        enable_dependencies={'on_complete': ['view']},
        disable_dependencies={'on_change': ['view']},
        clear_dependencies={'on_change': ['view']})

    view = View(workflow_name=workflow_name,
                permissions=workflow_permission,
                label='View',
                required=True,
                one_off=True,
                on_complete=['call_zone', 'call_linked_record_zone'],
                enable_dependencies={'on_complete': ['zone']},
                disable_dependencies={'on_change': ['zone']},
                should_cascade_disable_on_change=True,
                clear_dependencies={'on_change': ['zone']},
                should_cascade_clear_on_change=True)

    zone = Zone(workflow_name=workflow_name,
                permissions=workflow_permission,
                label='Zone',
                required=True,
                enable_dependencies={'on_complete': ['alias_record']},
                disable_dependencies={'on_change': ['alias_record']},
                should_cascade_disable_on_change=True,
                clear_dependencies={'on_change': ['alias_record']},
                should_cascade_clear_on_change=True)

    alias_record = AliasRecord(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label='Alias Record',
        required=True,
        inputs={
            'configuration': 'configuration',
            'view': 'view',
            'zone': 'zone',
            'alias_record': 'alias_record'
        },
        server_outputs={
            'on_complete': {
                'alias_record_name': 'alias_name',
                'linked_record_zone': 'linked_record_zone',
                'linked_record_name': 'linked_record'
            }
        },
        server_side_output_method=get_alias_records_endpoint,
        enable_dependencies={
            'on_complete':
            ['alias_name', 'linked_record_zone', 'linked_record', 'submit']
        },
        disable_dependencies={
            'on_change':
            ['alias_name', 'linked_record_zone', 'linked_record', 'submit']
        },
        should_cascade_disable_on_change=True,
        clear_dependencies={
            'on_change': ['alias_name', 'linked_record_zone', 'linked_record']
        },
        should_cascade_clear_on_change=True)

    alias_name = CustomStringField(label='New Alias Name', required=True)

    linked_record_zone = Zone(workflow_name=workflow_name,
                              permissions=workflow_permission,
                              label='Linked Record Zone',
                              required=True,
                              inputs={
                                  'configuration': 'configuration',
                                  'view': 'view',
                                  'zone': 'linked_record_zone'
                              },
                              clear_below_on_change=False)

    linked_record = CustomStringField(label='Linked Record', required=True)

    submit = SubmitField(label='Update')
class GenericFormTemplate(GatewayForm):
    """ Form to generate HTML and Javascript for the delete_text_record_example workflow

    Note:
        When updating the form, remember to make the corresponding changes to the workflow pages
    """
    workflow_name = 'delete_alias_record_example'
    workflow_permission = 'delete_alias_record_example_page'
    configuration = Configuration(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label='Configuration',
        required=True,
        coerce=int,
        is_disabled_on_start=False,
        on_complete=['call_view'],
        enable_dependencies={'on_complete': ['view']},
        disable_dependencies={'on_change': ['view']},
        clear_dependencies={'on_change': ['view']})

    view = View(workflow_name=workflow_name,
                permissions=workflow_permission,
                label='View',
                required=True,
                one_off=True,
                on_complete=['call_zone'],
                enable_dependencies={'on_complete': ['zone']},
                disable_dependencies={'on_change': ['zone']},
                should_cascade_disable_on_change=True,
                clear_dependencies={'on_change': ['zone']},
                should_cascade_clear_on_change=True)

    zone = Zone(workflow_name=workflow_name,
                permissions=workflow_permission,
                label='Zone',
                required=True,
                enable_dependencies={'on_complete': ['alias_record']},
                disable_dependencies={'on_change': ['alias_record']},
                should_cascade_disable_on_change=True,
                clear_dependencies={'on_change': ['alias_record']},
                should_cascade_clear_on_change=True)

    alias_record = AliasRecord(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label='Alias Record',
        required=True,
        on_complete=['populate_alias_record_data'],
        enable_dependencies={
            'on_complete': ['name', 'linked_record', 'submit']
        },
        disable_dependencies={
            'on_change': ['name', 'linked_record', 'submit']
        },
        should_cascade_disable_on_change=True,
        clear_dependencies={'on_change': ['name', 'linked_record']},
        should_cascade_clear_on_change=True)

    name = CustomStringField(label='Name', readonly=True)

    linked_record = CustomStringField(label='Linked Record', readonly=True)

    submit = SubmitField(label='Delete')
class GenericFormTemplate(GatewayForm):
    """Form to generate HTML and Javascript for the update_alias_record workflow

    Note:
        When updating the form, remember to make the corresponding changes to the workflow pages
    """

    workflow_name = "update_alias_record"
    workflow_permission = "update_alias_record_page"
    configuration = Configuration(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label="Configuration",
        required=True,
        coerce=int,
        is_disabled_on_start=False,
        on_complete=["call_view"],
        enable_dependencies={"on_complete": ["view"]},
        disable_dependencies={"on_change": ["view"]},
        clear_dependencies={"on_change": ["view"]},
    )

    view = View(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label="View",
        required=True,
        one_off=True,
        on_complete=["call_zone", "call_linked_record_zone"],
        enable_dependencies={"on_complete": ["zone"]},
        disable_dependencies={"on_change": ["zone"]},
        should_cascade_disable_on_change=True,
        clear_dependencies={"on_change": ["zone"]},
        should_cascade_clear_on_change=True,
    )

    zone = Zone(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label="Zone",
        required=True,
        enable_dependencies={"on_complete": ["alias_record"]},
        disable_dependencies={"on_change": ["alias_record"]},
        should_cascade_disable_on_change=True,
        clear_dependencies={"on_change": ["alias_record"]},
        should_cascade_clear_on_change=True,
    )

    alias_record = AliasRecord(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label="Alias Record",
        required=True,
        inputs={
            "configuration": "configuration",
            "view": "view",
            "zone": "zone",
            "alias_record": "alias_record",
        },
        server_outputs={
            "on_complete": {
                "alias_record_name": "alias_name",
                "linked_record_zone": "linked_record_zone",
                "linked_record_name": "linked_record",
            }
        },
        server_side_output_method=get_alias_records_endpoint,
        enable_dependencies={
            "on_complete":
            ["alias_name", "linked_record_zone", "linked_record", "submit"]
        },
        disable_dependencies={
            "on_change":
            ["alias_name", "linked_record_zone", "linked_record", "submit"]
        },
        should_cascade_disable_on_change=True,
        clear_dependencies={
            "on_change": ["alias_name", "linked_record_zone", "linked_record"]
        },
        should_cascade_clear_on_change=True,
    )

    alias_name = CustomStringField(label="New Alias Name", required=True)

    linked_record_zone = Zone(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label="Linked Record Zone",
        required=True,
        inputs={
            "configuration": "configuration",
            "view": "view",
            "zone": "linked_record_zone"
        },
        clear_below_on_change=False,
    )

    linked_record = CustomStringField(label="Linked Record", required=True)

    submit = SubmitField(label="Update")
Ejemplo n.º 5
0
class GenericFormTemplate(GatewayForm):
    # When updating the form, remember to make the corresponding changes to the workflow pages
    workflow_name = 'update_alias_record_example'
    workflow_permission = 'update_alias_record_example_page'
    configuration = Configuration(workflow_name=workflow_name,
                                  permissions=workflow_permission,
                                  label='Configuration',
                                  required=True,
                                  coerce=int,
                                  validators=[],
                                  is_disabled_on_start=False,
                                  on_complete=['call_view'],
                                  enable_on_complete=['view'])

    view = View(workflow_name=workflow_name,
                permissions=workflow_permission,
                label='View',
                required=True,
                one_off=True,
                on_complete=['call_zone', 'call_linked_record_zone'],
                enable_on_complete=['zone'])

    zone = Zone(workflow_name=workflow_name,
                permissions=workflow_permission,
                label='Zone',
                required=True,
                enable_on_complete=['alias_record'])

    alias_record = AliasRecord(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label='Alias Record',
        required=True,
        inputs={
            'configuration': 'configuration',
            'view': 'view',
            'zone': 'zone',
            'alias_record': 'alias_record'
        },
        server_outputs={
            'alias_record_name': 'alias_name',
            'linked_record_zone': 'linked_record_zone',
            'linked_record_name': 'linked_record'
        },
        server_side_output_method=get_alias_records_endpoint,
        on_complete=['server_output_alias_record'],
        enable_on_complete=[
            'alias_name', 'linked_record_zone', 'linked_record', 'submit'
        ])

    alias_name = CustomStringField(label='New Alias Name', required=True)

    linked_record_zone = Zone(workflow_name=workflow_name,
                              permissions=workflow_permission,
                              label='Linked Record Zone',
                              required=True,
                              inputs={
                                  'configuration': 'configuration',
                                  'view': 'view',
                                  'zone': 'linked_record_zone'
                              },
                              clear_below_on_change=False)

    linked_record = CustomStringField(label='Linked Record', required=True)

    submit = SubmitField(label='Update')
Ejemplo n.º 6
0
class GenericFormTemplate(GatewayForm):
    """Form to generate HTML and Javascript for the delete_text_record workflow

    Note:
        When updating the form, remember to make the corresponding changes to the workflow pages
    """

    workflow_name = "delete_alias_record"
    workflow_permission = "delete_alias_record_page"
    configuration = Configuration(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label="Configuration",
        required=True,
        coerce=int,
        is_disabled_on_start=False,
        on_complete=["call_view"],
        enable_dependencies={"on_complete": ["view"]},
        disable_dependencies={"on_change": ["view"]},
        clear_dependencies={"on_change": ["view"]},
    )

    view = View(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label="View",
        required=True,
        one_off=True,
        on_complete=["call_zone"],
        enable_dependencies={"on_complete": ["zone"]},
        disable_dependencies={"on_change": ["zone"]},
        should_cascade_disable_on_change=True,
        clear_dependencies={"on_change": ["zone"]},
        should_cascade_clear_on_change=True,
    )

    zone = Zone(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label="Zone",
        required=True,
        enable_dependencies={"on_complete": ["alias_record"]},
        disable_dependencies={"on_change": ["alias_record"]},
        should_cascade_disable_on_change=True,
        clear_dependencies={"on_change": ["alias_record"]},
        should_cascade_clear_on_change=True,
    )

    alias_record = AliasRecord(
        workflow_name=workflow_name,
        permissions=workflow_permission,
        label="Alias Record",
        required=True,
        on_complete=["populate_alias_record_data"],
        enable_dependencies={
            "on_complete": ["name", "linked_record", "submit"]
        },
        disable_dependencies={
            "on_change": ["name", "linked_record", "submit"]
        },
        should_cascade_disable_on_change=True,
        clear_dependencies={"on_change": ["name", "linked_record"]},
        should_cascade_clear_on_change=True,
    )

    name = CustomStringField(label="Name", readonly=True)

    linked_record = CustomStringField(label="Linked Record", readonly=True)

    submit = SubmitField(label="Delete")