Compare commits

...

25 Commits

Author SHA1 Message Date
Pat Buxton
3f4248b4d7 Update sqlachemy-utils to 0.42.0
* Support Python 3.11 through 3.13
2026-02-11 19:15:03 -08:00
Vanessa Giannoni
77148277b9 feat(charts): improve negative stacked bar label positioning and accessibility (#37405) 2026-02-11 17:46:10 -08:00
Evan Rusackas
981b370fe9 chore(storybook): consolidate storybook and enhance plugin stories (#37771)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 16:06:23 -08:00
Enzo Martellucci
b012b63e5b fix(native-filters): align refresh icon with default value field (#37802) 2026-02-11 21:26:26 +01:00
Kamil Gabryjelski
b0be47a4ac fix: Unreachable drop zones within tabs in dashbboard editor (#37904) 2026-02-11 21:08:19 +01:00
Ville Brofeldt
00d02cb2ea perf(gtf): improve task base filter (#37900) 2026-02-11 10:40:07 -08:00
Kamil Gabryjelski
26a2e12779 perf: fix N+1 query in Slice.datasource property (#37899) 2026-02-11 18:57:28 +01:00
Luis Sánchez
5f0001affc feat(timeseries): remove stream style for bar charts (#37532) 2026-02-11 09:25:03 -08:00
Ville Brofeldt
255a0ada81 fix(gtf): add missing user_id to task commands (#37867) 2026-02-11 09:04:27 -08:00
Evan Rusackas
9089f30045 chore(lint): upgrade array creation, effect, and TypeScript rules (#37885)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 08:45:21 -08:00
Kamil Gabryjelski
98ca599eef perf: fix N+1 query in chart list API when thumbnail_url is requested (#37895) 2026-02-11 17:19:48 +01:00
Evan Rusackas
d640fe42c9 chore: remove Applitools visual testing integration (#37873)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 08:07:19 -08:00
Evan Rusackas
534fa48f1f chore(lint): enforce stricter eslint/oxlint rules (#37883)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 08:07:02 -08:00
Evan Rusackas
c28729f944 chore(lint): add jest/expect-expect rule for test assertions (#37887)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 08:06:34 -08:00
Luis Sánchez
88a14f2ba0 fix(FiltersBadge): world map wont show filter icon after refresh page (#37260) 2026-02-11 16:33:32 +03:00
Ville Brofeldt
74e1607010 fix(extensions): broken test (#37871) 2026-02-11 08:33:45 -03:00
Mehmet Salih Yavuz
69c679be20 fix(explore): Don't show unsaved changes modal on new charts (#37714) 2026-02-11 13:05:42 +03:00
Evan Rusackas
9a79dbf445 fix(docs): make page size selector work in database table (#37863)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 22:15:55 -08:00
dependabot[bot]
7e5ca83220 chore(deps-dev): bump @types/node from 25.2.2 to 25.2.3 in /superset-frontend (#37851)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 14:24:55 -08:00
dependabot[bot]
7d4a7f113c chore(deps-dev): bump webpack from 5.105.0 to 5.105.1 in /docs (#37849)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 14:24:13 -08:00
dependabot[bot]
4eb8fc814a chore(deps-dev): bump @types/node from 25.2.2 to 25.2.3 in /superset-websocket (#37846)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 14:23:11 -08:00
Tadas Barzdžius
39ac96817a fix(helm): Add default initContainer resources (#37637) 2026-02-10 11:51:37 -08:00
Levis Mbote
1388a62823 fix(filters): fix filter / customization name not updating in sidebar in real time (#37358) 2026-02-10 20:41:47 +01:00
Michael S. Molina
6a6b9b5386 chore: Bump core packages (0.0.1rc11, 0.0.1rc4) (#37860) 2026-02-10 16:37:07 -03:00
Michael S. Molina
b98b34a60f refactor: Make extensions contribution schema consistent (#37856) 2026-02-10 15:55:39 -03:00
294 changed files with 7491 additions and 26871 deletions

View File

@@ -101,16 +101,6 @@ updates:
open-pull-requests-limit: 5
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/plugins/legacy-plugin-chart-histogram/"
schedule:
interval: "daily"
labels:
- npm
- dependabot
open-pull-requests-limit: 5
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/plugins/legacy-plugin-chart-partition/"
schedule:
@@ -211,16 +201,6 @@ updates:
open-pull-requests-limit: 5
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/plugins/legacy-plugin-chart-sankey/"
schedule:
interval: "daily"
labels:
- npm
- dependabot
open-pull-requests-limit: 5
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/plugins/legacy-preset-chart-nvd3/"
schedule:
@@ -241,16 +221,6 @@ updates:
open-pull-requests-limit: 5
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/plugins/legacy-plugin-chart-event-flow/"
schedule:
interval: "daily"
labels:
- npm
- dependabot
open-pull-requests-limit: 5
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/"
schedule:
@@ -261,16 +231,6 @@ updates:
open-pull-requests-limit: 5
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/plugins/legacy-plugin-chart-sankey-loop/"
schedule:
interval: "daily"
labels:
- npm
- dependabot
open-pull-requests-limit: 5
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/plugins/plugin-chart-echarts/"
schedule:
@@ -282,7 +242,7 @@ updates:
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/plugins/preset-chart-xy/"
directory: "/superset-frontend/plugins/plugin-chart-ag-grid-table/"
schedule:
interval: "daily"
labels:
@@ -292,7 +252,7 @@ updates:
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/plugins/legacy-plugin-chart-heatmap/"
directory: "/superset-frontend/plugins/plugin-chart-cartodiagram/"
schedule:
interval: "daily"
labels:
@@ -311,16 +271,6 @@ updates:
open-pull-requests-limit: 5
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/plugins/legacy-plugin-chart-sunburst/"
schedule:
interval: "daily"
labels:
- npm
- dependabot
open-pull-requests-limit: 5
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/plugins/plugin-chart-handlebars/"
schedule:
@@ -366,27 +316,6 @@ updates:
open-pull-requests-limit: 5
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/packages/superset-ui-demo/"
ignore:
# TODO: remove below entries until React >= 18.0.0
- dependency-name: "@storybook*"
update-types: ["version-update:semver-major", "version-update:semver-minor"]
groups:
storybook:
applies-to: version-updates
patterns:
- "@storybook*"
update-types:
- "patch"
schedule:
interval: "daily"
labels:
- npm
- dependabot
open-pull-requests-limit: 5
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/superset-frontend/packages/superset-ui-switchboard/"
schedule:

View File

@@ -304,26 +304,3 @@ monitor_memory() {
sleep 2
done
}
cypress-run-applitools() {
cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
local flasklog="${HOME}/flask.log"
local port=8081
local cypress="./node_modules/.bin/cypress run"
local browser=${CYPRESS_BROWSER:-chrome}
export CYPRESS_BASE_URL="http://localhost:${port}"
nohup flask run --no-debugger -p $port >"$flasklog" 2>&1 </dev/null &
local flaskProcessId=$!
$cypress --spec "cypress/applitools/**/*" --browser "$browser" --headless
say "::group::Flask log for default run"
cat "$flasklog"
say "::endgroup::"
# make sure the program exits
kill $flaskProcessId
}

View File

@@ -39,13 +39,9 @@ jobs:
# pkg:npm/store2@2.14.2
# adding an exception for an ambigious license on store2, which has been resolved in
# the latest version. It's MIT: https://github.com/nbubna/store/blob/master/LICENSE-MIT
# pkg:npm/applitools/*
# adding exception for all applitools modules (eyes-cypress and its dependencies),
# which has an explicit OSS license approved by ASF
# license: https://applitools.com/legal/open-source-terms-of-use/
# pkg:npm/node-forge@1.3.1
# selecting BSD-3-Clause licensing terms for node-forge to ensure compatibility with Apache
allow-dependencies-licenses: pkg:npm/store2@2.14.2, pkg:npm/applitools/core, pkg:npm/applitools/core-base, pkg:npm/applitools/css-tree, pkg:npm/applitools/ec-client, pkg:npm/applitools/eg-socks5-proxy-server, pkg:npm/applitools/eyes, pkg:npm/applitools/eyes-cypress, pkg:npm/applitools/nml-client, pkg:npm/applitools/tunnel-client, pkg:npm/applitools/utils, pkg:npm/node-forge@1.3.1, pkg:npm/rgbcolor, pkg:npm/jszip@3.10.1
allow-dependencies-licenses: pkg:npm/store2@2.14.2, pkg:npm/node-forge@1.3.1, pkg:npm/rgbcolor, pkg:npm/jszip@3.10.1
python-dependency-liccheck:
# NOTE: Configuration for liccheck lives in our pyproject.yml.

View File

@@ -1,91 +0,0 @@
name: Applitools Cypress
on:
schedule:
- cron: "0 1 * * *"
jobs:
config:
runs-on: ubuntu-24.04
outputs:
has-secrets: ${{ steps.check.outputs.has-secrets }}
steps:
- name: "Check for secrets"
id: check
shell: bash
run: |
if [ -n "${{ (secrets.APPLITOOLS_API_KEY != '' && secrets.APPLITOOLS_API_KEY != '') || '' }}" ]; then
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
fi
cypress-applitools:
needs: config
if: needs.config.outputs.has-secrets
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
browser: ["chrome"]
env:
SUPERSET_ENV: development
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
PYTHONPATH: ${{ github.workspace }}
REDIS_PORT: 16379
GITHUB_TOKEN: ${{ github.token }}
APPLITOOLS_APP_NAME: Superset
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
APPLITOOLS_BATCH_ID: ${{ github.sha }}
APPLITOOLS_BATCH_NAME: Superset Cypress
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: superset
POSTGRES_PASSWORD: superset
ports:
- 15432:5432
redis:
image: redis:7-alpine
ports:
- 16379:6379
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v6
with:
persist-credentials: false
submodules: recursive
ref: master
- name: Setup Python
uses: ./.github/actions/setup-backend/
- name: Import test data
uses: ./.github/actions/cached-dependencies
with:
run: testdata
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: './superset-frontend/.nvmrc'
- name: Install npm dependencies
uses: ./.github/actions/cached-dependencies
with:
run: npm-install
- name: Build javascript packages
uses: ./.github/actions/cached-dependencies
with:
run: build-instrumented-assets
- name: Setup Postgres
if: steps.check.outcome == 'failure'
uses: ./.github/actions/cached-dependencies
with:
run: setup-postgres
- name: Install cypress
uses: ./.github/actions/cached-dependencies
with:
run: cypress-install
- name: Run Cypress
uses: ./.github/actions/cached-dependencies
env:
CYPRESS_BROWSER: ${{ matrix.browser }}
with:
run: cypress-run-applitools

View File

@@ -1,52 +0,0 @@
name: Applitools Storybook
on:
schedule:
- cron: "0 0 * * *"
env:
APPLITOOLS_APP_NAME: Superset
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
APPLITOOLS_BATCH_ID: ${{ github.sha }}
APPLITOOLS_BATCH_NAME: Superset Storybook
jobs:
config:
runs-on: ubuntu-24.04
outputs:
has-secrets: ${{ steps.check.outputs.has-secrets }}
steps:
- name: "Check for secrets"
id: check
shell: bash
run: |
if [ -n "${{ (secrets.APPLITOOLS_API_KEY != '' && secrets.APPLITOOLS_API_KEY != '') || '' }}" ]; then
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
fi
cron:
needs: config
if: needs.config.outputs.has-secrets
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v6
with:
persist-credentials: false
submodules: recursive
ref: master
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version-file: './superset-frontend/.nvmrc'
- name: Install eyes-storybook dependencies
uses: ./.github/actions/cached-dependencies
with:
run: eyes-storybook-dependencies
- name: Install NPM dependencies
uses: ./.github/actions/cached-dependencies
with:
run: npm-install
- name: Run Applitools Eyes-Storybook
working-directory: ./superset-frontend
run: npx eyes-storybook -u https://superset-storybook.netlify.app/

View File

@@ -163,11 +163,6 @@ jobs:
docker run --rm $TAG bash -c \
"npm run plugins:build"
- name: Build Plugins Storybook
run: |
docker run --rm $TAG bash -c \
"npm run plugins:build-storybook"
test-storybook:
needs: frontend-build
if: needs.frontend-build.outputs.should-run == 'true'

View File

@@ -38,12 +38,14 @@ Extensions can add new views or panels to the host application, such as custom S
"frontend": {
"contributions": {
"views": {
"sqllab.panels": [
{
"id": "my_extension.main",
"name": "My Panel Name"
}
]
"sqllab": {
"panels": [
{
"id": "my_extension.main",
"name": "My Panel Name"
}
]
}
}
}
}
@@ -76,25 +78,27 @@ Extensions can contribute new menu items or context menus to the host applicatio
"frontend": {
"contributions": {
"menus": {
"sqllab.editor": {
"primary": [
{
"view": "builtin.editor",
"command": "my_extension.copy_query"
}
],
"secondary": [
{
"view": "builtin.editor",
"command": "my_extension.prettify"
}
],
"context": [
{
"view": "builtin.editor",
"command": "my_extension.clear"
}
]
"sqllab": {
"editor": {
"primary": [
{
"view": "builtin.editor",
"command": "my_extension.copy_query"
}
],
"secondary": [
{
"view": "builtin.editor",
"command": "my_extension.prettify"
}
],
"context": [
{
"view": "builtin.editor",
"command": "my_extension.clear"
}
]
}
}
}
}

View File

@@ -92,12 +92,14 @@ The `extension.json` file contains all metadata necessary for the host applicati
"frontend": {
"contributions": {
"views": {
"sqllab.panels": [
{
"id": "dataset_references.main",
"name": "Dataset references"
}
]
"sqllab": {
"panels": [
{
"id": "dataset_references.main",
"name": "Dataset references"
}
]
}
}
},
"moduleFederation": {

View File

@@ -93,12 +93,14 @@ This example adds a "Data Profiler" panel to SQL Lab:
"frontend": {
"contributions": {
"views": {
"sqllab.panels": [
{
"id": "data_profiler.main",
"name": "Data Profiler"
}
]
"sqllab": {
"panels": [
{
"id": "data_profiler.main",
"name": "Data Profiler"
}
]
}
}
}
}
@@ -142,25 +144,27 @@ This example adds primary, secondary, and context actions to the editor:
}
],
"menus": {
"sqllab.editor": {
"primary": [
{
"view": "builtin.editor",
"command": "query_tools.format"
}
],
"secondary": [
{
"view": "builtin.editor",
"command": "query_tools.explain"
}
],
"context": [
{
"view": "builtin.editor",
"command": "query_tools.copy_as_cte"
}
]
"sqllab": {
"editor": {
"primary": [
{
"view": "builtin.editor",
"command": "query_tools.format"
}
],
"secondary": [
{
"view": "builtin.editor",
"command": "query_tools.explain"
}
],
"context": [
{
"view": "builtin.editor",
"command": "query_tools.copy_as_cte"
}
]
}
}
}
}

View File

@@ -94,12 +94,14 @@ The generated `extension.json` contains basic metadata. Update it to register yo
"frontend": {
"contributions": {
"views": {
"sqllab.panels": [
{
"id": "hello_world.main",
"name": "Hello World"
}
]
"sqllab": {
"panels": [
{
"id": "hello_world.main",
"name": "Hello World"
}
]
}
}
},
"moduleFederation": {

View File

@@ -47,5 +47,5 @@ This is a list of statements that describe how we do frontend development in Sup
- We do not debate code formatting style in PRs, instead relying on automated tooling to enforce it.
- If there's not a linting rule, we don't have a rule!
- See: [Linting How-Tos](../contributing/howtos#typescript--javascript)
- We use [React Storybook](https://storybook.js.org/) and [Applitools](https://applitools.com/) to help preview/test and stabilize our components
- We use [React Storybook](https://storybook.js.org/) to help preview/test and stabilize our components
- A public Storybook with components from the `master` branch is available [here](https://apache-superset.github.io/superset-ui/?path=/story/*)

View File

@@ -636,7 +636,6 @@ const config: Config = {
copyright: `
<div class="footer__ci-services">
<span>CI powered by</span>
<a href="https://applitools.com/" target="_blank" rel="nofollow noopener noreferrer"><img src="/img/applitools.png" alt="Applitools" title="Applitools - Visual Testing" /></a>
<a href="https://www.netlify.com/" target="_blank" rel="nofollow noopener noreferrer"><img src="/img/netlify.png" alt="Netlify" title="Netlify - Deploy Previews" /></a>
</div>
<p>Copyright © ${new Date().getFullYear()},

View File

@@ -1,6 +1,6 @@
{
"copyright": {
"message": "\n <div class=\"footer__ci-services\">\n <span>CI powered by</span>\n <a href=\"https://applitools.com/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img src=\"/img/applitools.png\" alt=\"Applitools\" title=\"Applitools - Visual Testing\" /></a>\n <a href=\"https://www.netlify.com/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img src=\"/img/netlify.png\" alt=\"Netlify\" title=\"Netlify - Deploy Previews\" /></a>\n </div>\n <p>Copyright © 2026,\n The <a href=\"https://www.apache.org/\" target=\"_blank\" rel=\"noreferrer\">Apache Software Foundation</a>,\n Licensed under the Apache <a href=\"https://apache.org/licenses/LICENSE-2.0\" target=\"_blank\" rel=\"noreferrer\">License</a>.</p>\n <p><small>Apache Superset, Apache, Superset, the Superset logo, and the Apache feather logo are either registered trademarks or trademarks of The Apache Software Foundation. All other products or name brands are trademarks of their respective holders, including The Apache Software Foundation.\n <a href=\"https://www.apache.org/\" target=\"_blank\">Apache Software Foundation</a> resources</small></p>\n <img class=\"footer__divider\" src=\"/img/community/line.png\" alt=\"Divider\" />\n <p>\n <small>\n <a href=\"/docs/security/\" target=\"_blank\" rel=\"noreferrer\">Security</a>&nbsp;|&nbsp;\n <a href=\"https://www.apache.org/foundation/sponsorship.html\" target=\"_blank\" rel=\"noreferrer\">Donate</a>&nbsp;|&nbsp;\n <a href=\"https://www.apache.org/foundation/thanks.html\" target=\"_blank\" rel=\"noreferrer\">Thanks</a>&nbsp;|&nbsp;\n <a href=\"https://apache.org/events/current-event\" target=\"_blank\" rel=\"noreferrer\">Events</a>&nbsp;|&nbsp;\n <a href=\"https://apache.org/licenses/\" target=\"_blank\" rel=\"noreferrer\">License</a>&nbsp;|&nbsp;\n <a href=\"https://privacy.apache.org/policies/privacy-policy-public.html\" target=\"_blank\" rel=\"noreferrer\">Privacy</a>\n </small>\n </p>\n <!-- telemetry/analytics pixel: -->\n <img referrerPolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=39ae6855-95fc-4566-86e5-360d542b0a68\" />\n ",
"message": "\n <div class=\"footer__ci-services\">\n <span>CI powered by</span>\n <a href=\"https://www.netlify.com/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img src=\"/img/netlify.png\" alt=\"Netlify\" title=\"Netlify - Deploy Previews\" /></a>\n </div>\n <p>Copyright © 2026,\n The <a href=\"https://www.apache.org/\" target=\"_blank\" rel=\"noreferrer\">Apache Software Foundation</a>,\n Licensed under the Apache <a href=\"https://apache.org/licenses/LICENSE-2.0\" target=\"_blank\" rel=\"noreferrer\">License</a>.</p>\n <p><small>Apache Superset, Apache, Superset, the Superset logo, and the Apache feather logo are either registered trademarks or trademarks of The Apache Software Foundation. All other products or name brands are trademarks of their respective holders, including The Apache Software Foundation.\n <a href=\"https://www.apache.org/\" target=\"_blank\">Apache Software Foundation</a> resources</small></p>\n <img class=\"footer__divider\" src=\"/img/community/line.png\" alt=\"Divider\" />\n <p>\n <small>\n <a href=\"/docs/security/\" target=\"_blank\" rel=\"noreferrer\">Security</a>&nbsp;|&nbsp;\n <a href=\"https://www.apache.org/foundation/sponsorship.html\" target=\"_blank\" rel=\"noreferrer\">Donate</a>&nbsp;|&nbsp;\n <a href=\"https://www.apache.org/foundation/thanks.html\" target=\"_blank\" rel=\"noreferrer\">Thanks</a>&nbsp;|&nbsp;\n <a href=\"https://apache.org/events/current-event\" target=\"_blank\" rel=\"noreferrer\">Events</a>&nbsp;|&nbsp;\n <a href=\"https://apache.org/licenses/\" target=\"_blank\" rel=\"noreferrer\">License</a>&nbsp;|&nbsp;\n <a href=\"https://privacy.apache.org/policies/privacy-policy-public.html\" target=\"_blank\" rel=\"noreferrer\">Privacy</a>\n </small>\n </p>\n <!-- telemetry/analytics pixel: -->\n <img referrerPolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=39ae6855-95fc-4566-86e5-360d542b0a68\" />\n ",
"description": "The footer copyright"
}
}

View File

@@ -103,7 +103,7 @@
"prettier": "^3.8.1",
"typescript": "~5.9.3",
"typescript-eslint": "^8.55.0",
"webpack": "^5.105.0"
"webpack": "^5.105.1"
},
"browserslist": {
"production": [

View File

@@ -579,7 +579,7 @@ const DatabaseIndex: React.FC<DatabaseIndexProps> = ({ data }) => {
columns={columns}
rowKey={(record) => record.isCompatible ? `${record.compatibleWith}-${record.name}` : record.name}
pagination={{
pageSize: 20,
defaultPageSize: 20,
showSizeChanger: true,
showTotal: (total) => `${total} databases`,
}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -7188,14 +7188,6 @@ encodeurl@~2.0.0:
resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz"
integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==
enhanced-resolve@^5.17.4:
version "5.18.4"
resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.4.tgz"
integrity sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q==
dependencies:
graceful-fs "^4.2.4"
tapable "^2.2.0"
enhanced-resolve@^5.19.0:
version "5.19.0"
resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.19.0.tgz"
@@ -14080,7 +14072,7 @@ synckit@^0.11.12:
dependencies:
"@pkgr/core" "^0.2.9"
tapable@^2.0.0, tapable@^2.2.0, tapable@^2.2.1, tapable@^2.3.0:
tapable@^2.0.0, tapable@^2.2.1, tapable@^2.3.0:
version "2.3.0"
resolved "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz"
integrity sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==
@@ -14868,14 +14860,6 @@ warning@^4.0.3:
dependencies:
loose-envify "^1.0.0"
watchpack@^2.4.4:
version "2.4.4"
resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz"
integrity sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==
dependencies:
glob-to-regexp "^0.4.1"
graceful-fs "^4.1.2"
watchpack@^2.5.1:
version "2.5.1"
resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.5.1.tgz"
@@ -15003,10 +14987,10 @@ webpack-virtual-modules@^0.6.2:
resolved "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz"
integrity sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==
webpack@^5.105.0:
version "5.105.0"
resolved "https://registry.npmjs.org/webpack/-/webpack-5.105.0.tgz"
integrity sha512-gX/dMkRQc7QOMzgTe6KsYFM7DxeIONQSui1s0n/0xht36HvrgbxtM1xBlgx596NbpHuQU8P7QpKwrZYwUX48nw==
webpack@^5.105.1, webpack@^5.88.1, webpack@^5.95.0:
version "5.105.1"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.105.1.tgz#c05cb3621196c76fa3b3a9bea446d14616b83778"
integrity sha512-Gdj3X74CLJJ8zy4URmK42W7wTZUJrqL+z8nyGEr4dTN0kb3nVs+ZvjbTOqRYPD7qX4tUmwyHL9Q9K6T1seW6Yw==
dependencies:
"@types/eslint-scope" "^3.7.7"
"@types/estree" "^1.0.8"
@@ -15034,37 +15018,6 @@ webpack@^5.105.0:
watchpack "^2.5.1"
webpack-sources "^3.3.3"
webpack@^5.88.1, webpack@^5.95.0:
version "5.104.1"
resolved "https://registry.npmjs.org/webpack/-/webpack-5.104.1.tgz"
integrity sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA==
dependencies:
"@types/eslint-scope" "^3.7.7"
"@types/estree" "^1.0.8"
"@types/json-schema" "^7.0.15"
"@webassemblyjs/ast" "^1.14.1"
"@webassemblyjs/wasm-edit" "^1.14.1"
"@webassemblyjs/wasm-parser" "^1.14.1"
acorn "^8.15.0"
acorn-import-phases "^1.0.3"
browserslist "^4.28.1"
chrome-trace-event "^1.0.2"
enhanced-resolve "^5.17.4"
es-module-lexer "^2.0.0"
eslint-scope "5.1.1"
events "^3.2.0"
glob-to-regexp "^0.4.1"
graceful-fs "^4.2.11"
json-parse-even-better-errors "^2.3.1"
loader-runner "^4.3.1"
mime-types "^2.1.27"
neo-async "^2.6.2"
schema-utils "^4.3.3"
tapable "^2.3.0"
terser-webpack-plugin "^5.3.16"
watchpack "^2.4.4"
webpack-sources "^3.3.3"
webpackbar@^6.0.1:
version "6.0.1"
resolved "https://registry.npmjs.org/webpackbar/-/webpackbar-6.0.1.tgz"

View File

@@ -29,7 +29,7 @@ maintainers:
- name: craig-rueda
email: craig@craigrueda.com
url: https://github.com/craig-rueda
version: 0.15.2 # See [README](https://github.com/apache/superset/blob/master/helm/superset/README.md#versioning) for version details.
version: 0.15.3 # See [README](https://github.com/apache/superset/blob/master/helm/superset/README.md#versioning) for version details.
dependencies:
- name: postgresql
version: 13.4.4

View File

@@ -23,7 +23,7 @@ NOTE: This file is generated by helm-docs: https://github.com/norwoodj/helm-docs
# superset
![Version: 0.15.2](https://img.shields.io/badge/Version-0.15.2-informational?style=flat-square)
![Version: 0.15.3](https://img.shields.io/badge/Version-0.15.3-informational?style=flat-square)
Apache Superset is a modern, enterprise-ready business intelligence web application

View File

@@ -312,6 +312,12 @@ supersetNode:
- /bin/sh
- -c
- dockerize -wait "tcp://$DB_HOST:$DB_PORT" -timeout 120s
resources:
limits:
memory: "256Mi"
requests:
cpu: "250m"
memory: "128Mi"
# -- Launch additional containers into supersetNode pod
extraContainers: []
@@ -410,6 +416,12 @@ supersetWorker:
- /bin/sh
- -c
- dockerize -wait "tcp://$DB_HOST:$DB_PORT" -wait "tcp://$REDIS_HOST:$REDIS_PORT" -timeout 120s
resources:
limits:
memory: "256Mi"
requests:
cpu: "250m"
memory: "128Mi"
# -- Launch additional containers into supersetWorker pod
extraContainers: []
# -- Annotations to be added to supersetWorker deployment
@@ -492,6 +504,12 @@ supersetCeleryBeat:
- /bin/sh
- -c
- dockerize -wait "tcp://$DB_HOST:$DB_PORT" -wait "tcp://$REDIS_HOST:$REDIS_PORT" -timeout 120s
resources:
limits:
memory: "256Mi"
requests:
cpu: "250m"
memory: "128Mi"
# -- Launch additional containers into supersetCeleryBeat pods
extraContainers: []
# -- Annotations to be added to supersetCeleryBeat deployment
@@ -585,6 +603,12 @@ supersetCeleryFlower:
- /bin/sh
- -c
- dockerize -wait "tcp://$DB_HOST:$DB_PORT" -wait "tcp://$REDIS_HOST:$REDIS_PORT" -timeout 120s
resources:
limits:
memory: "256Mi"
requests:
cpu: "250m"
memory: "128Mi"
# -- Launch additional containers into supersetCeleryFlower pods
extraContainers: []
# -- Annotations to be added to supersetCeleryFlower deployment
@@ -749,6 +773,12 @@ init:
- /bin/sh
- -c
- dockerize -wait "tcp://$DB_HOST:$DB_PORT" -timeout 120s
resources:
limits:
memory: "256Mi"
requests:
cpu: "250m"
memory: "128Mi"
# -- A Superset init script
# @default -- a script to create admin user and initialize roles
initscript: |-

View File

@@ -99,7 +99,7 @@ dependencies = [
"simplejson>=3.15.0",
"slack_sdk>=3.19.0, <4",
"sqlalchemy>=1.4, <2",
"sqlalchemy-utils>=0.38.3, <0.39",
"sqlalchemy-utils>=0.42.0, <0.43",
"sqlglot>=28.10.0, <29",
# newer pandas needs 0.9+
"tabulate>=0.9.0, <1.0",

View File

@@ -399,7 +399,7 @@ sqlalchemy==1.4.54
# marshmallow-sqlalchemy
# shillelagh
# sqlalchemy-utils
sqlalchemy-utils==0.38.3
sqlalchemy-utils==0.42.0
# via
# apache-superset (pyproject.toml)
# apache-superset-core

View File

@@ -990,7 +990,7 @@ sqlalchemy==1.4.54
# sqlalchemy-utils
sqlalchemy-bigquery==1.15.0
# via apache-superset
sqlalchemy-utils==0.38.3
sqlalchemy-utils==0.42.0
# via
# -c requirements/base-constraint.txt
# apache-superset

View File

@@ -18,7 +18,7 @@
[project]
name = "apache-superset-core"
version = "0.0.1rc3"
version = "0.0.1rc4"
description = "Core Python package for building Apache Superset backend extensions and integrations"
readme = "README.md"
authors = [
@@ -45,7 +45,7 @@ dependencies = [
"flask-appbuilder>=5.0.2,<6",
"pydantic>=2.8.0",
"sqlalchemy>=1.4.0,<2.0",
"sqlalchemy-utils>=0.38.0",
"sqlalchemy-utils>=0.42.0",
"sqlglot>=28.10.0, <29",
"typing-extensions>=4.0.0",
]

View File

@@ -56,19 +56,37 @@ class ModuleFederationConfig(BaseModel):
class ContributionConfig(BaseModel):
"""Configuration for frontend UI contributions."""
"""Configuration for frontend UI contributions.
Views and menus use a nested structure: type -> scope -> location -> contributions.
Example:
{
"views": {
"sqllab": {
"panels": [{"id": "my-ext.panel", "name": "My Panel"}],
"leftSidebar": [{"id": "my-ext.sidebar", "name": "Sidebar"}]
}
},
"menus": {
"sqllab": {
"editor": {"primary": [...], "secondary": [...]}
}
}
}
"""
commands: list[dict[str, Any]] = Field(
default_factory=list,
description="Command contributions",
)
views: dict[str, list[dict[str, Any]]] = Field(
views: dict[str, dict[str, list[dict[str, Any]]]] = Field(
default_factory=dict,
description="View contributions by location",
description="View contributions by scope and location",
)
menus: dict[str, Any] = Field(
menus: dict[str, dict[str, Any]] = Field(
default_factory=dict,
description="Menu contributions",
description="Menu contributions by scope and location",
)

View File

@@ -135,7 +135,9 @@ module.exports = {
'icons',
'i18n-strings',
'react-prefer-function-component',
'react-you-might-not-need-an-effect',
'prettier',
'react-you-might-not-need-an-effect',
],
rules: {
// === Essential Superset customizations ===
@@ -235,12 +237,22 @@ module.exports = {
'jsx-a11y/mouse-events-have-key-events': 0,
'jsx-a11y/no-static-element-interactions': 0,
// React effect best practices
'react-you-might-not-need-an-effect/no-empty-effect': 'error',
'react-you-might-not-need-an-effect/no-pass-live-state-to-parent': 'error',
'react-you-might-not-need-an-effect/no-initialize-state': 'error',
// Lodash
'lodash/import-scope': [2, 'member'],
// File progress
'file-progress/activate': 1,
// React effect rules
'react-you-might-not-need-an-effect/no-adjust-state-on-prop-change':
'error',
'react-you-might-not-need-an-effect/no-pass-data-to-parent': 'error',
// Restricted imports
'no-restricted-imports': [
'error',
@@ -306,7 +318,6 @@ module.exports = {
files: ['packages/**/src/**/*.js', 'packages/**/src/**/*.jsx'],
excludedFiles: [
'packages/generator-superset/**/*', // Yeoman generator templates run via Node
'packages/superset-ui-demo/.storybook/**/*', // Storybook config files
'packages/**/__mocks__/**/*', // Test mocks
],
rules: {
@@ -350,7 +361,7 @@ module.exports = {
],
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-use-before-define': 1,
'@typescript-eslint/no-use-before-define': 'error',
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,

View File

@@ -23,8 +23,13 @@ const customConfig = require('../webpack.config.js');
// Filter out plugins that shouldn't be included in Storybook's static build
// ReactRefreshWebpackPlugin adds Fast Refresh code that requires a dev server runtime,
// which isn't available when serving the static storybook build
// ForkTsCheckerWebpackPlugin causes TypeScript project reference errors in Storybook context
const pluginsToExclude = [
'ReactRefreshWebpackPlugin',
'ForkTsCheckerWebpackPlugin',
];
const filteredPlugins = customConfig.plugins.filter(
plugin => plugin.constructor.name !== 'ReactRefreshWebpackPlugin',
plugin => !pluginsToExclude.includes(plugin.constructor.name),
);
// Deep clone and modify rules to disable React Fast Refresh and dev mode in SWC loader
@@ -73,9 +78,9 @@ const disableDevModeInRules = rules =>
module.exports = {
stories: [
'../src/@(components|common|filters|explore|views|dashboard|features)/**/*.stories.@(tsx|jsx)',
'../packages/superset-ui-demo/storybook/stories/**/*.*.@(tsx|jsx)',
'../packages/superset-ui-core/src/components/**/*.stories.@(tsx|jsx)',
'../src/**/*.stories.tsx',
'../packages/superset-ui-core/src/**/*.stories.tsx',
'../plugins/*/src/**/*.stories.tsx',
],
addons: [
@@ -102,6 +107,8 @@ module.exports = {
...customConfig.resolve?.alias,
// Fix for Storybook 8.6.x with React 17 - resolve ESM module paths
'react-dom/test-utils': require.resolve('react-dom/test-utils'),
// Shared storybook utilities
'@storybook-shared': join(__dirname, 'shared'),
},
},
plugins: [...config.plugins, ...filteredPlugins],

View File

@@ -28,6 +28,27 @@ import { App, Layout, Space, Content } from 'antd';
import 'src/theme.ts';
import './storybook.css';
// Set up bootstrap data for components that check HTML_SANITIZATION config
// (e.g., HandlebarsViewer). This allows <style> tags in Handlebars templates.
if (typeof document !== 'undefined') {
let appEl = document.getElementById('app');
if (!appEl) {
appEl = document.createElement('div');
appEl.id = 'app';
document.body.appendChild(appEl);
}
appEl.setAttribute(
'data-bootstrap',
JSON.stringify({
common: {
conf: {
HTML_SANITIZATION: false,
},
},
}),
);
}
export const GlobalStylesOverrides = () => (
<Global
styles={css`

View File

@@ -61,10 +61,7 @@ export default function ResizableChartDemo({
);
}
export const withResizableChartDemo: Decorator<{
width: number;
height: number;
}> = (storyFn, context) => {
export const withResizableChartDemo: Decorator = (Story, context) => {
const {
parameters: { initialSize, panelPadding },
} = context;
@@ -73,7 +70,14 @@ export const withResizableChartDemo: Decorator<{
initialSize={initialSize as Size | undefined}
panelPadding={panelPadding}
>
{innerSize => storyFn({ ...context, ...context.args, ...innerSize })}
{innerSize => (
<Story
args={{
...context.args,
...innerSize,
}}
/>
)}
</ResizableChartDemo>
);
};

View File

@@ -23,9 +23,25 @@ import {
ResizableBoxProps,
ResizeCallbackData,
} from 'react-resizable';
import { styled } from '@apache-superset/core/ui';
import 'react-resizable/css/styles.css';
const StyledResizableBox = styled(ResizableBox)`
&.panel {
overflow: hidden;
background: ${({ theme }) => theme.colorBgContainer};
border: 1px solid ${({ theme }) => theme.colorBorder};
border-radius: ${({ theme }) => theme.borderRadius}px;
}
.panel-body {
overflow: hidden;
width: 100%;
height: 100%;
}
`;
export type Size = ResizeCallbackData['size'];
export default function ResizablePanel({
@@ -41,7 +57,7 @@ export default function ResizablePanel({
}) {
const { width, height } = initialSize;
return (
<ResizableBox
<StyledResizableBox
className="panel"
width={width}
height={height}
@@ -60,6 +76,6 @@ export default function ResizablePanel({
{heading ? <div className="panel-heading">{heading}</div> : null}
<div className="panel-body">{children}</div>
</>
</ResizableBox>
</StyledResizableBox>
);
}

View File

@@ -32,7 +32,7 @@ export default function createQueryStory({
[key: string]: {
chartType: string;
formData: {
[key: string]: any;
[key: string]: unknown;
};
};
};
@@ -43,7 +43,7 @@ export default function createQueryStory({
mode: string | number,
width: number,
height: number,
formData: any,
formData: string,
) => {
const { chartType } = choices[mode];

View File

@@ -17,12 +17,18 @@
* under the License.
*/
import { EchartsBoxPlotChartPlugin } from '@superset-ui/plugin-chart-echarts';
new EchartsBoxPlotChartPlugin().configure({ key: 'box-plot' }).register();
export default {
title: 'Legacy Chart Plugins/legacy-preset-chart-nvd3/BoxPlot',
};
export { basic } from './stories/basic';
export { default as ErrorMessage } from './ErrorMessage';
export { default as Expandable } from './Expandable';
export { default as ResizablePanel, type Size } from './ResizablePanel';
export {
default as ResizableChartDemo,
SupersetBody,
withResizableChartDemo,
} from './ResizableChartDemo';
export {
default as VerifyCORS,
renderError,
type Props as VerifyCORSProps,
} from './VerifyCORS';
export { default as createQueryStory } from './createQueryStory';
export { default as dummyDatasource } from './dummyDatasource';

View File

@@ -1,27 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
module.exports = {
apiKey: process.env.APPLITOOLS_API_KEY,
batchId: process.env.APPLITOOLS_BATCH_ID,
batchName: process.env.APPLITOOLS_BATCH_NAME,
puppeteerOptions: {
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox'],
},
};

View File

@@ -1,29 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
module.exports = {
apiKey: process.env.APPLITOOLS_API_KEY,
batchId: process.env.APPLITOOLS_BATCH_ID,
batchName: process.env.APPLITOOLS_BATCH_NAME,
browser: [{ width: 1920, height: 1080, name: 'chrome' }],
failCypressOnDiff: false,
isDisabled: false,
showLogs: false,
testConcurrency: 10,
ignoreCaret: true,
};

View File

@@ -18,73 +18,67 @@
*/
// eslint-disable-next-line import/no-extraneous-dependencies
import { defineConfig } from 'cypress';
import eyesPlugin from '@applitools/eyes-cypress';
const { verifyDownloadTasks } = require('cy-verify-downloads');
export default eyesPlugin(
defineConfig({
chromeWebSecurity: false,
defaultCommandTimeout: 8000,
numTestsKeptInMemory: 3,
// Disabled after realizing this MESSES UP rison encoding in intricate ways
experimentalFetchPolyfill: false,
experimentalMemoryManagement: true,
requestTimeout: 10000,
video: false,
viewportWidth: 1280,
viewportHeight: 1024,
projectId: 'ud5x2f',
retries: {
runMode: 2,
openMode: 0,
export default defineConfig({
chromeWebSecurity: false,
defaultCommandTimeout: 8000,
numTestsKeptInMemory: 3,
// Disabled after realizing this MESSES UP rison encoding in intricate ways
experimentalFetchPolyfill: false,
experimentalMemoryManagement: true,
requestTimeout: 10000,
video: false,
viewportWidth: 1280,
viewportHeight: 1024,
projectId: 'ud5x2f',
retries: {
runMode: 2,
openMode: 0,
},
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
// ECONNRESET on Chrome/Chromium 117.0.5851.0 when using Cypress <12.15.0
// Check https://github.com/cypress-io/cypress/issues/27804 for context
// TODO: This workaround should be removed when upgrading Cypress
on('before:browser:launch', (browser, launchOptions) => {
if (browser.name === 'chrome' && browser.isHeadless) {
// eslint-disable-next-line no-param-reassign
launchOptions.args = launchOptions.args.map(arg => {
if (arg === '--headless') {
return '--headless=new';
}
return arg;
});
launchOptions.args.push(
'--disable-dev-shm-usage',
'--disable-gpu',
'--no-sandbox',
'--disable-software-rasterizer',
'--memory-pressure-off',
'--js-flags=--max-old-space-size=4096',
'--disable-background-timer-throttling',
'--disable-backgrounding-occluded-windows',
'--disable-renderer-backgrounding',
);
}
return launchOptions;
});
// eslint-disable-next-line global-require
require('@cypress/code-coverage/task')(on, config);
on('task', verifyDownloadTasks);
// eslint-disable-next-line global-require,import/extensions
return config;
},
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
// ECONNRESET on Chrome/Chromium 117.0.5851.0 when using Cypress <12.15.0
// Check https://github.com/cypress-io/cypress/issues/27804 for context
// TODO: This workaround should be removed when upgrading Cypress
on('before:browser:launch', (browser, launchOptions) => {
if (browser.name === 'chrome' && browser.isHeadless) {
// eslint-disable-next-line no-param-reassign
launchOptions.args = launchOptions.args.map(arg => {
if (arg === '--headless') {
return '--headless=new';
}
return arg;
});
launchOptions.args.push(
'--disable-dev-shm-usage',
'--disable-gpu',
'--no-sandbox',
'--disable-software-rasterizer',
'--memory-pressure-off',
'--js-flags=--max-old-space-size=4096',
'--disable-background-timer-throttling',
'--disable-backgrounding-occluded-windows',
'--disable-renderer-backgrounding',
);
}
return launchOptions;
});
// eslint-disable-next-line global-require
require('@cypress/code-coverage/task')(on, config);
on('task', verifyDownloadTasks);
// eslint-disable-next-line global-require,import/extensions
return config;
},
baseUrl: 'http://localhost:8088',
excludeSpecPattern: ['**/_skip.*'],
experimentalRunAllSpecs: true,
specPattern: [
'cypress/e2e/**/*.{js,jsx,ts,tsx}',
'cypress/applitools/**/*.{js,jsx,ts,tsx}',
],
},
}),
);
baseUrl: 'http://localhost:8088',
excludeSpecPattern: ['**/_skip.*'],
experimentalRunAllSpecs: true,
specPattern: ['cypress/e2e/**/*.{js,jsx,ts,tsx}'],
},
});

View File

@@ -1,45 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { CHART_LIST } from 'cypress/utils/urls';
describe('charts list view', () => {
beforeEach(() => {
cy.visit(CHART_LIST);
});
afterEach(() => {
cy.eyesClose();
});
it('should load the Charts list', () => {
cy.get('[aria-label="unordered-list"]').click();
cy.eyesOpen({
testName: 'Charts list-view',
});
cy.eyesCheckWindow('Charts list-view loaded');
});
it('should load the Charts card list', () => {
cy.get('[aria-label="appstore"]').click();
cy.eyesOpen({
testName: 'Charts card-view',
});
cy.eyesCheckWindow('Charts card-view loaded');
});
});

View File

@@ -1,53 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { WORLD_HEALTH_DASHBOARD } from 'cypress/utils/urls';
import { waitForChartLoad } from 'cypress/utils';
import { WORLD_HEALTH_CHARTS } from '../e2e/dashboard/utils';
describe('Dashboard load', () => {
beforeEach(() => {
cy.visit(WORLD_HEALTH_DASHBOARD);
WORLD_HEALTH_CHARTS.forEach(waitForChartLoad);
});
afterEach(() => {
cy.eyesClose();
});
it('should load the Dashboard', () => {
cy.eyesOpen({
testName: 'Dashboard page',
});
cy.eyesCheckWindow('Dashboard loaded');
});
it('should load the Dashboard in edit mode', () => {
cy.get('.header-with-actions')
.find('[aria-label="Edit dashboard"]')
.click();
// wait for a chart to appear
cy.get('[data-test="grid-container"]').find('.box_plot', {
timeout: 10000,
});
cy.eyesOpen({
testName: 'Dashboard edit mode',
});
cy.eyesCheckWindow('Dashboard edit mode loaded');
});
});

View File

@@ -1,45 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { DASHBOARD_LIST } from 'cypress/utils/urls';
describe('dashboard list view', () => {
beforeEach(() => {
cy.visit(DASHBOARD_LIST);
});
afterEach(() => {
cy.eyesClose();
});
it('should load the Dashboards list', () => {
cy.get('[aria-label="unordered-list"]').click();
cy.eyesOpen({
testName: 'Dashboards list-view',
});
cy.eyesCheckWindow('Dashboards list-view loaded');
});
it('should load the Dashboards card list', () => {
cy.get('[aria-label="appstore"]').click();
cy.eyesOpen({
testName: 'Dashboards card-view',
});
cy.eyesCheckWindow('Dashboards card-view loaded');
});
});

View File

@@ -1,46 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import {
FORM_DATA_DEFAULTS,
NUM_METRIC,
} from '../e2e/explore/visualizations/shared.helper';
describe('explore view', () => {
beforeEach(() => {
cy.intercept('POST', '**/superset/explore_json/**').as('getJson');
});
afterEach(() => {
cy.eyesClose();
});
it('should load Explore', () => {
const LINE_CHART_DEFAULTS = {
...FORM_DATA_DEFAULTS,
viz_type: 'echarts_timeseries_line',
};
const formData = { ...LINE_CHART_DEFAULTS, metrics: [NUM_METRIC] };
cy.visitChartByParams(formData);
cy.verifySliceSuccess({ waitAlias: '@getJson', chartSelector: 'svg' });
cy.eyesOpen({
testName: 'Explore page',
});
cy.eyesCheckWindow('Explore loaded');
});
});

View File

@@ -1,32 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
describe('SqlLab view', () => {
beforeEach(() => {
cy.visit('/sqllab');
});
it('should load the SqlLab', () => {
cy.eyesOpen({
testName: 'SqlLab page',
});
cy.eyesCheckWindow('SqlLab loaded');
cy.eyesClose();
});
});

View File

@@ -17,7 +17,6 @@
* under the License.
*/
import '@cypress/code-coverage/support';
import '@applitools/eyes-cypress/commands';
import { expect } from 'chai';
import rison from 'rison';

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,6 @@
]
},
"dependencies": {
"@applitools/eyes-cypress": "^3.44.9",
"@cypress/code-coverage": "^3.10.4",
"@superset-ui/core": "^2.1.0",
"brace": "^0.11.1",

View File

@@ -6,11 +6,11 @@
"strict": true,
"target": "es2019",
"lib": ["es2019", "DOM"],
"types": ["cypress", "@applitools/eyes-cypress", "node"],
"types": ["cypress", "node"],
"allowJs": true,
"noEmit": true
},
"files": ["cypress/support/index.d.ts", "./node_modules/@applitools/eyes-cypress/types/index.d.ts"],
"files": ["cypress/support/index.d.ts"],
"include": ["cypress/**/*.ts", "./cypress.config.ts"],
"exclude": ["node_modules"]
}

View File

@@ -53,7 +53,6 @@ module.exports = {
'src/**/*.{js,jsx,ts,tsx}',
'{packages,plugins}/**/src/**/*.{js,jsx,ts,tsx}',
'!**/*.stories.*',
'!packages/superset-ui-demo/**/*',
],
coverageDirectory: '<rootDir>/coverage/',
coveragePathIgnorePatterns: [

View File

@@ -28,7 +28,8 @@
// === Core ESLint rules ===
// Error prevention
"no-console": "warn",
"no-alert": "warn",
"no-alert": "error",
"constructor-super": "error",
"no-debugger": "error",
"no-unused-vars": "off",
"no-undef": "error",
@@ -148,7 +149,8 @@
],
"react/no-array-index-key": "off",
"react/no-children-prop": "error",
"react/no-danger": "warn",
"react/no-danger": "error",
"react/forbid-foreign-prop-types": "error",
"react/no-danger-with-children": "error",
"react/no-deprecated": "error",
"react/no-did-update-set-state": "error",
@@ -231,7 +233,7 @@
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
@@ -250,6 +252,8 @@
],
// === Unicorn rules (bonus coverage) ===
"unicorn/no-new-array": "error",
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/filename-case": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/no-null": "off",
@@ -262,7 +266,19 @@
// === Jest rules ===
"jest/consistent-test-it": ["error", { "fn": "test" }],
"jest/no-focused-tests": "error",
"jest/no-disabled-tests": "error"
"jest/no-disabled-tests": "error",
"jest/expect-expect": [
"error",
{
"assertFunctionNames": [
"expect",
"expect*",
"runTimezoneTest",
"compareURI",
"test*WithInitialValues"
]
}
]
},
"ignorePatterns": [
"packages/generator-superset/**/*",

File diff suppressed because it is too large Load Diff

View File

@@ -45,7 +45,7 @@
"build-translation": "scripts/po2json.sh",
"bundle-stats": "cross-env BUNDLE_ANALYZER=true npm run build && npx open-cli ../superset/static/stats/statistics.html",
"clear-npm": "mkdir -p /tmp/empty && rsync -a --delete /tmp/empty/ node_modules/ && rmdir node_modules /tmp/empty",
"core:cover": "cross-env NODE_ENV=test NODE_OPTIONS=\"--max-old-space-size=4096\" jest --coverage --coverageThreshold='{\"global\":{\"statements\":100,\"branches\":100,\"functions\":100,\"lines\":100}}' --collectCoverageFrom='[\"packages/**/src/**/*.{js,ts}\", \"!packages/superset-ui-demo/**/*\", \"!packages/superset-core/**/*\"]' packages",
"core:cover": "cross-env NODE_ENV=test NODE_OPTIONS=\"--max-old-space-size=4096\" jest --coverage --coverageThreshold='{\"global\":{\"statements\":100,\"branches\":100,\"functions\":100,\"lines\":100}}' --collectCoverageFrom='[\"packages/**/src/**/*.{js,ts}\", \"!packages/superset-core/**/*\"]' packages",
"cover": "cross-env NODE_ENV=test NODE_OPTIONS=\"--max-old-space-size=4096\" jest --coverage",
"dev": "webpack --mode=development --color --watch",
"dev-server": "cross-env NODE_ENV=development BABEL_ENV=development node --max_old_space_size=4096 ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode=development",
@@ -57,18 +57,17 @@
"lint-fix:all": "npx oxlint --config oxlint.json --fix",
"lint:full": "npm run lint && npm run check:custom-rules",
"check:custom-rules": "node scripts/check-custom-rules.js",
"check:storybook-coverage": "node scripts/check-storybook-coverage.js",
"ensure-oxc": "echo 'OXC linter is ready' && npx oxlint --version",
"lint-stats": "node ./scripts/oxlint-metrics-uploader.js",
"plugins:build": "node ./scripts/build.js",
"plugins:build-assets": "node ./scripts/copyAssets.js",
"plugins:build-storybook": "cd packages/superset-ui-demo && npm run build-storybook",
"plugins:create-conventional-version": "npm run prune && lerna version --conventional-commits --create-release github --no-private --yes --tag-version-prefix=\"plugins-and-packages-v\"",
"plugins:create-minor-version": "npm run prune && lerna version minor --no-private --yes --tag-version-prefix=\"plugins-and-packages-v\"",
"plugins:create-patch-version": "npm run prune && lerna version patch --no-private --yes --tag-version-prefix=\"plugins-and-packages-v\"",
"plugins:publish-all": "npm run prune && npm run plugins:build && lerna publish from-package --force-publish --yes",
"plugins:release-conventional": "npm run prune && npm run plugins:build && lerna publish --conventional-commits --create-release github --yes",
"plugins:release-from-tag": "npm run prune && npm run plugins:build && lerna publish from-package --yes",
"plugins:storybook": "cd packages/superset-ui-demo && npm run storybook",
"playwright:test": "playwright test",
"playwright:ui": "playwright test --ui",
"playwright:headed": "playwright test --headed",
@@ -235,7 +234,6 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@applitools/eyes-storybook": "^3.63.10",
"@babel/cli": "^7.28.6",
"@babel/compat-data": "^7.28.4",
"@babel/core": "^7.29.0",
@@ -285,7 +283,7 @@
"@types/js-levenshtein": "^1.1.3",
"@types/json-bigint": "^1.0.4",
"@types/mousetrap": "^1.6.15",
"@types/node": "^25.2.2",
"@types/node": "^25.2.3",
"@types/react": "^17.0.83",
"@types/react-dom": "^17.0.26",
"@types/react-loadable": "^5.5.11",

View File

@@ -1,6 +1,6 @@
{
"name": "@apache-superset/core",
"version": "0.0.1-rc10",
"version": "0.0.1-rc11",
"description": "This package contains UI elements, APIs, and utility functions used by Superset.",
"sideEffects": false,
"main": "lib/index.js",

View File

@@ -93,20 +93,55 @@ export interface EditorContribution {
*/
export type EditorLanguage = 'sql' | 'json' | 'yaml' | 'markdown' | 'css';
/**
* Valid locations within SQL Lab.
*/
export type SqlLabLocation =
| 'leftSidebar'
| 'rightSidebar'
| 'panels'
| 'editor'
| 'statusBar'
| 'results'
| 'queryHistory';
/**
* Nested structure for view contributions by scope and location.
* @example
* {
* sqllab: {
* panels: [{ id: "my-ext.panel", name: "My Panel" }],
* leftSidebar: [{ id: "my-ext.sidebar", name: "My Sidebar" }]
* }
* }
*/
export interface ViewContributions {
sqllab?: Partial<Record<SqlLabLocation, ViewContribution[]>>;
}
/**
* Nested structure for menu contributions by scope and location.
* @example
* {
* sqllab: {
* editor: { primary: [...], secondary: [...] }
* }
* }
*/
export interface MenuContributions {
sqllab?: Partial<Record<SqlLabLocation, MenuContribution>>;
}
/**
* Aggregates all contributions (commands, menus, views, and editors) provided by an extension or module.
*/
export interface Contributions {
/** List of command contributions. */
commands: CommandContribution[];
/** Mapping of menu contributions by menu key. */
menus: {
[key: string]: MenuContribution;
};
/** Mapping of view contributions by view key. */
views: {
[key: string]: ViewContribution[];
};
/** Nested mapping of menu contributions by scope and location. */
menus: MenuContributions;
/** Nested mapping of view contributions by scope and location. */
views: ViewContributions;
/** List of editor contributions. */
editors?: EditorContribution[];
}

View File

@@ -78,7 +78,7 @@
"@types/react-syntax-highlighter": "^15.5.13",
"@types/jquery": "^3.5.33",
"@types/lodash": "^4.17.23",
"@types/node": "^25.2.2",
"@types/node": "^25.2.3",
"@types/prop-types": "^15.7.15",
"@types/rison": "0.1.0",
"@types/seedrandom": "^3.0.8",

View File

@@ -32,8 +32,8 @@ import {
wordCloudFormData,
} from '../../../../superset-ui-core/test/chart/fixtures/formData';
import Expandable from '../../shared/components/Expandable';
import VerifyCORS, { renderError } from '../../shared/components/VerifyCORS';
import { Expandable } from '@storybook-shared';
import { VerifyCORS, renderError } from '@storybook-shared';
const BIG_NUMBER = bigNumberFormData.viz_type;
const SANKEY = sankeyFormData.viz_type;

View File

@@ -23,7 +23,7 @@ import {
BuggyChartPlugin,
ChartKeys,
} from '../../../../superset-ui-core/test/chart/components/MockChartPlugins';
import ResizableChartDemo from '../../shared/components/ResizableChartDemo';
import { ResizableChartDemo } from '@storybook-shared';
new DiligentChartPlugin().configure({ key: ChartKeys.DILIGENT }).register();
new BuggyChartPlugin().configure({ key: ChartKeys.BUGGY }).register();

View File

@@ -18,17 +18,18 @@
*/
.palette-label {
margin: 4px 12px 4px 0;
padding-right: 16px;
vertical-align: middle;
}
.palette-container {
display: flex;
flex-direction: row;
border: 1px solid #eaeaea;
width: fit-content;
align-items: center;
}
.palette-item {
width: 16px;
height: 16px;
width: 24px;
height: 24px;
border-radius: 2px;
}

View File

@@ -0,0 +1,100 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { action } from '@storybook/addon-actions';
import { Meta, StoryFn } from '@storybook/react';
import { CachedLabel } from '.';
import type { CacheLabelProps } from './types';
export default {
title: 'Components/CachedLabel',
component: CachedLabel,
} as Meta<typeof CachedLabel>;
// Interactive CachedLabel story
export const InteractiveCachedLabel: StoryFn<CacheLabelProps> = args => (
<div style={{ display: 'inline-block' }}>
<CachedLabel {...args} />
</div>
);
InteractiveCachedLabel.args = {
cachedTimestamp: new Date(Date.now() - 5 * 60 * 1000).toISOString(), // 5 minutes ago
onClick: action('refresh-clicked'),
};
InteractiveCachedLabel.argTypes = {
cachedTimestamp: {
description: 'ISO timestamp of when the data was cached',
control: { type: 'text' },
},
className: {
description: 'Additional CSS class for the label',
control: { type: 'text' },
},
};
// Show different cache ages
export const CacheAges: StoryFn = () => {
const now = Date.now();
const timestamps = [
{ label: 'Just now', timestamp: new Date(now - 30 * 1000).toISOString() },
{
label: '5 minutes ago',
timestamp: new Date(now - 5 * 60 * 1000).toISOString(),
},
{
label: '1 hour ago',
timestamp: new Date(now - 60 * 60 * 1000).toISOString(),
},
{
label: '1 day ago',
timestamp: new Date(now - 24 * 60 * 60 * 1000).toISOString(),
},
{ label: 'No timestamp', timestamp: undefined },
];
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
{timestamps.map(({ label, timestamp }) => (
<div
key={label}
style={{ display: 'flex', alignItems: 'center', gap: 16 }}
>
<span style={{ width: 120, color: '#666' }}>{label}:</span>
<CachedLabel
cachedTimestamp={timestamp}
onClick={action('refresh-clicked')}
/>
</div>
))}
<p style={{ marginTop: 16, color: '#888', fontSize: 12 }}>
Hover over each label to see the tooltip with relative time
</p>
</div>
);
};
CacheAges.parameters = {
docs: {
description: {
story:
'Shows the CachedLabel with different cache timestamps. Hover to see the relative time in the tooltip.',
},
},
};

View File

@@ -61,7 +61,7 @@ test('should render a tooltip on hover', async () => {
render(<ModalTrigger {...tooltipProps} />);
await userEvent.hover(screen.getByRole('button'));
await screen.findByRole('tooltip');
expect(await screen.findByRole('tooltip')).toBeInTheDocument();
});
test('should not render a modal before click', () => {

View File

@@ -0,0 +1,249 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { Meta, StoryFn } from '@storybook/react';
import { SafeMarkdown } from './SafeMarkdown';
export default {
title: 'Components/SafeMarkdown',
component: SafeMarkdown,
} as Meta<typeof SafeMarkdown>;
interface SafeMarkdownArgs {
source: string;
htmlSanitization?: boolean;
}
// Interactive SafeMarkdown story
export const InteractiveSafeMarkdown: StoryFn<SafeMarkdownArgs> = args => (
<SafeMarkdown {...args} />
);
InteractiveSafeMarkdown.args = {
source: `# Hello Markdown!
This is a **bold** statement and this is *italic*.
## Features
- Bullet point 1
- Bullet point 2
- Bullet point 3
### Code Example
\`\`\`javascript
const greeting = "Hello, World!";
console.log(greeting);
\`\`\`
Inline \`code\` works too!
> This is a blockquote for important notes.
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Row 1 | Data | More |
| Row 2 | Data | More |
[Link to Apache Superset](https://superset.apache.org)
`,
htmlSanitization: true,
};
InteractiveSafeMarkdown.argTypes = {
source: {
description: 'Markdown source string to render',
control: { type: 'text' },
},
htmlSanitization: {
description: 'Enable HTML sanitization (recommended for user input)',
control: { type: 'boolean' },
},
};
// GitHub Flavored Markdown examples
export const GFMFeatures: StoryFn = () => (
<SafeMarkdown
source={`## GitHub Flavored Markdown
### Task Lists
- [x] Completed task
- [ ] Incomplete task
- [ ] Another task
### Strikethrough
~~This text is struck through~~
### Tables
| Feature | Supported |
|---------|-----------|
| Tables | ✅ |
| Task Lists | ✅ |
| Strikethrough | ✅ |
| Autolinks | ✅ |
### Autolinks
Visit https://superset.apache.org for more info.
### Footnotes
Here is a footnote reference[^1].
[^1]: Here is the footnote content.
`}
/>
);
GFMFeatures.parameters = {
docs: {
description: {
story:
'Demonstrates GitHub Flavored Markdown (GFM) features like task lists, strikethrough, tables, and autolinks.',
},
},
};
// HTML sanitization comparison
export const HTMLSanitization: StoryFn = () => (
<div style={{ display: 'flex', gap: 40 }}>
<div style={{ flex: 1 }}>
<h4>With Sanitization (default)</h4>
<div style={{ border: '1px solid #ddd', padding: 16, borderRadius: 4 }}>
<SafeMarkdown
source={`
### Safe HTML
<div>This div is allowed</div>
<span style="color: red;">Inline styles are stripped</span>
<script>alert('This script is removed')</script>
<img src="x" onerror="alert('XSS')">
<a href="javascript:alert('XSS')">Malicious link</a>
<a href="https://superset.apache.org">Safe link</a>
`}
htmlSanitization
/>
</div>
</div>
<div style={{ flex: 1 }}>
<h4>Without Sanitization</h4>
<div style={{ border: '1px solid #ddd', padding: 16, borderRadius: 4 }}>
<SafeMarkdown
source={`
### Unsanitized HTML
<div style="color: blue; font-weight: bold;">Styled div works</div>
<span style="background: yellow; padding: 4px;">Inline styles preserved</span>
`}
htmlSanitization={false}
/>
</div>
</div>
</div>
);
HTMLSanitization.parameters = {
docs: {
description: {
story:
'Compares rendering with and without HTML sanitization. Sanitization removes potentially dangerous elements like scripts and event handlers.',
},
},
};
// Common dashboard use cases
export const DashboardUseCases: StoryFn = () => (
<div style={{ display: 'flex', flexDirection: 'column', gap: 24 }}>
<div>
<h4>Chart Description</h4>
<div
style={{
border: '1px solid #ddd',
padding: 16,
borderRadius: 4,
background: '#fafafa',
}}
>
<SafeMarkdown
source={`### Monthly Revenue Analysis
This chart shows **revenue trends** over the past 12 months.
Key insights:
- Q4 shows *significant growth* (+25%)
- Summer months historically slower
- Year-over-year improvement of **18%**
_Data source: Finance Department_`}
/>
</div>
</div>
<div>
<h4>Data Quality Notes</h4>
<div
style={{
border: '1px solid #ddd',
padding: 16,
borderRadius: 4,
background: '#fff3cd',
}}
>
<SafeMarkdown
source={`> ⚠️ **Data Quality Notice**
>
> Some records from the legacy system may be incomplete.
> See [data dictionary](/docs/data-dictionary) for details.`}
/>
</div>
</div>
<div>
<h4>Metric Definitions</h4>
<div
style={{
border: '1px solid #ddd',
padding: 16,
borderRadius: 4,
background: '#fafafa',
}}
>
<SafeMarkdown
source={`| Metric | Definition | Formula |
|--------|------------|---------|
| **CAC** | Customer Acquisition Cost | \`total_marketing_spend / new_customers\` |
| **LTV** | Lifetime Value | \`avg_revenue_per_customer * avg_customer_lifespan\` |
| **Churn** | Monthly Churn Rate | \`lost_customers / start_customers * 100\` |`}
/>
</div>
</div>
</div>
);
DashboardUseCases.parameters = {
docs: {
description: {
story:
'Real-world examples of how SafeMarkdown is used in Superset dashboards for chart descriptions, data quality notes, and metric definitions.',
},
},
};

View File

@@ -0,0 +1,530 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { useMemo, useState, useCallback } from 'react';
import { Meta, StoryFn } from '@storybook/react';
import {
useTable,
useSortBy,
Column,
Row,
SortingRule,
HeaderGroup,
ColumnInstance,
TablePropGetter,
TableBodyPropGetter,
} from 'react-table';
import TableCollection from '.';
import { TableSize } from '../Table';
// Type aliases for casting to the component's expected object-based types
// Required because memo() loses the generic type parameter
type AnyProps = TablePropGetter<object>;
type AnyBodyProps = TableBodyPropGetter<object>;
type AnyHeaders = HeaderGroup<object>[];
type AnyRows = Row<object>[];
type AnyColumns = ColumnInstance<object>[];
type AnyPrepareRow = (row: Row<object>) => void;
export default {
title: 'Components/TableCollection',
component: TableCollection,
} as Meta<typeof TableCollection>;
// Sample data type
interface SampleData {
id: number;
name: string;
email: string;
role: string;
status: string;
lastLogin: string;
}
// Sample data generator
const generateSampleData = (count: number): SampleData[] =>
Array.from({ length: count }, (_, i) => ({
id: i + 1,
name: `User ${i + 1}`,
email: `user${i + 1}@example.com`,
role: ['Admin', 'Editor', 'Viewer'][i % 3],
status: ['Active', 'Inactive', 'Pending'][i % 3],
lastLogin: new Date(
Date.now() - Math.random() * 30 * 24 * 60 * 60 * 1000,
).toLocaleDateString(),
}));
// Basic table story
export const Basic: StoryFn = () => {
const data = useMemo(() => generateSampleData(10), []);
const columns: Column<SampleData>[] = useMemo(
() => [
{ Header: 'ID', accessor: 'id' },
{ Header: 'Name', accessor: 'name' },
{ Header: 'Email', accessor: 'email' },
{ Header: 'Role', accessor: 'role' },
{ Header: 'Status', accessor: 'status' },
{ Header: 'Last Login', accessor: 'lastLogin' },
],
[],
);
const {
getTableProps,
getTableBodyProps,
headerGroups,
rows,
prepareRow,
columns: tableColumns,
} = useTable<SampleData>({ columns, data }, useSortBy);
return (
<TableCollection
getTableProps={getTableProps as AnyProps}
getTableBodyProps={getTableBodyProps as AnyBodyProps}
headerGroups={headerGroups as AnyHeaders}
rows={rows as AnyRows}
columns={tableColumns as AnyColumns}
prepareRow={prepareRow as AnyPrepareRow}
loading={false}
totalCount={rows.length}
pageSize={10}
/>
);
};
Basic.parameters = {
docs: {
description: {
story:
'Basic TableCollection with sortable columns. Click column headers to sort.',
},
},
};
// With pagination
export const WithPagination: StoryFn = () => {
const allData = useMemo(() => generateSampleData(50), []);
const [pageIndex, setPageIndex] = useState(0);
const pageSize = 10;
const paginatedData = useMemo(
() => allData.slice(pageIndex * pageSize, (pageIndex + 1) * pageSize),
[allData, pageIndex],
);
const columns: Column<SampleData>[] = useMemo(
() => [
{ Header: 'ID', accessor: 'id' },
{ Header: 'Name', accessor: 'name' },
{ Header: 'Email', accessor: 'email' },
{ Header: 'Role', accessor: 'role' },
{ Header: 'Status', accessor: 'status' },
],
[],
);
const {
getTableProps,
getTableBodyProps,
headerGroups,
rows,
prepareRow,
columns: tableColumns,
} = useTable<SampleData>({ columns, data: paginatedData }, useSortBy);
const handlePageChange = useCallback((page: number) => {
setPageIndex(page);
}, []);
return (
<TableCollection
getTableProps={getTableProps as AnyProps}
getTableBodyProps={getTableBodyProps as AnyBodyProps}
headerGroups={headerGroups as AnyHeaders}
rows={rows as AnyRows}
columns={tableColumns as AnyColumns}
prepareRow={prepareRow as AnyPrepareRow}
loading={false}
pageIndex={pageIndex}
pageSize={pageSize}
totalCount={allData.length}
onPageChange={handlePageChange}
showRowCount
/>
);
};
WithPagination.parameters = {
docs: {
description: {
story:
'TableCollection with server-side pagination. Shows "X-Y of Z" row count.',
},
},
};
// With row selection
export const WithRowSelection: StoryFn = () => {
const data = useMemo(() => generateSampleData(10), []);
const [selectedRows, setSelectedRows] = useState<Row<SampleData>[]>([]);
const columns: Column<SampleData>[] = useMemo(
() => [
{ Header: 'ID', accessor: 'id' },
{ Header: 'Name', accessor: 'name' },
{ Header: 'Email', accessor: 'email' },
{ Header: 'Role', accessor: 'role' },
],
[],
);
const {
getTableProps,
getTableBodyProps,
headerGroups,
rows,
prepareRow,
columns: tableColumns,
} = useTable<SampleData>({ columns, data }, useSortBy);
const toggleRowSelected = useCallback(
(rowId: string, selected: boolean) => {
const row = rows.find(r => r.id === rowId);
if (row) {
if (selected) {
setSelectedRows(prev => [...prev, row] as Row<SampleData>[]);
} else {
setSelectedRows(
prev => prev.filter(r => r.id !== rowId) as Row<SampleData>[],
);
}
}
},
[rows],
);
const toggleAllRowsSelected = useCallback(
(selected?: boolean) => {
if (selected) {
setSelectedRows(rows as Row<SampleData>[]);
} else {
setSelectedRows([]);
}
},
[rows],
);
return (
<div>
<div style={{ marginBottom: 16, color: '#666' }}>
Selected: {selectedRows.length} row(s)
{selectedRows.length > 0 && (
<span> - IDs: {selectedRows.map(r => r.original.id).join(', ')}</span>
)}
</div>
<TableCollection
getTableProps={getTableProps as AnyProps}
getTableBodyProps={getTableBodyProps as AnyBodyProps}
headerGroups={headerGroups as AnyHeaders}
rows={rows as AnyRows}
columns={tableColumns as AnyColumns}
prepareRow={prepareRow as AnyPrepareRow}
loading={false}
bulkSelectEnabled
selectedFlatRows={selectedRows as AnyRows}
toggleRowSelected={toggleRowSelected}
toggleAllRowsSelected={toggleAllRowsSelected}
totalCount={rows.length}
pageSize={10}
/>
</div>
);
};
WithRowSelection.parameters = {
docs: {
description: {
story:
'TableCollection with bulk selection enabled. Use checkboxes to select individual rows or all rows.',
},
},
};
// Loading state
export const LoadingState: StoryFn = () => {
const data: SampleData[] = useMemo(() => [], []);
const columns: Column<SampleData>[] = useMemo(
() => [
{ Header: 'ID', accessor: 'id' },
{ Header: 'Name', accessor: 'name' },
{ Header: 'Email', accessor: 'email' },
{ Header: 'Role', accessor: 'role' },
{ Header: 'Status', accessor: 'status' },
],
[],
);
const {
getTableProps,
getTableBodyProps,
headerGroups,
rows,
prepareRow,
columns: tableColumns,
} = useTable<SampleData>({ columns, data }, useSortBy);
return (
<TableCollection
getTableProps={getTableProps as AnyProps}
getTableBodyProps={getTableBodyProps as AnyBodyProps}
headerGroups={headerGroups as AnyHeaders}
rows={rows as AnyRows}
columns={tableColumns as AnyColumns}
prepareRow={prepareRow as AnyPrepareRow}
loading
totalCount={0}
pageSize={10}
/>
);
};
LoadingState.parameters = {
docs: {
description: {
story: 'TableCollection in loading state with a spinner overlay.',
},
},
};
// Different sizes
export const TableSizes: StoryFn = () => {
const data = useMemo(() => generateSampleData(5), []);
const columns: Column<SampleData>[] = useMemo(
() => [
{ Header: 'ID', accessor: 'id' },
{ Header: 'Name', accessor: 'name' },
{ Header: 'Email', accessor: 'email' },
{ Header: 'Role', accessor: 'role' },
],
[],
);
const sizes: TableSize[] = [
TableSize.Small,
TableSize.Middle,
TableSize.Large,
];
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 32 }}>
{sizes.map(size => {
const {
getTableProps,
getTableBodyProps,
headerGroups,
rows,
prepareRow,
columns: tableColumns,
} = useTable<SampleData>({ columns, data }, useSortBy);
return (
<div key={size}>
<h4 style={{ marginBottom: 8 }}>Size: {size}</h4>
<TableCollection
getTableProps={getTableProps as AnyProps}
getTableBodyProps={getTableBodyProps as AnyBodyProps}
headerGroups={headerGroups as AnyHeaders}
rows={rows as AnyRows}
columns={tableColumns as AnyColumns}
prepareRow={prepareRow as AnyPrepareRow}
loading={false}
size={size}
totalCount={rows.length}
pageSize={10}
/>
</div>
);
})}
</div>
);
};
TableSizes.parameters = {
docs: {
description: {
story: 'TableCollection in different sizes: small, middle, and large.',
},
},
};
// With controlled sorting
export const WithControlledSorting: StoryFn = () => {
const [sortBy, setSortBy] = useState<SortingRule<SampleData>[]>([
{ id: 'name', desc: false },
]);
const data = useMemo(() => {
const rawData = generateSampleData(15);
if (sortBy.length > 0) {
const { id, desc } = sortBy[0];
return [...rawData].sort((a, b) => {
const aVal = a[id as keyof SampleData];
const bVal = b[id as keyof SampleData];
if (aVal < bVal) return desc ? 1 : -1;
if (aVal > bVal) return desc ? -1 : 1;
return 0;
});
}
return rawData;
}, [sortBy]);
const columns: Column<SampleData>[] = useMemo(
() => [
{ Header: 'ID', accessor: 'id' },
{ Header: 'Name', accessor: 'name' },
{ Header: 'Email', accessor: 'email' },
{ Header: 'Role', accessor: 'role' },
{ Header: 'Status', accessor: 'status' },
],
[],
);
const {
getTableProps,
getTableBodyProps,
headerGroups,
rows,
prepareRow,
columns: tableColumns,
} = useTable<SampleData>(
{
columns,
data,
initialState: { sortBy },
manualSortBy: true,
},
useSortBy,
);
return (
<div>
<div style={{ marginBottom: 16, color: '#666' }}>
Current sort:{' '}
{sortBy.length > 0
? `${sortBy[0].id} (${sortBy[0].desc ? 'descending' : 'ascending'})`
: 'none'}
</div>
<TableCollection
getTableProps={getTableProps as AnyProps}
getTableBodyProps={getTableBodyProps as AnyBodyProps}
headerGroups={headerGroups as AnyHeaders}
rows={rows as AnyRows}
columns={tableColumns as AnyColumns}
prepareRow={prepareRow as AnyPrepareRow}
loading={false}
setSortBy={setSortBy}
totalCount={rows.length}
pageSize={15}
/>
</div>
);
};
WithControlledSorting.parameters = {
docs: {
description: {
story:
'TableCollection with controlled (server-side) sorting. Click column headers to sort.',
},
},
};
// With row highlighting
export const WithRowHighlighting: StoryFn = () => {
const data = useMemo(() => generateSampleData(10), []);
const [highlightRowId, setHighlightRowId] = useState<number | undefined>(3);
const columns: Column<SampleData>[] = useMemo(
() => [
{ Header: 'ID', accessor: 'id' },
{ Header: 'Name', accessor: 'name' },
{ Header: 'Email', accessor: 'email' },
{ Header: 'Role', accessor: 'role' },
],
[],
);
const {
getTableProps,
getTableBodyProps,
headerGroups,
rows,
prepareRow,
columns: tableColumns,
} = useTable<SampleData>({ columns, data }, useSortBy);
return (
<div>
<div style={{ marginBottom: 16 }}>
<label>
Highlight row ID:{' '}
<select
value={highlightRowId ?? ''}
onChange={e =>
setHighlightRowId(
e.target.value ? Number(e.target.value) : undefined,
)
}
>
<option value="">None</option>
{data.map(d => (
<option key={d.id} value={d.id}>
{d.id}
</option>
))}
</select>
</label>
</div>
<TableCollection
getTableProps={getTableProps as AnyProps}
getTableBodyProps={getTableBodyProps as AnyBodyProps}
headerGroups={headerGroups as AnyHeaders}
rows={rows as AnyRows}
columns={tableColumns as AnyColumns}
prepareRow={prepareRow as AnyPrepareRow}
loading={false}
highlightRowId={highlightRowId}
totalCount={rows.length}
pageSize={10}
/>
</div>
);
};
WithRowHighlighting.parameters = {
docs: {
description: {
story:
'TableCollection with row highlighting. Use the dropdown to highlight a specific row.',
},
},
};

View File

@@ -17,12 +17,12 @@
* under the License.
*/
import { bigNumberFormData } from '../../../../superset-ui-core/test/chart/fixtures/formData';
import VerifyCORS, {
Props as VerifyCORSProps,
} from '../../shared/components/VerifyCORS';
import Expandable from '../../shared/components/Expandable';
import { bigNumberFormData } from '../../../test/chart/fixtures/formData';
import {
VerifyCORS,
Expandable,
type VerifyCORSProps,
} from '@storybook-shared';
const REQUEST_METHODS = ['GET', 'POST'];
const ENDPOINTS = {

View File

@@ -22,7 +22,8 @@
*/
export default class ExtensibleFunction extends Function {
// @ts-expect-error
// @ts-expect-error - intentionally not calling super(), using setPrototypeOf pattern instead
// eslint-disable-next-line constructor-super
constructor(fn: Function) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, no-constructor-return
return Object.setPrototypeOf(fn, new.target.prototype);

View File

@@ -106,6 +106,7 @@ describe('safeHtmlSpan', () => {
expect(safeSpan).toEqual(
<span
className="safe-html-wrapper"
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: htmlString }}
/>,
);

View File

@@ -167,6 +167,8 @@ export function safeHtmlSpan(possiblyHtmlString: string) {
return (
<span
className="safe-html-wrapper"
// Safe: HTML is sanitized before rendering
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: sanitizeHtml(possiblyHtmlString) }}
/>
);

View File

@@ -231,7 +231,7 @@ describe('ChartDataProvider', () => {
mockLoadDatasource.mockImplementation(() => new Promise(() => {}));
setup();
await screen.findByRole('status');
expect(await screen.findByRole('status')).toBeInTheDocument();
});
test('shows payload when loaded', async () => {

View File

@@ -276,7 +276,7 @@ describe('SuperChart', () => {
};
// Update the resize observer trigger to ensure it's called after component mount
/* oxlint-disable-next-line jest/no-disabled-tests */
/* oxlint-disable-next-line jest/no-disabled-tests, jest/expect-expect -- skipped test */
test.skip('works when width and height are percent', async () => {
const { container } = render(
<SuperChart

View File

@@ -1,18 +0,0 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100,
"safari": 15,
"firefox": 91
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": []
}

View File

@@ -1,55 +0,0 @@
import { dirname, join } from 'path';
const customConfig = require('../../../webpack.config.js');
module.exports = {
addons: [
getAbsolutePath('@storybook/addon-controls'),
'@mihkeleidast/storybook-addon-source',
getAbsolutePath('@storybook/addon-actions'),
getAbsolutePath('@storybook/addon-links'),
],
stories: ['../storybook/stories/**/*.stories.[tj]sx'],
webpackFinal: config => ({
...config,
module: {
...config.module,
rules: [
...customConfig.module.rules,
// Fix for Storybook 8 ESM issue with react-dom/test-utils
{
test: /\.m?js$/,
resolve: {
fullySpecified: false,
},
},
],
},
resolve: {
...config.resolve,
...customConfig.resolve,
alias: {
...config.resolve?.alias,
...customConfig.resolve?.alias,
},
},
}),
typescript: {
reactDocgen: 'none',
},
framework: {
name: getAbsolutePath('@storybook/react-webpack5'),
options: {},
},
docs: {
autodocs: false,
},
};
function getAbsolutePath(value) {
return dirname(require.resolve(join(value, 'package.json')));
}

View File

@@ -1,77 +0,0 @@
import { withJsx } from '@mihkeleidast/storybook-addon-source';
import {
configure,
getTimeFormatterRegistry,
smartDateFormatter,
getCategoricalSchemeRegistry,
getSequentialSchemeRegistry,
CategoricalD3,
CategoricalSuperset,
SequentialCommon,
SequentialD3,
} from '@superset-ui/core';
import themeDecorator from './themeDecorator';
import './storybook.css';
export const decorators = [withJsx, themeDecorator];
export const parameters = {
passArgsFirst: false,
options: {
name: '✨ Superset UI',
addonPanelInRight: false,
enableShortcuts: false,
goFullScreen: false,
hierarchyRootSeparator: null,
hierarchySeparator: /\|/,
selectedAddonPanel: undefined, // The order of addons in the "Addon panel" is the same as you import them in 'addons.js'. The first panel will be opened by default as you run Storybook
showAddonPanel: true,
showSearchBox: false,
showStoriesPanel: true,
sidebarAnimations: true,
sortStoriesByKind: false,
url: '#',
storySort: (a, b) => {
if (a.kind === b.kind) {
return 0;
}
if (
a.id.startsWith('core-packages') &&
!b.id.startsWith('core-packages')
) {
return -1;
}
if (
!a.id.startsWith('core-packages') &&
b.id.startsWith('core-packages')
) {
return 1;
}
return a.id.localeCompare(b.id, undefined, { numeric: true });
},
},
};
// Superset setup
configure();
// Register color schemes
const categoricalSchemeRegistry = getCategoricalSchemeRegistry();
[CategoricalD3, CategoricalSuperset].forEach(group => {
group.forEach(scheme => {
categoricalSchemeRegistry.registerValue(scheme.id, scheme);
});
});
categoricalSchemeRegistry.setDefaultKey('d3Category10');
const sequentialSchemeRegistry = getSequentialSchemeRegistry();
[SequentialCommon, SequentialD3].forEach(group => {
group.forEach(scheme => {
sequentialSchemeRegistry.registerValue(scheme.id, scheme);
});
});
getTimeFormatterRegistry()
.registerValue('smart_date', smartDateFormatter)
.setDefaultKey('smart_date');

View File

@@ -1,19 +0,0 @@
html,
body,
#root {
height: 100%;
font-family:
BlinkMacSystemFont,
Roboto,
Helvetica Neue,
sans-serif;
font-weight: 200;
color: #484848;
}
#root > div {
padding: 8px;
}
code {
background: none;
}

View File

@@ -1,10 +0,0 @@
// themeDecorator.js
import { supersetTheme, ThemeProvider } from '@apache-superset/core/ui';
const ThemeDecorator = Story => (
<ThemeProvider theme={supersetTheme}>
<Story />
</ThemeProvider>
);
export default ThemeDecorator;

View File

@@ -1,89 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [0.20.0](https://github.com/apache/superset/compare/v2021.41.0...v0.20.0) (2024-09-09)
### Bug Fixes
- **ci:** fix failed `docker-build` CI job ([#28442](https://github.com/apache/superset/issues/28442)) ([4f51f05](https://github.com/apache/superset/commit/4f51f051334e5285495a53074c54aae0fea77156))
- **plugin-chart-echarts:** invalid total label location for negative values in stacked bar chart ([#21032](https://github.com/apache/superset/issues/21032)) ([a8ba544](https://github.com/apache/superset/commit/a8ba544e609ad3af449239c1fb956bb18c7066c4))
- **plugin-chart-echarts:** missing value format in mixed timeseries ([#21044](https://github.com/apache/superset/issues/21044)) ([2d1ba46](https://github.com/apache/superset/commit/2d1ba468441b113c574d6fcc5984e8e09ddbc1c6))
- **plugin-chart-pivot-table:** Invalid Formats Date Fields ([#20909](https://github.com/apache/superset/issues/20909)) ([3f124d9](https://github.com/apache/superset/commit/3f124d9d67f194746da0a49ee2456a0530ec73f9))
- **storybook:** fix broken Storybook stories during development ([#29587](https://github.com/apache/superset/issues/29587)) ([462cda4](https://github.com/apache/superset/commit/462cda400baa00b3bcc4a7f8aded362ca55e18a5))
### Features
- add drag and drop column rearrangement for table viz ([#19381](https://github.com/apache/superset/issues/19381)) ([7e9b85f](https://github.com/apache/superset/commit/7e9b85f76ca8cae38c38e11f857634216b1cd71c))
- add Nightingale chart support for echarts pie chart ([#28597](https://github.com/apache/superset/issues/28597)) ([f9d2451](https://github.com/apache/superset/commit/f9d2451b23e0f5b0316a61889a8d964704e888dc))
- Adds the ECharts Bubble chart ([#22107](https://github.com/apache/superset/issues/22107)) ([c81c60c](https://github.com/apache/superset/commit/c81c60c91fbcb09dd63c05f050e18ee09ceebfd6))
- Adds the ECharts Sunburst chart ([#22833](https://github.com/apache/superset/issues/22833)) ([30abefb](https://github.com/apache/superset/commit/30abefb519978e2760a492de51dc0d19803edf3a))
- **build:** uplift Storybook to v8 ([#29408](https://github.com/apache/superset/issues/29408)) ([3bf8989](https://github.com/apache/superset/commit/3bf89893dc17a8dea94a40a6d590625d215e8dab))
- Migrates Dual Line Chart to Mixed Chart ([#23910](https://github.com/apache/superset/issues/23910)) ([f5148ef](https://github.com/apache/superset/commit/f5148ef728ce649697c10fb7aa65982d7dd05638))
- Migrates Pivot Table v1 to v2 ([#23712](https://github.com/apache/superset/issues/23712)) ([522eb97](https://github.com/apache/superset/commit/522eb97b65dcaceb82f7f1b7de8545997a415253))
- Migrates TreeMap chart ([#23741](https://github.com/apache/superset/issues/23741)) ([af24092](https://github.com/apache/superset/commit/af24092440f23f807554dcc63e3e45c3c73273bf))
- **plugin-chart-echarts:** Echarts Waterfall ([#17906](https://github.com/apache/superset/issues/17906)) ([17792a5](https://github.com/apache/superset/commit/17792a507c7245c9e09c6eb98a774f2ef4ec8568))
- Removes the preset-chart-xy plugin ([#23943](https://github.com/apache/superset/issues/23943)) ([e922f09](https://github.com/apache/superset/commit/e922f0993d31732f048eb4d638c67cd7fc18bdfa))
- **storybook:** Co-habitating/Upgrading Storybooks to v7 (dependency madness ensues) ([#26907](https://github.com/apache/superset/issues/26907)) ([753ef69](https://github.com/apache/superset/commit/753ef695294ce26238b68ff41ba0a9af6aea74de))
- **timeseries-chart:** add percentage threshold input control ([#17758](https://github.com/apache/superset/issues/17758)) ([6bd4dd2](https://github.com/apache/superset/commit/6bd4dd257a6089a093bae3f251cf9f0976d353e6))
# [0.19.0](https://github.com/apache/superset/compare/v2021.41.0...v0.19.0) (2024-09-07)
### Bug Fixes
- **ci:** fix failed `docker-build` CI job ([#28442](https://github.com/apache/superset/issues/28442)) ([4f51f05](https://github.com/apache/superset/commit/4f51f051334e5285495a53074c54aae0fea77156))
- **plugin-chart-echarts:** invalid total label location for negative values in stacked bar chart ([#21032](https://github.com/apache/superset/issues/21032)) ([a8ba544](https://github.com/apache/superset/commit/a8ba544e609ad3af449239c1fb956bb18c7066c4))
- **plugin-chart-echarts:** missing value format in mixed timeseries ([#21044](https://github.com/apache/superset/issues/21044)) ([2d1ba46](https://github.com/apache/superset/commit/2d1ba468441b113c574d6fcc5984e8e09ddbc1c6))
- **plugin-chart-pivot-table:** Invalid Formats Date Fields ([#20909](https://github.com/apache/superset/issues/20909)) ([3f124d9](https://github.com/apache/superset/commit/3f124d9d67f194746da0a49ee2456a0530ec73f9))
- **storybook:** fix broken Storybook stories during development ([#29587](https://github.com/apache/superset/issues/29587)) ([462cda4](https://github.com/apache/superset/commit/462cda400baa00b3bcc4a7f8aded362ca55e18a5))
### Features
- add drag and drop column rearrangement for table viz ([#19381](https://github.com/apache/superset/issues/19381)) ([7e9b85f](https://github.com/apache/superset/commit/7e9b85f76ca8cae38c38e11f857634216b1cd71c))
- add Nightingale chart support for echarts pie chart ([#28597](https://github.com/apache/superset/issues/28597)) ([f9d2451](https://github.com/apache/superset/commit/f9d2451b23e0f5b0316a61889a8d964704e888dc))
- Adds the ECharts Bubble chart ([#22107](https://github.com/apache/superset/issues/22107)) ([c81c60c](https://github.com/apache/superset/commit/c81c60c91fbcb09dd63c05f050e18ee09ceebfd6))
- Adds the ECharts Sunburst chart ([#22833](https://github.com/apache/superset/issues/22833)) ([30abefb](https://github.com/apache/superset/commit/30abefb519978e2760a492de51dc0d19803edf3a))
- **build:** uplift Storybook to v8 ([#29408](https://github.com/apache/superset/issues/29408)) ([3bf8989](https://github.com/apache/superset/commit/3bf89893dc17a8dea94a40a6d590625d215e8dab))
- Migrates Dual Line Chart to Mixed Chart ([#23910](https://github.com/apache/superset/issues/23910)) ([f5148ef](https://github.com/apache/superset/commit/f5148ef728ce649697c10fb7aa65982d7dd05638))
- Migrates Pivot Table v1 to v2 ([#23712](https://github.com/apache/superset/issues/23712)) ([522eb97](https://github.com/apache/superset/commit/522eb97b65dcaceb82f7f1b7de8545997a415253))
- Migrates TreeMap chart ([#23741](https://github.com/apache/superset/issues/23741)) ([af24092](https://github.com/apache/superset/commit/af24092440f23f807554dcc63e3e45c3c73273bf))
- **plugin-chart-echarts:** Echarts Waterfall ([#17906](https://github.com/apache/superset/issues/17906)) ([17792a5](https://github.com/apache/superset/commit/17792a507c7245c9e09c6eb98a774f2ef4ec8568))
- Removes the preset-chart-xy plugin ([#23943](https://github.com/apache/superset/issues/23943)) ([e922f09](https://github.com/apache/superset/commit/e922f0993d31732f048eb4d638c67cd7fc18bdfa))
- **storybook:** Co-habitating/Upgrading Storybooks to v7 (dependency madness ensues) ([#26907](https://github.com/apache/superset/issues/26907)) ([753ef69](https://github.com/apache/superset/commit/753ef695294ce26238b68ff41ba0a9af6aea74de))
- **timeseries-chart:** add percentage threshold input control ([#17758](https://github.com/apache/superset/issues/17758)) ([6bd4dd2](https://github.com/apache/superset/commit/6bd4dd257a6089a093bae3f251cf9f0976d353e6))
# [0.18.0](https://github.com/apache-superset/superset-ui/compare/v0.17.87...v0.18.0) (2021-08-30)
**Note:** Version bump only for package @superset-ui/demo
## [0.17.63](https://github.com/apache-superset/superset-ui/compare/v0.17.62...v0.17.63) (2021-07-02)
**Note:** Version bump only for package @superset-ui/demo
## [0.17.62](https://github.com/apache-superset/superset-ui/compare/v0.17.61...v0.17.62) (2021-07-02)
**Note:** Version bump only for package @superset-ui/demo
## [0.17.61](https://github.com/apache-superset/superset-ui/compare/v0.17.60...v0.17.61) (2021-07-02)
**Note:** Version bump only for package @superset-ui/demo

View File

@@ -1,28 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# @superset-ui/demo
Storybook for `@superset-ui` packages.
**See it live:** [apache-superset.github.io/superset-ui](https://apache-superset.github.io/superset-ui)
For documentation on running Storybook locally and adding stories, see the
[Storybook documentation](https://superset.apache.org/docs/developer_portal/testing/storybook)
in the Developer Portal.

View File

@@ -1,84 +0,0 @@
{
"name": "@superset-ui/demo",
"version": "0.20.0",
"private": true,
"description": "Storybook for Superset UI ✨",
"keywords": [
"storybook",
"superset",
"ui",
"visualization",
"analysis",
"data"
],
"homepage": "https://github.com/apache/superset/tree/master/superset-frontend/packages/superset-ui-demo#readme",
"bugs": {
"url": "https://github.com/apache/superset/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/apache/superset.git",
"directory": "superset-frontend/packages/superset-ui-demo"
},
"license": "Apache-2.0",
"main": "index.js",
"scripts": {
"build-storybook": "npm run demo:clean && storybook build",
"demo:build": "npm run demo:clean && storybook build -o _gh-pages",
"demo:clean": "rm -rf _gh-pages",
"demo:publish": "gh-pages -d _gh-pages",
"deploy-demo": "npm run demo:build && npm run demo:publish && npm run demo:clean",
"storybook": "storybook dev -p 9001"
},
"dependencies": {
"@emotion/cache": "^11.14.0",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@mihkeleidast/storybook-addon-source": "^1.0.1",
"@react-icons/all-files": "^4.1.0",
"@storybook/addon-actions": "^8.6.15",
"@storybook/addon-controls": "^8.6.15",
"@storybook/addon-links": "^8.6.15",
"@storybook/react": "^8.6.15",
"@storybook/types": "^8.6.15",
"@types/react-loadable": "^5.5.11",
"core-js": "3.48.0",
"gh-pages": "^6.3.0",
"jquery": "^4.0.0",
"memoize-one": "^6.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-loadable": "^5.5.0",
"react-resizable": "^3.1.3"
},
"devDependencies": {
"@babel/core": "^7.29.0",
"@babel/preset-env": "^7.29.0",
"@babel/preset-react": "^7.28.5",
"@babel/preset-typescript": "^7.28.5",
"@storybook/react-webpack5": "^8.6.15",
"babel-loader": "^10.0.0",
"fork-ts-checker-webpack-plugin": "^9.1.0",
"ts-loader": "^9.5.4",
"typescript": "^5.9.3"
},
"peerDependencies": {
"@apache-superset/core": "*",
"@superset-ui/core": "*",
"@superset-ui/legacy-plugin-chart-calendar": "*",
"@superset-ui/legacy-plugin-chart-chord": "*",
"@superset-ui/legacy-plugin-chart-country-map": "*",
"@superset-ui/legacy-plugin-chart-horizon": "*",
"@superset-ui/legacy-plugin-chart-map-box": "*",
"@superset-ui/legacy-plugin-chart-paired-t-test": "*",
"@superset-ui/legacy-plugin-chart-parallel-coordinates": "*",
"@superset-ui/legacy-plugin-chart-partition": "*",
"@superset-ui/legacy-plugin-chart-rose": "*",
"@superset-ui/legacy-plugin-chart-world-map": "*",
"@superset-ui/legacy-preset-chart-deckgl": "*",
"@superset-ui/legacy-preset-chart-nvd3": "*",
"@superset-ui/plugin-chart-echarts": "*",
"@superset-ui/plugin-chart-table": "*",
"@superset-ui/plugin-chart-word-cloud": "*"
}
}

View File

@@ -1,90 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import {
Layout,
Menu,
Button,
Card,
Input,
Space,
} from '@superset-ui/core/components';
import { Alert, Table } from 'antd';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Icons } from '@superset-ui/core/components/Icons';
const { Header, Content, Sider } = Layout;
export default {
title: 'Example/ExampleApp',
};
export const KitchenSink = () => {
const columns = [
{ title: 'Name', dataIndex: 'name' },
{ title: 'Age', dataIndex: 'age' },
{ title: 'Address', dataIndex: 'address' },
];
const data = [
{ key: 1, name: 'John Brown', age: 32, address: 'New York' },
{ key: 2, name: 'Jim Green', age: 42, address: 'London' },
{ key: 3, name: 'Joe Black', age: 28, address: 'Sydney' },
];
return (
<Layout style={{ minHeight: '100vh' }}>
<Header style={{ color: 'white', fontSize: 18 }}>My App</Header>
<Layout>
<Sider width={200}>
<Menu
mode="inline"
defaultSelectedKeys={['1']}
style={{ height: '100%' }}
items={[
{ key: '1', icon: <Icons.UserOutlined />, label: 'Users' },
{ key: '2', icon: <Icons.BookOutlined />, label: 'Devices' },
{ key: '3', icon: <Icons.CheckCircleFilled />, label: 'Alerts' },
]}
/>
</Sider>
<Layout style={{ padding: '24px' }}>
<Content>
<Space direction="vertical" size="large" style={{ width: '100%' }}>
<Alert
message="Welcome"
description="You are logged in."
type="info"
/>
<Card title="Quick Actions">
<Space>
<Button type="primary">Create</Button>
<Button>Settings</Button>
<Input placeholder="Search..." />
</Space>
</Card>
<Card title="User Table">
<Table columns={columns} dataSource={data} pagination={false} />
</Card>
</Space>
</Content>
</Layout>
</Layout>
</Layout>
);
};

View File

@@ -1,53 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { SuperChart } from '@superset-ui/core';
import CalendarChartPlugin from '@superset-ui/legacy-plugin-chart-calendar';
import data from './data';
import dummyDatasource from '../../../shared/dummyDatasource';
new CalendarChartPlugin().configure({ key: 'calendar' }).register();
export default {
title: 'Legacy Chart Plugins/legacy-plugin-chart-calendar',
};
export const basic = () => (
<SuperChart
chartType="calendar"
width={400}
height={400}
datasource={dummyDatasource}
queriesData={[{ data }]}
formData={{
cellSize: 10,
cellPadding: 2,
cellRadius: 0,
domainGranularity: 'month',
subdomainGranularity: 'day',
linearColorScheme: 'schemeRdYlBu',
steps: 10,
yAxisFormat: '.3s',
xAxisTimeFormat: 'smart_date',
showLegend: true,
showValues: false,
showMetricName: true,
}}
/>
);

View File

@@ -1,58 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable no-magic-numbers */
import { SuperChart } from '@superset-ui/core';
import { useTheme } from '@apache-superset/core/ui';
import MapBoxChartPlugin from '@superset-ui/legacy-plugin-chart-map-box';
import { generateData } from './data';
new MapBoxChartPlugin().configure({ key: 'map-box' }).register();
export default {
title: 'Legacy Chart Plugins/legacy-plugin-chart-map-box',
};
export const Basic = () => {
const theme = useTheme();
return (
<SuperChart
chartType="map-box"
width={400}
height={400}
queriesData={[{ data: generateData(theme) }]}
formData={{
allColumnsX: 'LON',
allColumnsY: 'LAT',
clusteringRadius: '60',
globalOpacity: 1,
mapboxColor: 'rgb(244, 176, 42)',
mapboxLabel: [],
mapboxStyle: 'mapbox://styles/mapbox/light-v9',
pandasAggfunc: 'sum',
pointRadius: 'Auto',
pointRadiusUnit: 'Pixels',
renderWhileDragging: true,
viewportLatitude: 37.78711146014447,
viewportLongitude: -122.37633433151713,
viewportZoom: 10.026425338292782,
}}
/>
);
};

View File

@@ -1,52 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { SuperChart, VizType } from '@superset-ui/core';
import PartitionChartPlugin from '@superset-ui/legacy-plugin-chart-partition';
import data from './data';
import dummyDatasource from '../../../shared/dummyDatasource';
new PartitionChartPlugin().configure({ key: VizType.Partition }).register();
export default {
title: 'Legacy Chart Plugins/legacy-plugin-chart-partition',
};
export const basic = () => (
<SuperChart
chartType={VizType.Partition}
width={400}
height={400}
datasource={dummyDatasource}
queriesData={[{ data }]}
formData={{
colorScheme: 'd3Category10',
dateTimeFormat: '%Y-%m-%d',
equalDateSize: true,
groupby: ['region', 'country_code'],
logScale: false,
metrics: ['sum__SP_POP_TOTL'],
numberFormat: '.3s',
partitionLimit: '5',
partitionThreshold: '0.05',
richTooltip: true,
timeSeriesOption: 'not-time',
}}
/>
);

View File

@@ -1,45 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable no-magic-numbers, sort-keys */
import { SuperChart, VizType } from '@superset-ui/core';
import RoseChartPlugin from '@superset-ui/legacy-plugin-chart-rose';
import data from './data';
new RoseChartPlugin().configure({ key: VizType.Rose }).register();
export default {
title: 'Legacy Chart Plugins/legacy-plugin-chart-rose',
};
export const basic = () => (
<SuperChart
chartType={VizType.Rose}
width={400}
height={400}
queriesData={[{ data }]}
formData={{
colorScheme: 'd3Category10',
dateTimeFormat: '%Y-%m-%d',
numberFormat: '.3s',
richTooltip: true,
roseAreaProportion: false,
}}
/>
);

View File

@@ -1,269 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable sort-keys, no-magic-numbers */
export default {
cache_key: null,
cached_dttm: null,
cache_timeout: 86400,
error: null,
form_data: {
datasource: '10__table',
viz_type: 'deck_arc',
slice_id: 71,
url_params: {},
granularity_sqla: 'dttm',
time_grain_sqla: null,
time_range: ' : ',
start_spatial: {
type: 'latlong',
latCol: 'LATITUDE',
lonCol: 'LONGITUDE',
},
end_spatial: {
type: 'latlong',
latCol: 'LATITUDE_DEST',
lonCol: 'LONGITUDE_DEST',
},
row_limit: 5000,
filter_nulls: true,
adhoc_filters: [
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: '1b92e906-53a1-48e2-8e45-056fc5c9d2dc',
comparator: '',
operator: 'IS NOT NULL',
subject: 'LATITUDE',
},
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: '0ec864e8-e3e1-42cc-b0f8-4620dfc1c806',
comparator: '',
operator: 'IS NOT NULL',
subject: 'LATITUDE_DEST',
},
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: 'ecf4d524-eb35-45a8-b928-91398ebcf498',
comparator: '',
operator: 'IS NOT NULL',
subject: 'LONGITUDE',
},
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: '5297586e-9c42-4c5a-bd5d-8a5fed4d698f',
comparator: '',
operator: 'IS NOT NULL',
subject: 'LONGITUDE_DEST',
},
],
mapbox_style: 'mapbox://styles/mapbox/light-v9',
viewport: {
altitude: 1.5,
bearing: 8.546256357301871,
height: 642,
latitude: 44.596651438714254,
longitude: -91.84340711201104,
maxLatitude: 85.05113,
maxPitch: 60,
maxZoom: 20,
minLatitude: -85.05113,
minPitch: 0,
minZoom: 0,
pitch: 60,
width: 997,
zoom: 2.929837070560775,
},
autozoom: true,
color_picker: {
a: 1,
b: 135,
g: 122,
r: 0,
},
target_color_picker: {
r: 0,
g: 122,
b: 135,
a: 1,
},
dimension: null,
color_scheme: 'bnbColors',
label_colors: {},
stroke_width: 1,
legend_position: 'tr',
legend_format: null,
js_columns: [],
where: '',
having: '',
filters: [
{
col: 'LATITUDE',
op: 'IS NOT NULL',
val: '',
},
{
col: 'LATITUDE_DEST',
op: 'IS NOT NULL',
val: '',
},
{
col: 'LONGITUDE',
op: 'IS NOT NULL',
val: '',
},
{
col: 'LONGITUDE_DEST',
op: 'IS NOT NULL',
val: '',
},
],
},
is_cached: false,
query:
'SELECT "LATITUDE" AS "LATITUDE",\n "LONGITUDE" AS "LONGITUDE",\n "LONGITUDE_DEST" AS "LONGITUDE_DEST",\n "LATITUDE_DEST" AS "LATITUDE_DEST"\nFROM flights\nWHERE "LATITUDE" IS NOT NULL\n AND "LATITUDE_DEST" IS NOT NULL\n AND "LONGITUDE" IS NOT NULL\n AND "LONGITUDE_DEST" IS NOT NULL\nLIMIT 5000\nOFFSET 0',
status: 'success',
stacktrace: null,
rowcount: 5000,
data: {
features: [
{
sourcePosition: [-149.99618999999998, 61.174319999999994],
targetPosition: [-122.30931000000001, 47.44898],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-118.40807, 33.94254],
targetPosition: [-80.09559, 26.683159999999997],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-122.37483999999999, 37.619],
targetPosition: [-80.94313000000001, 35.214009999999995],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-118.40807, 33.94254],
targetPosition: [-80.29056, 25.79325],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-122.30931000000001, 47.44898],
targetPosition: [-149.99618999999998, 61.174319999999994],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-122.37483999999999, 37.619],
targetPosition: [-93.21692, 44.88055],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-115.15233, 36.08036],
targetPosition: [-93.21692, 44.88055],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-118.40807, 33.94254],
targetPosition: [-80.94313000000001, 35.214009999999995],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-122.37483999999999, 37.619],
targetPosition: [-97.0372, 32.89595],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-115.15233, 36.08036],
targetPosition: [-84.42694, 33.640440000000005],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-104.667, 39.85841],
targetPosition: [-84.42694, 33.640440000000005],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-115.15233, 36.08036],
targetPosition: [-80.29056, 25.79325],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-118.40807, 33.94254],
targetPosition: [-93.21692, 44.88055],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-111.97776999999999, 40.78839],
targetPosition: [-84.42694, 33.640440000000005],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-122.30931000000001, 47.44898],
targetPosition: [-93.21692, 44.88055],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-149.99618999999998, 61.174319999999994],
targetPosition: [-122.30931000000001, 47.44898],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-149.99618999999998, 61.174319999999994],
targetPosition: [-122.30931000000001, 47.44898],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-122.37483999999999, 37.619],
targetPosition: [-95.33972, 29.98047],
cat_color: null,
__timestamp: null,
},
{
sourcePosition: [-149.99618999999998, 61.174319999999994],
targetPosition: [-122.5975, 45.58872],
cat_color: null,
__timestamp: null,
},
],
mapboxApiKey:
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
},
};

View File

@@ -1,113 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable sort-keys */
/* eslint-disable no-magic-numbers */
export default {
cache_key: null,
cached_dttm: null,
cache_timeout: 86400,
error: null,
form_data: {
color_picker: { a: 1, b: 0, g: 255, r: 14 },
datasource: '5__table',
extruded: true,
granularity_sqla: 'dttm',
grid_size: 120,
groupby: [],
mapbox_style: 'mapbox://styles/mapbox/satellite-streets-v9',
point_radius: 'Auto',
point_radius_fixed: { type: 'fix', value: 2000 },
point_radius_unit: 'Pixels',
row_limit: 5000,
size: 'count',
spatial: { latCol: 'LAT', lonCol: 'LON', type: 'latlong' },
time_grain_sqla: null,
viewport: {
bearing: 155.80099696026355,
latitude: 37.7942314882596,
longitude: -122.42066918995666,
pitch: 53.470800300695146,
zoom: 12.699690845482069,
},
viz_type: 'deck_grid',
slice_id: 69,
time_range: ' : ',
adhoc_filters: [
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: '72912258-6f4f-4f04-a570-58317ca49b11',
comparator: '',
operator: 'IS NOT NULL',
subject: 'LAT',
},
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: '7e19669b-48ef-4be8-a7e1-8378dedb4c00',
comparator: '',
operator: 'IS NOT NULL',
subject: 'LON',
},
],
where: '',
having: '',
filters: [
{ col: 'LAT', op: 'IS NOT NULL', val: '' },
{ col: 'LON', op: 'IS NOT NULL', val: '' },
],
},
is_cached: false,
query:
'SELECT "LAT" AS "LAT",\n "LON" AS "LON",\n COUNT(*) AS count\nFROM\n (SELECT datetime,\n ROUND(LON*10000000)/10000000 as LON,\n ROUND(LAT*10000000)/10000000 as LAT, NUMBER , STREET,\n UNIT,\n CITY,\n DISTRICT,\n REGION,\n POSTCODE,\n ID occupancy,\n radius_miles,\n geohash,\n delimited\n FROM long_lat) AS expr_qry\nWHERE "LAT" IS NOT NULL\n AND "LON" IS NOT NULL\nGROUP BY "LAT",\n "LON"\nORDER BY count DESC\nLIMIT 5000\nOFFSET 0',
status: 'success',
stacktrace: null,
rowcount: 5000,
data: {
features: [
{ position: [-122.4221936, 37.7786083], weight: 2415 },
{ position: [-122.4101989, 37.7878771], weight: 2391 },
{ position: [-122.4205965, 37.8054735], weight: 1349 },
{ position: [-122.4125137, 37.7908413], weight: 1004 },
{ position: [-122.4088144, 37.7912984], weight: 816 },
{ position: [-122.3934248, 37.7776271], weight: 610 },
{ position: [-122.390972, 37.789376], weight: 460 },
{ position: [-122.3804676, 37.7334388], weight: 453 },
{ position: [-122.4214063, 37.7813858], weight: 453 },
{ position: [-122.3961419, 37.7905823], weight: 422 },
{ position: [-122.3922757, 37.7858294], weight: 376 },
{ position: [-122.3903881, 37.7826463], weight: 359 },
{ position: [-122.3936422, 37.7870311], weight: 353 },
{ position: [-122.435635, 37.7852314], weight: 306 },
{ position: [-122.3971336, 37.7790975], weight: 301 },
{ position: [-122.3921161, 37.7864536], weight: 300 },
{ position: [-122.390611, 37.7876797], weight: 292 },
{ position: [-122.4055041, 37.804244], weight: 291 },
{ position: [-122.4136476, 37.7910263], weight: 264 },
{ position: [-122.4224908, 37.7867552], weight: 247 },
{ position: [-122.4123203, 37.7784493], weight: 240 },
{ position: [-122.4368896, 37.7822303], weight: 239 },
{ position: [-122.389625, 37.7806302], weight: 237 },
],
mapboxApiKey:
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
metricLabels: ['count'],
},
};

View File

@@ -1,113 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable sort-keys */
/* eslint-disable no-magic-numbers */
export default {
cache_key: null,
cached_dttm: null,
cache_timeout: 86400,
error: null,
form_data: {
color_picker: { a: 1, b: 0, g: 255, r: 14 },
datasource: '5__table',
extruded: true,
granularity_sqla: 'dttm',
grid_size: 120,
groupby: [],
mapbox_style: 'mapbox://styles/mapbox/satellite-streets-v9',
point_radius: 'Auto',
point_radius_fixed: { type: 'fix', value: 2000 },
point_radius_unit: 'Pixels',
row_limit: 5000,
size: 'count',
spatial: { latCol: 'LAT', lonCol: 'LON', type: 'latlong' },
time_grain_sqla: null,
viewport: {
bearing: 155.80099696026355,
latitude: 37.7942314882596,
longitude: -122.42066918995666,
pitch: 53.470800300695146,
zoom: 12.699690845482069,
},
viz_type: 'deck_grid',
slice_id: 69,
time_range: ' : ',
adhoc_filters: [
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: '72912258-6f4f-4f04-a570-58317ca49b11',
comparator: '',
operator: 'IS NOT NULL',
subject: 'LAT',
},
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: '7e19669b-48ef-4be8-a7e1-8378dedb4c00',
comparator: '',
operator: 'IS NOT NULL',
subject: 'LON',
},
],
where: '',
having: '',
filters: [
{ col: 'LAT', op: 'IS NOT NULL', val: '' },
{ col: 'LON', op: 'IS NOT NULL', val: '' },
],
},
is_cached: false,
query:
'SELECT "LAT" AS "LAT",\n "LON" AS "LON",\n COUNT(*) AS count\nFROM\n (SELECT datetime,\n ROUND(LON*10000000)/10000000 as LON,\n ROUND(LAT*10000000)/10000000 as LAT, NUMBER , STREET,\n UNIT,\n CITY,\n DISTRICT,\n REGION,\n POSTCODE,\n ID occupancy,\n radius_miles,\n geohash,\n delimited\n FROM long_lat) AS expr_qry\nWHERE "LAT" IS NOT NULL\n AND "LON" IS NOT NULL\nGROUP BY "LAT",\n "LON"\nORDER BY count DESC\nLIMIT 5000\nOFFSET 0',
status: 'success',
stacktrace: null,
rowcount: 5000,
data: {
features: [
{ position: [-122.4221936, 37.7786083], weight: 2415 },
{ position: [-122.4101989, 37.7878771], weight: 2391 },
{ position: [-122.4205965, 37.8054735], weight: 1349 },
{ position: [-122.4125137, 37.7908413], weight: 1004 },
{ position: [-122.4088144, 37.7912984], weight: 816 },
{ position: [-122.3934248, 37.7776271], weight: 610 },
{ position: [-122.390972, 37.789376], weight: 460 },
{ position: [-122.3804676, 37.7334388], weight: 453 },
{ position: [-122.4214063, 37.7813858], weight: 453 },
{ position: [-122.3961419, 37.7905823], weight: 422 },
{ position: [-122.3922757, 37.7858294], weight: 376 },
{ position: [-122.3903881, 37.7826463], weight: 359 },
{ position: [-122.3936422, 37.7870311], weight: 353 },
{ position: [-122.435635, 37.7852314], weight: 306 },
{ position: [-122.3971336, 37.7790975], weight: 301 },
{ position: [-122.3921161, 37.7864536], weight: 300 },
{ position: [-122.390611, 37.7876797], weight: 292 },
{ position: [-122.4055041, 37.804244], weight: 291 },
{ position: [-122.4136476, 37.7910263], weight: 264 },
{ position: [-122.4224908, 37.7867552], weight: 247 },
{ position: [-122.4123203, 37.7784493], weight: 240 },
{ position: [-122.4368896, 37.7822303], weight: 239 },
{ position: [-122.389625, 37.7806302], weight: 237 },
],
mapboxApiKey:
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
metricLabels: ['count'],
},
};

View File

@@ -1,227 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable sort-keys */
/* eslint-disable no-magic-numbers */
export const payload = theme => ({
cache_key: null,
cached_dttm: null,
cache_timeout: 86400,
error: null,
form_data: {
datasource: '11__table',
viz_type: 'deck_path',
slice_id: 72,
url_params: {},
granularity_sqla: null,
time_grain_sqla: null,
time_range: ' : ',
line_column: 'path_json',
line_type: 'json',
row_limit: 5000,
filter_nulls: true,
adhoc_filters: [
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: 'b4c1a7de-17ef-4505-b688-2760c0c22e1f',
comparator: '',
operator: 'IS NOT NULL',
subject: 'path_json',
},
],
mapbox_style: 'mapbox://styles/mapbox/light-v9',
viewport: {
altitude: 1.5,
bearing: 0,
height: 1094,
latitude: 37.73671752604488,
longitude: -122.18885402582598,
maxLatitude: 85.05113,
maxPitch: 60,
maxZoom: 20,
minLatitude: -85.05113,
minPitch: 0,
minZoom: 0,
pitch: 0,
width: 669,
zoom: 9.51847667620428,
},
color_picker: { a: 1, b: 135, g: 122, r: 0 },
line_width: 150,
reverse_long_lat: false,
autozoom: true,
js_columns: ['color'],
where: '',
having: '',
filters: [{ col: 'path_json', op: 'IS NOT NULL', val: '' }],
},
is_cached: false,
query:
'SELECT color AS color,\n path_json AS path_json\nFROM bart_lines\nWHERE path_json IS NOT NULL\nLIMIT 5000\nOFFSET 0',
status: 'success',
stacktrace: null,
rowcount: 5,
data: {
features: [
{
color: theme.colorPrimary,
path: [
[-122.3535851, 37.9360513],
[-122.3179784, 37.9249513],
[-122.300284, 37.902646],
[-122.2843653, 37.8735039],
[-122.269058, 37.8694562],
[-122.2709185, 37.85301],
[-122.2689342, 37.8283973],
[-122.2707195, 37.8080566],
[-122.2718706, 37.804996],
[-122.2948251, 37.8064628],
[-122.3971496, 37.794745],
[-122.4030149, 37.7905282],
[-122.4084631, 37.7862646],
[-122.4157833, 37.7803439],
[-122.4219476, 37.7653052],
[-122.4206096, 37.7528545],
[-122.4359052, 37.7340058],
[-122.448995, 37.723273],
[-122.471192, 37.7067871],
[-122.4672607, 37.6842548],
[-122.4449822, 37.6635925],
[-122.4169649, 37.6372339],
[-122.3876274, 37.5993171],
],
__timestamp: null,
extraProps: { color: theme.colorPrimary },
},
{
color: theme.colorWarning,
path: [
[-122.353165, 37.936887],
[-122.317269, 37.925655],
[-122.299272, 37.903059],
[-122.283451, 37.87404],
[-122.268045, 37.869867],
[-122.26978, 37.853024],
[-122.2677961, 37.8284091],
[-122.2695925, 37.8079322],
[-122.2721546, 37.8035508],
[-122.2666476, 37.7964139],
[-122.2253433, 37.7739122],
[-122.1985085, 37.7530763],
[-122.1625282, 37.7216747],
[-122.1280105, 37.6961822],
[-122.0888196, 37.669805],
[-122.0584803, 37.6342836],
[-122.0187396, 37.5906334],
[-121.9772135, 37.5567286],
],
__timestamp: null,
extraProps: { color: theme.colorWarning },
},
{
color: theme.colorError,
path: [
[-121.945154, 38.018914],
[-122.024597, 38.003275],
[-122.029095, 37.973737],
[-122.056013, 37.928403],
[-122.067423, 37.905628],
[-122.123801, 37.893394],
[-122.183791, 37.878361],
[-122.251793, 37.844601],
[-122.2666934, 37.8282587],
[-122.2684655, 37.8078078],
[-122.2715151, 37.80322],
[-122.2947035, 37.8055689],
[-122.3969458, 37.7938605],
[-122.402211, 37.7898921],
[-122.40766, 37.7856278],
[-122.4147696, 37.779936],
[-122.4208208, 37.7651836],
[-122.4195378, 37.7525542],
[-122.4349986, 37.7334634],
[-122.4482045, 37.722627],
[-122.4701365, 37.7064541],
[-122.466233, 37.684638],
[-122.444116, 37.664174],
[-122.416038, 37.637753000000004],
[-122.392612, 37.616035],
[-122.38666, 37.599787],
],
__timestamp: null,
extraProps: { color: theme.colorError },
},
{
color: theme.colorSuccess,
path: [
[-121.900367, 37.701695],
[-121.928099, 37.699759],
[-122.075567, 37.690754],
[-122.1266292, 37.6975918],
[-122.160905, 37.7229335],
[-122.1968609, 37.7543157],
[-122.2239172, 37.7753131],
[-122.2653405, 37.7978803],
[-122.294582, 37.804675],
[-122.396742, 37.792976],
[-122.401407, 37.789256],
[-122.406857, 37.784991],
[-122.413756, 37.779528],
[-122.419694, 37.765062],
[-122.418466, 37.752254],
[-122.434092, 37.732921],
[-122.447414, 37.721981],
[-122.469081, 37.706121],
],
__timestamp: null,
extraProps: { color: theme.colorSuccess },
},
{
color: theme.colorWarning,
path: [
[-121.9764, 37.557355],
[-122.017867, 37.591208],
[-122.057551, 37.6348],
[-122.087967, 37.670399],
[-122.1272512, 37.696851],
[-122.161717, 37.7223045],
[-122.1976851, 37.7536963],
[-122.2246308, 37.7746129],
[-122.2658775, 37.7970877],
[-122.2945333, 37.8037768],
[-122.3965382, 37.7920915],
[-122.4006031, 37.7886199],
[-122.406054, 37.7843542],
[-122.4127424, 37.77912],
[-122.4185672, 37.7649404],
[-122.4173942, 37.7519538],
[-122.4331854, 37.7323786],
[-122.4466235, 37.721335],
[-122.4683093, 37.705461],
],
__timestamp: null,
extraProps: { color: theme.colorWarning },
},
],
mapboxApiKey:
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
metricLabels: [],
},
});

View File

@@ -1,130 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
export default {
cache_key: '31946c4488d1899827d283b668d83281',
cached_dttm: '2020-03-04T22:40:59',
cache_timeout: 129600,
error: null,
form_data: {
datasource: '93829__table',
viz_type: 'deck_polygon',
url_params: {},
granularity_sqla: null,
time_range: '100 years ago : ',
line_column: 'geometry',
line_type: 'json',
adhoc_filters: [
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: '4ea1a468-43f9-45f0-9655-576d2ab04bc1',
comparator: '',
operator: 'IS NOT NULL',
subject: 'geometry',
},
],
metric: 'count',
point_radius_fixed: {
type: 'fix',
value: 1000,
},
row_limit: 1000,
reverse_long_lat: false,
filter_nulls: true,
mapbox_style: 'mapbox://styles/mapbox/light-v9',
viewport: {
longitude: 6.85236157047845,
latitude: 31.222656842808707,
zoom: 1,
bearing: 0,
pitch: 0,
},
autozoom: true,
fill_color_picker: {
r: 0,
g: 122,
b: 135,
a: 1,
},
stroke_color_picker: {
r: 0,
g: 122,
b: 135,
a: 1,
},
filled: true,
stroked: false,
extruded: true,
multiplier: 1,
line_width: 10,
linear_color_scheme: 'blue_white_yellow',
opacity: 80,
num_buckets: 5,
table_filter: false,
toggle_polygons: true,
legend_position: 'tr',
legend_format: null,
js_columns: [],
where: '',
having: '',
filters: [
{
col: 'geometry',
op: 'IS NOT NULL',
val: '',
},
],
},
is_cached: true,
status: 'success',
stacktrace: null,
rowcount: 1,
data: {
features: [
{
count: 10,
name: 'Test',
polygon: {
type: 'Feature',
properties: {},
geometry: {
type: 'Polygon',
coordinates: [
[
[-149.95132113447022, 61.1310423022678],
[-149.95386039742468, 61.12975642234931],
[-149.9529189574033, 61.128200857856946],
[-149.94943860572158, 61.12793112735274],
[-149.9468993514573, 61.12921688848983],
[-149.94784044016444, 61.1307724989074],
[-149.95132113447022, 61.1310423022678],
],
],
},
},
__timestamp: null,
elevation: 0,
},
],
mapboxApiKey:
'pk.eyJ1IjoiZ2tlZWUiLCJhIjoiY2lvbmN5dXhtMDA4NXRybTJjZWU2ZHVxOSJ9.CJG_6Oz52y5yI5cr3Ct_aQ',
metricLabels: ['count'],
},
};

View File

@@ -1,382 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable sort-keys */
/* eslint-disable no-magic-numbers */
export default {
cache_key: null,
cached_dttm: null,
cache_timeout: 86400,
error: null,
form_data: {
datasource: '9__table',
viz_type: 'deck_polygon',
slice_id: 70,
url_params: {},
granularity_sqla: null,
time_grain_sqla: null,
time_range: ' : ',
line_column: 'contour',
line_type: 'json',
adhoc_filters: [
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: '8039e26e-6daa-4daa-87ae-a9932e3500e6',
comparator: '',
operator: 'IS NOT NULL',
subject: 'contour',
},
],
metric: 'count',
point_radius_fixed: { type: 'fix', value: 1000 },
row_limit: 10000,
reverse_long_lat: false,
filter_nulls: true,
mapbox_style: 'mapbox://styles/mapbox/light-v9',
viewport: {
altitude: 1.5,
bearing: 37.89506450385642,
height: 906,
latitude: 37.752020331384834,
longitude: -122.43388541747726,
maxLatitude: 85.05113,
maxPitch: 60,
maxZoom: 20,
minLatitude: -85.05113,
minPitch: 0,
minZoom: 0,
pitch: 60,
width: 667,
zoom: 11.133995608594631,
},
autozoom: true,
fill_color_picker: { a: 1, b: 73, g: 65, r: 3 },
stroke_color_picker: { a: 1, b: 135, g: 122, r: 0 },
filled: true,
stroked: false,
extruded: true,
multiplier: 1,
line_width: 10,
linear_color_scheme: 'blue_white_yellow',
opacity: 80,
num_buckets: 5,
table_filter: false,
toggle_polygons: true,
legend_position: 'tr',
legend_format: null,
js_columns: ['population', 'area'],
where: '',
having: '',
filters: [{ col: 'contour', op: 'IS NOT NULL', val: '' }],
},
is_cached: false,
query:
'SELECT population AS population,\n area AS area,\n contour AS contour,\n COUNT(*) AS count\nFROM sf_population_polygons\nWHERE contour IS NOT NULL\nGROUP BY population,\n area,\n contour\nORDER BY count DESC\nLIMIT 10000\nOFFSET 0',
status: 'success',
stacktrace: null,
rowcount: 25,
data: {
features: [
{
population: 406,
area: 0.18,
count: 1,
polygon: [
[-122.4000672, 37.7903039],
[-122.4020657, 37.7887212],
[-122.4019604, 37.7889222],
[-122.4021896, 37.7900391],
[-122.4038416, 37.7898293],
[-122.4046134, 37.7935651],
[-122.4001488, 37.7941342],
[-122.399572, 37.7913265],
[-122.3994942, 37.7913249],
[-122.3991486, 37.7910166],
[-122.39948, 37.7907443],
[-122.4000672, 37.7903039],
],
__timestamp: null,
elevation: 1000,
extraProps: { population: 406, area: 0.18 },
},
{
population: 3183,
area: 6.11,
count: 1,
polygon: [
[-122.4709907, 37.7875345],
[-122.4725434, 37.787369],
[-122.474584, 37.7870491],
[-122.4761622, 37.7869787],
[-122.478708, 37.7869141],
[-122.4813756, 37.7871989],
[-122.4839107, 37.7877057],
[-122.4840196, 37.7886714],
[-122.4840713, 37.7895716],
[-122.484215, 37.7897676],
[-122.4862218, 37.7905133],
[-122.4861481, 37.7906058],
[-122.4861088, 37.7906875],
[-122.4858962, 37.7908937],
[-122.4857404, 37.7910213],
[-122.4854114, 37.7914684],
[-122.4852847, 37.791713],
[-122.484995, 37.7919486],
[-122.4847529, 37.7922157],
[-122.4845413, 37.7925221],
[-122.4843636, 37.7927401],
[-122.4840721, 37.793295],
[-122.4838582, 37.7936461],
[-122.4835934, 37.7940352],
[-122.4832937, 37.7946713],
[-122.4835185, 37.79473],
[-122.4830886, 37.7956115],
[-122.4829995, 37.7959034],
[-122.4811062, 37.7996127],
[-122.4810689, 37.7997047],
[-122.4810634, 37.7998236],
[-122.4809868, 37.7999382],
[-122.4809748, 37.8003312],
[-122.480758, 37.8004434],
[-122.4806561, 37.8006483],
[-122.4805924, 37.800725],
[-122.4803755, 37.8010946],
[-122.480296, 37.8012937],
[-122.4802023, 37.8014169],
[-122.4801818, 37.8015573],
[-122.4488026, 37.801772],
[-122.4483597, 37.8015868],
[-122.4479216, 37.8015323],
[-122.4478196, 37.8016332],
[-122.4473414, 37.7985527],
[-122.447303, 37.798459199999996],
[-122.4462995, 37.7918785],
[-122.4493673, 37.791488],
[-122.4509955, 37.7912099],
[-122.4520356, 37.7909989],
[-122.4590286, 37.789716],
[-122.4594757, 37.7897106],
[-122.4599255, 37.7895428],
[-122.4686535, 37.7877835],
[-122.4709907, 37.7875345],
],
__timestamp: null,
elevation: 1000,
extraProps: { population: 3183, area: 6.11 },
},
{
population: 3713,
area: 0.9,
count: 1,
polygon: [
[-122.4000583, 37.7936936],
[-122.4001488, 37.7941342],
[-122.4046134, 37.7935651],
[-122.405143, 37.796211],
[-122.4018534, 37.7966262],
[-122.4022286, 37.7984297],
[-122.4031596, 37.8030984],
[-122.4047983, 37.8029008],
[-122.4055454, 37.8066342],
[-122.4054957, 37.8066406],
[-122.4046961, 37.8062647],
[-122.4031944, 37.8051186],
[-122.4017323, 37.8051922],
[-122.400573, 37.806121],
[-122.4009636, 37.8035634],
[-122.4008425, 37.8034294],
[-122.4004799, 37.8034661],
[-122.3985512, 37.8046028],
[-122.3985201, 37.8046033],
[-122.3985596, 37.8045264],
[-122.3982279, 37.8042811],
[-122.3982256, 37.8042564],
[-122.3999717, 37.803225],
[-122.3996027, 37.8028079],
[-122.3978247, 37.8038103],
[-122.3977935, 37.8038108],
[-122.3975172, 37.8034946],
[-122.3975148, 37.8034706],
[-122.3996153, 37.8022824],
[-122.3997233, 37.8021763],
[-122.3994097, 37.8018242],
[-122.3992151, 37.8018645],
[-122.3971156, 37.803021],
[-122.3970844, 37.8030215],
],
__timestamp: null,
elevation: 1000,
extraProps: { population: 5846, area: 1.23 },
},
{
population: 13768,
area: 0.75,
count: 1,
polygon: [
[-122.4042198, 37.7916906],
[-122.4038416, 37.7898293],
[-122.4021896, 37.7900391],
[-122.4019604, 37.7889222],
[-122.4020657, 37.7887212],
[-122.4029031, 37.7880856],
[-122.4034308, 37.7876418],
[-122.4045833, 37.7867306],
[-122.4048499, 37.78681],
[-122.4080362, 37.7864096],
[-122.408595, 37.7892256],
[-122.4118857, 37.7888075],
[-122.4122662, 37.7906728],
[-122.4139159, 37.7904631],
[-122.4148256, 37.7949882],
[-122.405143, 37.796211],
[-122.4049572, 37.7953267],
[-122.4047106, 37.7940214],
[-122.4042198, 37.7916906],
],
__timestamp: null,
elevation: 1000,
extraProps: { population: 13768, area: 0.75 },
},
{
population: 19289,
area: 4.4,
count: 1,
polygon: [
[-122.4586889, 37.7307515],
[-122.4591931, 37.730603],
[-122.4593522, 37.7305158],
[-122.4595637, 37.7303686],
[-122.4597838, 37.7301095],
[-122.4598784, 37.7298845],
[-122.4599838, 37.7295225],
[-122.460024, 37.7291957],
[-122.4600025, 37.7287394],
[-122.4604127, 37.7287392],
[-122.4608163, 37.7286811],
[-122.4614222, 37.7283303],
[-122.4618248, 37.7281189],
[-122.4620685, 37.7280496],
[-122.4623783, 37.7280113],
[-122.4627034, 37.7280243],
[-122.4628883, 37.728055499999996],
[-122.4627359, 37.7277841],
[-122.4626158, 37.7275292],
[-122.4625471, 37.7272254],
[-122.4625456, 37.7269975],
[-122.4626867, 37.7257749],
[-122.4628155, 37.7254824],
[-122.4622126, 37.7252655],
[-122.4622803, 37.7251473],
[-122.4622712, 37.7230211],
[-122.4624314, 37.723008899999996],
[-122.462655, 37.7229479],
[-122.4628403, 37.7228017],
[-122.463189, 37.7226046],
[-122.4637514, 37.7223952],
[-122.4639816, 37.722327],
[-122.4642937, 37.7221137],
[-122.4644348, 37.7219078],
[-122.4644842, 37.72168],
[-122.4716737, 37.7216313],
[-122.4717603, 37.7216712],
[-122.4723224, 37.7216238],
[-122.4720569, 37.726824],
[-122.4719072, 37.7289272],
[-122.4715943, 37.7289021],
[-122.4715487, 37.729784],
[-122.4718665, 37.7297845],
[-122.4715693, 37.7347068],
[-122.4710681, 37.7356067],
[-122.4705741, 37.736589],
[-122.47068, 37.736647],
[-122.4708059, 37.7367737],
[-122.4708698, 37.7369516],
[-122.4442995, 37.7322772],
[-122.4442889, 37.7315689],
[-122.4465784, 37.731549],
[-122.4534113, 37.7315306],
[-122.4535909, 37.7314884],
[-122.4549159, 37.731465],
[-122.4557626, 37.7313488],
[-122.4566075, 37.7311877],
[-122.4574742, 37.7309975],
[-122.4582225, 37.7307774],
[-122.4584725, 37.7307528],
[-122.4586889, 37.7307515],
],
__timestamp: null,
elevation: 1000,
extraProps: { population: 19289, area: 4.4 },
},
{
population: 23088,
area: 2.74,
count: 1,
polygon: [
[-122.4384025, 37.794807],
[-122.446587, 37.7937653],
[-122.4464465, 37.792813699999996],
[-122.447303, 37.798459199999996],
[-122.4473414, 37.7985527],
[-122.4478196, 37.8016332],
[-122.4479216, 37.8015323],
[-122.4483597, 37.8015868],
[-122.4488026, 37.801772],
[-122.4491786, 37.8020739],
[-122.4494602, 37.8024543],
[-122.4495655, 37.8027914],
[-122.4495837, 37.8031531],
[-122.4494957, 37.8034703],
[-122.4493881, 37.8037108],
[-122.4491242, 37.8040079],
[-122.4488145, 37.8042286],
[-122.4482407, 37.8044777],
[-122.4483233, 37.8050078],
[-122.4485291, 37.8067632],
[-122.4483226, 37.8068106],
[-122.4481598, 37.8068744],
[-122.4478339, 37.8070522],
[-122.4471803, 37.8074771],
[-122.446638, 37.8075252],
[-122.4464767, 37.8075168],
[-122.4452557, 37.8076269],
[-122.4417181, 37.8077876],
[-122.4418195, 37.8078923],
[-122.4419352, 37.8078808],
[-122.4419435, 37.8078669],
[-122.4418599, 37.8077804],
[-122.4418735, 37.8077713],
[-122.4419766, 37.8078774],
[-122.4419771, 37.8078952],
[-122.4418165, 37.8079116],
[-122.4418236, 37.8079843],
[-122.4423208, 37.8079321],
[-122.4423776, 37.8079182],
],
__timestamp: null,
elevation: 1000,
extraProps: { population: 79407, area: 8.9 },
},
],
mapboxApiKey:
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
metricLabels: ['count'],
},
};

View File

@@ -1,228 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable sort-keys */
/* eslint-disable no-magic-numbers */
export default {
cache_key: null,
cached_dttm: null,
cache_timeout: 86400,
error: null,
form_data: {
color_picker: { a: 0.82, b: 3, g: 0, r: 205 },
datasource: '5__table',
granularity_sqla: 'dttm',
groupby: [],
mapbox_style: 'mapbox://styles/mapbox/light-v9',
multiplier: 10,
point_radius_fixed: { type: 'metric', value: 'count' },
point_unit: 'square_m',
row_limit: 5000,
size: 'count',
spatial: { latCol: 'LAT', lonCol: 'LON', type: 'latlong' },
time_grain_sqla: null,
viewport: {
bearing: -4.952916738791771,
latitude: 37.78926922909199,
longitude: -122.42613341901688,
pitch: 4.750411100577438,
zoom: 12.729132798697304,
},
viz_type: 'deck_scatter',
slice_id: 66,
time_range: ' : ',
adhoc_filters: [
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: 'b0487cd7-2139-476f-a388-1f0f9759530f',
comparator: '',
operator: 'IS NOT NULL',
subject: 'LAT',
},
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: '9398a511-3673-468c-b47e-634f59358b6f',
comparator: '',
operator: 'IS NOT NULL',
subject: 'LON',
},
],
where: '',
having: '',
filters: [
{ col: 'LAT', op: 'IS NOT NULL', val: '' },
{ col: 'LON', op: 'IS NOT NULL', val: '' },
],
},
is_cached: false,
query:
'SELECT "LAT" AS "LAT",\n "LON" AS "LON",\n COUNT(*) AS count\nFROM\n (SELECT datetime,\n ROUND(LON*10000000)/10000000 as LON,\n ROUND(LAT*10000000)/10000000 as LAT, NUMBER , STREET,\n UNIT,\n CITY,\n DISTRICT,\n REGION,\n POSTCODE,\n ID occupancy,\n radius_miles,\n geohash,\n delimited\n FROM long_lat) AS expr_qry\nWHERE "LAT" IS NOT NULL\n AND "LON" IS NOT NULL\nGROUP BY "LAT",\n "LON"\nORDER BY count DESC\nLIMIT 5000\nOFFSET 0',
status: 'success',
stacktrace: null,
rowcount: 5000,
data: {
features: [
{
metric: 2415,
radius: 2415,
cat_color: null,
position: [-122.4221936, 37.7786083],
__timestamp: null,
},
{
metric: 2391,
radius: 2391,
cat_color: null,
position: [-122.4101989, 37.7878771],
__timestamp: null,
},
{
metric: 1349,
radius: 1349,
cat_color: null,
position: [-122.4205965, 37.8054735],
__timestamp: null,
},
{
metric: 1004,
radius: 1004,
cat_color: null,
position: [-122.4125137, 37.7908413],
__timestamp: null,
},
{
metric: 816,
radius: 816,
cat_color: null,
position: [-122.4088144, 37.7912984],
__timestamp: null,
},
{
metric: 610,
radius: 610,
cat_color: null,
position: [-122.3934248, 37.7776271],
__timestamp: null,
},
{
metric: 460,
radius: 460,
cat_color: null,
position: [-122.390972, 37.789376],
__timestamp: null,
},
{
metric: 453,
radius: 453,
cat_color: null,
position: [-122.3804676, 37.7334388],
__timestamp: null,
},
{
metric: 453,
radius: 453,
cat_color: null,
position: [-122.4214063, 37.7813858],
__timestamp: null,
},
{
metric: 422,
radius: 422,
cat_color: null,
position: [-122.3961419, 37.7905823],
__timestamp: null,
},
{
metric: 376,
radius: 376,
cat_color: null,
position: [-122.3922757, 37.7858294],
__timestamp: null,
},
{
metric: 359,
radius: 359,
cat_color: null,
position: [-122.3903881, 37.7826463],
__timestamp: null,
},
{
metric: 353,
radius: 353,
cat_color: null,
position: [-122.3936422, 37.7870311],
__timestamp: null,
},
{
metric: 306,
radius: 306,
cat_color: null,
position: [-122.435635, 37.7852314],
__timestamp: null,
},
{
metric: 301,
radius: 301,
cat_color: null,
position: [-122.3971336, 37.7790975],
__timestamp: null,
},
{
metric: 300,
radius: 300,
cat_color: null,
position: [-122.3921161, 37.7864536],
__timestamp: null,
},
{
metric: 292,
radius: 292,
cat_color: null,
position: [-122.390611, 37.7876797],
__timestamp: null,
},
{
metric: 291,
radius: 291,
cat_color: null,
position: [-122.4055041, 37.804244],
__timestamp: null,
},
{
metric: 264,
radius: 264,
cat_color: null,
position: [-122.4136476, 37.7910263],
__timestamp: null,
},
{
metric: 247,
radius: 247,
cat_color: null,
position: [-122.4224908, 37.7867552],
__timestamp: null,
},
],
mapboxApiKey:
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
metricLabels: ['count'],
},
};

View File

@@ -1,135 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable sort-keys */
/* eslint-disable no-magic-numbers */
export default {
cache_key: null,
cached_dttm: null,
cache_timeout: 86400,
error: null,
form_data: {
color_picker: { a: 1, b: 0, g: 255, r: 14 },
datasource: '5__table',
granularity_sqla: 'dttm',
grid_size: 20,
groupby: [],
mapbox_style: 'mapbox://styles/mapbox/dark-v9',
point_radius: 'Auto',
point_radius_fixed: { type: 'fix', value: 2000 },
point_unit: 'square_m',
row_limit: 5000,
size: 'count',
spatial: { latCol: 'LAT', lonCol: 'LON', type: 'latlong' },
time_grain_sqla: null,
viewport: {
bearing: -4.952916738791771,
latitude: 37.76024135844065,
longitude: -122.41827069521386,
pitch: 4.750411100577438,
zoom: 14.161641703941438,
},
viz_type: 'deck_screengrid',
slice_id: 67,
time_range: ' : ',
adhoc_filters: [
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: '341bf332-81fe-4f9e-837e-90a4d8b8b9f0',
comparator: '',
operator: 'IS NOT NULL',
subject: 'LAT',
},
{
clause: 'WHERE',
expressionType: 'SIMPLE',
filterOptionName: '453dd738-e394-4ea2-bbe9-a7b59bf5e0cc',
comparator: '',
operator: 'IS NOT NULL',
subject: 'LON',
},
],
where: '',
having: '',
filters: [
{ col: 'LAT', op: 'IS NOT NULL', val: '' },
{ col: 'LON', op: 'IS NOT NULL', val: '' },
],
},
is_cached: false,
query:
'SELECT "LAT" AS "LAT",\n "LON" AS "LON",\n COUNT(*) AS count\nFROM\n (SELECT datetime,\n ROUND(LON*10000000)/10000000 as LON,\n ROUND(LAT*10000000)/10000000 as LAT, NUMBER , STREET,\n UNIT,\n CITY,\n DISTRICT,\n REGION,\n POSTCODE,\n ID occupancy,\n radius_miles,\n geohash,\n delimited\n FROM long_lat) AS expr_qry\nWHERE "LAT" IS NOT NULL\n AND "LON" IS NOT NULL\nGROUP BY "LAT",\n "LON"\nORDER BY count DESC\nLIMIT 5000\nOFFSET 0',
status: 'success',
stacktrace: null,
rowcount: 5000,
data: {
features: [
{ position: [-122.4221936, 37.7786083], weight: 2415, __timestamp: null },
{ position: [-122.4101989, 37.7878771], weight: 2391, __timestamp: null },
{ position: [-122.4205965, 37.8054735], weight: 1349, __timestamp: null },
{ position: [-122.4125137, 37.7908413], weight: 1004, __timestamp: null },
{ position: [-122.4088144, 37.7912984], weight: 816, __timestamp: null },
{ position: [-122.3934248, 37.7776271], weight: 610, __timestamp: null },
{ position: [-122.390972, 37.789376], weight: 460, __timestamp: null },
{ position: [-122.3804676, 37.7334388], weight: 453, __timestamp: null },
{ position: [-122.4214063, 37.7813858], weight: 453, __timestamp: null },
{ position: [-122.3961419, 37.7905823], weight: 422, __timestamp: null },
{ position: [-122.3922757, 37.7858294], weight: 376, __timestamp: null },
{ position: [-122.3903881, 37.7826463], weight: 359, __timestamp: null },
{ position: [-122.3936422, 37.7870311], weight: 353, __timestamp: null },
{ position: [-122.435635, 37.7852314], weight: 306, __timestamp: null },
{ position: [-122.3971336, 37.7790975], weight: 301, __timestamp: null },
{ position: [-122.3921161, 37.7864536], weight: 300, __timestamp: null },
{ position: [-122.390611, 37.7876797], weight: 292, __timestamp: null },
{ position: [-122.4055041, 37.804244], weight: 291, __timestamp: null },
{ position: [-122.4136476, 37.7910263], weight: 264, __timestamp: null },
{ position: [-122.4224908, 37.7867552], weight: 247, __timestamp: null },
{ position: [-122.4123203, 37.7784493], weight: 240, __timestamp: null },
{ position: [-122.4368896, 37.7822303], weight: 239, __timestamp: null },
{ position: [-122.389625, 37.7806302], weight: 237, __timestamp: null },
{ position: [-122.3990823, 37.7831803], weight: 237, __timestamp: null },
{ position: [-122.3959614, 37.7740032], weight: 219, __timestamp: null },
{ position: [-122.4041783, 37.8044503], weight: 216, __timestamp: null },
{ position: [-122.4005582, 37.7706919], weight: 210, __timestamp: null },
{ position: [-122.4040784, 37.8034687], weight: 209, __timestamp: null },
{ position: [-122.418513, 37.7717131], weight: 208, __timestamp: null },
{ position: [-122.4127266, 37.7899451], weight: 202, __timestamp: null },
{ position: [-122.402292, 37.7808479], weight: 201, __timestamp: null },
{ position: [-122.391326, 37.7892785], weight: 200, __timestamp: null },
{ position: [-122.3882041, 37.7195347], weight: 198, __timestamp: null },
{ position: [-122.3917766, 37.7876762], weight: 197, __timestamp: null },
{ position: [-122.4151204, 37.78524], weight: 196, __timestamp: null },
{ position: [-122.3902944, 37.7836002], weight: 191, __timestamp: null },
{ position: [-122.4162567, 37.775248], weight: 190, __timestamp: null },
{ position: [-122.404391, 37.7853957], weight: 190, __timestamp: null },
{ position: [-122.479301, 37.7269377], weight: 180, __timestamp: null },
{ position: [-122.396631, 37.7536653], weight: 176, __timestamp: null },
{ position: [-122.3990994, 37.7866056], weight: 175, __timestamp: null },
{ position: [-122.3990304, 37.7857742], weight: 166, __timestamp: null },
{ position: [-122.4032414, 37.7640112], weight: 165, __timestamp: null },
{ position: [-122.4242026, 37.7867158], weight: 165, __timestamp: null },
{ position: [-122.4258311, 37.7863612], weight: 164, __timestamp: null },
{ position: [-122.4125675, 37.7903477], weight: 161, __timestamp: null },
],
mapboxApiKey:
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
metricLabels: ['count'],
},
};

View File

@@ -1,77 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable sort-keys, no-magic-numbers */
export default [
{
label: 'East Asia & Pacific',
values: {
Q1: 1384725172.5,
Q2: 1717904169.0,
Q3: 2032724922.5,
whisker_high: 2240687901.0,
whisker_low: 1031863394.0,
outliers: [],
},
},
{
label: 'Europe & Central Asia',
values: {
Q1: 751386460.5,
Q2: 820716895.0,
Q3: 862814192.5,
whisker_high: 903095786.0,
whisker_low: 660881033.0,
outliers: [],
},
},
{
label: 'Latin America & Caribbean',
values: {
Q1: 313690832.5,
Q2: 421490233.0,
Q3: 529668114.5,
whisker_high: 626270167.0,
whisker_low: 220564224.0,
outliers: [],
},
},
{
label: 'South Asia',
values: {
Q1: 772373036.5,
Q2: 1059570231.0,
Q3: 1398841234.0,
whisker_high: 1720976995.0,
whisker_low: 572036107.0,
outliers: [],
},
},
{
label: 'Sub-Saharan Africa',
values: {
Q1: 320037758.0,
Q2: 467337821.0,
Q3: 676768689.0,
whisker_high: 974315323.0,
whisker_low: 228268752.0,
outliers: [],
},
},
];

View File

@@ -1,37 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { SuperChart, VizType } from '@superset-ui/core';
import dummyDatasource from '../../../../../shared/dummyDatasource';
import data from '../data';
export const basic = () => (
<SuperChart
chartType="box-plot"
width={800}
height={600}
datasource={dummyDatasource}
queriesData={[{ data }]}
formData={{
colorScheme: 'd3Category10',
vizType: VizType.BoxPlot,
whiskerOptions: 'Min/max (no outliers)',
}}
/>
);

View File

@@ -1,55 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { SuperChart, VizType } from '@superset-ui/core';
import dummyDatasource from '../../../../../shared/dummyDatasource';
import data from '../data';
export const basic = () => (
<SuperChart
chartType={VizType.LegacyBubble}
width={400}
height={400}
datasource={dummyDatasource}
queriesData={[{ data }]}
formData={{
annotationData: {},
bottomMargin: 'auto',
colorScheme: 'd3Category10',
entity: 'country_name',
leftMargin: 'auto',
maxBubbleSize: '50',
series: 'region',
showLegend: true,
size: 'sum__SP_POP_TOTL',
vizType: VizType.LegacyBubble,
x: 'sum__SP_RUR_TOTL_ZS',
xAxisFormat: '.3s',
xAxisLabel: 'x-axis label',
xAxisShowminmax: false,
xLogScale: false,
xTicksLayout: 'auto',
y: 'sum__SP_DYN_LE00_IN',
yAxisFormat: '.3s',
yAxisLabel: '',
yAxisShowminmax: false,
yLogScale: false,
}}
/>
);

View File

@@ -1,29 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { VizType } from '@superset-ui/core';
import { BulletChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
new BulletChartPlugin().configure({ key: VizType.Bullet }).register();
export default {
title: 'Legacy Chart Plugins/legacy-preset-chart-nvd3/Bullet',
};
export { basic } from './stories/basic';

View File

@@ -1,41 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { SuperChart, VizType } from '@superset-ui/core';
import dummyDatasource from '../../../../../shared/dummyDatasource';
import data from '../data';
export const basic = () => (
<SuperChart
chartType={VizType.Bullet}
width={400}
height={400}
datasource={dummyDatasource}
queriesData={[{ data }]}
formData={{
markerLabels: '',
markerLineLabels: '',
markerLines: '',
markers: '',
rangeLabels: '',
ranges: '',
vizType: VizType.Bullet,
}}
/>
);

View File

@@ -1,30 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { VizType } from '@superset-ui/core';
import { CompareChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
new CompareChartPlugin().configure({ key: VizType.Compare }).register();
export default {
title: 'Legacy Chart Plugins/legacy-preset-chart-nvd3/Compare',
};
export { basic } from './stories/basic';
export { timeFormat } from './stories/timeFormat';

Some files were not shown because too many files have changed in this diff Show More