Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change: upgrade the frontend stack #1376

Merged
merged 96 commits into from
Nov 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
a836460
Initial Webpack setup
arikfr Oct 30, 2016
56bdea2
Migrate filters
arikfr Oct 30, 2016
4e0c9af
Migrated services & app header component
arikfr Oct 30, 2016
da790de
First page implemented (home)
arikfr Oct 30, 2016
0318be5
Separate npm modules to their own JS file
arikfr Oct 31, 2016
aa529e4
Initial config
arikfr Oct 31, 2016
4ad53eb
Support for pushstate in dev server
arikfr Oct 31, 2016
9c9feee
Queries page
arikfr Oct 31, 2016
22236c7
Add alerts and admin pages
arikfr Nov 2, 2016
ee31edf
Visualzations base & table visualization
arikfr Nov 4, 2016
bbbaa7a
working version of chart visualization
arikfr Nov 6, 2016
db795c7
Remove unused test code
arikfr Nov 6, 2016
0e5325e
Remove code from rd_ui that was already migrated to frontend
arikfr Nov 7, 2016
d49e5f9
Query snippets pages
arikfr Nov 7, 2016
6eb0831
Add users list page
arikfr Nov 7, 2016
de91bb9
User show page
arikfr Nov 8, 2016
3583f57
new user page
arikfr Nov 8, 2016
98cc0fe
Fix new user form to show errors
arikfr Nov 9, 2016
cb01381
Migrate the group list and show page
arikfr Nov 9, 2016
54eb2fe
remove edit-in-place directive
arikfr Nov 9, 2016
e0aeae4
Desitnations list
arikfr Nov 9, 2016
b76fbc2
Destinations editor
arikfr Nov 9, 2016
33834a4
data sources pages
arikfr Nov 9, 2016
d561904
First version of query pages
arikfr Nov 9, 2016
416f7da
Query view/edit screens
arikfr Nov 13, 2016
d02c4e7
Add widget dialog
arikfr Nov 14, 2016
fece3f8
Make ui-sortable work again
arikfr Nov 14, 2016
59c3f38
Make create dashboard work
arikfr Nov 16, 2016
99815b7
autofocus directive
arikfr Nov 16, 2016
00bd387
add back the vendor scripts file
arikfr Nov 16, 2016
b249b9a
Working version of the dashboard page
luke14free Nov 16, 2016
0b6d2b4
Unpaginated results
luke14free Nov 16, 2016
55d8f9e
Adding dropdown menu link to the dashboards page
luke14free Nov 16, 2016
f372e68
Add queries results page
arikfr Nov 17, 2016
d929226
Adding custom javascript charts
luke14free Nov 17, 2016
df11077
Removing unused import
luke14free Nov 17, 2016
71be7aa
Fixing console log reporting and option label
luke14free Nov 17, 2016
f44912b
Hide tabs when viz type is set to custom
luke14free Nov 17, 2016
21283ca
Adding a query runner for generic script execution
luke14free Nov 17, 2016
0e6b68d
Fixing CSS
luke14free Nov 18, 2016
ff69710
Remove variables with $scope and use self
luke14free Nov 18, 2016
f5c43d8
finally moving variables to `this`
luke14free Nov 18, 2016
b966414
Removing tabs and making the changes ES6 compliant
luke14free Nov 18, 2016
e9746ac
Removing unused pagination import
luke14free Nov 18, 2016
a368b14
Fixing wrong package version and ES6 compliance
luke14free Nov 18, 2016
f9260ca
Adding clientConfig for JS visualization
luke14free Nov 18, 2016
3743ef5
Adding capabilities to the original script runner
luke14free Nov 18, 2016
b88f36a
Add: autorefresh capabilities do dashboard
luke14free Nov 18, 2016
21cfa35
Fixing stupid concatenation typo
luke14free Nov 18, 2016
4c3de76
Making select menu for refresh choice look nicer
luke14free Nov 18, 2016
edd2a1b
Adding correct classes for the toggle and option to stop refresh
luke14free Nov 18, 2016
02d27c1
Improving security checks & removing unused log
luke14free Nov 18, 2016
4b19163
Working dashboard editor
arikfr Nov 20, 2016
0ab815b
Remove unused logging
arikfr Nov 20, 2016
0ced011
Address lint issues
arikfr Nov 20, 2016
f7eec27
Adding a query runner for generic script execution
luke14free Nov 17, 2016
599fe5f
Adding capabilities to the original script runner
luke14free Nov 18, 2016
df5e1b5
Remove manual injections
arikfr Nov 20, 2016
55e3d86
Backport changes made after creating this pull request
arikfr Nov 20, 2016
ca3c934
Remove old gulp file & package.json
arikfr Nov 20, 2016
d237943
remove .env.example file
arikfr Nov 20, 2016
9579c0a
Sunburst visualization
arikfr Nov 20, 2016
7dbd20c
Cleanup eslint issues
arikfr Nov 21, 2016
2b9066b
Sankey visualization
arikfr Nov 21, 2016
2ef8ecd
Add wordcloud and boxplot visualizations
arikfr Nov 21, 2016
8e55be9
Cohort visualization|
arikfr Nov 21, 2016
c67828f
Map visualization
arikfr Nov 21, 2016
8952919
Pivot table visualization
arikfr Nov 22, 2016
3070d85
change sourcemaps generation method
arikfr Nov 22, 2016
afc31ae
Remove unused files
arikfr Nov 22, 2016
3fecc02
Move backend templates into redash/templates
arikfr Nov 22, 2016
8676eb0
Change queries/format call to return JSON object
arikfr Nov 22, 2016
4ef4f98
Load currentUser/clientConfig from server
arikfr Nov 23, 2016
73e5ed4
use clientconfig in datetime filter
arikfr Nov 23, 2016
50fcb14
Working login/logout, real session data & public dashboard page
arikfr Nov 24, 2016
0a06f95
Working embeds & renamed frontend to client
arikfr Nov 24, 2016
5c99175
change default settings to use client/dist
arikfr Nov 24, 2016
bb64b17
Udpate webpack config
arikfr Nov 24, 2016
3314599
Webpack build notifier
arikfr Nov 24, 2016
a874d88
Fix tests & update CircleCI configuration
arikfr Nov 26, 2016
c029e13
Migrate the draft functionality and fork to this branch
arikfr Nov 26, 2016
68ccf4b
Remove references to rd_ui
arikfr Nov 26, 2016
0a06d51
Remove input-errors/show-errors usage
arikfr Nov 26, 2016
7c5d395
Show correct embed URL
arikfr Nov 27, 2016
2067eab
Fix: query snippets were broken
arikfr Nov 27, 2016
cd670b6
Implement sorting for data tables
arikfr Nov 27, 2016
5a3033a
Add /dashboards to list of paths
arikfr Nov 27, 2016
c25a4e3
Fix dashboard creation
arikfr Nov 27, 2016
8901079
Fix new dashboard link in app header
arikfr Nov 27, 2016
1ea9f0e
Fix: sometimes order of columns in table was wrong
arikfr Nov 27, 2016
724b767
Fix: query filters
arikfr Nov 27, 2016
5152850
Make sure session is loaded before route is rendered
arikfr Nov 27, 2016
b507c7c
Fix authentication handling for embeds
arikfr Nov 27, 2016
b5e2234
Set title
arikfr Nov 27, 2016
dca8998
Bring back pace
arikfr Nov 28, 2016
14d4606
Make keyboard shortcuts work again
arikfr Nov 28, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rd_ui/.tmp/
rd_ui/node_modules/
client/.tmp/
client/node_modules/
.git/
.vagrant/
5 changes: 0 additions & 5 deletions .env.example

This file was deleted.

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.idea
*.pyc
.coverage
rd_ui/dist
client/dist
.DS_Store
celerybeat-schedule*
.#*
Expand All @@ -26,5 +26,4 @@ docker-compose.yml
node_modules
.tmp
.sass-cache
rd_ui/app/bower_components
npm-debug.log
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@ RUN chown -R redash /opt/redash/current
# Setting working directory
WORKDIR /opt/redash/current

ENV REDASH_STATIC_ASSETS_PATH="../rd_ui/dist/"

# Install project specific dependencies
RUN pip install -r requirements_all_ds.txt && \
pip install -r requirements.txt

RUN curl https://deb.nodesource.com/setup_4.x | bash - && \
apt-get install -y nodejs && \
sudo -u redash -H make deps && \
rm -rf node_modules rd_ui/node_modules /home/redash/.npm /home/redash/.cache && \
rm -rf node_modules client/node_modules /home/redash/.npm /home/redash/.cache && \
apt-get purge -y nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
Expand Down
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ BASE_VERSION=$(shell python ./manage.py version | cut -d + -f 1)
FILENAME=$(CIRCLE_ARTIFACTS)/$(NAME).$(VERSION).tar.gz

deps:
if [ -d "./rd_ui/app" ]; then npm install; fi
if [ -d "./rd_ui/app" ]; then npm run bower install; fi
if [ -d "./rd_ui/app" ]; then npm run build; fi
if [ -d "./client/app" ]; then cd client && npm install; fi
if [ -d "./client/app" ]; then cd client && npm run build; fi

pack:
sed -ri "s/^__version__ = '([0-9.]*)'/__version__ = '$(FULL_VERSION)'/" redash/__init__.py
tar -zcv -f $(FILENAME) --exclude="optipng*" --exclude=".git*" --exclude="*.pyc" --exclude="*.pyo" --exclude="venv" --exclude="node_modules" --exclude="rd_ui/dist/bower_components" --exclude="rd_ui/app" *
tar -zcv -f $(FILENAME) --exclude="optipng*" --exclude=".git*" --exclude="*.pyc" --exclude="*.pyo" --exclude="venv" --exclude="client/node_modules" --exclude="client/app" *

upload:
python bin/release_manager.py $(CIRCLE_SHA1) $(BASE_VERSION) $(FILENAME)

test:
nosetests --with-coverage --cover-package=redash tests/
#grunt test
49 changes: 0 additions & 49 deletions bower.json

This file was deleted.

8 changes: 5 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ dependencies:
- pip install -r requirements.txt
- pip install pymongo==3.2.1
- if [ "$CIRCLE_BRANCH" = "master" ]; then make deps; fi
- if [ "$CIRCLE_BRANCH" = "webpack" ]; then make deps; fi
cache_directories:
- node_modules/
- rd_ui/app/bower_components/
- client/node_modules/
test:
override:
- nosetests --with-xunit --xunit-file=$CIRCLE_TEST_REPORTS/junit.xml --with-coverage --cover-package=redash tests/
Expand All @@ -24,8 +25,9 @@ deployment:
branch: master
commands:
- make pack
- make upload
- echo "rd_ui/app" >> .dockerignore
# Skipping uploads for now, until master is stable.
# - make upload
- echo "client/app" >> .dockerignore
- docker pull redash/redash:latest
- docker build -t redash/redash:$(./manage.py version | sed -e "s/\+/./") .
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
Expand Down
3 changes: 3 additions & 0 deletions client/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015", "stage-2"]
}
2 changes: 2 additions & 0 deletions client/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/*.js
config/*.js
15 changes: 15 additions & 0 deletions client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
root: true,
extends: 'airbnb-base',
env: {
"browser": true,
"node": true
},
rules: {
// allow debugger during development
'no-param-reassign': 0,
'no-mixed-operators': 0,
'no-underscore-dangle': 0,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}
1 change: 1 addition & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
30 changes: 11 additions & 19 deletions rd_ui/app/styles/redash.css → client/app/assets/css/redash.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,13 @@ a.navbar-brand img {

/* Gridster */

.gridster ul {
list-style-type: none;
}

li.widget {
/*background-color:grey;*/
border-width: 1px;
border-style: solid;
border-color: grey;
opacity: 0.7;
cursor: move;
}

li.widget:hover {
Expand All @@ -188,6 +185,12 @@ li.widget:hover {
background: rgba(0, 0, 0, 0.5) !important;
}

.gridster li .heading {
border: #ddd;
background-color: #f5f5f5;
padding: 5px;
}

/* Editor */

.ace_editor {
Expand Down Expand Up @@ -477,21 +480,6 @@ div.table-name:hover {
display: none !important;
}

/* Smart Table */

.smart-table {
margin-bottom: 0px;
}

.smart-table .pagination {
margin-bottom: 5px;
margin-top: 10px;
}

.smart-table .smart-table-header-row .header-content {
cursor: pointer;
}

.voffset {
margin-top: 2px;
}
Expand Down Expand Up @@ -679,3 +667,7 @@ div.table-name:hover {
stroke-opacity: .2;
}

/*Dashboard list view */
.m-2{
margin:2px;
}
Loading