Skip to content

Commit

Permalink
renaming field templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ebeahan committed Jun 4, 2020
1 parent 8559898 commit 2641daf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 31 deletions.
35 changes: 4 additions & 31 deletions scripts/generators/asciidoc_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ def page_field_index(intermediate_nested, ecs_version):
return page_text


def render_field_index_row(fieldset):
return index_row().format(
fieldset_id='ecs-' + fieldset['name'],
fieldset_title=fieldset['title'],
fieldset_short=fieldset.get('short', fieldset['description'])
)


# Field Details Page

def page_field_details(intermediate_nested):
Expand Down Expand Up @@ -181,36 +173,17 @@ def render_nesting_row(nesting):


def table_footer():
template = template_env.get_template('table_footer.j2')
return template.render()

return '''
|=====
'''

# Field Index

def generate_field_index(ecs_version, fieldsets, template_name='fields.j2'):
def generate_field_index(ecs_version, fieldsets, template_name='fields_template.j2'):
template = template_env.get_template(template_name)
return template.render(ecs_version=ecs_version, fieldsets=fieldsets)


def index_header(ecs_version):
template = template_env.get_template('index_header.j2')
return template.render(ecs_version=ecs_version)




def index_row():
return '''
| <<{fieldset_id},{fieldset_title}>> | {fieldset_short}
'''


def index_footer():
template = template_env.get_template('index_footer.j2')
return template.render()



# Field Details Page

# Main Fields Table
Expand Down
File renamed without changes.

0 comments on commit 2641daf

Please sign in to comment.