Skip to content

Add an export button to the ontology sidebar for the existing Turtle endpoint - #1230

Open
Schro-code wants to merge 1 commit into
deeplethe:devfrom
Schro-code:feat/ontology-export-button
Open

Schro-code wants to merge 1 commit into
deeplethe:devfrom
Schro-code:feat/ontology-export-button

Conversation

@Schro-code

@Schro-code Schro-code commented Oct 14, 2026 •

Copy link
Copy Markdown

Why

The server already exposes GET /api/v1/kbs/{id}/export?format=turtle but there is no UI to reach it — users must resort to curl or the browser address bar.

What changes

  • web/src/pages/Ontology.tsx — adds a Download RailItem next to the existing Import button in the ontology sidebar, wired to window.open(/api/v1/kbs/{id}/export?format=turtle)
  • web/src/i18n/en.ts — adds exportShort: "Export"
  • web/src/i18n/zh.ts — adds exportShort: "导出"

How it was checked

  • pnpm build and pnpm test pass locally
  • Button appears in the ontology sidebar, clicking it opens the Turtle export in a new tab

Before review

  • Every commit is signed off (git commit -s)
  • For changes under web/: pnpm build and pnpm test pass
  • UI strings are in both web/src/i18n/en.ts and zh.ts

…endpoint

Signed-off-by: Zhoulu <ldazzh@lineadirecta.es>

@WaylandYang WaylandYang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this.

One change: GET /kbs/{id}/export exports the whole knowledge base (every fact with its provenance), not the ontology, so an "Export" next to the ontology's Import promises the wrong thing. Could the button say "Export knowledge base (RDF)" / "导出整个知识库(RDF)" and move to the base's settings (KbSettings)?

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants