Skip to content

Commit 3e9210f

Browse files
authored
Merge pull request #216 from mozilla/revert-213-182_rebase_for_m9
Revert "182 rebase for m9"
2 parents 774f311 + dd70782 commit 3e9210f

File tree

26 files changed

+50
-248
lines changed

26 files changed

+50
-248
lines changed

CHANGELOG.md

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Change Log
22

3-
## v3.0.0 - UNRELEASED
4-
5-
## v2.0.0 - 2017-08-08
3+
## v2.0.0 - UNRELEASED
64

75
### Added
86

@@ -20,19 +18,6 @@
2018
- Add: option to hide pivot table controls. @deecay
2119
- Retry reload of query results if it had an error.
2220
- [Data Sources] Add: MemSQL query runner. @alexanderlz
23-
- "Dumb" recents option (see #1779 for details)
24-
- Athena: direct query runner using the instead of JDBC proxy. @laughingman7743
25-
- Optionally support parameters in embeds. @ziahamza
26-
- Sorting ability in alerts view.
27-
- Option to change default encoding of CSV writer. @yamamanx
28-
- Ability to set dashboard level filters from UI.
29-
- CLI command to open IPython shell.
30-
- Add link to query page from admin view. @miketheman
31-
- Add the option to write logs to STDOUT instead of STDERR. @eyalzek
32-
- Add limit parameter to tasks API. @alexpekurovsky
33-
- Add SQLAlchemy pool settings.
34-
- Support for category type y axis.
35-
- Add 12 & 24 hours refresh rate option to dashboards.
3621

3722
### Changed
3823

@@ -59,20 +44,6 @@
5944
- Split refresh schemas into separate tasks and add a timeout.
6045
- Execute scheduled queries with parameters using their default value.
6146
- Keep track of last query execution (including failed ones) for scheduling purposes.
62-
- Same view for input on search result page as in header. @44px
63-
- Metrics: report endpoints without dots for metrics.
64-
- Redirect to / when org not found.
65-
- Improve parameters label placement. @44px
66-
- Auto-publish queries when they are named (with option to disable; #1830).
67-
- Show friendly error message in case of duplicate data source name.
68-
- Don't allow saving dashboard with empty name.
69-
- Enable strict checking for Angular DI.
70-
- Disable Angular debug info (should improve performance).
71-
- Update to Webpack 2. @44px
72-
- Remove /forgot endpoint if REDASH_PASSWORD_LOGIN_ENABLED is false. @amarjayr
73-
- Docker: make Gunicorn worker count configurable. @unixwitch
74-
- Snowflake support is no longer enabled by default.
75-
- Enable memory optimization for Excel exporter.
7647

7748
### Fixed
7849

@@ -82,24 +53,6 @@
8253
- [SQLite] better handle utf-8 error messages.
8354
- Fix: don't remove locks for queries with task status of PENDING.
8455
- Only split columns with __/:: that end with filter/MultiFilter.
85-
- Alert notifications fail (sometime) with a SQLAlchemy error.
86-
- Safeguard against empty query results when checking alert status. @danielerapati
87-
- Delete data source doesn't work when query results referenced by queries.
88-
- Fix redirect to /setup on the last setup step. @44px
89-
- Cassandra: use port setting in connection options. @yershalom
90-
- Metrics: table name wasn't found for count queries.
91-
- BigQuery wasn't loading due to bad import.
92-
- DynamicForm component was inserting empty values.
93-
- Clear null values from data source options dictionary.
94-
- /api/session API call wasn't working when multi tenancy enabled
95-
- If column had no type it would use previous column's type.
96-
- Alert destination details were not updating.
97-
- When setting rearm on a new alert, it wasn't persisted.
98-
- Salesforce: sandbox parameter should be optional. @msnider
99-
- Alert page wasn't properly linked from alerts list. @alison985
100-
- PostgreSQL passwords with spaces were not supported. (#1056)
101-
- PivotTable wasn't updating after first save.
102-
10356

10457
## v1.0.3 - 2017-04-18
10558

bin/upgrade

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
2-
import argparse
32
import os
3+
import argparse
44
import subprocess
55
import sys
66
from collections import namedtuple
@@ -111,10 +111,7 @@ def restart_services():
111111
# otherwise it won't notice that /opt/redash/current pointing at a different
112112
# directory.
113113
green("Restarting...")
114-
try:
115-
run('sudo /etc/init.d/redash_supervisord restart')
116-
except subprocess.CalledProcessError as e:
117-
run('sudo service supervisor restart')
114+
run('sudo /etc/init.d/redash_supervisord restart')
118115

119116

120117
def update_requirements(version_name):

client/app/pages/dashboards/dashboard.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ function DashboardCtrl($rootScope, $routeParams, $location, $timeout, $q, $uibMo
1717
{ name: '10 minutes', rate: 60 * 10 },
1818
{ name: '30 minutes', rate: 60 * 30 },
1919
{ name: '1 hour', rate: 60 * 60 },
20-
{ name: '12 hour', rate: 12 * 60 * 60 },
21-
{ name: '24 hour', rate: 24 * 60 * 60 },
2220
];
2321

2422
this.setRefreshRate = (rate) => {

client/app/pages/dashboards/widget.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ function DashboardWidgetCtrl($location, $uibModal, $window, Events, currentUser)
8585
};
8686

8787
if (this.widget.visualization) {
88-
Events.record('view', 'query', this.widget.visualization.query.id, { dashboard: true });
89-
Events.record('view', 'visualization', this.widget.visualization.id, { dashboard: true });
88+
Events.record('view', 'query', this.widget.visualization.query.id);
89+
Events.record('view', 'visualization', this.widget.visualization.id);
9090

9191
this.query = this.widget.getQuery();
9292
this.reload(false);

client/app/pages/queries/query.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ <h3>
106106
<a ng-if="dataSource.options.doc_url != '' && dataSource.options.doc_url" ng-href={{dataSource.options.doc_url}}>{{dataSource.type_name}} documentation</a>
107107
<span ng-if="dataSource.options.doc_url == '' || !dataSource.options.doc_url">{{ dataSource.type_name }} documentation</span>
108108
<get-data-source-version id='data-source-version'></get-data-source-version>
109+
109110
<div class="pull-right">
110111
<button class="btn btn-s btn-default" ng-click="togglePublished()" ng-if="query.is_draft && query.id != undefined && (isQueryOwner || currentUser.hasPermission('admin'))">
111112
<span class="fa fa-paper-plane"></span> Publish

client/app/visualizations/chart/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function ChartEditor(ColorPalette, clientConfig) {
7777
}
7878

7979
scope.xAxisScales = ['datetime', 'linear', 'logarithmic', 'category'];
80-
scope.yAxisScales = ['linear', 'logarithmic', 'datetime', 'category'];
80+
scope.yAxisScales = ['linear', 'logarithmic', 'datetime'];
8181

8282
scope.chartTypeChanged = () => {
8383
keys(scope.options.seriesOptions).forEach((key) => {

client/app/visualizations/chart/plotly.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -300,17 +300,12 @@ const PlotlyChart = () => {
300300
const seriesOptions = scope.options.seriesOptions[series.name] ||
301301
{ type: scope.options.globalSeriesType };
302302

303-
const seriesColor = seriesOptions.color ? seriesOptions.color : getColor(index);
304-
305303
const plotlySeries = {
306304
x: [],
307305
y: [],
308-
error_y: {
309-
array: [],
310-
color: seriesColor,
311-
},
306+
error_y: { array: [] },
312307
name: seriesOptions.name || series.name,
313-
marker: { color: seriesColor },
308+
marker: { color: seriesOptions.color ? seriesOptions.color : getColor(index) },
314309
};
315310

316311
if (seriesOptions.yAxis === 1 && (scope.options.series.stacking === null || seriesOptions.type === 'line')) {

client/app/visualizations/pivot/index.js

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,6 @@ function pivotTableRenderer() {
1616
template: '',
1717
replace: false,
1818
link($scope, element) {
19-
function removeControls() {
20-
const hideControls =
21-
$scope.visualization.options.controls &&
22-
$scope.visualization.options.controls.enabled;
23-
24-
document.querySelectorAll('.pvtAxisContainer, .pvtRenderer, .pvtVals').forEach((control) => {
25-
if (hideControls) {
26-
control.style.display = 'none';
27-
} else {
28-
control.style.display = '';
29-
}
30-
});
31-
}
32-
3319
function updatePivot() {
3420
$scope.$watch('queryResult && queryResult.getData()', (data) => {
3521
if (!data) {
@@ -61,15 +47,17 @@ function pivotTableRenderer() {
6147
if ($scope.visualization) {
6248
Object.assign(options, $scope.visualization.options);
6349
}
64-
6550
$(element).pivotUI(data, options, true);
66-
removeControls();
51+
if (options.controls && options.controls.enabled) {
52+
const controls = $('.pvtAxisContainer, .pvtRenderer, .pvtVals');
53+
for (let i = 0; i < controls.length; i += 1) { controls[i].style.display = 'none'; }
54+
}
6755
}
6856
});
6957
}
7058

7159
$scope.$watch('queryResult && queryResult.getData()', updatePivot);
72-
$scope.$watch('visualization.options.controls.enabled', removeControls);
60+
$scope.$watch('visualization.options.controls.enabled', updatePivot);
7361
},
7462
};
7563
}
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<div class="form-horizontal">
22
<div class="form-group">
33
<div class="col-lg-6">
4-
<label>
5-
<input type="checkbox" ng-model="visualization.options.controls.enabled">
6-
Hide Pivot Controls
7-
</label>
4+
<input type="checkbox" ng-model="visualization.options.controls.enabled">
5+
<i class="input-helper"></i> Hide Controls
86
</div>
97
</div>
108
</div>

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "redash-client",
3-
"version": "3.0.0",
3+
"version": "2.0.0",
44
"description": "The frontend part of Redash.",
55
"main": "index.js",
66
"scripts": {
@@ -59,7 +59,6 @@
5959
"devDependencies": {
6060
"babel-core": "^6.18.0",
6161
"babel-loader": "^6.2.7",
62-
"babel-plugin-angularjs-annotate": "^0.7.0",
6362
"babel-plugin-transform-object-assign": "^6.22.0",
6463
"babel-preset-es2015": "^6.18.0",
6564
"babel-preset-stage-2": "^6.18.0",

0 commit comments

Comments
 (0)