-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added dashboard standalone page #1429
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
6b45e85
Added dashboard standalone page
vera-liu bbb0e3e
Deleted additional template, parameterized dashboard.html for standalone
vera-liu 7debabc
Only wrap add-slice-container for standalone instead of including who…
vera-liu 3962230
Use standalone_mode argument passed from both explore view and dashbo…
vera-liu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,43 @@ | ||
<html> | ||
<body> | ||
<div | ||
class="dashboard container-fluid" | ||
data-dashboard="{{ dashboard.json_data }}" | ||
data-css="{{ dashboard.css }}" | ||
data-user="{{ user_id }}" | ||
> | ||
{% include 'caravel/flash_wrapper.html' %} | ||
|
||
<!-- Modal --> | ||
<div class="modal fade" id="css_modal" tabindex="-1" role="dialog"> | ||
<div class="modal-dialog" role="document"> | ||
<div class="modal-content css"> | ||
<div class="modal-body"> | ||
<textarea id="dash_css" rows="30" cols="60">{{ dashboard.css }}</textarea> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="title"> | ||
<div class="row"> | ||
<h1> | ||
<strong> | ||
{{ dashboard.dashboard_title }} | ||
</strong> | ||
</h1> | ||
</div> | ||
</div> | ||
|
||
<!-- gridster class used for backwards compatibility --> | ||
<div id="grid-container" class="slice-grid gridster"></div> | ||
|
||
</div> | ||
</body> | ||
{% with filename="css-theme" %} | ||
{% include "caravel/partials/_script_tag.html" %} | ||
{% endwith %} | ||
{% with filename="dashboard" %} | ||
{% include "caravel/partials/_script_tag.html" %} | ||
{% endwith %} | ||
</html> |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to render a new template for the standalone view? or could we add some logic to
basic.html
where if we are on the dashboard page and the standalone arg is true, don't show the header. we are doing something similar for the standalone viz's afaik.https://github.com/ascott/caravel/blob/master/caravel/templates/caravel/basic.html#L24-L25
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that we have a separate standalone template for explore view: https://github.com/ascott/caravel/blob/f837733d858643152304469c899c096e31d2bf24/caravel/views.py#L1194
Apart from the header, I also took out the button groups, fav star to limit interactions on dashboard standalone page. We could have if statements in both basic.html and dashboard.html for rendering specific parts based on standalone argument, but I was thinking that having a separate template would be cleaner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think keeping one template for the dashboard and adding the conditions where needed will be more clear in the long run since we won't have to maintain 2 templates. the conditional for show/hiding the header should work the same way in
basic.html
for both the slice and dashboard view, so we will probably only need the conditionals in the dashboard template.