-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make "Map view" URL configurable in backend settings (#106)
When a query results contains WKT literals in its last column, a "Map view" button appears. A click on that button leads to an instance of https://github.com/ad-freiburg/qlever-petrimaps, which visualizes the result. So far, this only worked for selected backends, and it was hard-coded in `backend/static/js/qleverUI.js` which ones. Now this can be configured invididually for each backend, via a field `Map view base URL`. The URL should be the base URL of the `qlever-petrimaps` instance. When the field is empty (which is the default), no "Map View" button is shown for that backend. Fixes #102 . Since a new field was added to the backend configuration, this requires a migration.
- Loading branch information
Showing
8 changed files
with
50 additions
and
6 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
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,24 @@ | ||
# Generated by Django 5.0.3 on 2024-09-22 19:29 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("backend", "0072_backend_isnoslugmode"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="backend", | ||
name="mapViewBaseURL", | ||
field=models.CharField( | ||
blank=True, | ||
default="", | ||
help_text="The base URL of the https://github.com/ad-freiburg/qlever-petrimaps instance; if empty, no Map View button will appear", | ||
max_length=2048, | ||
verbose_name="Map view base URL", | ||
), | ||
), | ||
] |
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
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
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
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
Binary file not shown.
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