SIP-32: Moving frontend code to the base of the repo (#9098)
* move assets out, get webpack dev working * update docs to reference superset-frontend * draw the rest of the owl * fix docs * fix webpack script * rats * correct docs * fix tox dox
|
|
@ -34,7 +34,7 @@
|
|||
tests/
|
||||
docs/
|
||||
install/
|
||||
superset/assets/node_modules/
|
||||
superset/assets/cypress/
|
||||
superset/assets/coverage/
|
||||
superset-frontend/node_modules/
|
||||
superset-frontend/cypress/
|
||||
superset-frontend/coverage/
|
||||
venv
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ analyze:
|
|||
modules:
|
||||
- name: assets
|
||||
type: npm
|
||||
target: superset/assets
|
||||
path: superset/assets
|
||||
target: superset-frontend
|
||||
path: superset-frontend
|
||||
- name: docs
|
||||
type: pip
|
||||
target: docs
|
||||
|
|
|
|||
|
|
@ -51,16 +51,18 @@ local_config.py
|
|||
superset.egg-info/
|
||||
superset/bin/supersetc
|
||||
tmp
|
||||
rat-results.txt
|
||||
|
||||
# Node.js, webpack artifacts
|
||||
*.entry.js
|
||||
*.js.map
|
||||
node_modules
|
||||
npm-debug.log*
|
||||
superset/assets/coverage/*
|
||||
superset/assets/cypress/screenshots
|
||||
superset/assets/cypress/videos
|
||||
superset/assets/version_info.json
|
||||
superset-frontend/coverage/*
|
||||
superset-frontend/cypress/screenshots
|
||||
superset-frontend/cypress/videos
|
||||
superset-frontend/version_info.json
|
||||
superset/static
|
||||
yarn-error.log
|
||||
|
||||
# IntelliJ
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ node_modules/*
|
|||
rat-results.txt
|
||||
babel-node
|
||||
dist
|
||||
superset/static/*
|
||||
build
|
||||
superset.egg-info
|
||||
apache_superset.egg-info
|
||||
|
|
@ -32,6 +33,7 @@ apache_superset.egg-info
|
|||
env/*
|
||||
docs/_build/*
|
||||
docs/_modules/*
|
||||
docs/_static/*
|
||||
_build/*
|
||||
_static/*
|
||||
.buildinfo
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ cache:
|
|||
- ~/.npm
|
||||
- ~/.cache
|
||||
- ~/.travis_cache/
|
||||
- superset/assets/.terser-plugin-cache/
|
||||
- superset-frontend/.terser-plugin-cache/
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ Here's a list of repositories that contain Superset-related packages:
|
|||
distributed on
|
||||
[pypi](https://pypi.org/project/apache-superset/). This repository
|
||||
also includes Superset's main Javascript bundles and react apps under
|
||||
the [superset/assets](https://github.com/apache/incubator-superset/tree/master/superset/assets)
|
||||
the [superset-frontend](https://github.com/apache/incubator-superset/tree/master/superset-frontend)
|
||||
folder.
|
||||
- [apache-superset/superset-ui](https://github.com/apache-superset/superset-ui)
|
||||
contains core Superset's
|
||||
|
|
@ -322,15 +322,15 @@ Then, [open a pull request](https://help.github.com/articles/about-pull-requests
|
|||
If you're adding new images to the documentation, you'll notice that the images
|
||||
referenced in the rst, e.g.
|
||||
|
||||
.. image:: _static/img/tutorial/tutorial_01_sources_database.png
|
||||
.. image:: _static/images/tutorial/tutorial_01_sources_database.png
|
||||
|
||||
aren't actually stored in that directory. Instead, you should add and commit
|
||||
images (and any other static assets) to the `superset/assets/images` directory.
|
||||
images (and any other static assets) to the `superset-frontend/images` directory.
|
||||
When the docs are deployed to https://superset.incubator.apache.org/, images
|
||||
are copied from there to the `_static/img` directory, just like they're referenced
|
||||
are copied from there to the `_static/images` directory, just like they're referenced
|
||||
in the docs.
|
||||
|
||||
For example, the image referenced above actually lives in `superset/assets/images/tutorial`. Since the image is moved during the documentation build process, the docs reference the image in `_static/img/tutorial` instead.
|
||||
For example, the image referenced above actually lives in `superset-frontend/images/tutorial`. Since the image is moved during the documentation build process, the docs reference the image in `_static/images/tutorial` instead.
|
||||
|
||||
#### API documentation
|
||||
|
||||
|
|
@ -418,7 +418,7 @@ app.logger.info(form_data)
|
|||
|
||||
### Frontend Assets
|
||||
|
||||
Frontend assets (JavaScript, CSS, and images) must be compiled in order to properly display the web UI. The `superset/assets` directory contains all NPM-managed front end assets. Note that there are additional frontend assets bundled with Flask-Appbuilder (e.g. jQuery and bootstrap); these are not managed by NPM, and may be phased out in the future.
|
||||
Frontend assets (JavaScript, CSS, and images) must be compiled in order to properly display the web UI. The `superset-frontend` directory contains all NPM-managed front end assets. Note that there are additional frontend assets bundled with Flask-Appbuilder (e.g. jQuery and bootstrap); these are not managed by NPM, and may be phased out in the future.
|
||||
|
||||
#### nvm and node
|
||||
|
||||
|
|
@ -437,7 +437,7 @@ Install third-party dependencies listed in `package.json`:
|
|||
|
||||
```bash
|
||||
# From the root of the repository
|
||||
cd superset/assets
|
||||
cd superset-frontend
|
||||
|
||||
# Install dependencies from `package-lock.json`
|
||||
npm ci
|
||||
|
|
@ -481,7 +481,7 @@ See docs [here](docker/README.md)
|
|||
#### Updating NPM packages
|
||||
|
||||
Use npm in the prescribed way, making sure that
|
||||
`superset/assets/package-lock.json` is updated according to `npm`-prescribed
|
||||
`superset-frontend/package-lock.json` is updated according to `npm`-prescribed
|
||||
best practices.
|
||||
|
||||
#### Feature flags
|
||||
|
|
@ -494,7 +494,7 @@ FEATURE_FLAGS = {
|
|||
}
|
||||
```
|
||||
|
||||
If you want to use the same flag in the client code, also add it to the FeatureFlag TypeScript enum in `superset/assets/src/featureFlags.ts`. For example,
|
||||
If you want to use the same flag in the client code, also add it to the FeatureFlag TypeScript enum in `superset-frontend/src/featureFlags.ts`. For example,
|
||||
|
||||
```
|
||||
export enum FeatureFlag {
|
||||
|
|
@ -524,7 +524,7 @@ Lint the project with:
|
|||
tox -e flake8
|
||||
|
||||
# for javascript
|
||||
cd superset/assets
|
||||
cd superset-frontend
|
||||
npm ci
|
||||
npm run lint
|
||||
```
|
||||
|
|
@ -616,7 +616,7 @@ def sqrt(x: Union[float, int]) -> Union[float, int]:
|
|||
We use [Jest](https://jestjs.io/) and [Enzyme](https://airbnb.io/enzyme/) to test Javascript. Tests can be run with:
|
||||
|
||||
```bash
|
||||
cd superset/assets
|
||||
cd superset-frontend
|
||||
npm run test
|
||||
```
|
||||
|
||||
|
|
@ -636,7 +636,7 @@ superset run --port 8081
|
|||
Run Cypress tests:
|
||||
|
||||
```bash
|
||||
cd superset/assets
|
||||
cd superset-frontend
|
||||
npm run build
|
||||
|
||||
cd cypress-base
|
||||
|
|
@ -653,7 +653,7 @@ npm run cypress run -- --spec cypress/integration/dashboard/index.test.js --conf
|
|||
npm run cypress open
|
||||
```
|
||||
|
||||
See [`superset/assets/cypress_build.sh`](https://github.com/apache/incubator-superset/blob/master/superset/assets/cypress_build.sh).
|
||||
See [`superset-frontend/cypress_build.sh`](https://github.com/apache/incubator-superset/blob/master/superset-frontend/cypress_build.sh).
|
||||
|
||||
## Translating
|
||||
|
||||
|
|
|
|||
12
Dockerfile
|
|
@ -42,15 +42,15 @@ RUN cd /app \
|
|||
FROM node:10-jessie AS superset-node
|
||||
|
||||
# NPM ci first, as to NOT invalidate previous steps except for when package.json changes
|
||||
RUN mkdir -p /app/superset/assets
|
||||
COPY ./superset/assets/package* /app/superset/assets/
|
||||
RUN cd /app/superset/assets \
|
||||
RUN mkdir -p /app/superset-frontend
|
||||
COPY ./superset-frontend/package* /app/superset-frontend/
|
||||
RUN cd /app/superset-frontend \
|
||||
&& npm ci
|
||||
|
||||
# Next, copy in the rest and let webpack do its thing
|
||||
COPY ./superset/assets /app/superset/assets
|
||||
COPY ./superset-frontend /app/superset-frontend
|
||||
# This is BY FAR the most expensive step (thanks Terser!)
|
||||
RUN cd /app/superset/assets \
|
||||
RUN cd /app/superset-frontend \
|
||||
&& npm run build \
|
||||
&& rm -rf node_modules
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ RUN useradd --user-group --no-create-home --no-log-init --shell /bin/bash supers
|
|||
COPY --from=superset-py /usr/local/lib/python3.6/site-packages/ /usr/local/lib/python3.6/site-packages/
|
||||
# Copying site-packages doesn't move the CLIs, so let's copy them one by one
|
||||
COPY --from=superset-py /usr/local/bin/gunicorn /usr/local/bin/celery /usr/local/bin/flask /usr/bin/
|
||||
COPY --from=superset-node /app/superset/assets /app/superset/assets
|
||||
COPY --from=superset-node /app/superset-frontend /app/superset-frontend
|
||||
|
||||
## Lastly, let's install superset itself
|
||||
COPY superset /app/superset
|
||||
|
|
|
|||
13
MANIFEST.in
|
|
@ -20,18 +20,7 @@ graft licenses/
|
|||
include README.md
|
||||
recursive-include superset/examples *
|
||||
recursive-include superset/migrations *
|
||||
|
||||
include superset/assets/package.json
|
||||
|
||||
# Whitelist anything that needs to be added to the static bundle
|
||||
recursive-exclude superset/static *
|
||||
recursive-include superset/static/assets/branding *
|
||||
recursive-include superset/static/assets/dist *
|
||||
recursive-include superset/static/assets/images *
|
||||
recursive-exclude superset/static/images/viz_thumbnails_large *
|
||||
recursive-include superset/static/assets/stylesheets *
|
||||
include superset/static/assets/version_info.json
|
||||
|
||||
recursive-include superset/templates *
|
||||
recursive-include superset/translations *
|
||||
recursive-include superset/static *
|
||||
recursive-exclude tests *
|
||||
|
|
|
|||
12
README.md
|
|
@ -25,7 +25,7 @@ Superset
|
|||
[](https://pypi.python.org/pypi/apache-superset)
|
||||
[](https://join.slack.com/t/apache-superset/shared_invite/enQtNDMxMDY5NjM4MDU0LWJmOTcxYjlhZTRhYmEyYTMzOWYxOWEwMjcwZDZiNWRiNDY2NDUwNzcwMDFhNzE1ZmMxZTZlZWY0ZTQ2MzMyNTU)
|
||||
[](https://superset.incubator.apache.org)
|
||||
[](https://david-dm.org/apache/incubator-superset?path=superset/assets)
|
||||
[](https://david-dm.org/apache/incubator-superset?path=superset-frontend)
|
||||
|
||||
<img
|
||||
src="https://cloud.githubusercontent.com/assets/130878/20946612/49a8a25c-bbc0-11e6-8314-10bef902af51.png"
|
||||
|
|
@ -42,23 +42,23 @@ Screenshots & Gifs
|
|||
|
||||
**View Dashboards**
|
||||
|
||||
<kbd><img title="View Dashboards" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset/assets/images/screenshots/bank_dash.png"></kbd><br/>
|
||||
<kbd><img title="View Dashboards" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset-frontend/images/screenshots/bank_dash.png"></kbd><br/>
|
||||
|
||||
**Slice & dice your data**
|
||||
|
||||
<kbd><img title="Slice & dice your data" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset/assets/images/screenshots/explore.png"></kbd><br/>
|
||||
<kbd><img title="Slice & dice your data" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset-frontend/images/screenshots/explore.png"></kbd><br/>
|
||||
|
||||
**Query and visualize your data with SQL Lab**
|
||||
|
||||
<kbd><img title="SQL Lab" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset/assets/images/screenshots/sqllab.png"></kbd><br/>
|
||||
<kbd><img title="SQL Lab" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset-frontend/images/screenshots/sqllab.png"></kbd><br/>
|
||||
|
||||
**Visualize geospatial data with deck.gl**
|
||||
|
||||
<kbd><img title="Geospatial" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset/assets/images/screenshots/deckgl_dash.png"></kbd><br/>
|
||||
<kbd><img title="Geospatial" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset-frontend/images/screenshots/deckgl_dash.png"></kbd><br/>
|
||||
|
||||
**Choose from a wide array of visualizations**
|
||||
|
||||
<kbd><img title="Visualizations" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset/assets/images/screenshots/visualizations.png"></kbd><br/>
|
||||
<kbd><img title="Visualizations" src="https://raw.githubusercontent.com/apache/incubator-superset/master/superset-frontend/images/screenshots/visualizations.png"></kbd><br/>
|
||||
|
||||
Apache Superset
|
||||
---------------
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ ARG SUPERSET_RELEASE_RC_TARBALL
|
|||
# Can fetch source from svn or copy tarball from local mounted directory
|
||||
COPY $SUPERSET_RELEASE_RC_TARBALL ./
|
||||
RUN tar -xvf *.tar.gz
|
||||
WORKDIR /home/superset/apache-superset-incubating-$VERSION/superset/assets
|
||||
WORKDIR /home/superset/apache-superset-incubating-$VERSION/superset-frontend
|
||||
|
||||
RUN npm ci \
|
||||
&& npm run build \
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ RUN svn co https://dist.apache.org/repos/dist/dev/incubator/superset/$VERSION ./
|
|||
RUN tar -xvf *.tar.gz
|
||||
WORKDIR apache-superset-incubating-$VERSION
|
||||
|
||||
RUN cd superset/assets \
|
||||
RUN cd superset-frontend \
|
||||
&& npm ci \
|
||||
&& npm run build \
|
||||
&& rm -rf node_modules
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ deprecations and upgrading-related topics,
|
|||
make sure to move the content now under the `Next Version` section under a new
|
||||
section for the new release.
|
||||
|
||||
Finally bump the version number on `superset/static/assets/package.json`:
|
||||
Finally bump the version number on `superset-frontend/package.json`:
|
||||
|
||||
```json
|
||||
"version": "0.34.1"
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ mkdir -p "${HOME}/${SUPERSET_VERSION_RC}"
|
|||
cd incubator-superset && \
|
||||
|
||||
# Check RC version
|
||||
if ! jq -e --arg SUPERSET_VERSION $SUPERSET_VERSION '.version == $SUPERSET_VERSION' superset/assets/package.json
|
||||
if ! jq -e --arg SUPERSET_VERSION $SUPERSET_VERSION '.version == $SUPERSET_VERSION' superset-frontend/package.json
|
||||
then
|
||||
SOURCE_VERSION=$(jq '.version' superset/assets/package.json)
|
||||
SOURCE_VERSION=$(jq '.version' superset-frontend/package.json)
|
||||
echo "Source package.json version is wrong, found: ${SOURCE_VERSION} should be: ${SUPERSET_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ services:
|
|||
|
||||
superset-node:
|
||||
image: node:10-jessie
|
||||
command: ["bash", "-c", "cd /app/superset/assets && npm install && npm run dev"]
|
||||
command: ["bash", "-c", "cd /app/superset-frontend && npm install && npm run dev"]
|
||||
env_file: docker/.env
|
||||
depends_on: *superset-depends-on
|
||||
volumes: *superset-volumes
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ we use here.
|
|||
|
||||
Under the **Sources** menu, select the *Databases* option:
|
||||
|
||||
.. image:: images/tutorial/tutorial_01_sources_database.png
|
||||
.. image:: _static/images/tutorial/tutorial_01_sources_database.png
|
||||
:scale: 70%
|
||||
|
||||
On the resulting page, click on the green plus sign, near the top right:
|
||||
|
||||
.. image:: images/tutorial/tutorial_02_add_database.png
|
||||
.. image:: _static/images/tutorial/tutorial_02_add_database.png
|
||||
:scale: 70%
|
||||
|
||||
You can configure a number of advanced options on this page, but for
|
||||
|
|
@ -50,12 +50,12 @@ this walkthrough, you’ll only need to do **two things**:
|
|||
|
||||
1. Name your database connection:
|
||||
|
||||
.. image:: images/tutorial/tutorial_03_database_name.png
|
||||
.. image:: _static/images/tutorial/tutorial_03_database_name.png
|
||||
:scale: 70%
|
||||
|
||||
2. Provide the SQLAlchemy Connection URI and test the connection:
|
||||
|
||||
.. image:: images/tutorial/tutorial_04_sqlalchemy_connection_string.png
|
||||
.. image:: _static/images/tutorial/tutorial_04_sqlalchemy_connection_string.png
|
||||
:scale: 70%
|
||||
|
||||
This example shows the connection string for our test weather database.
|
||||
|
|
@ -68,19 +68,19 @@ Click the **Test Connection** button to confirm things work end to end.
|
|||
Once Superset can successfully connect and authenticate, you should see
|
||||
a popup like this:
|
||||
|
||||
.. image:: images/tutorial/tutorial_05_connection_popup.png
|
||||
.. image:: _static/images/tutorial/tutorial_05_connection_popup.png
|
||||
:scale: 50%
|
||||
|
||||
Moreover, you should also see the list of tables Superset can read from
|
||||
the schema you’re connected to, at the bottom of the page:
|
||||
|
||||
.. image:: images/tutorial/tutorial_06_list_of_tables.png
|
||||
.. image:: _static/images/tutorial/tutorial_06_list_of_tables.png
|
||||
:scale: 70%
|
||||
|
||||
If the connection looks good, save the configuration by clicking the **Save**
|
||||
button at the bottom of the page:
|
||||
|
||||
.. image:: images/tutorial/tutorial_07_save_button.png
|
||||
.. image:: _static/images/tutorial/tutorial_07_save_button.png
|
||||
:scale: 70%
|
||||
|
||||
Adding a new table
|
||||
|
|
@ -91,25 +91,25 @@ to Superset that you’d like to query.
|
|||
|
||||
Under the **Sources** menu, select the *Tables* option:
|
||||
|
||||
.. image:: images/tutorial/tutorial_08_sources_tables.png
|
||||
.. image:: _static/images/tutorial/tutorial_08_sources_tables.png
|
||||
:scale: 70%
|
||||
|
||||
On the resulting page, click on the green plus sign, near the top left:
|
||||
|
||||
.. image:: images/tutorial/tutorial_09_add_new_table.png
|
||||
.. image:: _static/images/tutorial/tutorial_09_add_new_table.png
|
||||
:scale: 70%
|
||||
|
||||
You only need a few pieces of information to add a new table to Superset:
|
||||
|
||||
* The name of the table
|
||||
|
||||
.. image:: images/tutorial/tutorial_10_table_name.png
|
||||
.. image:: _static/images/tutorial/tutorial_10_table_name.png
|
||||
:scale: 70%
|
||||
|
||||
* The target database from the **Database** drop-down menu (i.e. the one
|
||||
you just added above)
|
||||
|
||||
.. image:: images/tutorial/tutorial_11_choose_db.png
|
||||
.. image:: _static/images/tutorial/tutorial_11_choose_db.png
|
||||
:scale: 70%
|
||||
|
||||
* Optionally, the database schema. If the table exists in the “default” schema
|
||||
|
|
@ -118,13 +118,13 @@ You only need a few pieces of information to add a new table to Superset:
|
|||
|
||||
Click on the **Save** button to save the configuration:
|
||||
|
||||
.. image:: images/tutorial/tutorial_07_save_button.png
|
||||
.. image:: _static/images/tutorial/tutorial_07_save_button.png
|
||||
:scale: 70%
|
||||
|
||||
When redirected back to the list of tables, you should see a message indicating
|
||||
that your table was created:
|
||||
|
||||
.. image:: images/tutorial/tutorial_12_table_creation_success_msg.png
|
||||
.. image:: _static/images/tutorial/tutorial_12_table_creation_success_msg.png
|
||||
:scale: 70%
|
||||
|
||||
This message also directs you to edit the table configuration. We’ll edit a limited
|
||||
|
|
@ -133,7 +133,7 @@ a more advanced tutorial.
|
|||
|
||||
Click on the edit button next to the table you’ve created:
|
||||
|
||||
.. image:: images/tutorial/tutorial_13_edit_table_config.png
|
||||
.. image:: _static/images/tutorial/tutorial_13_edit_table_config.png
|
||||
:scale: 70%
|
||||
|
||||
On the resulting page, click on the **List Table Column** tab. Here, you’ll define the
|
||||
|
|
@ -153,7 +153,7 @@ Here’s how we’ve configured fields for the weather data. Even for measures l
|
|||
weather measurements (precipitation, snowfall, etc.), it’s ideal to group and filter
|
||||
by these values:
|
||||
|
||||
.. image:: images/tutorial/tutorial_14_field_config.png
|
||||
.. image:: _static/images/tutorial/tutorial_14_field_config.png
|
||||
|
||||
As with the configurations above, click the **Save** button to save these settings.
|
||||
|
||||
|
|
@ -163,17 +163,17 @@ Exploring your data
|
|||
To start exploring your data, simply click on the table name you just created in
|
||||
the list of available tables:
|
||||
|
||||
.. image:: images/tutorial/tutorial_15_click_table_name.png
|
||||
.. image:: _static/images/tutorial/tutorial_15_click_table_name.png
|
||||
|
||||
By default, you’ll be presented with a Table View:
|
||||
|
||||
.. image:: images/tutorial/tutorial_16_datasource_chart_type.png
|
||||
.. image:: _static/images/tutorial/tutorial_16_datasource_chart_type.png
|
||||
|
||||
Let’s walk through a basic query to get the count of all records in our table.
|
||||
First, we’ll need to change the **Since** filter to capture the range of our data.
|
||||
You can use simple phrases to apply these filters, like "3 years ago":
|
||||
|
||||
.. image:: images/tutorial/tutorial_17_choose_time_range.png
|
||||
.. image:: _static/images/tutorial/tutorial_17_choose_time_range.png
|
||||
|
||||
The upper limit for time, the **Until** filter, defaults to "now", which may or may
|
||||
not be what you want.
|
||||
|
|
@ -181,25 +181,25 @@ not be what you want.
|
|||
Look for the Metrics section under the **GROUP BY** header, and start typing "Count"
|
||||
- you’ll see a list of metrics matching what you type:
|
||||
|
||||
.. image:: images/tutorial/tutorial_18_choose_metric.png
|
||||
.. image:: _static/images/tutorial/tutorial_18_choose_metric.png
|
||||
|
||||
Select the *COUNT(\*)* metric, then click the green **Query** button near the top
|
||||
of the explore:
|
||||
|
||||
.. image:: images/tutorial/tutorial_19_click_query.png
|
||||
.. image:: _static/images/tutorial/tutorial_19_click_query.png
|
||||
|
||||
You’ll see your results in the table:
|
||||
|
||||
.. image:: images/tutorial/tutorial_20_count_star_result.png
|
||||
.. image:: _static/images/tutorial/tutorial_20_count_star_result.png
|
||||
|
||||
Let’s group this by the *weather_description* field to get the count of records by
|
||||
the type of weather recorded by adding it to the *Group by* section:
|
||||
|
||||
.. image:: images/tutorial/tutorial_21_group_by.png
|
||||
.. image:: _static/images/tutorial/tutorial_21_group_by.png
|
||||
|
||||
and run the query:
|
||||
|
||||
.. image:: images/tutorial/tutorial_22_group_by_result.png
|
||||
.. image:: _static/images/tutorial/tutorial_22_group_by_result.png
|
||||
|
||||
Let’s find a more useful data point: the top 10 times and places that recorded the
|
||||
highest temperature in 2015.
|
||||
|
|
@ -207,11 +207,11 @@ highest temperature in 2015.
|
|||
We replace *weather_description* with *latitude*, *longitude* and *measurement_date* in the
|
||||
*Group by* section:
|
||||
|
||||
.. image:: images/tutorial/tutorial_23_group_by_more_dimensions.png
|
||||
.. image:: _static/images/tutorial/tutorial_23_group_by_more_dimensions.png
|
||||
|
||||
And replace *COUNT(\*)* with *max__measurement_flag*:
|
||||
|
||||
.. image:: images/tutorial/tutorial_24_max_metric.png
|
||||
.. image:: _static/images/tutorial/tutorial_24_max_metric.png
|
||||
|
||||
The *max__measurement_flag* metric was created when we checked the box under **Max** and
|
||||
next to the *measurement_flag* field, indicating that this field was numeric and that
|
||||
|
|
@ -223,16 +223,16 @@ precipitation and temperature). Therefore, we must filter our query only on reco
|
|||
where the *weather_description* is equal to "Maximum temperature", which we do in
|
||||
the **Filters** section at the bottom of the explore:
|
||||
|
||||
.. image:: images/tutorial/tutorial_25_max_temp_filter.png
|
||||
.. image:: _static/images/tutorial/tutorial_25_max_temp_filter.png
|
||||
|
||||
Finally, since we only care about the top 10 measurements, we limit our results to
|
||||
10 records using the *Row limit* option under the **Options** header:
|
||||
|
||||
.. image:: images/tutorial/tutorial_26_row_limit.png
|
||||
.. image:: _static/images/tutorial/tutorial_26_row_limit.png
|
||||
|
||||
We click **Query** and get the following results:
|
||||
|
||||
.. image:: images/tutorial/tutorial_27_top_10_max_temps.png
|
||||
.. image:: _static/images/tutorial/tutorial_27_top_10_max_temps.png
|
||||
|
||||
In this dataset, the maximum temperature is recorded in tenths of a degree Celsius.
|
||||
The top value of 1370, measured in the middle of Nevada, is equal to 137 C, or roughly
|
||||
|
|
@ -257,20 +257,20 @@ a dashboard.
|
|||
|
||||
We change the Chart Type to "Distribution - Bar Chart":
|
||||
|
||||
.. image:: images/tutorial/tutorial_28_bar_chart.png
|
||||
.. image:: _static/images/tutorial/tutorial_28_bar_chart.png
|
||||
|
||||
Our filter on Maximum temperature measurements was retained, but the query and
|
||||
formatting options are dependent on the chart type, so you’ll have to set the
|
||||
values again:
|
||||
|
||||
.. image:: images/tutorial/tutorial_29_bar_chart_series_metrics.png
|
||||
.. image:: _static/images/tutorial/tutorial_29_bar_chart_series_metrics.png
|
||||
|
||||
You should note the extensive formatting options for this chart: the ability to
|
||||
set axis labels, margins, ticks, etc. To make the data presentable to a broad
|
||||
audience, you’ll want to apply many of these to slices that end up in dashboards.
|
||||
For now, though, we run our query and get the following chart:
|
||||
|
||||
.. image:: images/tutorial/tutorial_30_bar_chart_results.png
|
||||
.. image:: _static/images/tutorial/tutorial_30_bar_chart_results.png
|
||||
:scale: 70%
|
||||
|
||||
Creating a slice and dashboard
|
||||
|
|
@ -282,39 +282,39 @@ a saved query is called a **Slice**.
|
|||
To create a slice, click the **Save as** button near the top-left of the
|
||||
explore:
|
||||
|
||||
.. image:: images/tutorial/tutorial_19_click_query.png
|
||||
.. image:: _static/images/tutorial/tutorial_19_click_query.png
|
||||
|
||||
A popup should appear, asking you to name the slice, and optionally add it to a
|
||||
dashboard. Since we haven’t yet created any dashboards, we can create one and
|
||||
immediately add our slice to it. Let’s do it:
|
||||
|
||||
.. image:: images/tutorial/tutorial_31_save_slice_to_dashboard.png
|
||||
.. image:: _static/images/tutorial/tutorial_31_save_slice_to_dashboard.png
|
||||
:scale: 70%
|
||||
|
||||
Click Save, which will direct you back to your original query. We see that
|
||||
our slice and dashboard were successfully created:
|
||||
|
||||
.. image:: images/tutorial/tutorial_32_save_slice_confirmation.png
|
||||
.. image:: _static/images/tutorial/tutorial_32_save_slice_confirmation.png
|
||||
:scale: 70%
|
||||
|
||||
Let’s check out our new dashboard. We click on the **Dashboards** menu:
|
||||
|
||||
.. image:: images/tutorial/tutorial_33_dashboard.png
|
||||
.. image:: _static/images/tutorial/tutorial_33_dashboard.png
|
||||
|
||||
and find the dashboard we just created:
|
||||
|
||||
.. image:: images/tutorial/tutorial_34_weather_dashboard.png
|
||||
.. image:: _static/images/tutorial/tutorial_34_weather_dashboard.png
|
||||
|
||||
Things seemed to have worked - our slice is here!
|
||||
|
||||
.. image:: images/tutorial/tutorial_35_slice_on_dashboard.png
|
||||
.. image:: _static/images/tutorial/tutorial_35_slice_on_dashboard.png
|
||||
:scale: 70%
|
||||
|
||||
But it’s a bit smaller than we might like. Luckily, you can adjust the size
|
||||
of slices in a dashboard by clicking, holding and dragging the bottom-right
|
||||
corner to your desired dimensions:
|
||||
|
||||
.. image:: images/tutorial/tutorial_36_adjust_dimensions.gif
|
||||
.. image:: _static/images/tutorial/tutorial_36_adjust_dimensions.gif
|
||||
:scale: 120%
|
||||
|
||||
After adjusting the size, you’ll be asked to click on the icon near the
|
||||
|
|
|
|||
|
|
@ -16,8 +16,9 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
rm -rf _build
|
||||
cp -r ../superset-frontend/images/ _static/images/
|
||||
make html
|
||||
#cp -r ../superset/assets/images/ _build/html/_static/img/
|
||||
cp -r ../superset/assets/images/ _static/img/
|
||||
#cp -r ../superset-frontend/images/ _build/html/_static/img/
|
||||
rm -rf /tmp/superset-docs
|
||||
cp -r _build/html /tmp/superset-docs
|
||||
cp -r _build/html ../superset/static/assets/docs
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ element corresponds to Druid aggregation definition. You can create your own
|
|||
aggregations manually from the ``List Druid Metric`` tab following Druid
|
||||
documentation.
|
||||
|
||||
.. image:: images/druid_agg.png
|
||||
.. image:: _static/images/druid_agg.png
|
||||
:scale: 50 %
|
||||
|
||||
Post-Aggregations
|
||||
|
|
|
|||
|
|
@ -18,190 +18,189 @@
|
|||
Visualizations Gallery
|
||||
======================
|
||||
|
||||
.. image:: images/viz_thumbnails/area.png
|
||||
.. image:: _static/images/viz_thumbnails/area.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/bar.png
|
||||
.. image:: _static/images/viz_thumbnails/bar.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/big_number.png
|
||||
.. image:: _static/images/viz_thumbnails/big_number.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/big_number_total.png
|
||||
.. image:: _static/images/viz_thumbnails/big_number_total.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/box_plot.png
|
||||
.. image:: _static/images/viz_thumbnails/box_plot.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/bubble.png
|
||||
.. image:: _static/images/viz_thumbnails/bubble.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/bullet.png
|
||||
.. image:: _static/images/viz_thumbnails/bullet.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/cal_heatmap.png
|
||||
.. image:: _static/images/viz_thumbnails/cal_heatmap.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/chord.png
|
||||
.. image:: _static/images/viz_thumbnails/chord.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/compare.png
|
||||
.. image:: _static/images/viz_thumbnails/compare.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/country_map.png
|
||||
.. image:: _static/images/viz_thumbnails/country_map.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/deck_arc.png
|
||||
.. image:: _static/images/viz_thumbnails/deck_arc.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/deck_geojson.png
|
||||
.. image:: _static/images/viz_thumbnails/deck_geojson.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/deck_grid.png
|
||||
.. image:: _static/images/viz_thumbnails/deck_grid.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/deck_hex.png
|
||||
.. image:: _static/images/viz_thumbnails/deck_hex.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/deck_multi.png
|
||||
.. image:: _static/images/viz_thumbnails/deck_multi.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/deck_path.png
|
||||
.. image:: _static/images/viz_thumbnails/deck_path.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/deck_polygon.png
|
||||
.. image:: _static/images/viz_thumbnails/deck_polygon.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/deck_scatter.png
|
||||
.. image:: _static/images/viz_thumbnails/deck_scatter.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/deck_screengrid.png
|
||||
.. image:: _static/images/viz_thumbnails/deck_screengrid.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/directed_force.png
|
||||
.. image:: _static/images/viz_thumbnails/directed_force.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/dist_bar.png
|
||||
.. image:: _static/images/viz_thumbnails/dist_bar.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/dual_line.png
|
||||
.. image:: _static/images/viz_thumbnails/dual_line.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/event_flow.png
|
||||
.. image:: _static/images/viz_thumbnails/event_flow.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/filter_box.png
|
||||
.. image:: _static/images/viz_thumbnails/filter_box.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/heatmap.png
|
||||
.. image:: _static/images/viz_thumbnails/heatmap.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/histogram.png
|
||||
.. image:: _static/images/viz_thumbnails/histogram.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/horizon.png
|
||||
.. image:: _static/images/viz_thumbnails/horizon.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/iframe.png
|
||||
.. image:: _static/images/viz_thumbnails/iframe.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/line.png
|
||||
.. image:: _static/images/viz_thumbnails/line.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/mapbox.png
|
||||
.. image:: _static/images/viz_thumbnails/mapbox.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/markup.png
|
||||
.. image:: _static/images/viz_thumbnails/markup.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/paired_ttest.png
|
||||
.. image:: _static/images/viz_thumbnails/paired_ttest.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/para.png
|
||||
.. image:: _static/images/viz_thumbnails/para.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/partition.png
|
||||
.. image:: _static/images/viz_thumbnails/partition.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/pie.png
|
||||
.. image:: _static/images/viz_thumbnails/pie.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/pivot_table.png
|
||||
.. image:: _static/images/viz_thumbnails/pivot_table.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/rose.png
|
||||
.. image:: _static/images/viz_thumbnails/rose.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/sankey.png
|
||||
.. image:: _static/images/viz_thumbnails/sankey.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/separator.png
|
||||
.. image:: _static/images/viz_thumbnails/separator.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/sunburst.png
|
||||
.. image:: _static/images/viz_thumbnails/sunburst.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/table.png
|
||||
.. image:: _static/images/viz_thumbnails/table.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/time_pivot.png
|
||||
.. image:: _static/images/viz_thumbnails/time_pivot.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/time_table.png
|
||||
.. image:: _static/images/viz_thumbnails/time_table.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/treemap.png
|
||||
.. image:: _static/images/viz_thumbnails/treemap.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/word_cloud.png
|
||||
.. image:: _static/images/viz_thumbnails/word_cloud.png
|
||||
:scale: 25 %
|
||||
|
||||
|
||||
.. image:: images/viz_thumbnails/world_map.png
|
||||
.. image:: _static/images/viz_thumbnails/world_map.png
|
||||
:scale: 25 %
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
../superset/assets/images/
|
||||
../superset-frontend/images
|
||||
|
|
@ -17,12 +17,12 @@
|
|||
|
||||
|apache_img| |superset_img|
|
||||
|
||||
.. |apache_img| image:: images/apache_feather.png
|
||||
.. |apache_img| image:: _static/images/apache_feather.png
|
||||
:width: 7%
|
||||
:target: http://www.apache.org/
|
||||
:alt: The Apache Software Foundation
|
||||
|
||||
.. |superset_img| image:: images/s.png
|
||||
.. |superset_img| image:: _static/images/s.png
|
||||
:width: 25%
|
||||
|
||||
Apache Superset (incubating)
|
||||
|
|
@ -134,19 +134,19 @@ be supported as well.
|
|||
Screenshots
|
||||
-----------
|
||||
|
||||
.. image:: images/screenshots/bank_dash.png
|
||||
.. image:: _static/images/screenshots/bank_dash.png
|
||||
|
||||
------
|
||||
|
||||
.. image:: images/screenshots/explore.png
|
||||
.. image:: _static/images/screenshots/explore.png
|
||||
|
||||
------
|
||||
|
||||
.. image:: images/screenshots/sqllab.png
|
||||
.. image:: _static/images/screenshots/sqllab.png
|
||||
|
||||
------
|
||||
|
||||
.. image:: images/screenshots/deckgl_dash.png
|
||||
.. image:: _static/images/screenshots/deckgl_dash.png
|
||||
|
||||
------
|
||||
|
||||
|
|
|
|||
|
|
@ -648,7 +648,7 @@ It is possible to tweak the database connection information using the
|
|||
parameters exposed by SQLAlchemy. In the ``Database`` edit view, you will
|
||||
find an ``extra`` field as a ``JSON`` blob.
|
||||
|
||||
.. image:: images/tutorial/add_db.png
|
||||
.. image:: _static/images/tutorial/add_db.png
|
||||
:scale: 30 %
|
||||
|
||||
This JSON string contains extra configuration elements. The ``engine_params``
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ sure the users with limited access have [only] the Gamma role assigned to
|
|||
them. Second, create a new role (``Menu -> Security -> List Roles``) and
|
||||
click the ``+`` sign.
|
||||
|
||||
.. image:: images/create_role.png
|
||||
.. image:: _static/images/create_role.png
|
||||
:scale: 50 %
|
||||
|
||||
This new window allows you to give this new role a name, attribute it to users
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ SQL Lab is a modern, feature-rich SQL IDE written in
|
|||
|
||||
------
|
||||
|
||||
.. image:: images/screenshots/sqllab.png
|
||||
.. image:: _static/images/screenshots/sqllab.png
|
||||
|
||||
------
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ In the top menu, select :menuselection:`Sources --> Databases`. Find the
|
|||
:guilabel:`examples` database in the list and select the edit record
|
||||
button.
|
||||
|
||||
.. image:: images/usertutorial/edit-record.png
|
||||
.. image:: _static/images/usertutorial/edit-record.png
|
||||
|
||||
Within the :guilabel:`Edit Database` page, check the
|
||||
:guilabel:`Allow Csv Upload` checkbox.
|
||||
|
|
@ -59,17 +59,17 @@ Download the data for this tutorial to your computer from
|
|||
|
||||
In the top menu, select :menuselection:`Sources --> Upload a CSV`.
|
||||
|
||||
.. image:: images/usertutorial/upload_a_csv.png
|
||||
.. image:: _static/images/usertutorial/upload_a_csv.png
|
||||
|
||||
Then, enter the :guilabel:`Table name` as `tutorial_flights`
|
||||
and select the :guilabel:`CSV file` from your computer.
|
||||
|
||||
.. image:: images/usertutorial/csv_to_database_configuration.png
|
||||
.. image:: _static/images/usertutorial/csv_to_database_configuration.png
|
||||
|
||||
Next enter the text `Travel Date` into the
|
||||
:guilabel:`Parse Dates` field.
|
||||
|
||||
.. image:: images/usertutorial/parse_dates_column.png
|
||||
.. image:: _static/images/usertutorial/parse_dates_column.png
|
||||
|
||||
Leaving all the other options in their default settings, select
|
||||
:guilabel:`Save` at the bottom of the page.
|
||||
|
|
@ -82,17 +82,17 @@ the number of flights and cost per travel class.
|
|||
|
||||
To create a new chart, select the :menuselection:`New --> Chart`.
|
||||
|
||||
.. image:: images/usertutorial/add_new_chart.png
|
||||
.. image:: _static/images/usertutorial/add_new_chart.png
|
||||
|
||||
Once in the :guilabel:`Create a new chart` dialogue, select
|
||||
:guilabel:`tutorial_flights` from the :guilabel:`Chose a datasource`
|
||||
dropdown.
|
||||
|
||||
.. image:: images/usertutorial/chose_a_datasource.png
|
||||
.. image:: _static/images/usertutorial/chose_a_datasource.png
|
||||
|
||||
Next, select the visualization type as :guilabel:`Table`.
|
||||
|
||||
.. image:: images/usertutorial/select_table_visualization_type.png
|
||||
.. image:: _static/images/usertutorial/select_table_visualization_type.png
|
||||
|
||||
Then, select :guilabel:`Create new chart` to go into the chart view.
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ within the :guilabel:`Time` section, remove the filter on
|
|||
changing the selection to :guilabel:`No filter`, with a final
|
||||
:guilabel:`OK` to confirm your selection.
|
||||
|
||||
.. image:: images/usertutorial/no_filter_on_time_filter.png
|
||||
.. image:: _static/images/usertutorial/no_filter_on_time_filter.png
|
||||
|
||||
Now, we want to specify the rows in our table by using the
|
||||
:guilabel:`Group by` option. Since in this example, we want to
|
||||
|
|
@ -117,11 +117,11 @@ since we have a row per flight), is already there. To add cost, within
|
|||
:guilabel:`Metrics`, select :guilabel:`Cost`. :guilabel:`Save` the
|
||||
default aggregation option, which is to sum the column.
|
||||
|
||||
.. image:: images/usertutorial/sum_cost_column.png
|
||||
.. image:: _static/images/usertutorial/sum_cost_column.png
|
||||
|
||||
Finally, select :guilabel:`Run Query` to see the results of the table.
|
||||
|
||||
.. image:: images/usertutorial/tutorial_table.png
|
||||
.. image:: _static/images/usertutorial/tutorial_table.png
|
||||
|
||||
Congratulations, you have created your first visualization in Apache
|
||||
Superset!
|
||||
|
|
@ -133,7 +133,7 @@ name as Tutorial Table (you will be able to find it again through the
|
|||
select :guilabel:`Add to new dashboard` and enter `Tutorial Dashboard`.
|
||||
Finally, select :guilabel:`Save & go to dashboard`.
|
||||
|
||||
.. image:: images/usertutorial/save_tutorial_table.png
|
||||
.. image:: _static/images/usertutorial/save_tutorial_table.png
|
||||
|
||||
Dashboard basics
|
||||
----------------
|
||||
|
|
@ -149,7 +149,7 @@ section. Select :guilabel:`Edit dashboard` and then hover over the
|
|||
table. By selecting the bottom right hand corner of the table (the
|
||||
cursor will change too), you can resize it by dragging and dropping.
|
||||
|
||||
.. image:: images/usertutorial/resize_tutorial_table_on_dashboard.png
|
||||
.. image:: _static/images/usertutorial/resize_tutorial_table_on_dashboard.png
|
||||
|
||||
Finally, save your changes by selecting :guilabel:`Save changes` in the
|
||||
top right.
|
||||
|
|
@ -180,7 +180,7 @@ June 2011 respectively by either entering directly the dates or using
|
|||
the calendar widget (by selecting the month name and then the year, you
|
||||
can move more quickly to far away dates).
|
||||
|
||||
.. image:: images/usertutorial/select_dates_pivot_table.png
|
||||
.. image:: _static/images/usertutorial/select_dates_pivot_table.png
|
||||
|
||||
Next, within the :guilabel:`Query` section, remove the default COUNT(*)
|
||||
and add Cost, keeping the default SUM aggregate. Note that Apache
|
||||
|
|
@ -196,7 +196,7 @@ Within :guilabel:`Columns`, select first :guilabel:`Department` and then
|
|||
:guilabel:`Travel Class`. All set – let’s :guilabel:`Run Query` to see
|
||||
some data!
|
||||
|
||||
.. image:: images/usertutorial/tutorial_pivot_table.png
|
||||
.. image:: _static/images/usertutorial/tutorial_pivot_table.png
|
||||
|
||||
You should see months in the rows and Department and Travel Class in the
|
||||
columns. To get this in our dashboard, select :guilabel:`Save`, name the
|
||||
|
|
@ -224,7 +224,7 @@ add :guilabel:`Cost`. This time, we want to change how this column is
|
|||
aggregated to show the mean value: we can do this by selecting
|
||||
:guilabel:`AVG` in the :guilabel:`aggregate` dropdown.
|
||||
|
||||
.. image:: images/usertutorial/average_aggregate_for_cost.png
|
||||
.. image:: _static/images/usertutorial/average_aggregate_for_cost.png
|
||||
|
||||
Next, select :guilabel:`Run Query` to show the data on the chart.
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ filter by selecting No in the :guilabel:`Show Range Filter` drop down
|
|||
and adding some labels using :guilabel:`X Axis Label` and
|
||||
:guilabel:`Y Axis Label`.
|
||||
|
||||
.. image:: images/usertutorial/tutorial_line_chart.png
|
||||
.. image:: _static/images/usertutorial/tutorial_line_chart.png
|
||||
|
||||
Once you’re done, :guilabel:`Save` as Tutorial Line Chart, use
|
||||
:guilabel:`Add chart to
|
||||
|
|
@ -265,7 +265,7 @@ Within the Insert components pane, drag and drop a :guilabel:`Markdown`
|
|||
box on the dashboard. Look for the blue lines which indicate the anchor
|
||||
where the box will go.
|
||||
|
||||
.. image:: images/usertutorial/blue_bar_insert_component.png
|
||||
.. image:: _static/images/usertutorial/blue_bar_insert_component.png
|
||||
|
||||
Now, to edit the text, select the box. You can enter text, in markdown
|
||||
format (see `this Markdown
|
||||
|
|
@ -274,7 +274,7 @@ for more information about this format). You can toggle between
|
|||
:guilabel:`Edit` and :guilabel:`Preview` using the menu on the top of
|
||||
the box.
|
||||
|
||||
.. image:: images/usertutorial/markdown.png
|
||||
.. image:: _static/images/usertutorial/markdown.png
|
||||
|
||||
To exit, select any other part of the dashboard. Finally, don’t forget
|
||||
to keep your changes using :guilabel:`Save changes`.
|
||||
|
|
@ -307,7 +307,7 @@ select :guilabel:`Run Query`. This gives us a preview of our filter.
|
|||
Next, remove the date filter by unchecking the :guilabel:`Date Filter`
|
||||
checkbox.
|
||||
|
||||
.. image:: images/usertutorial/filter_on_origin_country.png
|
||||
.. image:: _static/images/usertutorial/filter_on_origin_country.png
|
||||
|
||||
Finally, select :guilabel:`Save`, name the chart as Tutorial Filter, add
|
||||
the chart to our existing Tutorial Dashboard and then
|
||||
|
|
@ -329,7 +329,7 @@ simply select :guilabel:`Draft` next to the title of your dashboard on
|
|||
the top left to change your dashboard to be in :guilabel:`Published`
|
||||
state. You can also favorite this dashboard by selecting the star.
|
||||
|
||||
.. image:: images/usertutorial/publish_dashboard.png
|
||||
.. image:: _static/images/usertutorial/publish_dashboard.png
|
||||
|
||||
Taking your dashboard further
|
||||
-----------------------------
|
||||
|
|
@ -358,7 +358,7 @@ by selecting the green plus sign. Then, select the
|
|||
:guilabel:`Volcanic Eruptions` layer, add a short description Grímsvötn
|
||||
and the eruption dates (23-25 May 2011) before finally saving.
|
||||
|
||||
.. image:: images/usertutorial/edit_annotation.png
|
||||
.. image:: _static/images/usertutorial/edit_annotation.png
|
||||
|
||||
Then, navigate to the line chart by going to :guilabel:`Charts` then
|
||||
selecting :guilabel:`Tutorial
|
||||
|
|
@ -371,11 +371,11 @@ Line Chart` from the list. Next, go to the
|
|||
- set the :guilabel:`Annotation Source` as :guilabel:`Superset annotation`
|
||||
- specify the :guilabel:`Annotation Layer` as :guilabel:`Volcanic Eruptions`
|
||||
|
||||
.. image:: images/usertutorial/annotation_settings.png
|
||||
.. image:: _static/images/usertutorial/annotation_settings.png
|
||||
|
||||
Select :guilabel:`Apply` to see your annotation shown on the chart.
|
||||
|
||||
.. image:: images/usertutorial/annotation.png
|
||||
.. image:: _static/images/usertutorial/annotation.png
|
||||
|
||||
If you wish, you can change how your annotation looks by changing the
|
||||
settings in the :guilabel:`Display configuration` section. Otherwise,
|
||||
|
|
@ -418,7 +418,7 @@ Next, in the query section, change the :guilabel:`Metrics` to the sum of
|
|||
:guilabel:`Cost`. Select :guilabel:`Run Query` to show the chart. You
|
||||
should see the total cost per day for each month in October 2011.
|
||||
|
||||
.. image:: images/usertutorial/advanced_analytics_base.png
|
||||
.. image:: _static/images/usertutorial/advanced_analytics_base.png
|
||||
|
||||
Finally, save the visualization as Tutorial Advanced Analytics Base,
|
||||
adding it to the Tutorial Dashboard.
|
||||
|
|
@ -443,7 +443,7 @@ After displaying the chart by selecting :guilabel:`Run Query` you will
|
|||
see that the data is less variable and that the series starts later as
|
||||
the ramp up period is excluded.
|
||||
|
||||
.. image:: images/usertutorial/rolling_mean.png
|
||||
.. image:: _static/images/usertutorial/rolling_mean.png
|
||||
|
||||
Save the chart as Tutorial Rolling Mean and add it to the Tutorial
|
||||
Dashboard.
|
||||
|
|
@ -464,14 +464,14 @@ typing in "minus 1 week" (note this box accepts input in natural
|
|||
language). :guilabel:`Run Query` to see the new chart, which has an
|
||||
additional series with the same values, shifted a week back in time.
|
||||
|
||||
.. image:: images/usertutorial/time_comparison_two_series.png
|
||||
.. image:: _static/images/usertutorial/time_comparison_two_series.png
|
||||
|
||||
Then, change the :guilabel:`Calculation type` to
|
||||
:guilabel:`Absolute difference` and select :guilabel:`Run
|
||||
Query`. We can now see only one series again, this time showing the
|
||||
difference between the two series we saw previously.
|
||||
|
||||
.. image:: images/usertutorial/time_comparison_absolute_difference.png
|
||||
.. image:: _static/images/usertutorial/time_comparison_absolute_difference.png
|
||||
|
||||
Save the chart as Tutorial Time Comparison and add it to the Tutorial
|
||||
Dashboard.
|
||||
|
|
@ -488,7 +488,7 @@ Next, in the :guilabel:`Python Functions` subsection of
|
|||
in the :guilabel:`Rule` and median as the :guilabel:`Method` and show
|
||||
the chart by selecting :guilabel:`Run Query`.
|
||||
|
||||
.. image:: images/usertutorial/resample.png
|
||||
.. image:: _static/images/usertutorial/resample.png
|
||||
|
||||
Note that now we have a single data point every 7 days. In our case, the
|
||||
value showed corresponds to the median value within the seven daily data
|
||||
|
|
@ -505,4 +505,3 @@ side and compare the different outputs.
|
|||
.. [#f1] See the Pandas `rolling method documentation <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.rolling.html>`_ for more information.
|
||||
.. [#f2] See the Pandas `cumsum method documentation <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.cumsum.html>`_ for more information.
|
||||
.. [#f3] See the Pandas `resample method documentation <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.resample.html>`_ for more information.
|
||||
|
||||
|
|
|
|||
|
|
@ -1970,11 +1970,11 @@ To add a new country in country map tools, we need to follow the following steps
|
|||
3. You need to convert shapefile to geojson file.
|
||||
This action can make with ogr2ogr tools: https://www.gdal.org/ogr2ogr.html
|
||||
|
||||
4. Put your geojson file in next folder : superset/assets/src/visualizations/CountryMap/countries with the next name : nameofyourcountries.geojson
|
||||
4. Put your geojson file in next folder : superset-frontend/src/visualizations/CountryMap/countries with the next name : nameofyourcountries.geojson
|
||||
|
||||
5. You can to reduce size of geojson file on this site: https://mapshaper.org/
|
||||
|
||||
6. Go in file superset/assets/src/explore/controls.jsx
|
||||
6. Go in file superset-frontend/src/explore/controls.jsx
|
||||
|
||||
7. Add your country in component 'select_country'
|
||||
Example :
|
||||
|
|
@ -2005,7 +2005,3 @@ To add a new country in country map tools, we need to follow the following steps
|
|||
].map(s => [s, s]),
|
||||
description: 'The name of country that Superset should display',
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
# and are on the correct branch
|
||||
cd ${SUPERSET_REPO_DIR}
|
||||
git branch
|
||||
rm superset/assets/dist/*
|
||||
cd superset/assets/
|
||||
rm superset/static/assets/*
|
||||
cd superset-frontend/
|
||||
npm ci && npm run build
|
||||
cd ../..
|
||||
python setup.py sdist
|
||||
|
|
|
|||
|
|
@ -71,9 +71,6 @@ mkdir -p ${TMP_DIR}/lib
|
|||
exit 1
|
||||
}
|
||||
|
||||
# This is the target of a symlink in superset/assets/docs - and rat exclude doesn't cope with the symlink target doesn't exist
|
||||
mkdir -p docs/_build/html/
|
||||
|
||||
echo "Running license checks. This can take a while."
|
||||
echo "$FWDIR"/.rat-excludes
|
||||
$java_cmd -jar "$rat_jar" -E "$FWDIR"/.rat-excludes -d "$FWDIR" > rat-results.txt
|
||||
|
|
|
|||
6
setup.py
|
|
@ -27,7 +27,7 @@ if sys.version_info < (3, 6):
|
|||
|
||||
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
PACKAGE_JSON = os.path.join(BASE_DIR, "superset", "assets", "package.json")
|
||||
PACKAGE_JSON = os.path.join(BASE_DIR, "superset-frontend", "package.json")
|
||||
with open(PACKAGE_JSON, "r") as package_file:
|
||||
version_string = json.load(package_file)["version"]
|
||||
|
||||
|
|
@ -50,9 +50,7 @@ print("VERSION: " + version_string)
|
|||
print("GIT SHA: " + GIT_SHA)
|
||||
print("-==-" * 15)
|
||||
|
||||
VERSION_INFO_FILE = os.path.join(
|
||||
BASE_DIR, "superset", "static", "assets", "version_info.json"
|
||||
)
|
||||
VERSION_INFO_FILE = os.path.join(BASE_DIR, "superset-frontend", "version_info.json")
|
||||
|
||||
with open(VERSION_INFO_FILE, "w") as version_file:
|
||||
json.dump(version_info, version_file)
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 459 KiB After Width: | Height: | Size: 459 KiB |
|
Before Width: | Height: | Size: 702 KiB After Width: | Height: | Size: 702 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 328 KiB After Width: | Height: | Size: 328 KiB |
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |