-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lapis2-docs): document url encoded forms
resolves #765
- Loading branch information
1 parent
f2f62b1
commit 31c19a5
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
import { getConfig } from '../config'; | ||
import { getLapisUrl } from '../lapisUrl'; | ||
const firstMetadatum = getConfig().schema.metadata[0]; | ||
const lapisUrl = getLapisUrl(); | ||
const html = String.raw`<form action="${lapisUrl}/sample/aggregated" method="POST"> | ||
<label> | ||
Field to aggregate by: | ||
<input type="text" name="fields" value="${firstMetadatum.name}" /> | ||
</label> | ||
<input type="hidden" name="downloadAsFile" value="true" /> | ||
<input type="submit" value="Submit" /> | ||
</form>`; | ||
--- | ||
|
||
<p>This is an HTML snippet that yields such a form:</p> | ||
<pre><code>{html}</code></pre> | ||
|
||
<p>This is the rendered HTML snippet. Click on submit send a request to this LAPIS instance:</p> | ||
<div class='card bg-base-100 border border-2 border-neutral'> | ||
<div class='card-body'> | ||
<div set:html={html} /> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters