Skip to content

Commit

Permalink
fixed api version to 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardKoschicek committed Nov 29, 2023
1 parent 93242de commit 18a60fd
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 116 deletions.
2 changes: 1 addition & 1 deletion openatlas/api/endpoints/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def walk_type_tree(types: list[int]) -> list[dict[str, Any]]:
item = g.types[id_]
items.append({
'id': item.id,
'url': url_for('api_03.entity', id_=item.id, _external=True),
'url': url_for('api.entity', id_=item.id, _external=True),
'label': item.name.replace("'", "'"),
'children': walk_type_tree(item.subs)})
return items
Expand Down
6 changes: 3 additions & 3 deletions openatlas/api/formats/linked_places.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def link_dict(link_: Link, inverse: bool = False) -> dict[str, Any]:
'label': link_.domain.name if inverse else link_.range.name,
'relationTo':
url_for(
'api_03.entity',
'api.entity',
id_=link_.domain.id if inverse else link_.range.id,
_external=True),
'relationType': get_crm_relation(link_, inverse),
Expand Down Expand Up @@ -88,7 +88,7 @@ def get_lp_file(links_inverse: list[Link]) -> list[dict[str, str]]:
path = get_file_path(link.domain.id)
files.append({
'@id': url_for(
'api_03.entity',
'api.entity',
id_=link.domain.id,
_external=True),
'title': link.domain.name,
Expand All @@ -108,7 +108,7 @@ def get_lp_types(entity: Entity, links: list[Link]) -> list[dict[str, Any]]:
for type_ in entity.types:
type_dict = {
'identifier': url_for(
'api_03.entity', id_=type_.id, _external=True),
'api.entity', id_=type_.id, _external=True),
'descriptions': type_.description,
'label': type_.name,
'hierarchy': ' > '.join(map(
Expand Down
6 changes: 3 additions & 3 deletions openatlas/templates/admin/data.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ <h1 class="mb-1">{{ _('data integrity checks')|uc_first }}</h1>
<h1 class="mb-1">{{ _('data transfer')|uc_first }}</h1>
<div class="row g-1 d-flex align-items-center">
<div class="col-auto">{{ _('import')|button(url_for('import_index'))|safe }}</div>
<div class="col-auto">{{ ('CSV ' + _('export'))|button(url_for('api_03.export_database', format_='csv'))|safe }}</div>
<div class="col-auto">{{ ('JSON ' + _('export'))|button(url_for('api_03.export_database', format_='json'))|safe }}</div>
<div class="col-auto">{{ ('XML ' + _('export'))|button(url_for('api_03.export_database', format_='xml'))|safe }}</div>
<div class="col-auto">{{ ('CSV ' + _('export'))|button(url_for('api.export_database', format_='csv'))|safe }}</div>
<div class="col-auto">{{ ('JSON ' + _('export'))|button(url_for('api.export_database', format_='json'))|safe }}</div>
<div class="col-auto">{{ ('XML ' + _('export'))|button(url_for('api.export_database', format_='xml'))|safe }}</div>
{% if 'manager'|is_authorized %}
<div class="col-auto">{{ ('SQL ' + _('export'))|button(url_for('export_sql'))|safe }}</div>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion openatlas/templates/util/api_links.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
</button>
<ul class="dropdown-menu p-2">
<li>{{ "CSV"|link(url_for('api.entity', id_=entity.id, export='csv'))|safe }}</li>
<li> {{ "CSV Network Analysis"|link(url_for('api_03.entity', id_=entity.id, export='csvNetwork'))|safe }}</li>
<li> {{ "CSV Network Analysis"|link(url_for('api.entity', id_=entity.id, export='csvNetwork'))|safe }}</li>
</ul>
</div>
Loading

0 comments on commit 18a60fd

Please sign in to comment.