Skip to content

Commit

Permalink
Merge pull request #3196 from getredash/master
Browse files Browse the repository at this point in the history
Sync release/6.0.x branch with master
  • Loading branch information
arikfr authored Dec 16, 2018
2 parents 3ee7537 + ef66da7 commit 4780bd9
Show file tree
Hide file tree
Showing 41 changed files with 353 additions and 168 deletions.
14 changes: 8 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
command: docker-compose run --rm postgres psql -h postgres -U postgres -c "create database tests;"
- run:
name: Run Tests
command: docker-compose run --name tests redash tests --junitxml=junit.xml tests/
command: docker-compose run --name tests redash tests --junitxml=junit.xml --cov-report xml --cov=redash --cov-config .coveragerc tests/
- run:
name: Copy Test Results
command: |
Expand All @@ -58,32 +58,34 @@ jobs:
environment:
COMPOSE_FILE: .circleci/docker-compose.cypress.yml
COMPOSE_PROJECT_NAME: cypress
PERCY_TOKEN_ENCODED: MWM3OGUzNzk4ZWQ2NTE4YTBhMDAwZDNiNWE1Nzc4ZjEzZjYyMzY1MjE0NjY0NDRiOGE5ODc5ZGYzYTU4ZmE4NQ==
docker:
- image: circleci/node:8
steps:
- setup_remote_docker
- checkout
- run:
name: Install npm dependencies
command: npm install
command: |
npm install
- run:
name: Setup Redash server
command: |
npm run cypress:server start-ci
docker-compose run cypress node ./cypress/cypress-server.js setup
npm run cypress start
docker-compose run cypress node ./cypress/cypress.js db-seed
- run:
name: Execute Cypress tests
command: docker-compose run cypress ./node_modules/.bin/cypress run
command: npm run cypress run-ci
build-tarball:
docker:
- image: circleci/node:8
steps:
- checkout
- run: sudo apt install python-pip
- run: npm install
- run: .circleci/update_version
- run: npm run bundle
- run: npm run build
- run: .circleci/update_version
- run: .circleci/pack
- store_artifacts:
path: /tmp/artifacts/
Expand Down
4 changes: 4 additions & 0 deletions .circleci/docker-compose.cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ services:
- worker
environment:
CYPRESS_baseUrl: "http://server:5000"
PERCY_TOKEN: ${PERCY_TOKEN}
PERCY_BRANCH: ${CIRCLE_BRANCH}
PERCY_COMMIT: ${CIRCLE_SHA1}
PERCY_PULL_REQUEST: ${CIRCLE_PR_NUMBER}
redis:
image: redis:3.0-alpine
restart: unless-stopped
Expand Down
34 changes: 0 additions & 34 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/---bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: "\U0001F41B Bug report"
about: Report reproducible software issues so we can improve
---

<!--
We use GitHub only for bug reports 🐛
Anything else should be posted to https://discuss.redash.io 👫
🚨For support, help & questions use https://discuss.redash.io/c/support
💡For feature requests & ideas use https://discuss.redash.io/c/feature-requests
**Found a security vulnerability?** Please email security@redash.io to report any security vulnerabilities. We will acknowledge receipt of your vulnerability and strive to send you regular updates about our progress. If you're curious about the status of your disclosure please feel free to email us again. If you want to encrypt your disclosure email, you can use this PGP key.
-->

### Issue Summary

A summary of the issue and the browser/OS environment in which it occurs.

### Steps to Reproduce

1. This is the first step
2. This is the second step, etc.

Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?

### Technical details:

* Redash Version:
* Browser/OS:
* How did you install Redash:
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/--anything_else.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: "\U0001F4A1Anything else"
about: "For help, support, features & ideas - please use https://discuss.redash.io \U0001F46B "
labels: "Support Question"
---

We use GitHub only for bug reports 🐛

Anything else should be posted to https://discuss.redash.io 👫

🚨For support, help & questions use https://discuss.redash.io/c/support
💡For feature requests & ideas use https://discuss.redash.io/c/feature-requests

Alternatively, check out these resources below. Thanks! 😁.

- [Forum](https://disucss.redash.io)
- [Knowledge Base](https://redash.io/help)
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Change Log

## v6.0.0 - 2018-12-16

v6.0.0 release version. Mainly includes fixes for regressions from the beta version.

This release had contributions from 5 people: @rauchy, @denisov-vlad, @arikfr, @ariarijp, and @gabrieldutra. Thank you, everyone 🙏

### Changed

* #3183 Make refresh_queries less noisey in logs. @arikfr

### Fixed

* #3163 Include correct version in production builds. @rauchy
* #3161 Clickhouse: fix int() conversion error. @denisov-vlad
* #3166 Directly using record_event task requires timestamp. @arikfr
* #3167 Alert.evaluate failing when the column is missing. @arikfr
* ##3162 Remove API permissions for users who have been disabled. @rauchy
* #3171 Reject empty query name. @ariarijp
* #3175, #3186 Fix disable error message. @rauchy, @gabrieldutra
* #3182 [Redshift] support for schema names with dots. @arikfr
* #3187 Safely create_app in Celery code (try to fetch current_app first). @arikfr

### Other

* #3155 Add DB Seed to Cypress and setup Percy. @gabrieldutra
* #3180 Remove coverage from pytest terminal output. @rauchy


## v6.0.0-beta - 2018-12-03

This release was 2 months in the making and it is full with good stuff!
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile.cypress
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM cypress/browsers:chrome67

WORKDIR /usr/src/app
ENV APP /usr/src/app
WORKDIR $APP

RUN npm install cypress > /dev/null
RUN npm install --no-save cypress @percy/cypress > /dev/null

COPY cypress /usr/src/app/cypress
COPY cypress.json /usr/src/app/cypress.json
COPY cypress $APP/cypress
COPY cypress.json $APP/cypress.json

RUN ./node_modules/.bin/cypress verify
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ Today **_Redash_** has support for querying multiple databases, including: Redsh

## Supported Data Sources

Redash supports more than 25 [data sources](https://redash.io/help/data-sources/supported-data-sources).
Redash supports more than 35 [data sources](https://redash.io/help/data-sources/supported-data-sources).

## Getting Help

* Issues: https://github.com/getredash/redash/issues
* Discussion Forum: https://discuss.redash.io/
* Slack: http://slack.redash.io/

## Reporting Bugs and Contributing Code

Expand Down
2 changes: 1 addition & 1 deletion client/app/components/EditInPlace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class EditInPlace extends React.Component {

stopEditing = () => {
const newValue = this.inputRef.current.value;
const ignorableBlank = this.props.ignoreBlanks && this.props.value === '';
const ignorableBlank = this.props.ignoreBlanks && newValue === '';
if (!ignorableBlank && newValue !== this.props.value) {
this.props.onDone(newValue);
}
Expand Down
3 changes: 2 additions & 1 deletion client/app/components/QueryEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class QueryEditor extends React.Component {
const isExecuteDisabled = this.props.queryExecuting || !this.props.canExecuteQuery();

return (
<section style={{ height: '100%' }}>
<section style={{ height: '100%' }} data-test="QueryEditor">
<div className="container p-15 m-b-10" style={{ height: '100%' }}>
<div style={{ height: 'calc(100% - 40px)', marginBottom: '0px' }} className="editor__container">
<AceEditor
Expand Down Expand Up @@ -262,6 +262,7 @@ class QueryEditor extends React.Component {
className={'btn btn-primary m-l-5' + (isExecuteDisabled ? ' disabled' : '')}
disabled={isExecuteDisabled}
onClick={this.props.executeQuery}
data-test="ExecuteButton"
>
<span className="zmdi zmdi-play" />
<span className="hidden-xs m-l-5">Execute</span>
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/app-header/app-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<!--<a href="users" title="Settings"><i class="fa fa-cog"></i></a>-->
<!--</li>-->
<li class="dropdown" uib-dropdown>
<a href="#" class="dropdown-toggle dropdown--profile" uib-dropdown-toggle data-cy="dropdown-profile">
<a href="#" class="dropdown-toggle dropdown--profile" uib-dropdown-toggle data-test="ProfileDropdown">
<img ng-src="{{ $ctrl.currentUser.profile_image_url }}" class="profile__image--navbar" width="20"/>
<span class="dropdown--profile__username" ng-bind="$ctrl.currentUser.name"></span> <span
class="caret caret--nav"></span></a>
Expand Down
9 changes: 5 additions & 4 deletions client/app/components/dynamic-form.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
<form name="dynamicForm">
<div class="form-group required" ng-class='{"has-error": (dynamicForm.targetName | showError)}'>
<label class="control-label" for="dataSourceName">Name</label>
<input type="string" class="form-control" name="targetName" ng-model="target.name" autofocus required>
<input type="string" class="form-control" name="targetName" ng-model="target.name"
data-test="TargetName" autofocus required>
<error-messages input="dynamicForm.targetName" form="dynamicForm"></error-messages>
</div>
<hr>
<div class="form-group" ng-class='{"has-error": (inner.input | showError), "required": field.property.required}' ng-form="inner" ng-repeat="field in fields">
<label ng-if="field.property.type !== 'checkbox'" class="control-label">{{field.property.title || field.name | toHuman}}</label>
<input name="input" type="{{field.property.type}}" class="form-control" ng-model="target.options[field.name]" ng-required="field.property.required"
ng-if="field.property.type !== 'file' && field.property.type !== 'checkbox'" accesskey="tab" placeholder="{{field.property.default}}"
data-cy="{{field.property.title || field.name | toHuman}}">
data-test="{{field.property.title || field.name | toHuman}}">

<label ng-if="field.property.type=='checkbox'">
<input name="input" type="{{field.property.type}}" ng-model="target.options[field.name]" ng-required="field.property.required"
ng-if="field.property.type !== 'file'" accesskey="tab" placeholder="{{field.property.default}}"
data-cy="{{field.property.title || field.name | toHuman}}">
data-test="{{field.property.title || field.name | toHuman}}">
{{field.property.title || field.name | toHuman}}
</label>

Expand All @@ -25,7 +26,7 @@
<error-messages input="inner.input" form="inner"></error-messages>
</div>

<button class="btn btn-block btn-primary m-b-10" ng-disabled="!dynamicForm.$valid" ng-click="saveChanges()">Save</button>
<button class="btn btn-block btn-primary m-b-10" ng-disabled="!dynamicForm.$valid" ng-click="saveChanges()" data-test="Submit">Save</button>
<span ng-repeat="action in actions">
<button class="btn"
ng-class="action.class"
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/dynamic-table/dynamic-table.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="dynamic-table-container">
<table class="table table-condensed table-hover">
<table class="table table-condensed table-hover" data-test="DynamicTable">
<thead>
<tr>
<th ng-repeat="column in $ctrl.columns" ng-click="$ctrl.onColumnHeaderClick($event, column)"
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/type-picker.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h3 class="text-center">{{$ctrl.title}}</h3>
</div>

<div class="row">
<div class="col-lg-12 database-source">
<div class="col-lg-12 database-source" data-test="DatabaseSource">
<div class="visual-card" ng-repeat="type in $ctrl.types | filter:$ctrl.filter:strict" ng-click="$ctrl.onTypeSelect(type)">
<img ng-src="{{$ctrl.imgRoot}}/{{type.type}}.png" alt="{{type.name}}">
<h3>{{type.name}}</h3>
Expand Down
3 changes: 2 additions & 1 deletion client/app/pages/queries/query.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ <h3>
<main class="query-fullscreen">
<nav resizable r-directions="['right']" r-flex="true" resizable-toggle toggle-shortcut="Alt+Shift+D, Alt+D">
<div class="editor__left__data-source">
<ui-select ng-model="query.data_source_id" remove-selected="false" ng-disabled="!isQueryOwner || !sourceMode" on-select="updateDataSource()">
<ui-select ng-model="query.data_source_id" remove-selected="false" ng-disabled="!isQueryOwner || !sourceMode"
on-select="updateDataSource()" data-test="SelectDataSource">
<ui-select-match placeholder="Select Data Source...">{{$select.selected.name}}</ui-select-match>
<ui-select-choices repeat="ds.id as ds in dataSources | filter:$select.search">
{{ds.name}}
Expand Down
11 changes: 6 additions & 5 deletions client/app/services/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ function disableUser(user, toastr, $sanitize) {
return data;
})
.catch((response) => {
let message = response instanceof Error ? response.message : response.statusText;
if (!isString(message)) {
message = 'Unknown error';
}
toastr.error(`Cannot disable user <b>${userName}</b><br>${message}`, { allowHtml: true });
const message =
response.data && response.data.message
? response.data.message
: `Cannot disable user <b>${userName}</b><br>${response.statusText}`;

toastr.error(message, { allowHtml: true });
});
}

Expand Down
3 changes: 2 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"baseUrl": "http://localhost:5000"
"baseUrl": "http://localhost:5000",
"video": false
}
52 changes: 0 additions & 52 deletions cypress/cypress-server.js

This file was deleted.

Loading

0 comments on commit 4780bd9

Please sign in to comment.