Skip to content

Commit

Permalink
Merge pull request #1376 from getredash/webpack
Browse files Browse the repository at this point in the history
Change: upgrade the frontend stack
  • Loading branch information
arikfr authored Nov 28, 2016
2 parents a463bad + 14d4606 commit f473e18
Show file tree
Hide file tree
Showing 337 changed files with 10,435 additions and 12,362 deletions.
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

0 comments on commit f473e18

Please sign in to comment.