Merge pull request #843 from getredash/design/download_links

Fix: dashboard query results links broken
This commit is contained in:
Arik Fraimovich 2016-02-23 11:35:06 +02:00
commit f1e90fde31
2 changed files with 5 additions and 4 deletions

View File

@ -48,12 +48,12 @@
<span class="pull-right">
<div class="btn-group">
<button class="btn btn-default btn-xs" ng-disabled="!queryResult.getData()" query-result-link target="_self" title="Download as CSV File">
<a class="btn btn-default btn-xs" ng-disabled="!queryResult.getData()" query-result-link target="_self" title="Download as CSV File">
<span class="fa fa-file-o"></span>
</button>
<button class="btn btn-default btn-xs" ng-disabled="!queryResult.getData()" file-type="xlsx" query-result-link target="_self" title="Download as Excel File">
</a>
<a class="btn btn-default btn-xs" ng-disabled="!queryResult.getData()" file-type="xlsx" query-result-link target="_self" title="Download as Excel File">
<i class="fa fa-file-excel-o"></i>
</button>
</a>
</div>
<a class="btn btn-default btn-xs" ng-href="queries/{{query.id}}#{{widget.visualization.id}}" ng-show="currentUser.hasPermission('view_query')"><span class="glyphicon glyphicon-link"></span></a>
<button type="button" class="btn btn-default btn-xs" ng-show="dashboard.canEdit()" ng-click="deleteWidget()" title="Remove Widget"><span class="glyphicon glyphicon-trash"></span></button>

View File

@ -19,6 +19,7 @@ from redash.query_runner import get_query_runner
from redash.metrics.database import MeteredPostgresqlExtDatabase, MeteredModel
from utils import generate_token
class Database(object):
def __init__(self):
self.database_config = dict(settings.DATABASE_CONFIG)