-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
webui: Allow embedding visualisations on external sites
Add a new read-only way of rendering visualisations without any of the editor and page layout around it, allowing for embedding the visualisation on external pages using an iframe. Also add a new button in the visualisation editor which produces the HTML code the user needs to embed the chart.
- Loading branch information
1 parent
c67a81c
commit 67ddc83
Showing
5 changed files
with
261 additions
and
3 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
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,33 @@ | ||
[[ define "visembedPage" ]] | ||
<!doctype html> | ||
<html> | ||
[[ template "head" . ]] | ||
<body> | ||
<div> | ||
<div id="visualisation" data-name="[[ .VisName ]]" data-plot-config="visualisationData" data-branch="[[ .DB.Info.Branch ]]"></div> | ||
<div> | ||
<div class="col-md-1"></div> | ||
<div class="col-md-5"> | ||
<span class="pull-left"> | ||
View full dataset at <a href="/[[ .DB.Info.Owner ]]/[[ .DB.Info.Database ]]">[[ .DB.Info.Owner ]] / [[ .DB.Info.Database ]]</a> | ||
</span> | ||
</div> | ||
<div class="col-md-5"> | ||
<div class="pull-right"> | ||
Powered by <a href="/"><img src="/images/sqlitebrowser.svg" height="15"/> | ||
<span style="vertical-align: bottom; color: black; padding-top: 3px;">DBHub.io</span> | ||
</a> | ||
</div> | ||
</div> | ||
<div class="col-md-1"></div> | ||
</div> | ||
</div> | ||
[[ template "script_db_header" . ]] | ||
<script> | ||
var visualisationData = [[ .Visualisation ]]; | ||
var branchData = [[ .Branches ]]; | ||
</script> | ||
<script src="/js/dbhub.js"></script> | ||
</body> | ||
</html> | ||
[[ end ]] |
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