Skip to content

Commit

Permalink
Merge pull request #141 from alison985/m6_replay_non_athena
Browse files Browse the repository at this point in the history
bug fix and data_scanned for 3 more query_runners
  • Loading branch information
alison985 authored Jul 20, 2017
2 parents fdd83bb + 90c3b9f commit 58b40a9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/app/pages/alerts-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class AlertsListCtrl {
this.alerts = new Paginator([], { itemsPerPage: 20 });
Alert.query((alerts) => {
this.alerts.updateRows(alerts.map(alert => ({
id: alert.id,
name: alert.name,
state: alert.state,
class: stateClass[alert.state],
Expand Down
2 changes: 1 addition & 1 deletion client/app/pages/queries/query.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ <h3>
<span class="zmdi zmdi-time"></span>
<span class="text-muted">Data Scanned </span>
<strong>
<span ng-if="queryResult.query_result.data_scanned != ''"> {{ queryResult.query_result.data_scanned }}</span>
<span ng-if="queryResult.query_result.data_scanned != '' || queryResult.query_result.data_scanned == 'N/A'"> {{ queryResult.query_result.data_scanned }}</span>
</strong>
</li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions redash/query_runner/big_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def run_query(self, query, user):
return None, "Larger than %d MBytes will be processed (%f MBytes)" % (limitMB, processedMB)

data = self._get_query_result(jobs, query)
data.update({'data_scanned':'N/A'})
error = None

json_data = json.dumps(data, cls=JSONEncoder)
Expand Down
1 change: 1 addition & 0 deletions redash/query_runner/google_spreadsheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def run_query(self, query, user):
spreadsheet = spreadsheet_service.open_by_key(key)

data = parse_spreadsheet(spreadsheet, worksheet_num)
data.update({'data_scanned': 'N/A'})

json_data = json.dumps(data, cls=JSONEncoder)
error = None
Expand Down
1 change: 1 addition & 0 deletions redash/query_runner/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def run_query(self, query, user):

response = requests.get(url)
response.raise_for_status()
response.update({'data_scanned':'N/A'})
json_data = response.content.strip()

if not json_data:
Expand Down

0 comments on commit 58b40a9

Please sign in to comment.