Skip to content

Commit

Permalink
Merge pull request #216 from mozilla/revert-213-182_rebase_for_m9
Browse files Browse the repository at this point in the history
Revert "182 rebase for m9"
  • Loading branch information
alison985 authored Aug 22, 2017
2 parents 774f311 + dd70782 commit 3e9210f
Show file tree
Hide file tree
Showing 26 changed files with 50 additions and 248 deletions.
49 changes: 1 addition & 48 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Change Log

## v3.0.0 - UNRELEASED

## v2.0.0 - 2017-08-08
## v2.0.0 - UNRELEASED

### Added

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

### Changed

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

### Fixed

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


## v1.0.3 - 2017-04-18

Expand Down
7 changes: 2 additions & 5 deletions bin/upgrade
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
import argparse
import os
import argparse
import subprocess
import sys
from collections import namedtuple
Expand Down Expand Up @@ -111,10 +111,7 @@ def restart_services():
# otherwise it won't notice that /opt/redash/current pointing at a different
# directory.
green("Restarting...")
try:
run('sudo /etc/init.d/redash_supervisord restart')
except subprocess.CalledProcessError as e:
run('sudo service supervisor restart')
run('sudo /etc/init.d/redash_supervisord restart')


def update_requirements(version_name):
Expand Down
2 changes: 0 additions & 2 deletions client/app/pages/dashboards/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ function DashboardCtrl($rootScope, $routeParams, $location, $timeout, $q, $uibMo
{ name: '10 minutes', rate: 60 * 10 },
{ name: '30 minutes', rate: 60 * 30 },
{ name: '1 hour', rate: 60 * 60 },
{ name: '12 hour', rate: 12 * 60 * 60 },
{ name: '24 hour', rate: 24 * 60 * 60 },
];

this.setRefreshRate = (rate) => {
Expand Down
4 changes: 2 additions & 2 deletions client/app/pages/dashboards/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ function DashboardWidgetCtrl($location, $uibModal, $window, Events, currentUser)
};

if (this.widget.visualization) {
Events.record('view', 'query', this.widget.visualization.query.id, { dashboard: true });
Events.record('view', 'visualization', this.widget.visualization.id, { dashboard: true });
Events.record('view', 'query', this.widget.visualization.query.id);
Events.record('view', 'visualization', this.widget.visualization.id);

this.query = this.widget.getQuery();
this.reload(false);
Expand Down
1 change: 1 addition & 0 deletions client/app/pages/queries/query.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ <h3>
<a ng-if="dataSource.options.doc_url != '' && dataSource.options.doc_url" ng-href={{dataSource.options.doc_url}}>{{dataSource.type_name}} documentation</a>
<span ng-if="dataSource.options.doc_url == '' || !dataSource.options.doc_url">{{ dataSource.type_name }} documentation</span>
<get-data-source-version id='data-source-version'></get-data-source-version>

<div class="pull-right">
<button class="btn btn-s btn-default" ng-click="togglePublished()" ng-if="query.is_draft && query.id != undefined && (isQueryOwner || currentUser.hasPermission('admin'))">
<span class="fa fa-paper-plane"></span> Publish
Expand Down
2 changes: 1 addition & 1 deletion client/app/visualizations/chart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function ChartEditor(ColorPalette, clientConfig) {
}

scope.xAxisScales = ['datetime', 'linear', 'logarithmic', 'category'];
scope.yAxisScales = ['linear', 'logarithmic', 'datetime', 'category'];
scope.yAxisScales = ['linear', 'logarithmic', 'datetime'];

scope.chartTypeChanged = () => {
keys(scope.options.seriesOptions).forEach((key) => {
Expand Down
9 changes: 2 additions & 7 deletions client/app/visualizations/chart/plotly.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,17 +300,12 @@ const PlotlyChart = () => {
const seriesOptions = scope.options.seriesOptions[series.name] ||
{ type: scope.options.globalSeriesType };

const seriesColor = seriesOptions.color ? seriesOptions.color : getColor(index);

const plotlySeries = {
x: [],
y: [],
error_y: {
array: [],
color: seriesColor,
},
error_y: { array: [] },
name: seriesOptions.name || series.name,
marker: { color: seriesColor },
marker: { color: seriesOptions.color ? seriesOptions.color : getColor(index) },
};

if (seriesOptions.yAxis === 1 && (scope.options.series.stacking === null || seriesOptions.type === 'line')) {
Expand Down
22 changes: 5 additions & 17 deletions client/app/visualizations/pivot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,6 @@ function pivotTableRenderer() {
template: '',
replace: false,
link($scope, element) {
function removeControls() {
const hideControls =
$scope.visualization.options.controls &&
$scope.visualization.options.controls.enabled;

document.querySelectorAll('.pvtAxisContainer, .pvtRenderer, .pvtVals').forEach((control) => {
if (hideControls) {
control.style.display = 'none';
} else {
control.style.display = '';
}
});
}

function updatePivot() {
$scope.$watch('queryResult && queryResult.getData()', (data) => {
if (!data) {
Expand Down Expand Up @@ -61,15 +47,17 @@ function pivotTableRenderer() {
if ($scope.visualization) {
Object.assign(options, $scope.visualization.options);
}

$(element).pivotUI(data, options, true);
removeControls();
if (options.controls && options.controls.enabled) {
const controls = $('.pvtAxisContainer, .pvtRenderer, .pvtVals');
for (let i = 0; i < controls.length; i += 1) { controls[i].style.display = 'none'; }
}
}
});
}

$scope.$watch('queryResult && queryResult.getData()', updatePivot);
$scope.$watch('visualization.options.controls.enabled', removeControls);
$scope.$watch('visualization.options.controls.enabled', updatePivot);
},
};
}
Expand Down
6 changes: 2 additions & 4 deletions client/app/visualizations/pivot/pivottable-editor.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<div class="form-horizontal">
<div class="form-group">
<div class="col-lg-6">
<label>
<input type="checkbox" ng-model="visualization.options.controls.enabled">
Hide Pivot Controls
</label>
<input type="checkbox" ng-model="visualization.options.controls.enabled">
<i class="input-helper"></i> Hide Controls
</div>
</div>
</div>
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redash-client",
"version": "3.0.0",
"version": "2.0.0",
"description": "The frontend part of Redash.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -59,7 +59,6 @@
"devDependencies": {
"babel-core": "^6.18.0",
"babel-loader": "^6.2.7",
"babel-plugin-angularjs-annotate": "^0.7.0",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-stage-2": "^6.18.0",
Expand Down
2 changes: 1 addition & 1 deletion redash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from redash.destinations import import_destinations


__version__ = '3.0.0'
__version__ = '2.0.0'


def setup_logging():
Expand Down
3 changes: 1 addition & 2 deletions redash/authentication/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from redash import models, settings
from redash.authentication.org_resolving import current_org
from redash.authentication import google_oauth, saml_auth, remote_user_auth, ldap_auth
from redash.authentication import google_oauth, saml_auth, remote_user_auth
from redash.tasks import record_event

login_manager = LoginManager()
Expand Down Expand Up @@ -147,7 +147,6 @@ def setup_authentication(app):
app.register_blueprint(google_oauth.blueprint)
app.register_blueprint(saml_auth.blueprint)
app.register_blueprint(remote_user_auth.blueprint)
app.register_blueprint(ldap_auth.blueprint)

user_logged_in.connect(log_user_logged_in)

Expand Down
66 changes: 0 additions & 66 deletions redash/authentication/ldap_auth.py

This file was deleted.

12 changes: 3 additions & 9 deletions redash/handlers/admin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import json

from flask import request
from flask_login import login_required
from redash import models, redis_connection
from redash.handlers import routes
Expand Down Expand Up @@ -33,14 +32,9 @@ def outdated_queries():
@require_super_admin
@login_required
def queries_tasks():
global_limit = int(request.args.get('limit', 50))
waiting_limit = int(request.args.get('waiting_limit', global_limit))
progress_limit = int(request.args.get('progress_limit', global_limit))
done_limit = int(request.args.get('done_limit', global_limit))

waiting = QueryTaskTracker.all(QueryTaskTracker.WAITING_LIST, limit=waiting_limit)
in_progress = QueryTaskTracker.all(QueryTaskTracker.IN_PROGRESS_LIST, limit=progress_limit)
done = QueryTaskTracker.all(QueryTaskTracker.DONE_LIST, limit=done_limit)
waiting = QueryTaskTracker.all(QueryTaskTracker.WAITING_LIST)
in_progress = QueryTaskTracker.all(QueryTaskTracker.IN_PROGRESS_LIST)
done = QueryTaskTracker.all(QueryTaskTracker.DONE_LIST, limit=50)

response = {
'waiting': [t.data for t in waiting if t is not None],
Expand Down
5 changes: 1 addition & 4 deletions redash/handlers/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ def login(org_slug=None):
return redirect(url_for("remote_user_auth.login", next=next_path))
elif settings.SAML_LOGIN_ENABLED:
return redirect(url_for("saml_auth.sp_initiated", next=next_path))
elif settings.LDAP_LOGIN_ENABLED:
return redirect(url_for("ldap_auth.login", next=next_path))
else:
return redirect(url_for("google_oauth.authorize", next=next_path))

Expand All @@ -139,8 +137,7 @@ def login(org_slug=None):
show_google_openid=settings.GOOGLE_OAUTH_ENABLED,
google_auth_url=google_auth_url,
show_saml_login=settings.SAML_LOGIN_ENABLED,
show_remote_user_login=settings.REMOTE_USER_LOGIN_ENABLED,
show_ldap_login=settings.LDAP_LOGIN_ENABLED)
show_remote_user_login=settings.REMOTE_USER_LOGIN_ENABLED)


@routes.route(org_scoped_rule('/logout'))
Expand Down
Loading

0 comments on commit 3e9210f

Please sign in to comment.