From e46869b6b23249f80e7038cd3fa63a73fe61d6aa Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 6 Jan 2025 15:10:49 +0000 Subject: [PATCH 01/79] SRV-948 chore - dummy checks run --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 6fbb7f358d915..692e287120b81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ ###################################################################### # Node stage to deal with static asset construction ###################################################################### +#test ARG PY_VER=3.10-slim-bookworm # If BUILDPLATFORM is null, set it to 'amd64' (or leave as is otherwise). From 792509455f28e5cf422edfe7f30fbe602fcc3537 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 6 Jan 2025 15:20:47 +0000 Subject: [PATCH 02/79] SRV-948 chore - removing dummy comment --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 692e287120b81..6fbb7f358d915 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,6 @@ ###################################################################### # Node stage to deal with static asset construction ###################################################################### -#test ARG PY_VER=3.10-slim-bookworm # If BUILDPLATFORM is null, set it to 'amd64' (or leave as is otherwise). From 668ce25e28caa99f9cf17971b2d8b7f0bc21e7f5 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Wed, 18 Sep 2024 14:36:20 +0100 Subject: [PATCH 03/79] SRV-795 feat - reading language from url --- superset-frontend/src/constants.ts | 8 ++++++++ superset/security/manager.py | 2 +- superset/views/base.py | 6 +++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/constants.ts b/superset-frontend/src/constants.ts index c4fd0e94f9c3f..cd68bad3cf7da 100644 --- a/superset-frontend/src/constants.ts +++ b/superset-frontend/src/constants.ts @@ -111,6 +111,14 @@ export const URL_PARAMS = { name: 'focused_chart', type: 'number', }, + language: { + name: 'lang', + type: 'string' + }, + currency: { + name: 'currency', + type: 'string' + } } as const; export const RESERVED_CHART_URL_PARAMS: string[] = [ diff --git a/superset/security/manager.py b/superset/security/manager.py index 38fff7a3f44f8..8f27472d71f95 100644 --- a/superset/security/manager.py +++ b/superset/security/manager.py @@ -2662,7 +2662,7 @@ def has_guest_access(self, dashboard: "Dashboard") -> bool: return False dashboards = [ - r for r in user.resources if r["type"] == GuestTokenResourceType.DASHBOARD + r for r in user.resources if r["type"] == GuestTokenResourceType.DASHBOARD.value ] # TODO (embedded): remove this check once uuids are rolled out diff --git a/superset/views/base.py b/superset/views/base.py index 33ba43b2f6870..dda668f68600b 100644 --- a/superset/views/base.py +++ b/superset/views/base.py @@ -33,6 +33,7 @@ redirect, Response, session, + request ) from flask_appbuilder import BaseView, expose, Model, ModelView from flask_appbuilder.actions import action @@ -348,8 +349,11 @@ def cached_common_bootstrap_data( # pylint: disable=unused-argument def common_bootstrap_payload() -> dict[str, Any]: + locale = get_locale() + if request.args.get('lang'): + locale = Locale.parse(request.args.get('lang')) return { - **cached_common_bootstrap_data(utils.get_user_id(), get_locale()), + **cached_common_bootstrap_data(utils.get_user_id(), locale), "flash_messages": get_flashed_messages(with_categories=True), } From 5fc061e3bc660463570106b23a8bf51e5af8a707 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Thu, 19 Sep 2024 11:00:48 +0100 Subject: [PATCH 04/79] SRV-762 feat - firing resizing event --- .../components/DashboardBuilder/DashboardBuilder.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx index e5caed6968642..316b698a6bc22 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx @@ -444,6 +444,15 @@ const DashboardBuilder = () => { const [barTopOffset, setBarTopOffset] = useState(0); + const fireResizeEventToParent = () => { + const data = { + event: "supersetContentRefreshed", + width: window.document.body.scrollWidth, + height: window.document.body.scrollHeight, + } + window.parent.postMessage(data, "*"); + } + useEffect(() => { setBarTopOffset(headerRef.current?.getBoundingClientRect()?.height || 0); @@ -453,6 +462,7 @@ const DashboardBuilder = () => { setBarTopOffset( current => entries?.[0]?.contentRect?.height || current, ); + fireResizeEventToParent(); }); observer.observe(headerRef.current); From c673d8e992f71aca62a069f10413ce0f71de5da7 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 20 Sep 2024 14:36:32 +0100 Subject: [PATCH 05/79] SRV-796 feat - adding build action --- .github/workflows/build.yml | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000000..51854f8d02b6a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,70 @@ +name: "Docker Images" + +on: + push: + branches: + - main + pull_request: + types: [opened, reopened, synchronize] + +env: + AWS_REGION: eu-west-1 + +jobs: + build-image: + name: Build, Tag and Upload + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Create dist directory + run: mkdir dist + + - name: Compute labels + run: | + TAG_HASH="$(echo $GITHUB_SHA | head -c 8)" + TAG_NAME="$(echo $GITHUB_REF | sed -E -e 's:refs/pull/([0-9]+)/merge:pr.\1:' -e 's:refs/heads/::' -e 's:tag/v?([.0-9]+):v\1:' -e 's:/:.:')" + SUPERSET_REPOSITORY_URI="289222877357.dkr.ecr.eu-west-1.amazonaws.com/webgains/superset" + echo "TAG_HASH=$TAG_HASH" >> $GITHUB_ENV + echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV + echo "SUPERSET_REPOSITORY_URI=$SUPERSET_REPOSITORY_URI" >> $GITHUB_ENV + if [ $TAG_NAME = "main" ]; then echo "LATEST_TAG=$SUPERSET_REPOSITORY_URI:latest" >> $GITHUB_ENV; fi + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4.0.2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ env.AWS_REGION }} + + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2.0.1 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: | + ${{ env.SUPERSET_REPOSITORY_URI }}:${{ env.TAG_HASH }} + ${{ env.SUPERSET_REPOSITORY_URI }}:${{ env.TAG_NAME }} + ${{ env.LATEST_TAG }} + + - name: Create artifact + run: | + printf '[ + {"name":"superset","imageUri":"%s"} + ]' "$SUPERSET_REPOSITORY_URI:$TAG_HASH" > dist/images.json + + - name: Upload artifact to S3 + run: | + OBJECT_NAME="superset-$TAG_HASH-$(date +%Y-%m-%d)" + zip -r dist.zip dist + aws s3 cp dist.zip s3://superset-artifacts/$OBJECT_NAME \ No newline at end of file From f634d7dc2d2844c96a5438d25429ad777afa35bf Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 20 Sep 2024 14:55:34 +0100 Subject: [PATCH 06/79] SRV-796 fix - adding empty line at end of file --- .github/workflows/build.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51854f8d02b6a..10cca7b834f1c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,15 +56,3 @@ jobs: ${{ env.SUPERSET_REPOSITORY_URI }}:${{ env.TAG_HASH }} ${{ env.SUPERSET_REPOSITORY_URI }}:${{ env.TAG_NAME }} ${{ env.LATEST_TAG }} - - - name: Create artifact - run: | - printf '[ - {"name":"superset","imageUri":"%s"} - ]' "$SUPERSET_REPOSITORY_URI:$TAG_HASH" > dist/images.json - - - name: Upload artifact to S3 - run: | - OBJECT_NAME="superset-$TAG_HASH-$(date +%Y-%m-%d)" - zip -r dist.zip dist - aws s3 cp dist.zip s3://superset-artifacts/$OBJECT_NAME \ No newline at end of file From 643f37ae062f8d078079e81e10a23462ed03fbea Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 20 Sep 2024 16:44:19 +0100 Subject: [PATCH 07/79] SRV-796 fix - adding translations before build --- Dockerfile | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4f24360988101..6294d15b10f11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,17 +66,9 @@ RUN --mount=type=bind,source=./superset-frontend/package.json,target=./package.j # Runs the webpack build process COPY superset-frontend /app/superset-frontend -# Build the frontend if not in dev mode -RUN --mount=type=cache,target=/app/superset-frontend/.temp_cache \ - --mount=type=cache,target=/root/.npm \ - if [ "$DEV_MODE" = "false" ]; then \ - echo "Running 'npm run ${BUILD_CMD}'"; \ - npm run ${BUILD_CMD}; \ - else \ - echo "Skipping 'npm run ${BUILD_CMD}' in dev mode"; \ - fi; - # Copy translation files +# This copies the .po files needed for translation +RUN mkdir -p /app/superset/translations COPY superset/translations /app/superset/translations # Build the frontend if not in dev mode @@ -85,7 +77,7 @@ RUN if [ "$BUILD_TRANSLATIONS" = "true" ]; then \ fi; \ rm -rf /app/superset/translations/*/*/*.po; \ rm -rf /app/superset/translations/*/*/*.mo; - +RUN npm run ${BUILD_CMD} ###################################################################### # Base python layer From 135e2189c06d66f4b1742e07dce3239e25f6bce2 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 20 Sep 2024 16:32:06 +0100 Subject: [PATCH 08/79] SRV-796 debug - mute webpack output --- superset-frontend/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/webpack.config.js b/superset-frontend/webpack.config.js index dcc79a900f79d..6a7af30945759 100644 --- a/superset-frontend/webpack.config.js +++ b/superset-frontend/webpack.config.js @@ -240,7 +240,7 @@ const config = { }, }, output, - stats: 'minimal', + stats: 'none', /* Silence warning for missing export in @data-ui's internal structure. This issue arises from an internal implementation detail of @data-ui. As it's From 858bbf0dd4285d7a9fffd56c8e10299b5c05f343 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 20 Sep 2024 17:05:18 +0100 Subject: [PATCH 09/79] SRV-796 fix - copying frontend folder before running build-translations --- Dockerfile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6294d15b10f11..79febd9fa8978 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,17 +66,14 @@ RUN --mount=type=bind,source=./superset-frontend/package.json,target=./package.j # Runs the webpack build process COPY superset-frontend /app/superset-frontend -# Copy translation files # This copies the .po files needed for translation RUN mkdir -p /app/superset/translations COPY superset/translations /app/superset/translations +# Compiles .json files from the .po files, then deletes the .po files +RUN npm run build-translation +RUN rm /app/superset/translations/*/LC_MESSAGES/*.po +RUN rm /app/superset/translations/messages.pot -# Build the frontend if not in dev mode -RUN if [ "$BUILD_TRANSLATIONS" = "true" ]; then \ - npm run build-translation; \ - fi; \ - rm -rf /app/superset/translations/*/*/*.po; \ - rm -rf /app/superset/translations/*/*/*.mo; RUN npm run ${BUILD_CMD} ###################################################################### From 35ef468b6b78d22f07ff6eefc66c22add803e795 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 20 Sep 2024 17:49:48 +0100 Subject: [PATCH 10/79] SRV-796 fix - linter issues --- superset-frontend/src/constants.ts | 6 +++--- .../components/DashboardBuilder/DashboardBuilder.tsx | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/superset-frontend/src/constants.ts b/superset-frontend/src/constants.ts index cd68bad3cf7da..3869fe8a0e2ed 100644 --- a/superset-frontend/src/constants.ts +++ b/superset-frontend/src/constants.ts @@ -113,12 +113,12 @@ export const URL_PARAMS = { }, language: { name: 'lang', - type: 'string' + type: 'string', }, currency: { name: 'currency', - type: 'string' - } + type: 'string', + }, } as const; export const RESERVED_CHART_URL_PARAMS: string[] = [ diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx index 316b698a6bc22..2d20e246061ad 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx @@ -446,12 +446,12 @@ const DashboardBuilder = () => { const fireResizeEventToParent = () => { const data = { - event: "supersetContentRefreshed", - width: window.document.body.scrollWidth, - height: window.document.body.scrollHeight, - } - window.parent.postMessage(data, "*"); - } + event: 'supersetContentRefreshed', + width: window.document.body.scrollWidth, + height: window.document.body.scrollHeight, + }; + window.parent.postMessage(data, '*'); + }; useEffect(() => { setBarTopOffset(headerRef.current?.getBoundingClientRect()?.height || 0); From f4c03d89434f1c88cd1c19931a36a3fa32e62dee Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Wed, 16 Oct 2024 12:28:37 +0100 Subject: [PATCH 11/79] Fixed the `master` branch name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10cca7b834f1c..0b400eb5f1aff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: "Docker Images" on: push: branches: - - main + - master pull_request: types: [opened, reopened, synchronize] From b8e73d8c587045261a869b7c4eef3958506e94c5 Mon Sep 17 00:00:00 2001 From: David Rivera Date: Thu, 24 Oct 2024 10:12:14 +0200 Subject: [PATCH 12/79] SRV-817: Detecting filters on subject with JSON (pie charts) --- superset/jinja_context.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/superset/jinja_context.py b/superset/jinja_context.py index b0e29505a0d0b..797f22e757313 100644 --- a/superset/jinja_context.py +++ b/superset/jinja_context.py @@ -354,10 +354,16 @@ def get_filters(self, column: str, remove_filter: bool = False) -> list[Filter]: val: Union[Any, list[Any]] = flt.get("comparator") op: str = flt["operator"].upper() if flt.get("operator") else None # type: ignore if ( - flt.get("expressionType") == "SIMPLE" + (flt.get("expressionType") == "SIMPLE" and flt.get("clause") == "WHERE" and flt.get("subject") == column - and val + and val) + or + (isinstance(flt.get("subject"), dict) + and flt.get("expressionType") == "SIMPLE" + and flt.get("clause") == "WHERE" + and flt.get("subject").get("label") == column + and val) ): if remove_filter: if column not in self.removed_filters: From 0ad898ffca70105f8a6dd62dccfd83baf35b9cf5 Mon Sep 17 00:00:00 2001 From: David Rivera Date: Tue, 29 Oct 2024 14:18:21 +0100 Subject: [PATCH 13/79] SRV-820: Better position of dropdown for results x page --- .../plugins/plugin-chart-table/src/DataTable/DataTable.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx b/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx index 21ce6541cf2fd..5111e54ca2a4f 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx @@ -363,9 +363,7 @@ export default typedMemo(function DataTable({ {hasGlobalControl ? (
-
+
{hasPagination ? ( ({ ) : null}
{searchInput ? ( -
+
searchInput={ typeof searchInput === 'boolean' ? undefined : searchInput From 15199f87d86056a3120cbfbc72a08ca88f99ea35 Mon Sep 17 00:00:00 2001 From: David Rivera Date: Tue, 29 Oct 2024 15:31:10 +0100 Subject: [PATCH 14/79] SRV-820: Adding titles to comparison tables --- .../plugins/plugin-chart-table/src/TableChart.tsx | 8 ++++---- .../plugins/plugin-chart-table/src/transformProps.ts | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index b9cc335a34f0b..5c1a30153dd69 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -270,9 +270,9 @@ export default function TableChart( } = props; const comparisonColumns = [ { key: 'all', label: t('Display all') }, - { key: '#', label: '#' }, - { key: '△', label: '△' }, - { key: '%', label: '%' }, + { key: '#', label: t('Previous value') }, + { key: '△', label: t('Difference') }, + { key: '%', label: t('% Difference') }, ]; const timestampFormatter = useCallback( value => getTimeFormatterForGranularity(timeGrain)(value), @@ -407,7 +407,7 @@ export default function TableChart( }; }; - const comparisonLabels = [t('Main'), '#', '△', '%']; + const comparisonLabels = [t('Main'), t('Previous value'), t('Difference'), t('% Difference')]; const filteredColumnsMeta = useMemo(() => { if (!isUsingTimeComparison) { return columnsMeta; diff --git a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts index 48871e4ea4185..1d6876bb837e4 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts @@ -368,7 +368,7 @@ const processComparisonColumns = ( }, { ...col, - label: `#`, + label: t('# Previous value'), key: `# ${col.key}`, config: getComparisonColConfig(`#`, col.key, columnConfig), formatter: getComparisonColFormatter( @@ -381,7 +381,7 @@ const processComparisonColumns = ( }, { ...col, - label: `△`, + label: t('△ Difference'), key: `△ ${col.key}`, config: getComparisonColConfig(`△`, col.key, columnConfig), formatter: getComparisonColFormatter( @@ -394,7 +394,7 @@ const processComparisonColumns = ( }, { ...col, - label: `%`, + label: t('% Difference'), key: `% ${col.key}`, config: getComparisonColConfig(`%`, col.key, columnConfig), formatter: getComparisonColFormatter( From a9ca7da9cc8282956e6fe1797326a9b0a2f2e111 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Wed, 30 Oct 2024 09:37:09 +0000 Subject: [PATCH 15/79] SRV-820 chore - changing main to current value --- superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index 5c1a30153dd69..3c8659e16f74b 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -407,7 +407,7 @@ export default function TableChart( }; }; - const comparisonLabels = [t('Main'), t('Previous value'), t('Difference'), t('% Difference')]; + const comparisonLabels = [t('Current value'), t('Previous value'), t('Difference'), t('% Difference')]; const filteredColumnsMeta = useMemo(() => { if (!isUsingTimeComparison) { return columnsMeta; From fcad8c43b1dd94360f8d054af87d3718e498dba1 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Wed, 30 Oct 2024 09:38:00 +0000 Subject: [PATCH 16/79] SRV-820 chore - removing special triangle character --- .../plugins/plugin-chart-table/src/transformProps.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts index 1d6876bb837e4..b0deed1533ff3 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts @@ -381,7 +381,7 @@ const processComparisonColumns = ( }, { ...col, - label: t('△ Difference'), + label: t('Difference'), key: `△ ${col.key}`, config: getComparisonColConfig(`△`, col.key, columnConfig), formatter: getComparisonColFormatter( From ba60f99157fd27fb219ce3ff1dc5795948004930 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Wed, 30 Oct 2024 09:39:51 +0000 Subject: [PATCH 17/79] SRV-820 chore - removing # and renaming main --- .../plugins/plugin-chart-table/src/transformProps.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts index b0deed1533ff3..28cdd295c4d34 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts @@ -355,7 +355,7 @@ const processComparisonColumns = ( return [ { ...col, - label: t('Main'), + label: t('Current value'), key: `${t('Main')} ${col.key}`, config: getComparisonColConfig(t('Main'), col.key, columnConfig), formatter: getComparisonColFormatter( @@ -368,7 +368,7 @@ const processComparisonColumns = ( }, { ...col, - label: t('# Previous value'), + label: t('Previous value'), key: `# ${col.key}`, config: getComparisonColConfig(`#`, col.key, columnConfig), formatter: getComparisonColFormatter( From 4b588857ce27a48055c374d3709af03ed5014859 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 28 Oct 2024 14:15:13 +0000 Subject: [PATCH 18/79] SRV-818 feat - adding setup for webgains lokalise keys --- Dockerfile | 6 ++++-- locales/.gitkeep | 0 superset-frontend/package.json | 2 +- .../src/BigNumber/BigNumberViz.tsx | 2 +- .../plugin-chart-table/src/TableChart.tsx | 7 +++---- superset-frontend/scripts/lokalise_merger.sh | 19 +++++++++++++++++++ .../src/components/Chart/Chart.tsx | 4 +--- .../components/DynamicEditableTitle/index.tsx | 2 +- .../src/components/EditableTitle/index.tsx | 4 ++-- .../src/components/Select/Select.tsx | 2 +- .../FilterControls/FilterControl.tsx | 11 ++++------- superset/config.py | 9 ++++++++- 12 files changed, 45 insertions(+), 23 deletions(-) create mode 100644 locales/.gitkeep create mode 100644 superset-frontend/scripts/lokalise_merger.sh diff --git a/Dockerfile b/Dockerfile index 79febd9fa8978..f8671cfd081d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64} # superset-node used for building frontend assets ###################################################################### FROM --platform=${BUILDPLATFORM} node:20-bullseye-slim AS superset-node -ARG BUILD_TRANSLATIONS="false" # Include translations in the final build +ARG BUILD_TRANSLATIONS="true" ENV BUILD_TRANSLATIONS=${BUILD_TRANSLATIONS} ARG DEV_MODE="false" # Skip frontend build in dev mode ENV DEV_MODE=${DEV_MODE} @@ -37,7 +37,7 @@ COPY docker/ /app/docker/ ARG NPM_BUILD_CMD="build" # Install system dependencies required for node-gyp -RUN /app/docker/apt-install.sh build-essential python3 zstd +RUN /app/docker/apt-install.sh build-essential python3 zstd jq # Define environment variables for frontend build ENV BUILD_CMD=${NPM_BUILD_CMD} \ @@ -69,6 +69,8 @@ COPY superset-frontend /app/superset-frontend # This copies the .po files needed for translation RUN mkdir -p /app/superset/translations COPY superset/translations /app/superset/translations +COPY locales /app/locales + # Compiles .json files from the .po files, then deletes the .po files RUN npm run build-translation RUN rm /app/superset/translations/*/LC_MESSAGES/*.po diff --git a/locales/.gitkeep b/locales/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/superset-frontend/package.json b/superset-frontend/package.json index bc2d833468789..707e237ee0986 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -42,7 +42,7 @@ "build-dev": "cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=development webpack --mode=development --color", "build-instrumented": "cross-env NODE_ENV=production BABEL_ENV=instrumented webpack --mode=production --color", "build-storybook": "storybook build", - "build-translation": "scripts/po2json.sh", + "build-translation": "scripts/po2json.sh && scripts/lokalise_merger.sh", "bundle-stats": "cross-env BUNDLE_ANALYZER=true npm run build && npx open-cli ../superset/static/stats/statistics.html", "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", "cover": "cross-env NODE_ENV=test NODE_OPTIONS=\"--max-old-space-size=4096\" jest --coverage", diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx index d7882ccdb6c15..4a9499a565e02 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx @@ -221,7 +221,7 @@ class BigNumberVis extends PureComponent { height: maxHeight, }} > - {text} + {t(text)}
); } diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index 3c8659e16f74b..47c841acb4f5b 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -571,7 +571,7 @@ export default function TableChart( color: ${theme.colors.grayscale.dark2}; `} > - {column.label} + {t(column.label)} ( />, ); } - // Add the current header headers.push( - {key} + {t(key.trim())} ( alignItems: 'flex-end', }} > - {label} + {t(label)}
diff --git a/superset-frontend/scripts/lokalise_merger.sh b/superset-frontend/scripts/lokalise_merger.sh new file mode 100644 index 0000000000000..da2ae9a1ad21c --- /dev/null +++ b/superset-frontend/scripts/lokalise_merger.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -e + +for file in $( find ../superset/translations/** -name '*.json' ); +do + extension=${file##*.} + filename="${file%.*}" + if [ $extension == "json" ] + then + locale=${file/#..\/superset\/translations\/} + locale=${locale%\/LC_MESSAGES\/messages.json} + if [ -f "../locales/$locale/translation.json" ] + then + output=$(jq -s '.[0].locale_data.superset *= (.[1] | with_entries({key:.key,value:[.value]})) | first' $file "../locales/$locale/translation.json") + echo $output > $file + fi + fi +done diff --git a/superset-frontend/src/components/Chart/Chart.tsx b/superset-frontend/src/components/Chart/Chart.tsx index 3526a26b3f9ce..ad2084a296f83 100644 --- a/superset-frontend/src/components/Chart/Chart.tsx +++ b/superset-frontend/src/components/Chart/Chart.tsx @@ -283,9 +283,7 @@ class Chart extends PureComponent { } renderSpinner(databaseName: string | undefined) { - const message = databaseName - ? t('Waiting on %s', databaseName) - : t('Waiting on database...'); + const message = t('Loading...'); return ( diff --git a/superset-frontend/src/components/DynamicEditableTitle/index.tsx b/superset-frontend/src/components/DynamicEditableTitle/index.tsx index dd439194383ad..b8e1dac79b25b 100644 --- a/superset-frontend/src/components/DynamicEditableTitle/index.tsx +++ b/superset-frontend/src/components/DynamicEditableTitle/index.tsx @@ -192,7 +192,7 @@ export const DynamicEditableTitle = memo( onClick={handleClick} onKeyPress={handleKeyPress} placeholder={placeholder} - value={currentTitle} + value={isEditing ? currentTitle : t(currentTitle)} css={css` cursor: ${isEditing ? 'text' : 'pointer'}; diff --git a/superset-frontend/src/components/EditableTitle/index.tsx b/superset-frontend/src/components/EditableTitle/index.tsx index fc01fb9f63b99..de84cb04f8fa0 100644 --- a/superset-frontend/src/components/EditableTitle/index.tsx +++ b/superset-frontend/src/components/EditableTitle/index.tsx @@ -232,10 +232,10 @@ export default function EditableTitle({ display: inline-block; `} > - {value} + {t(value)} ) : ( - {value} + {t(value)} ); } return ( diff --git a/superset-frontend/src/components/Select/Select.tsx b/superset-frontend/src/components/Select/Select.tsx index 91f9515448dc2..f760dbff6820d 100644 --- a/superset-frontend/src/components/Select/Select.tsx +++ b/superset-frontend/src/components/Select/Select.tsx @@ -447,7 +447,7 @@ const Select = forwardRef( const selectAllLabel = useMemo( () => () => // TODO: localize - `${SELECT_ALL_VALUE} (${formatNumber( + `${t(SELECT_ALL_VALUE as string)} (${formatNumber( NumberFormats.INTEGER, selectAllEligible.length, )})`, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx index 089b6857cb3f4..a34637bc4bfd8 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx @@ -22,7 +22,7 @@ import { InPortal, OutPortal, } from 'react-reverse-portal'; -import { styled, SupersetTheme, truncationCSS } from '@superset-ui/core'; +import { t, styled, SupersetTheme, truncationCSS } from '@superset-ui/core'; import { FormItem as StyledFormItem, Form } from 'src/components/Form'; import { Tooltip } from 'src/components/Tooltip'; import { FilterBarOrientation } from 'src/dashboard/types'; @@ -252,15 +252,12 @@ const FilterControl = ({ const label = useMemo( () => ( - - {name} + + {t(name)} {isRequired && } {filter.description?.trim() && ( - + )} {icon} diff --git a/superset/config.py b/superset/config.py index 8c31f6cfb76d9..98f8f41949ca4 100644 --- a/superset/config.py +++ b/superset/config.py @@ -393,7 +393,14 @@ def _try_json_readsha(filepath: str, length: int) -> str | None: } # Turning off i18n by default as translation in most languages are # incomplete and not well maintained. -LANGUAGES = {} +LANGUAGES = { + "en": {"flag": "us", "name": "English"}, + "es": {"flag": "es", "name": "Spanish"}, + "it": {"flag": "it", "name": "Italian"}, + "fr": {"flag": "fr", "name": "French"}, + "de": {"flag": "de", "name": "German"}, + "nl": {"flag": "nl", "name": "Dutch"} +} # Override the default d3 locale format From e708c82c4cc7af25f8cea2e7d30f746cdab890e6 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 28 Oct 2024 14:39:09 +0000 Subject: [PATCH 19/79] SRV-818 feat - adding superset user to folder copy --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f8671cfd081d8..14e4d44f241aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,11 +64,12 @@ RUN --mount=type=bind,source=./superset-frontend/package.json,target=./package.j fi # Runs the webpack build process -COPY superset-frontend /app/superset-frontend - +COPY --chown=superset:superset superset-frontend /app/superset-frontend # This copies the .po files needed for translation RUN mkdir -p /app/superset/translations COPY superset/translations /app/superset/translations + +RUN mkdir -p /app/locales COPY locales /app/locales # Compiles .json files from the .po files, then deletes the .po files From 6006e683e9a2d4527bc0108e24c6444e705aa422 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 28 Oct 2024 14:45:29 +0000 Subject: [PATCH 20/79] SRV-818 fix - correcting bash comment --- superset-frontend/scripts/lokalise_merger.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/scripts/lokalise_merger.sh b/superset-frontend/scripts/lokalise_merger.sh index da2ae9a1ad21c..d7953ca3b4274 100644 --- a/superset-frontend/scripts/lokalise_merger.sh +++ b/superset-frontend/scripts/lokalise_merger.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash set -e From 9c24f287b97f8fc0f071a18ed60b5703c81a29cb Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 28 Oct 2024 15:02:55 +0000 Subject: [PATCH 21/79] SRS-818 fix - nuking permissions on scripts --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 14e4d44f241aa..8a4d500e4753c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,6 +65,8 @@ RUN --mount=type=bind,source=./superset-frontend/package.json,target=./package.j # Runs the webpack build process COPY --chown=superset:superset superset-frontend /app/superset-frontend +RUN chmod 777 -R /app/superset-frontend/scripts + # This copies the .po files needed for translation RUN mkdir -p /app/superset/translations COPY superset/translations /app/superset/translations @@ -88,6 +90,11 @@ ENV BUILD_TRANSLATIONS=${BUILD_TRANSLATIONS} ARG DEV_MODE="false" # Skip frontend build in dev mode ENV DEV_MODE=${DEV_MODE} +# Include translations in the final build. The default supports en only to +# reduce complexity and weight for those only using en +ARG BUILD_TRANSLATIONS="true" + +WORKDIR /app ENV LANG=C.UTF-8 \ LC_ALL=C.UTF-8 \ SUPERSET_ENV=production \ From df83091edddaee826c6b696fd592fbf663bd84d1 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 28 Oct 2024 15:03:50 +0000 Subject: [PATCH 22/79] SRV-818 fix - correcting script path --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8a4d500e4753c..0a8749b83534b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,7 +65,7 @@ RUN --mount=type=bind,source=./superset-frontend/package.json,target=./package.j # Runs the webpack build process COPY --chown=superset:superset superset-frontend /app/superset-frontend -RUN chmod 777 -R /app/superset-frontend/scripts +RUN chmod 777 -R scripts # This copies the .po files needed for translation RUN mkdir -p /app/superset/translations From 7b0dc7dc72e2504e739b608911709a2b6c2bc184 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 28 Oct 2024 15:12:37 +0000 Subject: [PATCH 23/79] SRV-818 fix - adding execute permission --- superset-frontend/scripts/lokalise_merger.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 superset-frontend/scripts/lokalise_merger.sh diff --git a/superset-frontend/scripts/lokalise_merger.sh b/superset-frontend/scripts/lokalise_merger.sh old mode 100644 new mode 100755 From 312b8ca2f81e2d47ff8ea94377d0ae5dbe476f8f Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 28 Oct 2024 15:13:37 +0000 Subject: [PATCH 24/79] SRV-818 fix - removing overkill permission grants --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0a8749b83534b..6fbb7f358d915 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,8 +64,7 @@ RUN --mount=type=bind,source=./superset-frontend/package.json,target=./package.j fi # Runs the webpack build process -COPY --chown=superset:superset superset-frontend /app/superset-frontend -RUN chmod 777 -R scripts +COPY superset-frontend /app/superset-frontend # This copies the .po files needed for translation RUN mkdir -p /app/superset/translations From 7db5af6c4f0b326d9072b2786ecd7fb9011c3ae7 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Tue, 5 Nov 2024 14:30:24 +0000 Subject: [PATCH 25/79] SRV-818 feat - uploading initial lokalise dump --- locales/de/translation.json | 133 ++++++++++++++++++++++++++++++++++++ locales/en/translation.json | 133 ++++++++++++++++++++++++++++++++++++ locales/es/translation.json | 133 ++++++++++++++++++++++++++++++++++++ locales/fr/translation.json | 133 ++++++++++++++++++++++++++++++++++++ locales/it/translation.json | 133 ++++++++++++++++++++++++++++++++++++ locales/nl/translation.json | 133 ++++++++++++++++++++++++++++++++++++ 6 files changed, 798 insertions(+) create mode 100644 locales/de/translation.json create mode 100644 locales/en/translation.json create mode 100644 locales/es/translation.json create mode 100644 locales/fr/translation.json create mode 100644 locales/it/translation.json create mode 100644 locales/nl/translation.json diff --git a/locales/de/translation.json b/locales/de/translation.json new file mode 100644 index 0000000000000..b7db656353a19 --- /dev/null +++ b/locales/de/translation.json @@ -0,0 +1,133 @@ +{ + "Channels": "Kanäle", + "Dates": "Daten", + "Granularity": "Granularität", + "Status": "Status", + "Groups": "Gruppen", + "Performance Report": "Performance-Report", + "Details": "Details", + "Performance Comparison": "Performance-Vergleich", + "Force refresh": "Aktualisierung erzwingen", + "Fetched": "Abgerufen", + "Enter fullscreen": "Vollbildmodus", + "Share": "Teilen", + "Download": "Herunterladen", + "Export to .CSV": "Als CSV exportieren", + "Export to Excel": "Nach Excel exportieren", + "Download as image": "Als Bild herunterladen", + "Sales & Traffic": "Umsatz und Traffic", + "Performance": "Performance", + "Total no. of sales": "Gesamtanzahl der Verkäufe", + "Total no. of products": "Gesamtanzahl der Produkte", + "Total Sales": "Gesamtumsatz", + "Clicks": "Klicks", + "Views": "Aufrufe", + "Conversion rate": "Conversion Rate", + "AOV": "AOV", + "Total Commission": "Gesamtprovision", + "EPHC": "EPHC", + "ROI %": "ROI (%)", + "Publishers": "Publisher", + "Devices": "Geräte", + "Countries": "Länder", + "Map": "Karte", + "Commission": "Provision", + "Ads": "Werbemittel", + "Products": "Produkte", + "Vouchers": "Gutscheine", + "More filters": "Weitere Filter", + "APPLY": "ANWENDEN", + "Clear all": "Alle löschen", + "Month to date vs Last Month": "Bisheriger Monat im Vergleich zum Vormonat", + "Week to date vs Last week": "Bisherige Woche im Vergleich zur Vorwoche", + "Year to date vs Last Year": "Bisheriges Jahr im Vergleich zum Vorjahr", + "Month to date vs Prev Year": "Bisheriger Monat im Vergleich zum Vorjahr", + "Total Sales & Traffic": "Gesamtumsatz und Traffic", + "Commission & Traffic": "Provision und Traffic", + "Top Publishers by Sales": "Top-Publisher nach Umsatz", + "Main": "Hauptumsatz", + "# Previous value": "Vorheriger Wert", + "Difference": "Unterschied", + "% Difference": "Unterschied (%)", + "Top Channels by Sales": "Top-Kanäle nach Umsatz", + "# Transactions": "Anz. Transaktionen", + "# Products": "Anz. Produkte", + "Total Sales Value": "Gesamtumsatz", + "# Clicks": "Anz. Klicks", + "Conversion Rate": "Conversion Rate", + "Country": "Land", + "Scheme": "Modell", + "Comm": "Provision", + "Ads Type": "Art des Werbemittels", + "Ads Name": "Name des Werbemittels", + "Product": "Produkt", + "Voucher": "Gutschein", + "Select All": "Alle auswählen", + "Last": "Letzter", + "Previous": "Vorheriger", + "Current": "Aktueller", + "Advanced": "Erweitert", + "No filter": "Kein Filter", + "Last day": "Letzter Tag", + "Last week": "Letzte Woche", + "Last month": "Letzter Monat", + "Last quarter": "Letztes Quartal", + "Last year": "Letztes Jahr", + "previous calendar week": "vorherige Kalenderwoche", + "previous calendar month": "vorheriger Kalendermonat", + "previous calendar year": "vorheriges Kalenderjahr", + "Current day": "Aktueller Tag", + "Current week": "Aktuelle Woche", + "Current month": "Aktueller Monat", + "Current quarter": "Aktuelles Quartal", + "Current year": "Aktuelles Jahr", + "Seconds %s": "Sekunden %s", + "Minutes %s": "Minuten %s", + "Hours %s": "Stunden %s", + "Days %s": "Tage %s", + "Weeks %s": "Wochen %s", + "Months %s": "Monate %s", + "Quarters %s": "Quartale %s", + "Years %s": "Jahre %s", + "Specific Date\/Time": "Datum\/Uhrzeit (spezifisch)", + "Relative Date\/Time": "Datum\/Uhrzeit (relativ)", + "Now": "Jetzt", + "Midnight": "Mitternacht", + "Transactions": "Transaktionen", + "Items": "Artikel", + "Override": "Override", + "Transaction Id": "Transaktions-ID", + "Program Id": "Programm-ID", + "Order Reference": "Bestellreferenz", + "Transaction value": "Transaktionswert", + "Browser": "Browser", + "Platform": "Plattform", + "Device": "Gerät", + "Campaign name": "Kampagnenname", + "Campaign id": "Kampagnen-ID", + "Publisher Id": "Publisher-ID", + "Publisher name": "Name des Publishers", + "Channel Type": "Kanaltyp", + "Category": "Kategorie", + "Currency": "Währung", + "Program": "Programm", + "Date": "Datum", + "Channel": "Kanal", + "Add\/Edit Filters": "Filter hinzufügen\/bearbeiten", + "Loading...": "Wird geladen...", + "Ad Type": "Art des Werbemittels", + "Ad name": "Name des Werbemittels", + "Publisher": "Publisher", + "Filters out of scope (%d)": "Filter außerhalb des Geltungsbereichs (%d)", + "Item id": "Artikel-ID", + "Item price": "Artikelpreis", + "Item Commission": "Provision für den Artikel", + "Product name": "Produktname", + "Product code": "Produktcode", + "Voucher code": "Gutscheincode", + "Commission type": "Provisionsart", + "Commission Scheme": "Provisionsmodell", + "Commission applied": "Angewendete Provision", + "Previous value": "Vorheriger Wert", + "Current value": "Aktueller Wert" +} \ No newline at end of file diff --git a/locales/en/translation.json b/locales/en/translation.json new file mode 100644 index 0000000000000..b8b4f0085e136 --- /dev/null +++ b/locales/en/translation.json @@ -0,0 +1,133 @@ +{ + "Channels": "Channels", + "Dates": "Dates", + "Granularity": "Granularity", + "Status": "Status", + "Groups": "Groups", + "Performance Report": "Performance Report", + "Details": "Details", + "Performance Comparison": "Performance Comparison", + "Force refresh": "Force refresh", + "Fetched": "Fetched", + "Enter fullscreen": "Enter fullscreen", + "Share": "Share", + "Download": "Download", + "Export to .CSV": "Export to CSV", + "Export to Excel": "Export to Excel", + "Download as image": "Download as image", + "Sales & Traffic": "Sales & Traffic", + "Performance": "Performance", + "Total no. of sales": "Total no. of sales", + "Total no. of products": "Total no. of products", + "Total Sales": "Total sales", + "Clicks": "Clicks", + "Views": "Views", + "Conversion rate": "Conversion rate", + "AOV": "AOV", + "Total Commission": "Total Commission", + "EPHC": "EPHC", + "ROI %": "ROI %", + "Publishers": "Publishers", + "Devices": "Devices", + "Countries": "Countries", + "Map": "Map", + "Commission": "Commission", + "Ads": "Ads", + "Products": "Products", + "Vouchers": "Vouchers", + "More filters": "More filters", + "APPLY": "APPLY", + "Clear all": "Clear all", + "Month to date vs Last Month": "Month to date vs last month", + "Week to date vs Last week": "Week to date vs last week", + "Year to date vs Last Year": "Year to date vs last year", + "Month to date vs Prev Year": "Month to date vs prev year", + "Total Sales & Traffic": "Total Sales & Traffic", + "Commission & Traffic": "Commission & Traffic", + "Top Publishers by Sales": "Top Publishers by Sales", + "Main": "Main", + "# Previous value": "# Previous value", + "Difference": "Difference", + "% Difference": "% Difference", + "Top Channels by Sales": "Top Channels by Sales", + "# Transactions": "# Transactions", + "# Products": "# Products", + "Total Sales Value": "Total Sales Value", + "# Clicks": "# Clicks", + "Conversion Rate": "Conversion Rate", + "Country": "Country", + "Scheme": "Scheme", + "Comm": "Commission", + "Ads Type": "Ads type", + "Ads Name": "Ads name", + "Product": "Product", + "Voucher": "Voucher", + "Select All": "Select All", + "Last": "Last", + "Previous": "Previous", + "Current": "Current", + "Advanced": "Advanced", + "No filter": "No filter", + "Last day": "Last day", + "Last week": "Last week", + "Last month": "Last month", + "Last quarter": "Last quarter", + "Last year": "Last year", + "previous calendar week": "previous calendar week", + "previous calendar month": "previous calendar month", + "previous calendar year": "previous calendar year", + "Current day": "Current day", + "Current week": "Current week", + "Current month": "Current month", + "Current quarter": "Current quarter", + "Current year": "Current year", + "Seconds %s": "Seconds %s", + "Minutes %s": "Minutes %s", + "Hours %s": "Hours %s", + "Days %s": "Days %s", + "Weeks %s": "Weeks %s", + "Months %s": "Months %s", + "Quarters %s": "Quarters %s", + "Years %s": "Years %s", + "Specific Date\/Time": "Specific Date\/Time", + "Relative Date\/Time": "Relative Date\/Time", + "Now": "Now", + "Midnight": "Midnight", + "Transactions": "Transactions", + "Items": "Items", + "Override": "Override", + "Transaction Id": "Transaction Id", + "Program Id": "Program Id", + "Order Reference": "Order Reference", + "Transaction value": "Transaction value", + "Browser": "Browser", + "Platform": "Platform", + "Device": "Device", + "Campaign name": "Campaign name", + "Campaign id": "Campaign id", + "Publisher Id": "Publisher Id", + "Publisher name": "Publisher name", + "Channel Type": "Channel Type", + "Category": "Category", + "Currency": "Currency", + "Program": "Program", + "Date": "Date", + "Channel": "Channel", + "Add\/Edit Filters": "Add\/Edit Filters", + "Loading...": "Loading...", + "Ad Type": "Ad Type", + "Ad name": "Ad name", + "Publisher": "Publisher", + "Filters out of scope (%d)": "Filters out of scope (%d)", + "Item id": "Item id", + "Item price": "Item price", + "Item Commission": "Item Commission", + "Product name": "Product name", + "Product code": "Product code", + "Voucher code": "Voucher code", + "Commission type": "Commission type", + "Commission Scheme": "Commission Scheme", + "Commission applied": "Commission applied", + "Previous value": "Previous value", + "Current value": "Current value" +} \ No newline at end of file diff --git a/locales/es/translation.json b/locales/es/translation.json new file mode 100644 index 0000000000000..8b17917c6f6cf --- /dev/null +++ b/locales/es/translation.json @@ -0,0 +1,133 @@ +{ + "Channels": "Canales", + "Dates": "Fechas", + "Granularity": "Granulado", + "Status": "Estado", + "Groups": "Grupos", + "Performance Report": "Informe de rendimiento", + "Details": "Detalles", + "Performance Comparison": "Comparación de rendimiento", + "Force refresh": "Forzar actualización", + "Fetched": "Obtenido", + "Enter fullscreen": "Modo pantalla completa", + "Share": "Compartir", + "Download": "Descargar", + "Export to .CSV": "Exportar a CSV", + "Export to Excel": "Exportar a Excel", + "Download as image": "Descargar como imagen", + "Sales & Traffic": "Ventas y tráfico", + "Performance": "Rendimiento", + "Total no. of sales": "N.º total de ventas", + "Total no. of products": "N.º total de productos", + "Total Sales": "Total de ventas", + "Clicks": "Clics", + "Views": "Visualizaciones", + "Conversion rate": "Tasa de conversión", + "AOV": "Cesta media", + "Total Commission": "Comisión total", + "EPHC": "EPHC", + "ROI %": "ROI (%)", + "Publishers": "Afiliados", + "Devices": "Dispositivos", + "Countries": "Países", + "Map": "Mapa", + "Commission": "Comisión", + "Ads": "Anuncios", + "Products": "Productos", + "Vouchers": "Descuentos", + "More filters": "Más filtros", + "APPLY": "APLICAR", + "Clear all": "Borrar todo", + "Month to date vs Last Month": "Mes hasta la fecha vs. mes pasado", + "Week to date vs Last week": "Semana hasta la fecha vs. semana pasada", + "Year to date vs Last Year": "Año hasta la fecha vs. año pasado", + "Month to date vs Prev Year": "Mes hasta la fecha vs. año anterior", + "Total Sales & Traffic": "Ventas y tráfico totales", + "Commission & Traffic": "Comisión y tráfico", + "Top Publishers by Sales": "Principales afiliados por ventas", + "Main": "Principal", + "# Previous value": "Valor anterior", + "Difference": "Diferencia", + "% Difference": "Diferencia (%)", + "Top Channels by Sales": "Principales canales por ventas", + "# Transactions": "N.º de transacciones", + "# Products": "N.º de productos", + "Total Sales Value": "Valor total de las ventas", + "# Clicks": "N.º de clics", + "Conversion Rate": "Tasa de conversión", + "Country": "País", + "Scheme": "Plan", + "Comm": "Comisión", + "Ads Type": "Tipo de anuncios", + "Ads Name": "Nombre de los anuncios", + "Product": "Producto", + "Voucher": "Descuento", + "Select All": "Seleccionar todo", + "Last": "Último", + "Previous": "Anterior", + "Current": "Actual", + "Advanced": "Búsqueda avanzada", + "No filter": "Sin filtros", + "Last day": "Último día", + "Last week": "La semana pasada", + "Last month": "El mes pasado", + "Last quarter": "El trimestre pasado", + "Last year": "El año pasado", + "previous calendar week": "semana natural anterior", + "previous calendar month": "mes natural anterior", + "previous calendar year": "año natural anterior", + "Current day": "Día actual", + "Current week": "Semana actual", + "Current month": "Mes actual", + "Current quarter": "Trimestre actual", + "Current year": "Año actual", + "Seconds %s": "%s segundos", + "Minutes %s": "%s minutos", + "Hours %s": "%s horas", + "Days %s": "%s días", + "Weeks %s": "%s semanas", + "Months %s": "%s meses", + "Quarters %s": "%s trimestres", + "Years %s": "%s años", + "Specific Date\/Time": "Fecha\/hora específica", + "Relative Date\/Time": "Fecha\/hora relativa", + "Now": "Ahora", + "Midnight": "Medianoche", + "Transactions": "Transacciones", + "Items": "Artículos", + "Override": "Sobrecomisión", + "Transaction Id": "ID de transacción", + "Program Id": "ID de programa", + "Order Reference": "Referencia del pedido", + "Transaction value": "Valor de la transacción", + "Browser": "Navegador", + "Platform": "Plataforma", + "Device": "Dispositivo", + "Campaign name": "Nombre de la campaña", + "Campaign id": "ID de campaña", + "Publisher Id": "ID de afiliado", + "Publisher name": "Nombre del afiliado", + "Channel Type": "Tipo de canal", + "Category": "Categoría", + "Currency": "Divisa", + "Program": "Programa", + "Date": "Fecha", + "Channel": "Canal", + "Add\/Edit Filters": "Agregar\/Modificar filtros", + "Loading...": "Cargando...", + "Ad Type": "Tipo de anuncio", + "Ad name": "Nombre del anuncio", + "Publisher": "Afiliado", + "Filters out of scope (%d)": "Los filtros no se corresponden con los datos (%d)", + "Item id": "ID del artículo", + "Item price": "Precio del artículo", + "Item Commission": "Comisión por el artículo", + "Product name": "Nombre del producto", + "Product code": "Código del producto", + "Voucher code": "Código de descuento", + "Commission type": "Tipo de comisión", + "Commission Scheme": "Plan de comisión", + "Commission applied": "Comisión aplicada", + "Previous value": "Valor anterior", + "Current value": "Valor actual" +} \ No newline at end of file diff --git a/locales/fr/translation.json b/locales/fr/translation.json new file mode 100644 index 0000000000000..9cebada56c290 --- /dev/null +++ b/locales/fr/translation.json @@ -0,0 +1,133 @@ +{ + "Channels": "Canaux", + "Dates": "Dates", + "Granularity": "Granularité", + "Status": "Statut", + "Groups": "Groupes", + "Performance Report": "Rapport de performance", + "Details": "Données détaillées", + "Performance Comparison": "Comparaison des performances", + "Force refresh": "Forcer l’actualisation", + "Fetched": "Récupéré", + "Enter fullscreen": "Mode plein écran", + "Share": "Partager", + "Download": "Télécharger", + "Export to .CSV": "Exporter au format CSV", + "Export to Excel": "Exporter vers Excel", + "Download as image": "Télécharger l'image", + "Sales & Traffic": "Montant total des ventes et trafic", + "Performance": "Performance", + "Total no. of sales": "Nombre total de ventes", + "Total no. of products": "Nombre total de produits", + "Total Sales": "Montant total des ventes", + "Clicks": "Clics", + "Views": "Affichages", + "Conversion rate": "Taux de conversion", + "AOV": "Panier moyen", + "Total Commission": "Commission totale", + "EPHC": "EPHC", + "ROI %": "ROI (%)", + "Publishers": "Éditeurs", + "Devices": "Appareils", + "Countries": "Pays", + "Map": "Carte", + "Commission": "Commission", + "Ads": "Annonces", + "Products": "Produits", + "Vouchers": "Codes promotionnels", + "More filters": "Plus de filtres", + "APPLY": "APPLIQUER", + "Clear all": "Tout supprimer", + "Month to date vs Last Month": "Mois en cours par rapport au mois précédent", + "Week to date vs Last week": "Semaine en cours par rapport à la semaine précédente", + "Year to date vs Last Year": "Année en cours par rapport à l'année précédente", + "Month to date vs Prev Year": "Mois en cours par rapport à l'année précédente", + "Total Sales & Traffic": "Montant total des ventes et trafic", + "Commission & Traffic": "Commission et trafic", + "Top Publishers by Sales": "Meilleures ventes, par éditeurs", + "Main": "", + "# Previous value": "Valeur antérieure", + "Difference": "Différence", + "% Difference": "Différence (%)", + "Top Channels by Sales": "Meilleurs canaux de ventes", + "# Transactions": "Nombre de transactions", + "# Products": "Nombre de produits", + "Total Sales Value": "Valeur totale des ventes", + "# Clicks": "Nombre de clics", + "Conversion Rate": "Taux de conversion", + "Country": "Pays", + "Scheme": "Plan", + "Comm": "Commission", + "Ads Type": "Type d'annonces", + "Ads Name": "Nom des annonces", + "Product": "Produit", + "Voucher": "Code promotionnel", + "Select All": "Tout sélectionner", + "Last": "Prochain(e)", + "Previous": "Précédent(e)", + "Current": "En cours", + "Advanced": "Recherche détaillée", + "No filter": "Aucun filtre", + "Last day": "Dernier jour", + "Last week": "Semaine précédente", + "Last month": "Mois précédent", + "Last quarter": "Trimestre précédent", + "Last year": "Année précédente", + "previous calendar week": "Semaine antérieure", + "previous calendar month": "Mois antérieur", + "previous calendar year": "Année civile antérieure", + "Current day": "Aujourd'hui", + "Current week": "Semaine en cours", + "Current month": "Mois en cours", + "Current quarter": "Trimestre en cours", + "Current year": "Année en cours", + "Seconds %s": "%s secondes", + "Minutes %s": "%s minutes", + "Hours %s": "%s heures", + "Days %s": "%s jours", + "Weeks %s": "%s semaines", + "Months %s": "%s mois", + "Quarters %s": "%s trimestres", + "Years %s": "%s années", + "Specific Date\/Time": "Date\/heure exacte", + "Relative Date\/Time": "Date\/heure relative", + "Now": "Maintenant", + "Midnight": "Minuit", + "Transactions": "Transactions", + "Items": "Articles", + "Override": "Frais sur commission", + "Transaction Id": "Identifiant (ID) de transaction", + "Program Id": "Identifiant (ID) du programme", + "Order Reference": "Référence de commande", + "Transaction value": "Valeur de la transaction", + "Browser": "Navigateur", + "Platform": "Plate-forme", + "Device": "Appareil", + "Campaign name": "Nom de la campagne", + "Campaign id": "Identifiant (ID) de campagne", + "Publisher Id": "Identifiant (ID) de l'éditeur", + "Publisher name": "Nom de l'éditeur", + "Channel Type": "Type de canal", + "Category": "Catégorie", + "Currency": "Devise", + "Program": "Programme", + "Date": "Date", + "Channel": "Canal", + "Add\/Edit Filters": "Ajouter\/modifier des filtres", + "Loading...": "Chargement en cours...", + "Ad Type": "Type d'annonce", + "Ad name": "Nom de l'annonce", + "Publisher": "Éditeur", + "Filters out of scope (%d)": "Les filtres ne correspondent pas aux données (%d)", + "Item id": "Identifiant (ID) de l'article", + "Item price": "Prix de l'article", + "Item Commission": "Commission sur l'article", + "Product name": "Nom du produit", + "Product code": "Code produit", + "Voucher code": "Code promotionnel", + "Commission type": "Type de commission", + "Commission Scheme": "Plan de commission", + "Commission applied": "Commission appliquée", + "Previous value": "Valeur antérieure", + "Current value": "Valeur actuelle" +} \ No newline at end of file diff --git a/locales/it/translation.json b/locales/it/translation.json new file mode 100644 index 0000000000000..a2ff82e03c07c --- /dev/null +++ b/locales/it/translation.json @@ -0,0 +1,133 @@ +{ + "Channels": "Canali", + "Dates": "Date", + "Granularity": "Granularità", + "Status": "Stato", + "Groups": "Gruppi", + "Performance Report": "Report delle prestazioni", + "Details": "Dettagli", + "Performance Comparison": "Confronto tra prestazioni", + "Force refresh": "Forza l'aggiornamento", + "Fetched": "Recuperato", + "Enter fullscreen": "Modalità schermo intero", + "Share": "Condividi", + "Download": "Scarica", + "Export to .CSV": "Esporta come CSV", + "Export to Excel": "Esporta in Excel", + "Download as image": "Scarica come immagine", + "Sales & Traffic": "Vendite e traffico", + "Performance": "Prestazioni", + "Total no. of sales": "N. totale di vendite", + "Total no. of products": "N. totale di prodotti", + "Total Sales": "Vendite totali", + "Clicks": "Click", + "Views": "Visualizzazioni", + "Conversion rate": "Tasso di conversione", + "AOV": "Carrello medio", + "Total Commission": "Commissione totale", + "EPHC": "EPHC", + "ROI %": "% ROI", + "Publishers": "Publisher", + "Devices": "Dispositivi", + "Countries": "Paesi", + "Map": "Mappa", + "Commission": "Commissione", + "Ads": "Annunci", + "Products": "Prodotti", + "Vouchers": "Coupon", + "More filters": "Più filtri", + "APPLY": "APPLICA", + "Clear all": "Cancella tutto", + "Month to date vs Last Month": "Mese in corso rispetto al mese scorso", + "Week to date vs Last week": "Settimana in corso rispetto alla settimana scorsa", + "Year to date vs Last Year": "Anno in corso rispetto all'anno scorso", + "Month to date vs Prev Year": "Mese in corso rispetto all'anno scorso", + "Total Sales & Traffic": "Vendite e traffico totali", + "Commission & Traffic": "Commissione e traffico", + "Top Publishers by Sales": "Migliori publisher per vendite", + "Main": "Principale", + "# Previous value": "# Valore precedente", + "Difference": "Differenza", + "% Difference": "Differenza %", + "Top Channels by Sales": "Migliori canali per vendite", + "# Transactions": "# Transazioni", + "# Products": "# Prodotti", + "Total Sales Value": "Valore totale vendite", + "# Clicks": "# Click", + "Conversion Rate": "Tasso di conversione", + "Country": "Paese", + "Scheme": "Schema", + "Comm": "Commissione", + "Ads Type": "Tipo annunci", + "Ads Name": "Nome annunci", + "Product": "Prodotto", + "Voucher": "Coupon", + "Select All": "Seleziona tutto", + "Last": "Ultimo", + "Previous": "Precedente", + "Current": "Attuale", + "Advanced": "Avanzato", + "No filter": "Nessun filtro", + "Last day": "Ieri", + "Last week": "La settimana scorsa", + "Last month": "Il mese scorso", + "Last quarter": "Il trimestre scorso", + "Last year": "L'anno scorso", + "previous calendar week": "settimana solare precedente", + "previous calendar month": "mese solare precedente", + "previous calendar year": "anno solare precedente", + "Current day": "Giorno attuale", + "Current week": "Settimana attuale", + "Current month": "Mese attuale", + "Current quarter": "Trimestre attuale", + "Current year": "Anno attuale", + "Seconds %s": "%s secondi", + "Minutes %s": "%s minuti", + "Hours %s": "%s ore", + "Days %s": "%s giorni", + "Weeks %s": "%s settimane", + "Months %s": "%s mesi", + "Quarters %s": "%s trimestri", + "Years %s": "%s anni", + "Specific Date\/Time": "Data\/ora specifica", + "Relative Date\/Time": "Data\/ora relativa", + "Now": "Adesso", + "Midnight": "Mezzanotte", + "Transactions": "Transazioni", + "Items": "Articoli", + "Override": "Provvigione", + "Transaction Id": "ID transazione", + "Program Id": "ID programma", + "Order Reference": "ID ordine", + "Transaction value": "Valore transazione", + "Browser": "Browser", + "Platform": "Piattaforma", + "Device": "Dispositivo", + "Campaign name": "Nome campagna", + "Campaign id": "ID campagna", + "Publisher Id": "ID publisher", + "Publisher name": "Nome publisher", + "Channel Type": "Tipo di canale", + "Category": "Categoria", + "Currency": "Valuta", + "Program": "Programma", + "Date": "Data", + "Channel": "Canale", + "Add\/Edit Filters": "Aggiungi\/Modifica filtri", + "Loading...": "Caricamento in corso...", + "Ad Type": "Tipo annuncio", + "Ad name": "Nome annuncio", + "Publisher": "Publisher", + "Filters out of scope (%d)": "Filtri esclusi (%d)", + "Item id": "ID articolo", + "Item price": "Prezzo articolo", + "Item Commission": "Commissione articolo", + "Product name": "Nome prodotto", + "Product code": "Codice prodotto", + "Voucher code": "Codice sconto", + "Commission type": "Tipologia di commissione", + "Commission Scheme": "Struttura commissionale", + "Commission applied": "Commissione applicata", + "Previous value": "Valore precedente", + "Current value": "Valore attuale" +} \ No newline at end of file diff --git a/locales/nl/translation.json b/locales/nl/translation.json new file mode 100644 index 0000000000000..d439260d70540 --- /dev/null +++ b/locales/nl/translation.json @@ -0,0 +1,133 @@ +{ + "Channels": "Kanalen", + "Dates": "Data", + "Granularity": "Korreligheid", + "Status": "Status", + "Groups": "Groepen", + "Performance Report": "Prestatierapport", + "Details": "Details", + "Performance Comparison": "Prestatie vergelijking", + "Force refresh": "Vernieuwen forceren", + "Fetched": "Opgehaald", + "Enter fullscreen": "Volledig scherm openen", + "Share": "Delen", + "Download": "Downloaden", + "Export to .CSV": "Naar CSV exporteren", + "Export to Excel": "Naar excel exporteren", + "Download as image": "Als afbeelding downloaden", + "Sales & Traffic": "Verkoop & verkeer", + "Performance": "Prestatie", + "Total no. of sales": "Totale aantal sales", + "Total no. of products": "Totale aantal producten", + "Total Sales": "Totale verkoop", + "Clicks": "Kliks", + "Views": "Weergaven", + "Conversion rate": "Conversiepercentage", + "AOV": "AOV", + "Total Commission": "Totale commissie", + "EPHC": "EPHC", + "ROI %": "ROI %", + "Publishers": "Publishers", + "Devices": "Apparaten", + "Countries": "Landen", + "Map": "Kaart", + "Commission": "Commissie", + "Ads": "Advertenties", + "Products": "Producten", + "Vouchers": "Kortingscodes", + "More filters": "Meer filters", + "APPLY": "TOEPASSEN", + "Clear all": "Alles legen", + "Month to date vs Last Month": "Maand tot vandaag vs. vorige maand", + "Week to date vs Last week": "Week tot vandaag vs. vorige week", + "Year to date vs Last Year": "Jaar tot vandaag vs. vorig jaar", + "Month to date vs Prev Year": "Maand tot vandaag vs. vorige jaar", + "Total Sales & Traffic": "Totale verkoop & verkeer", + "Commission & Traffic": "Commissie & verkeer", + "Top Publishers by Sales": "Beste publishers op verkoop", + "Main": "Hoofd", + "# Previous value": "# vorige waarde", + "Difference": "Verschil", + "% Difference": "% verschil", + "Top Channels by Sales": "Beste kanalen op verkoop", + "# Transactions": "# transacties", + "# Products": "# producten", + "Total Sales Value": "Totale waarde verkoop", + "# Clicks": "# kliks", + "Conversion Rate": "Conversiepercentage", + "Country": "Land", + "Scheme": "Schema", + "Comm": "Commissie", + "Ads Type": "Advertenties type", + "Ads Name": "Advertenties naam", + "Product": "Product", + "Voucher": "Kortingscode", + "Select All": "Alle selecteren", + "Last": "Laatste", + "Previous": "Vorige", + "Current": "Huidig", + "Advanced": "Geavanceerd", + "No filter": "Geen filter", + "Last day": "Vorige dag", + "Last week": "Vorige week", + "Last month": "Vorige maand", + "Last quarter": "Vorige kwartaal", + "Last year": "Vorig jaar", + "previous calendar week": "vorige kalenderweek", + "previous calendar month": "vorige kalendermaand", + "previous calendar year": "vorige kalenderjaar", + "Current day": "Huidige dag", + "Current week": "Huidige week", + "Current month": "Huidige maand", + "Current quarter": "Huidige kwartaal", + "Current year": "Huidige jaar", + "Seconds %s": "Seconden %s", + "Minutes %s": "Minuten (%s)", + "Hours %s": "Uren %s", + "Days %s": "Dagen %s", + "Weeks %s": "Weken %s", + "Months %s": "Maanden %s", + "Quarters %s": "Kwartalen %s", + "Years %s": "Jaren %s", + "Specific Date\/Time": "Specifieke datum\/tijd", + "Relative Date\/Time": "Relatieve datum\/tijd", + "Now": "Nu", + "Midnight": "Middernacht", + "Transactions": "Transacties", + "Items": "Items", + "Override": "Override", + "Transaction Id": "Transactie ID", + "Program Id": "Programma ID", + "Order Reference": "Orderreferentie", + "Transaction value": "Transactiewaarde", + "Browser": "Browser", + "Platform": "Platform", + "Device": "Apparaat", + "Campaign name": "Campagne naam", + "Campaign id": "Campagne id", + "Publisher Id": "Publisher id", + "Publisher name": "Publisher naam", + "Channel Type": "Kanaaltype", + "Category": "Categorie", + "Currency": "Valuta", + "Program": "Programma", + "Date": "Datum", + "Channel": "Kanaal", + "Add\/Edit Filters": "Filters toevoegen\/bewerken", + "Loading...": "Laden...", + "Ad Type": "Ad type", + "Ad name": "Ad naam", + "Publisher": "Publisher", + "Filters out of scope (%d)": "Filters buiten bereik (%d)", + "Item id": "Item id", + "Item price": "Item prijs", + "Item Commission": "Item commissie", + "Product name": "Productnaam", + "Product code": "Productcode", + "Voucher code": "Kortingscode", + "Commission type": "Commissie type", + "Commission Scheme": "Commissie schema", + "Commission applied": "Commissie toegepast", + "Previous value": "Vorige waarde", + "Current value": "Huidige waarde" +} \ No newline at end of file From 14f010169fc5a87460a33a0c8bcc4e128012ccbd Mon Sep 17 00:00:00 2001 From: "Bob T. Builder" <36963854+bob-t-builder@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:33:00 +0000 Subject: [PATCH 26/79] LOC-176 --- locales/de/translation.json | 57 +++------------------------ locales/en/translation.json | 57 +++------------------------ locales/es/translation.json | 57 +++------------------------ locales/fr/translation.json | 77 ++++++++----------------------------- locales/it/translation.json | 59 +++------------------------- locales/nl/translation.json | 59 +++------------------------- 6 files changed, 42 insertions(+), 324 deletions(-) diff --git a/locales/de/translation.json b/locales/de/translation.json index b7db656353a19..3e5b3bbbcc94d 100644 --- a/locales/de/translation.json +++ b/locales/de/translation.json @@ -1,58 +1,8 @@ { - "Channels": "Kanäle", - "Dates": "Daten", - "Granularity": "Granularität", - "Status": "Status", - "Groups": "Gruppen", - "Performance Report": "Performance-Report", - "Details": "Details", - "Performance Comparison": "Performance-Vergleich", - "Force refresh": "Aktualisierung erzwingen", - "Fetched": "Abgerufen", - "Enter fullscreen": "Vollbildmodus", - "Share": "Teilen", - "Download": "Herunterladen", - "Export to .CSV": "Als CSV exportieren", - "Export to Excel": "Nach Excel exportieren", - "Download as image": "Als Bild herunterladen", - "Sales & Traffic": "Umsatz und Traffic", - "Performance": "Performance", - "Total no. of sales": "Gesamtanzahl der Verkäufe", - "Total no. of products": "Gesamtanzahl der Produkte", - "Total Sales": "Gesamtumsatz", - "Clicks": "Klicks", - "Views": "Aufrufe", - "Conversion rate": "Conversion Rate", - "AOV": "AOV", - "Total Commission": "Gesamtprovision", - "EPHC": "EPHC", - "ROI %": "ROI (%)", - "Publishers": "Publisher", - "Devices": "Geräte", - "Countries": "Länder", - "Map": "Karte", - "Commission": "Provision", - "Ads": "Werbemittel", - "Products": "Produkte", - "Vouchers": "Gutscheine", - "More filters": "Weitere Filter", - "APPLY": "ANWENDEN", - "Clear all": "Alle löschen", - "Month to date vs Last Month": "Bisheriger Monat im Vergleich zum Vormonat", - "Week to date vs Last week": "Bisherige Woche im Vergleich zur Vorwoche", - "Year to date vs Last Year": "Bisheriges Jahr im Vergleich zum Vorjahr", - "Month to date vs Prev Year": "Bisheriger Monat im Vergleich zum Vorjahr", - "Total Sales & Traffic": "Gesamtumsatz und Traffic", - "Commission & Traffic": "Provision und Traffic", - "Top Publishers by Sales": "Top-Publisher nach Umsatz", - "Main": "Hauptumsatz", - "# Previous value": "Vorheriger Wert", - "Difference": "Unterschied", - "% Difference": "Unterschied (%)", - "Top Channels by Sales": "Top-Kanäle nach Umsatz", "# Transactions": "Anz. Transaktionen", "# Products": "Anz. Produkte", "Total Sales Value": "Gesamtumsatz", + "Total Commission": "Gesamtprovision", "# Clicks": "Anz. Klicks", "Conversion Rate": "Conversion Rate", "Country": "Land", @@ -122,12 +72,15 @@ "Item id": "Artikel-ID", "Item price": "Artikelpreis", "Item Commission": "Provision für den Artikel", + "Status": "Status", "Product name": "Produktname", "Product code": "Produktcode", "Voucher code": "Gutscheincode", "Commission type": "Provisionsart", "Commission Scheme": "Provisionsmodell", "Commission applied": "Angewendete Provision", + "Difference": "Differenz", "Previous value": "Vorheriger Wert", - "Current value": "Aktueller Wert" + "Current value": "Aktueller Wert", + "% Difference": "Differenz (%)" } \ No newline at end of file diff --git a/locales/en/translation.json b/locales/en/translation.json index b8b4f0085e136..7dfd740a655ad 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -1,58 +1,8 @@ { - "Channels": "Channels", - "Dates": "Dates", - "Granularity": "Granularity", - "Status": "Status", - "Groups": "Groups", - "Performance Report": "Performance Report", - "Details": "Details", - "Performance Comparison": "Performance Comparison", - "Force refresh": "Force refresh", - "Fetched": "Fetched", - "Enter fullscreen": "Enter fullscreen", - "Share": "Share", - "Download": "Download", - "Export to .CSV": "Export to CSV", - "Export to Excel": "Export to Excel", - "Download as image": "Download as image", - "Sales & Traffic": "Sales & Traffic", - "Performance": "Performance", - "Total no. of sales": "Total no. of sales", - "Total no. of products": "Total no. of products", - "Total Sales": "Total sales", - "Clicks": "Clicks", - "Views": "Views", - "Conversion rate": "Conversion rate", - "AOV": "AOV", - "Total Commission": "Total Commission", - "EPHC": "EPHC", - "ROI %": "ROI %", - "Publishers": "Publishers", - "Devices": "Devices", - "Countries": "Countries", - "Map": "Map", - "Commission": "Commission", - "Ads": "Ads", - "Products": "Products", - "Vouchers": "Vouchers", - "More filters": "More filters", - "APPLY": "APPLY", - "Clear all": "Clear all", - "Month to date vs Last Month": "Month to date vs last month", - "Week to date vs Last week": "Week to date vs last week", - "Year to date vs Last Year": "Year to date vs last year", - "Month to date vs Prev Year": "Month to date vs prev year", - "Total Sales & Traffic": "Total Sales & Traffic", - "Commission & Traffic": "Commission & Traffic", - "Top Publishers by Sales": "Top Publishers by Sales", - "Main": "Main", - "# Previous value": "# Previous value", - "Difference": "Difference", - "% Difference": "% Difference", - "Top Channels by Sales": "Top Channels by Sales", "# Transactions": "# Transactions", "# Products": "# Products", "Total Sales Value": "Total Sales Value", + "Total Commission": "Total Commission", "# Clicks": "# Clicks", "Conversion Rate": "Conversion Rate", "Country": "Country", @@ -122,12 +72,15 @@ "Item id": "Item id", "Item price": "Item price", "Item Commission": "Item Commission", + "Status": "Status", "Product name": "Product name", "Product code": "Product code", "Voucher code": "Voucher code", "Commission type": "Commission type", "Commission Scheme": "Commission Scheme", "Commission applied": "Commission applied", + "Difference": "Difference", "Previous value": "Previous value", - "Current value": "Current value" + "Current value": "Current value", + "% Difference": "% Difference" } \ No newline at end of file diff --git a/locales/es/translation.json b/locales/es/translation.json index 8b17917c6f6cf..8c5aa9aa253bc 100644 --- a/locales/es/translation.json +++ b/locales/es/translation.json @@ -1,58 +1,8 @@ { - "Channels": "Canales", - "Dates": "Fechas", - "Granularity": "Granulado", - "Status": "Estado", - "Groups": "Grupos", - "Performance Report": "Informe de rendimiento", - "Details": "Detalles", - "Performance Comparison": "Comparación de rendimiento", - "Force refresh": "Forzar actualización", - "Fetched": "Obtenido", - "Enter fullscreen": "Modo pantalla completa", - "Share": "Compartir", - "Download": "Descargar", - "Export to .CSV": "Exportar a CSV", - "Export to Excel": "Exportar a Excel", - "Download as image": "Descargar como imagen", - "Sales & Traffic": "Ventas y tráfico", - "Performance": "Rendimiento", - "Total no. of sales": "N.º total de ventas", - "Total no. of products": "N.º total de productos", - "Total Sales": "Total de ventas", - "Clicks": "Clics", - "Views": "Visualizaciones", - "Conversion rate": "Tasa de conversión", - "AOV": "Cesta media", - "Total Commission": "Comisión total", - "EPHC": "EPHC", - "ROI %": "ROI (%)", - "Publishers": "Afiliados", - "Devices": "Dispositivos", - "Countries": "Países", - "Map": "Mapa", - "Commission": "Comisión", - "Ads": "Anuncios", - "Products": "Productos", - "Vouchers": "Descuentos", - "More filters": "Más filtros", - "APPLY": "APLICAR", - "Clear all": "Borrar todo", - "Month to date vs Last Month": "Mes hasta la fecha vs. mes pasado", - "Week to date vs Last week": "Semana hasta la fecha vs. semana pasada", - "Year to date vs Last Year": "Año hasta la fecha vs. año pasado", - "Month to date vs Prev Year": "Mes hasta la fecha vs. año anterior", - "Total Sales & Traffic": "Ventas y tráfico totales", - "Commission & Traffic": "Comisión y tráfico", - "Top Publishers by Sales": "Principales afiliados por ventas", - "Main": "Principal", - "# Previous value": "Valor anterior", - "Difference": "Diferencia", - "% Difference": "Diferencia (%)", - "Top Channels by Sales": "Principales canales por ventas", "# Transactions": "N.º de transacciones", "# Products": "N.º de productos", "Total Sales Value": "Valor total de las ventas", + "Total Commission": "Comisión total", "# Clicks": "N.º de clics", "Conversion Rate": "Tasa de conversión", "Country": "País", @@ -122,12 +72,15 @@ "Item id": "ID del artículo", "Item price": "Precio del artículo", "Item Commission": "Comisión por el artículo", + "Status": "Estado", "Product name": "Nombre del producto", "Product code": "Código del producto", "Voucher code": "Código de descuento", "Commission type": "Tipo de comisión", "Commission Scheme": "Plan de comisión", "Commission applied": "Comisión aplicada", + "Difference": "Diferencia", "Previous value": "Valor anterior", - "Current value": "Valor actual" + "Current value": "Valor actual", + "% Difference": "Diferencia (%)" } \ No newline at end of file diff --git a/locales/fr/translation.json b/locales/fr/translation.json index 9cebada56c290..71cb060e61321 100644 --- a/locales/fr/translation.json +++ b/locales/fr/translation.json @@ -1,58 +1,8 @@ { - "Channels": "Canaux", - "Dates": "Dates", - "Granularity": "Granularité", - "Status": "Statut", - "Groups": "Groupes", - "Performance Report": "Rapport de performance", - "Details": "Données détaillées", - "Performance Comparison": "Comparaison des performances", - "Force refresh": "Forcer l’actualisation", - "Fetched": "Récupéré", - "Enter fullscreen": "Mode plein écran", - "Share": "Partager", - "Download": "Télécharger", - "Export to .CSV": "Exporter au format CSV", - "Export to Excel": "Exporter vers Excel", - "Download as image": "Télécharger l'image", - "Sales & Traffic": "Montant total des ventes et trafic", - "Performance": "Performance", - "Total no. of sales": "Nombre total de ventes", - "Total no. of products": "Nombre total de produits", - "Total Sales": "Montant total des ventes", - "Clicks": "Clics", - "Views": "Affichages", - "Conversion rate": "Taux de conversion", - "AOV": "Panier moyen", - "Total Commission": "Commission totale", - "EPHC": "EPHC", - "ROI %": "ROI (%)", - "Publishers": "Éditeurs", - "Devices": "Appareils", - "Countries": "Pays", - "Map": "Carte", - "Commission": "Commission", - "Ads": "Annonces", - "Products": "Produits", - "Vouchers": "Codes promotionnels", - "More filters": "Plus de filtres", - "APPLY": "APPLIQUER", - "Clear all": "Tout supprimer", - "Month to date vs Last Month": "Mois en cours par rapport au mois précédent", - "Week to date vs Last week": "Semaine en cours par rapport à la semaine précédente", - "Year to date vs Last Year": "Année en cours par rapport à l'année précédente", - "Month to date vs Prev Year": "Mois en cours par rapport à l'année précédente", - "Total Sales & Traffic": "Montant total des ventes et trafic", - "Commission & Traffic": "Commission et trafic", - "Top Publishers by Sales": "Meilleures ventes, par éditeurs", - "Main": "", - "# Previous value": "Valeur antérieure", - "Difference": "Différence", - "% Difference": "Différence (%)", - "Top Channels by Sales": "Meilleurs canaux de ventes", "# Transactions": "Nombre de transactions", "# Products": "Nombre de produits", "Total Sales Value": "Valeur totale des ventes", + "Total Commission": "Commission totale", "# Clicks": "Nombre de clics", "Conversion Rate": "Taux de conversion", "Country": "Pays", @@ -63,19 +13,19 @@ "Product": "Produit", "Voucher": "Code promotionnel", "Select All": "Tout sélectionner", - "Last": "Prochain(e)", + "Last": "Dernier(e)", "Previous": "Précédent(e)", "Current": "En cours", "Advanced": "Recherche détaillée", "No filter": "Aucun filtre", - "Last day": "Dernier jour", - "Last week": "Semaine précédente", - "Last month": "Mois précédent", - "Last quarter": "Trimestre précédent", - "Last year": "Année précédente", - "previous calendar week": "Semaine antérieure", - "previous calendar month": "Mois antérieur", - "previous calendar year": "Année civile antérieure", + "Last day": "Hier", + "Last week": "Semaine dernière", + "Last month": "Mois dernier", + "Last quarter": "Trimestre dernier", + "Last year": "Année dernière", + "previous calendar week": "Semaine précédente", + "previous calendar month": "Mois précédent", + "previous calendar year": "Année civile précédente", "Current day": "Aujourd'hui", "Current week": "Semaine en cours", "Current month": "Mois en cours", @@ -101,7 +51,7 @@ "Order Reference": "Référence de commande", "Transaction value": "Valeur de la transaction", "Browser": "Navigateur", - "Platform": "Plate-forme", + "Platform": "Plateforme", "Device": "Appareil", "Campaign name": "Nom de la campagne", "Campaign id": "Identifiant (ID) de campagne", @@ -122,12 +72,15 @@ "Item id": "Identifiant (ID) de l'article", "Item price": "Prix de l'article", "Item Commission": "Commission sur l'article", + "Status": "Statut", "Product name": "Nom du produit", "Product code": "Code produit", "Voucher code": "Code promotionnel", "Commission type": "Type de commission", "Commission Scheme": "Plan de commission", "Commission applied": "Commission appliquée", + "Difference": "Différence", "Previous value": "Valeur antérieure", - "Current value": "Valeur actuelle" + "Current value": "Valeur actuelle", + "% Difference": "Différence (%)" } \ No newline at end of file diff --git a/locales/it/translation.json b/locales/it/translation.json index a2ff82e03c07c..2d822921c3441 100644 --- a/locales/it/translation.json +++ b/locales/it/translation.json @@ -1,58 +1,8 @@ { - "Channels": "Canali", - "Dates": "Date", - "Granularity": "Granularità", - "Status": "Stato", - "Groups": "Gruppi", - "Performance Report": "Report delle prestazioni", - "Details": "Dettagli", - "Performance Comparison": "Confronto tra prestazioni", - "Force refresh": "Forza l'aggiornamento", - "Fetched": "Recuperato", - "Enter fullscreen": "Modalità schermo intero", - "Share": "Condividi", - "Download": "Scarica", - "Export to .CSV": "Esporta come CSV", - "Export to Excel": "Esporta in Excel", - "Download as image": "Scarica come immagine", - "Sales & Traffic": "Vendite e traffico", - "Performance": "Prestazioni", - "Total no. of sales": "N. totale di vendite", - "Total no. of products": "N. totale di prodotti", - "Total Sales": "Vendite totali", - "Clicks": "Click", - "Views": "Visualizzazioni", - "Conversion rate": "Tasso di conversione", - "AOV": "Carrello medio", - "Total Commission": "Commissione totale", - "EPHC": "EPHC", - "ROI %": "% ROI", - "Publishers": "Publisher", - "Devices": "Dispositivi", - "Countries": "Paesi", - "Map": "Mappa", - "Commission": "Commissione", - "Ads": "Annunci", - "Products": "Prodotti", - "Vouchers": "Coupon", - "More filters": "Più filtri", - "APPLY": "APPLICA", - "Clear all": "Cancella tutto", - "Month to date vs Last Month": "Mese in corso rispetto al mese scorso", - "Week to date vs Last week": "Settimana in corso rispetto alla settimana scorsa", - "Year to date vs Last Year": "Anno in corso rispetto all'anno scorso", - "Month to date vs Prev Year": "Mese in corso rispetto all'anno scorso", - "Total Sales & Traffic": "Vendite e traffico totali", - "Commission & Traffic": "Commissione e traffico", - "Top Publishers by Sales": "Migliori publisher per vendite", - "Main": "Principale", - "# Previous value": "# Valore precedente", - "Difference": "Differenza", - "% Difference": "Differenza %", - "Top Channels by Sales": "Migliori canali per vendite", "# Transactions": "# Transazioni", "# Products": "# Prodotti", "Total Sales Value": "Valore totale vendite", + "Total Commission": "Commissione totale", "# Clicks": "# Click", "Conversion Rate": "Tasso di conversione", "Country": "Paese", @@ -68,7 +18,7 @@ "Current": "Attuale", "Advanced": "Avanzato", "No filter": "Nessun filtro", - "Last day": "Ieri", + "Last day": "L'ultimo giorno", "Last week": "La settimana scorsa", "Last month": "Il mese scorso", "Last quarter": "Il trimestre scorso", @@ -122,12 +72,15 @@ "Item id": "ID articolo", "Item price": "Prezzo articolo", "Item Commission": "Commissione articolo", + "Status": "Stato", "Product name": "Nome prodotto", "Product code": "Codice prodotto", "Voucher code": "Codice sconto", "Commission type": "Tipologia di commissione", "Commission Scheme": "Struttura commissionale", "Commission applied": "Commissione applicata", + "Difference": "Differenza", "Previous value": "Valore precedente", - "Current value": "Valore attuale" + "Current value": "Valore attuale", + "% Difference": "Differenza %" } \ No newline at end of file diff --git a/locales/nl/translation.json b/locales/nl/translation.json index d439260d70540..1b2df4806453f 100644 --- a/locales/nl/translation.json +++ b/locales/nl/translation.json @@ -1,60 +1,10 @@ { - "Channels": "Kanalen", - "Dates": "Data", - "Granularity": "Korreligheid", - "Status": "Status", - "Groups": "Groepen", - "Performance Report": "Prestatierapport", - "Details": "Details", - "Performance Comparison": "Prestatie vergelijking", - "Force refresh": "Vernieuwen forceren", - "Fetched": "Opgehaald", - "Enter fullscreen": "Volledig scherm openen", - "Share": "Delen", - "Download": "Downloaden", - "Export to .CSV": "Naar CSV exporteren", - "Export to Excel": "Naar excel exporteren", - "Download as image": "Als afbeelding downloaden", - "Sales & Traffic": "Verkoop & verkeer", - "Performance": "Prestatie", - "Total no. of sales": "Totale aantal sales", - "Total no. of products": "Totale aantal producten", - "Total Sales": "Totale verkoop", - "Clicks": "Kliks", - "Views": "Weergaven", - "Conversion rate": "Conversiepercentage", - "AOV": "AOV", - "Total Commission": "Totale commissie", - "EPHC": "EPHC", - "ROI %": "ROI %", - "Publishers": "Publishers", - "Devices": "Apparaten", - "Countries": "Landen", - "Map": "Kaart", - "Commission": "Commissie", - "Ads": "Advertenties", - "Products": "Producten", - "Vouchers": "Kortingscodes", - "More filters": "Meer filters", - "APPLY": "TOEPASSEN", - "Clear all": "Alles legen", - "Month to date vs Last Month": "Maand tot vandaag vs. vorige maand", - "Week to date vs Last week": "Week tot vandaag vs. vorige week", - "Year to date vs Last Year": "Jaar tot vandaag vs. vorig jaar", - "Month to date vs Prev Year": "Maand tot vandaag vs. vorige jaar", - "Total Sales & Traffic": "Totale verkoop & verkeer", - "Commission & Traffic": "Commissie & verkeer", - "Top Publishers by Sales": "Beste publishers op verkoop", - "Main": "Hoofd", - "# Previous value": "# vorige waarde", - "Difference": "Verschil", - "% Difference": "% verschil", - "Top Channels by Sales": "Beste kanalen op verkoop", "# Transactions": "# transacties", "# Products": "# producten", "Total Sales Value": "Totale waarde verkoop", + "Total Commission": "Totale commissie", "# Clicks": "# kliks", - "Conversion Rate": "Conversiepercentage", + "Conversion Rate": "Conversieratio", "Country": "Land", "Scheme": "Schema", "Comm": "Commissie", @@ -122,12 +72,15 @@ "Item id": "Item id", "Item price": "Item prijs", "Item Commission": "Item commissie", + "Status": "Status", "Product name": "Productnaam", "Product code": "Productcode", "Voucher code": "Kortingscode", "Commission type": "Commissie type", "Commission Scheme": "Commissie schema", "Commission applied": "Commissie toegepast", + "Difference": "Verschil", "Previous value": "Vorige waarde", - "Current value": "Huidige waarde" + "Current value": "Huidige waarde", + "% Difference": "% verschil" } \ No newline at end of file From eccbf739a4de508ddd8be7e72d4a3de8c1f86414 Mon Sep 17 00:00:00 2001 From: "Bob T. Builder" <36963854+bob-t-builder@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:25:50 +0000 Subject: [PATCH 27/79] LOC-176 V2 --- locales/de/translation.json | 57 +++++++++++++++++++++++++++++++---- locales/en/translation.json | 57 +++++++++++++++++++++++++++++++---- locales/es/translation.json | 57 +++++++++++++++++++++++++++++++---- locales/fr/translation.json | 59 +++++++++++++++++++++++++++++++++---- locales/it/translation.json | 57 +++++++++++++++++++++++++++++++---- locales/nl/translation.json | 57 +++++++++++++++++++++++++++++++---- 6 files changed, 313 insertions(+), 31 deletions(-) diff --git a/locales/de/translation.json b/locales/de/translation.json index 3e5b3bbbcc94d..521617bbf5a25 100644 --- a/locales/de/translation.json +++ b/locales/de/translation.json @@ -1,8 +1,58 @@ { + "Channels": "Kanäle", + "Dates": "Daten", + "Granularity": "Granularität", + "Status": "Status", + "Groups": "Gruppen", + "Performance Report": "Performance-Report", + "Details": "Details", + "Performance Comparison": "Performance-Vergleich", + "Force refresh": "Aktualisierung erzwingen", + "Fetched": "Abgerufen", + "Enter fullscreen": "Vollbildmodus", + "Share": "Teilen", + "Download": "Herunterladen", + "Export to .CSV": "Als CSV exportieren", + "Export to Excel": "Als XLSX exportieren", + "Download as image": "Als Bild herunterladen", + "Sales & Traffic": "Umsatz und Traffic", + "Performance": "Performance", + "Total no. of sales": "Gesamtanzahl der Verkäufe", + "Total no. of products": "Gesamtanzahl der Produkte", + "Total Sales": "Gesamtumsatz", + "Clicks": "Klicks", + "Views": "Aufrufe", + "Conversion rate": "Conversion Rate", + "AOV": "AOV", + "Total Commission": "Gesamtprovision", + "EPHC": "EPHC", + "ROI %": "ROI (%)", + "Publishers": "Publisher", + "Devices": "Geräte", + "Countries": "Länder", + "Map": "Karte", + "Commission": "Provision", + "Ads": "Werbemittel", + "Products": "Produkte", + "Vouchers": "Gutscheine", + "More filters": "Weitere Filter", + "APPLY": "ANWENDEN", + "Clear all": "Filter aufheben", + "Month to date vs Last Month": "Bisheriger Monat im Vergleich zum Vormonat", + "Week to date vs Last week": "Bisherige Woche im Vergleich zur Vorwoche", + "Year to date vs Last Year": "Bisheriges Jahr im Vergleich zum Vorjahr", + "Month to date vs Prev Year": "Bisheriger Monat im Vergleich zum Vorjahr", + "Total Sales & Traffic": "Gesamtumsatz und Traffic", + "Commission & Traffic": "Provision und Traffic", + "Top Publishers by Sales": "Top-Publisher nach Umsatz", + "Main": "Aktuell", + "# Previous value": "Vorheriger Wert", + "Difference": "Differenz", + "% Difference": "Differenz (%)", + "Top Channels by Sales": "Top-Kanäle nach Umsatz", "# Transactions": "Anz. Transaktionen", "# Products": "Anz. Produkte", "Total Sales Value": "Gesamtumsatz", - "Total Commission": "Gesamtprovision", "# Clicks": "Anz. Klicks", "Conversion Rate": "Conversion Rate", "Country": "Land", @@ -72,15 +122,12 @@ "Item id": "Artikel-ID", "Item price": "Artikelpreis", "Item Commission": "Provision für den Artikel", - "Status": "Status", "Product name": "Produktname", "Product code": "Produktcode", "Voucher code": "Gutscheincode", "Commission type": "Provisionsart", "Commission Scheme": "Provisionsmodell", "Commission applied": "Angewendete Provision", - "Difference": "Differenz", "Previous value": "Vorheriger Wert", - "Current value": "Aktueller Wert", - "% Difference": "Differenz (%)" + "Current value": "Aktueller Wert" } \ No newline at end of file diff --git a/locales/en/translation.json b/locales/en/translation.json index 7dfd740a655ad..2cdf2e426b39c 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -1,8 +1,58 @@ { + "Channels": "Channels", + "Dates": "Dates", + "Granularity": "Granularity", + "Status": "Status", + "Groups": "Groups", + "Performance Report": "Performance Report", + "Details": "Details", + "Performance Comparison": "Performance Comparison", + "Force refresh": "Force refresh", + "Fetched": "Fetched", + "Enter fullscreen": "Enter fullscreen", + "Share": "Share", + "Download": "Download", + "Export to .CSV": "Export to CSV", + "Export to Excel": "Export to Excel", + "Download as image": "Download as image", + "Sales & Traffic": "Sales & Traffic", + "Performance": "Performance", + "Total no. of sales": "Total no. of sales", + "Total no. of products": "Total no. of products", + "Total Sales": "Total sales", + "Clicks": "Clicks", + "Views": "Views", + "Conversion rate": "Conversion rate", + "AOV": "AOV", + "Total Commission": "Total Commission", + "EPHC": "EPHC", + "ROI %": "ROI %", + "Publishers": "Publishers", + "Devices": "Devices", + "Countries": "Countries", + "Map": "Map", + "Commission": "Commission", + "Ads": "Ads", + "Products": "Products", + "Vouchers": "Vouchers", + "More filters": "More filters", + "APPLY": "APPLY", + "Clear all": "Clear all", + "Month to date vs Last Month": "Month to date vs last month", + "Week to date vs Last week": "Week to date vs last week", + "Year to date vs Last Year": "Year to date vs last year", + "Month to date vs Prev Year": "Month to date vs prev year", + "Total Sales & Traffic": "Total Sales & Traffic", + "Commission & Traffic": "Commission & Traffic", + "Top Publishers by Sales": "Top Publishers by Sales", + "Main": "Current", + "# Previous value": "Previous", + "Difference": "Difference", + "% Difference": "% Difference", + "Top Channels by Sales": "Top Channels by Sales", "# Transactions": "# Transactions", "# Products": "# Products", "Total Sales Value": "Total Sales Value", - "Total Commission": "Total Commission", "# Clicks": "# Clicks", "Conversion Rate": "Conversion Rate", "Country": "Country", @@ -72,15 +122,12 @@ "Item id": "Item id", "Item price": "Item price", "Item Commission": "Item Commission", - "Status": "Status", "Product name": "Product name", "Product code": "Product code", "Voucher code": "Voucher code", "Commission type": "Commission type", "Commission Scheme": "Commission Scheme", "Commission applied": "Commission applied", - "Difference": "Difference", "Previous value": "Previous value", - "Current value": "Current value", - "% Difference": "% Difference" + "Current value": "Current value" } \ No newline at end of file diff --git a/locales/es/translation.json b/locales/es/translation.json index 8c5aa9aa253bc..c8c18c04075c4 100644 --- a/locales/es/translation.json +++ b/locales/es/translation.json @@ -1,8 +1,58 @@ { + "Channels": "Canales", + "Dates": "Fechas", + "Granularity": "Granulado", + "Status": "Estado", + "Groups": "Grupos", + "Performance Report": "Informe de rendimiento", + "Details": "Detalles", + "Performance Comparison": "Comparación de rendimiento", + "Force refresh": "Forzar actualización", + "Fetched": "Obtenido", + "Enter fullscreen": "Modo pantalla completa", + "Share": "Compartir", + "Download": "Descargar", + "Export to .CSV": "Exportar a CSV", + "Export to Excel": "Exportar a Excel", + "Download as image": "Descargar como imagen", + "Sales & Traffic": "Ventas y tráfico", + "Performance": "Rendimiento", + "Total no. of sales": "N.º total de ventas", + "Total no. of products": "N.º total de productos", + "Total Sales": "Total de ventas", + "Clicks": "Clics", + "Views": "Visualizaciones", + "Conversion rate": "Tasa de conversión", + "AOV": "Cesta media", + "Total Commission": "Comisión total", + "EPHC": "EPHC", + "ROI %": "ROI (%)", + "Publishers": "Afiliados", + "Devices": "Dispositivos", + "Countries": "Países", + "Map": "Mapa", + "Commission": "Comisión", + "Ads": "Anuncios", + "Products": "Productos", + "Vouchers": "Descuentos", + "More filters": "Más filtros", + "APPLY": "APLICAR", + "Clear all": "Borrar todo", + "Month to date vs Last Month": "Mes hasta la fecha vs. mes pasado", + "Week to date vs Last week": "Semana hasta la fecha vs. semana pasada", + "Year to date vs Last Year": "Año hasta la fecha vs. año pasado", + "Month to date vs Prev Year": "Mes hasta la fecha vs. año anterior", + "Total Sales & Traffic": "Ventas y tráfico totales", + "Commission & Traffic": "Comisión y tráfico", + "Top Publishers by Sales": "Principales afiliados por ventas", + "Main": "Principal", + "# Previous value": "Anterior", + "Difference": "Diferencia", + "% Difference": "Diferencia (%)", + "Top Channels by Sales": "Principales canales por ventas", "# Transactions": "N.º de transacciones", "# Products": "N.º de productos", "Total Sales Value": "Valor total de las ventas", - "Total Commission": "Comisión total", "# Clicks": "N.º de clics", "Conversion Rate": "Tasa de conversión", "Country": "País", @@ -72,15 +122,12 @@ "Item id": "ID del artículo", "Item price": "Precio del artículo", "Item Commission": "Comisión por el artículo", - "Status": "Estado", "Product name": "Nombre del producto", "Product code": "Código del producto", "Voucher code": "Código de descuento", "Commission type": "Tipo de comisión", "Commission Scheme": "Plan de comisión", "Commission applied": "Comisión aplicada", - "Difference": "Diferencia", "Previous value": "Valor anterior", - "Current value": "Valor actual", - "% Difference": "Diferencia (%)" + "Current value": "Valor actual" } \ No newline at end of file diff --git a/locales/fr/translation.json b/locales/fr/translation.json index 71cb060e61321..68072ad85349f 100644 --- a/locales/fr/translation.json +++ b/locales/fr/translation.json @@ -1,8 +1,58 @@ { + "Channels": "Canaux", + "Dates": "Dates", + "Granularity": "Niveau de détail", + "Status": "Statut", + "Groups": "Groupes", + "Performance Report": "Rapport de performance", + "Details": "Données détaillées", + "Performance Comparison": "Comparaison des performances", + "Force refresh": "Forcer l’actualisation", + "Fetched": "Récupéré", + "Enter fullscreen": "Mode plein écran", + "Share": "Partager", + "Download": "Télécharger", + "Export to .CSV": "Exporter au format CSV", + "Export to Excel": "Exporter vers Excel", + "Download as image": "Télécharger l'image", + "Sales & Traffic": "Montant total des ventes et trafic", + "Performance": "Performance", + "Total no. of sales": "Nombre total de ventes", + "Total no. of products": "Nombre total de produits", + "Total Sales": "Montant total des ventes", + "Clicks": "Clics", + "Views": "Affichages", + "Conversion rate": "Taux de conversion", + "AOV": "Panier moyen", + "Total Commission": "Commission totale", + "EPHC": "EPHC", + "ROI %": "ROI (%)", + "Publishers": "Éditeurs", + "Devices": "Appareils", + "Countries": "Pays", + "Map": "Carte", + "Commission": "Commission", + "Ads": "Annonces", + "Products": "Produits", + "Vouchers": "Codes promotionnels", + "More filters": "Plus de filtres", + "APPLY": "APPLIQUER", + "Clear all": "Tout effacer", + "Month to date vs Last Month": "Mois en cours par rapport au mois précédent", + "Week to date vs Last week": "Semaine en cours par rapport à la semaine précédente", + "Year to date vs Last Year": "Année en cours par rapport à l'année précédente", + "Month to date vs Prev Year": "Mois en cours par rapport à l'année précédente", + "Total Sales & Traffic": "Montant total des ventes et trafic", + "Commission & Traffic": "Commission et trafic", + "Top Publishers by Sales": "Meilleures ventes, par éditeur", + "Main": "Période en cours", + "# Previous value": "Valeur antérieure", + "Difference": "Différence", + "% Difference": "Différence (%)", + "Top Channels by Sales": "Meilleurs canaux de ventes", "# Transactions": "Nombre de transactions", "# Products": "Nombre de produits", "Total Sales Value": "Valeur totale des ventes", - "Total Commission": "Commission totale", "# Clicks": "Nombre de clics", "Conversion Rate": "Taux de conversion", "Country": "Pays", @@ -18,7 +68,7 @@ "Current": "En cours", "Advanced": "Recherche détaillée", "No filter": "Aucun filtre", - "Last day": "Hier", + "Last day": "Dernier jour", "Last week": "Semaine dernière", "Last month": "Mois dernier", "Last quarter": "Trimestre dernier", @@ -72,15 +122,12 @@ "Item id": "Identifiant (ID) de l'article", "Item price": "Prix de l'article", "Item Commission": "Commission sur l'article", - "Status": "Statut", "Product name": "Nom du produit", "Product code": "Code produit", "Voucher code": "Code promotionnel", "Commission type": "Type de commission", "Commission Scheme": "Plan de commission", "Commission applied": "Commission appliquée", - "Difference": "Différence", "Previous value": "Valeur antérieure", - "Current value": "Valeur actuelle", - "% Difference": "Différence (%)" + "Current value": "Valeur actuelle" } \ No newline at end of file diff --git a/locales/it/translation.json b/locales/it/translation.json index 2d822921c3441..ff0c0eddb9be6 100644 --- a/locales/it/translation.json +++ b/locales/it/translation.json @@ -1,8 +1,58 @@ { + "Channels": "Canali", + "Dates": "Date", + "Granularity": "Granularità", + "Status": "Stato", + "Groups": "Gruppi", + "Performance Report": "Report delle prestazioni", + "Details": "Dettagli", + "Performance Comparison": "Confronto tra prestazioni", + "Force refresh": "Forza l'aggiornamento", + "Fetched": "Recuperato", + "Enter fullscreen": "Modalità schermo intero", + "Share": "Condividi", + "Download": "Scarica", + "Export to .CSV": "Esporta come CSV", + "Export to Excel": "Esporta in Excel", + "Download as image": "Scarica come immagine", + "Sales & Traffic": "Vendite e traffico", + "Performance": "Prestazioni", + "Total no. of sales": "N. totale di vendite", + "Total no. of products": "N. totale di prodotti", + "Total Sales": "Vendite totali", + "Clicks": "Click", + "Views": "Visualizzazioni", + "Conversion rate": "Tasso di conversione", + "AOV": "Carrello medio", + "Total Commission": "Commissione totale", + "EPHC": "EPHC", + "ROI %": "% ROI", + "Publishers": "Publisher", + "Devices": "Dispositivi", + "Countries": "Paesi", + "Map": "Mappa", + "Commission": "Commissione", + "Ads": "Annunci", + "Products": "Prodotti", + "Vouchers": "Coupon", + "More filters": "Più filtri", + "APPLY": "APPLICA", + "Clear all": "Cancella tutto", + "Month to date vs Last Month": "Mese in corso rispetto al mese scorso", + "Week to date vs Last week": "Settimana in corso rispetto alla settimana scorsa", + "Year to date vs Last Year": "Anno in corso rispetto all'anno scorso", + "Month to date vs Prev Year": "Mese in corso rispetto all'anno scorso", + "Total Sales & Traffic": "Vendite e traffico totali", + "Commission & Traffic": "Commissione e traffico", + "Top Publishers by Sales": "Migliori publisher per vendite", + "Main": "Principale", + "# Previous value": "# Valore precedente", + "Difference": "Differenza", + "% Difference": "Differenza %", + "Top Channels by Sales": "Migliori canali per vendite", "# Transactions": "# Transazioni", "# Products": "# Prodotti", "Total Sales Value": "Valore totale vendite", - "Total Commission": "Commissione totale", "# Clicks": "# Click", "Conversion Rate": "Tasso di conversione", "Country": "Paese", @@ -72,15 +122,12 @@ "Item id": "ID articolo", "Item price": "Prezzo articolo", "Item Commission": "Commissione articolo", - "Status": "Stato", "Product name": "Nome prodotto", "Product code": "Codice prodotto", "Voucher code": "Codice sconto", "Commission type": "Tipologia di commissione", "Commission Scheme": "Struttura commissionale", "Commission applied": "Commissione applicata", - "Difference": "Differenza", "Previous value": "Valore precedente", - "Current value": "Valore attuale", - "% Difference": "Differenza %" + "Current value": "Valore attuale" } \ No newline at end of file diff --git a/locales/nl/translation.json b/locales/nl/translation.json index 1b2df4806453f..a4ac4e7aa1927 100644 --- a/locales/nl/translation.json +++ b/locales/nl/translation.json @@ -1,8 +1,58 @@ { + "Channels": "Kanalen", + "Dates": "Data", + "Granularity": "Korreligheid", + "Status": "Status", + "Groups": "Groepen", + "Performance Report": "Performance rapport", + "Details": "Details", + "Performance Comparison": "Prestatie vergelijking", + "Force refresh": "Vernieuwen forceren", + "Fetched": "Opgehaald", + "Enter fullscreen": "Volledig scherm openen", + "Share": "Delen", + "Download": "Downloaden", + "Export to .CSV": "Naar CSV exporteren", + "Export to Excel": "Naar excel exporteren", + "Download as image": "Als afbeelding downloaden", + "Sales & Traffic": "Verkoop & verkeer", + "Performance": "Performance", + "Total no. of sales": "Totale aantal sales", + "Total no. of products": "Totale aantal producten", + "Total Sales": "Totale verkoop", + "Clicks": "Kliks", + "Views": "Weergaven", + "Conversion rate": "Conversieratio", + "AOV": "AOV", + "Total Commission": "Totale commissie", + "EPHC": "EPHC", + "ROI %": "ROI %", + "Publishers": "Publishers", + "Devices": "Apparaten", + "Countries": "Landen", + "Map": "Kaart", + "Commission": "Commissie", + "Ads": "Advertenties", + "Products": "Producten", + "Vouchers": "Kortingscodes", + "More filters": "Meer filters", + "APPLY": "TOEPASSEN", + "Clear all": "Alles legen", + "Month to date vs Last Month": "Maand tot vandaag vs. vorige maand", + "Week to date vs Last week": "Week tot vandaag vs. vorige week", + "Year to date vs Last Year": "Jaar tot vandaag vs. vorig jaar", + "Month to date vs Prev Year": "Maand tot vandaag vs. vorige jaar", + "Total Sales & Traffic": "Totale verkoop & verkeer", + "Commission & Traffic": "Commissie & verkeer", + "Top Publishers by Sales": "Beste publishers op verkoop", + "Main": "Hoofd", + "# Previous value": "# vorige waarde", + "Difference": "Verschil", + "% Difference": "% verschil", + "Top Channels by Sales": "Beste kanalen op verkoop", "# Transactions": "# transacties", "# Products": "# producten", "Total Sales Value": "Totale waarde verkoop", - "Total Commission": "Totale commissie", "# Clicks": "# kliks", "Conversion Rate": "Conversieratio", "Country": "Land", @@ -72,15 +122,12 @@ "Item id": "Item id", "Item price": "Item prijs", "Item Commission": "Item commissie", - "Status": "Status", "Product name": "Productnaam", "Product code": "Productcode", "Voucher code": "Kortingscode", "Commission type": "Commissie type", "Commission Scheme": "Commissie schema", "Commission applied": "Commissie toegepast", - "Difference": "Verschil", "Previous value": "Vorige waarde", - "Current value": "Huidige waarde", - "% Difference": "% verschil" + "Current value": "Huidige waarde" } \ No newline at end of file From d6b3c659c5230ce3a24328013579a838d47fd42e Mon Sep 17 00:00:00 2001 From: Greg Lebret Date: Fri, 15 Nov 2024 16:56:31 +0000 Subject: [PATCH 28/79] SRV-862: dispatch click to parent --- .../components/DashboardBuilder/DashboardBuilder.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx index 2d20e246061ad..692bf913c8379 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx @@ -453,6 +453,13 @@ const DashboardBuilder = () => { window.parent.postMessage(data, '*'); }; + const fireWindowClickToParent = () => { + const data = { + event: 'supersetWindowClick', + }; + window.parent.postMessage(data, '*'); + }; + useEffect(() => { setBarTopOffset(headerRef.current?.getBoundingClientRect()?.height || 0); @@ -468,8 +475,11 @@ const DashboardBuilder = () => { observer.observe(headerRef.current); } + window.addEventListener('click', fireWindowClickToParent); + return () => { observer?.disconnect(); + window.removeEventListener('click', fireWindowClickToParent); }; }, []); From 40e04f3a00e33c582957ee8e449a01878f26ff9a Mon Sep 17 00:00:00 2001 From: Greg Lebret Date: Mon, 18 Nov 2024 10:56:28 +0000 Subject: [PATCH 29/79] SRV-862: fix code formatting --- .../plugins/plugin-chart-table/src/DataTable/DataTable.tsx | 6 +++++- .../plugins/plugin-chart-table/src/TableChart.tsx | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx b/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx index 5111e54ca2a4f..75c41ec229d5c 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx @@ -379,7 +379,11 @@ export default typedMemo(function DataTable({ ) : null}
{searchInput ? ( -
+
searchInput={ typeof searchInput === 'boolean' ? undefined : searchInput diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index 47c841acb4f5b..00d658a8cde5a 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -407,7 +407,12 @@ export default function TableChart( }; }; - const comparisonLabels = [t('Current value'), t('Previous value'), t('Difference'), t('% Difference')]; + const comparisonLabels = [ + t('Current value'), + t('Previous value'), + t('Difference'), + t('% Difference'), + ]; const filteredColumnsMeta = useMemo(() => { if (!isUsingTimeComparison) { return columnsMeta; From 5fc4c290e30f3ee5d54235a2e7bf7f83d89645d2 Mon Sep 17 00:00:00 2001 From: Greg Lebret Date: Mon, 18 Nov 2024 11:37:58 +0000 Subject: [PATCH 30/79] SRV-862: addEventListener on document --- .../components/DashboardBuilder/DashboardBuilder.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx index 692bf913c8379..7670618ee2a53 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx @@ -475,11 +475,11 @@ const DashboardBuilder = () => { observer.observe(headerRef.current); } - window.addEventListener('click', fireWindowClickToParent); + document.addEventListener('click', fireWindowClickToParent); return () => { observer?.disconnect(); - window.removeEventListener('click', fireWindowClickToParent); + document.removeEventListener('click', fireWindowClickToParent); }; }, []); From 2449b35b6ff24f5982538264f685ec18147343aa Mon Sep 17 00:00:00 2001 From: Greg Lebret Date: Mon, 18 Nov 2024 13:37:06 +0000 Subject: [PATCH 31/79] SRV-862: revert document listener --- .../components/DashboardBuilder/DashboardBuilder.tsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx index 7670618ee2a53..2d20e246061ad 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx @@ -453,13 +453,6 @@ const DashboardBuilder = () => { window.parent.postMessage(data, '*'); }; - const fireWindowClickToParent = () => { - const data = { - event: 'supersetWindowClick', - }; - window.parent.postMessage(data, '*'); - }; - useEffect(() => { setBarTopOffset(headerRef.current?.getBoundingClientRect()?.height || 0); @@ -475,11 +468,8 @@ const DashboardBuilder = () => { observer.observe(headerRef.current); } - document.addEventListener('click', fireWindowClickToParent); - return () => { observer?.disconnect(); - document.removeEventListener('click', fireWindowClickToParent); }; }, []); From a033b9ee17047162f1424cc026b38b3c9b61a630 Mon Sep 17 00:00:00 2001 From: Greg Lebret Date: Mon, 18 Nov 2024 14:00:31 +0000 Subject: [PATCH 32/79] SRV-862: add document listener --- .../components/DashboardBuilder/DashboardBuilder.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx index 2d20e246061ad..7670618ee2a53 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx @@ -453,6 +453,13 @@ const DashboardBuilder = () => { window.parent.postMessage(data, '*'); }; + const fireWindowClickToParent = () => { + const data = { + event: 'supersetWindowClick', + }; + window.parent.postMessage(data, '*'); + }; + useEffect(() => { setBarTopOffset(headerRef.current?.getBoundingClientRect()?.height || 0); @@ -468,8 +475,11 @@ const DashboardBuilder = () => { observer.observe(headerRef.current); } + document.addEventListener('click', fireWindowClickToParent); + return () => { observer?.disconnect(); + document.removeEventListener('click', fireWindowClickToParent); }; }, []); From 1fbc1721cd35f852346a819c8cd88a18264413c1 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Thu, 21 Nov 2024 17:20:41 +0000 Subject: [PATCH 33/79] SRV-894 revert - reverting translations --- .../plugins/plugin-chart-table/src/transformProps.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts index 28cdd295c4d34..48871e4ea4185 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts @@ -355,7 +355,7 @@ const processComparisonColumns = ( return [ { ...col, - label: t('Current value'), + label: t('Main'), key: `${t('Main')} ${col.key}`, config: getComparisonColConfig(t('Main'), col.key, columnConfig), formatter: getComparisonColFormatter( @@ -368,7 +368,7 @@ const processComparisonColumns = ( }, { ...col, - label: t('Previous value'), + label: `#`, key: `# ${col.key}`, config: getComparisonColConfig(`#`, col.key, columnConfig), formatter: getComparisonColFormatter( @@ -381,7 +381,7 @@ const processComparisonColumns = ( }, { ...col, - label: t('Difference'), + label: `△`, key: `△ ${col.key}`, config: getComparisonColConfig(`△`, col.key, columnConfig), formatter: getComparisonColFormatter( @@ -394,7 +394,7 @@ const processComparisonColumns = ( }, { ...col, - label: t('% Difference'), + label: `%`, key: `% ${col.key}`, config: getComparisonColConfig(`%`, col.key, columnConfig), formatter: getComparisonColFormatter( From d3719118ded2e6375059e4775375cd020a68cf8f Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Thu, 21 Nov 2024 17:22:49 +0000 Subject: [PATCH 34/79] SRV-894 revert - reverting translations --- .../plugins/plugin-chart-table/src/TableChart.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index 00d658a8cde5a..b04cd0417f277 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -270,9 +270,9 @@ export default function TableChart( } = props; const comparisonColumns = [ { key: 'all', label: t('Display all') }, - { key: '#', label: t('Previous value') }, - { key: '△', label: t('Difference') }, - { key: '%', label: t('% Difference') }, + { key: '#', label: '#' }, + { key: '△', label: '△' }, + { key: '%', label: '%' }, ]; const timestampFormatter = useCallback( value => getTimeFormatterForGranularity(timeGrain)(value), @@ -407,12 +407,7 @@ export default function TableChart( }; }; - const comparisonLabels = [ - t('Current value'), - t('Previous value'), - t('Difference'), - t('% Difference'), - ]; + const comparisonLabels = [t('Main'), '#', '△', '%']; const filteredColumnsMeta = useMemo(() => { if (!isUsingTimeComparison) { return columnsMeta; From 7b0ac9e595a211b52c2e490d01641013d7f35bcf Mon Sep 17 00:00:00 2001 From: "Bob T. Builder" <36963854+bob-t-builder@users.noreply.github.com> Date: Fri, 22 Nov 2024 09:35:09 +0000 Subject: [PATCH 35/79] SRV-894 fix - removing "Main" from keys --- locales/de/translation.json | 8 ++++++-- locales/en/translation.json | 8 ++++++-- locales/es/translation.json | 8 ++++++-- locales/fr/translation.json | 8 ++++++-- locales/it/translation.json | 8 ++++++-- locales/nl/translation.json | 8 ++++++-- 6 files changed, 36 insertions(+), 12 deletions(-) diff --git a/locales/de/translation.json b/locales/de/translation.json index 521617bbf5a25..be1c8e5de42c6 100644 --- a/locales/de/translation.json +++ b/locales/de/translation.json @@ -45,7 +45,6 @@ "Total Sales & Traffic": "Gesamtumsatz und Traffic", "Commission & Traffic": "Provision und Traffic", "Top Publishers by Sales": "Top-Publisher nach Umsatz", - "Main": "Aktuell", "# Previous value": "Vorheriger Wert", "Difference": "Differenz", "% Difference": "Differenz (%)", @@ -129,5 +128,10 @@ "Commission Scheme": "Provisionsmodell", "Commission applied": "Angewendete Provision", "Previous value": "Vorheriger Wert", - "Current value": "Aktueller Wert" + "Current value": "Aktueller Wert", + "Quantity": "", + "Confirmed": "", + "Delayed": "", + "Cancelled": "", + "Program ID": "" } \ No newline at end of file diff --git a/locales/en/translation.json b/locales/en/translation.json index 2cdf2e426b39c..1d2213cbcfbf6 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -45,7 +45,6 @@ "Total Sales & Traffic": "Total Sales & Traffic", "Commission & Traffic": "Commission & Traffic", "Top Publishers by Sales": "Top Publishers by Sales", - "Main": "Current", "# Previous value": "Previous", "Difference": "Difference", "% Difference": "% Difference", @@ -129,5 +128,10 @@ "Commission Scheme": "Commission Scheme", "Commission applied": "Commission applied", "Previous value": "Previous value", - "Current value": "Current value" + "Current value": "Current value", + "Quantity": "Quantity", + "Confirmed": "Confirmed", + "Delayed": "Delayed", + "Cancelled": "Cancelled", + "Program ID": "Program ID" } \ No newline at end of file diff --git a/locales/es/translation.json b/locales/es/translation.json index c8c18c04075c4..e5dacd87c693f 100644 --- a/locales/es/translation.json +++ b/locales/es/translation.json @@ -45,7 +45,6 @@ "Total Sales & Traffic": "Ventas y tráfico totales", "Commission & Traffic": "Comisión y tráfico", "Top Publishers by Sales": "Principales afiliados por ventas", - "Main": "Principal", "# Previous value": "Anterior", "Difference": "Diferencia", "% Difference": "Diferencia (%)", @@ -129,5 +128,10 @@ "Commission Scheme": "Plan de comisión", "Commission applied": "Comisión aplicada", "Previous value": "Valor anterior", - "Current value": "Valor actual" + "Current value": "Valor actual", + "Quantity": "", + "Confirmed": "", + "Delayed": "", + "Cancelled": "", + "Program ID": "" } \ No newline at end of file diff --git a/locales/fr/translation.json b/locales/fr/translation.json index 68072ad85349f..c98fdb9a05be3 100644 --- a/locales/fr/translation.json +++ b/locales/fr/translation.json @@ -45,7 +45,6 @@ "Total Sales & Traffic": "Montant total des ventes et trafic", "Commission & Traffic": "Commission et trafic", "Top Publishers by Sales": "Meilleures ventes, par éditeur", - "Main": "Période en cours", "# Previous value": "Valeur antérieure", "Difference": "Différence", "% Difference": "Différence (%)", @@ -129,5 +128,10 @@ "Commission Scheme": "Plan de commission", "Commission applied": "Commission appliquée", "Previous value": "Valeur antérieure", - "Current value": "Valeur actuelle" + "Current value": "Valeur actuelle", + "Quantity": "", + "Confirmed": "", + "Delayed": "", + "Cancelled": "", + "Program ID": "" } \ No newline at end of file diff --git a/locales/it/translation.json b/locales/it/translation.json index ff0c0eddb9be6..9185eb2569250 100644 --- a/locales/it/translation.json +++ b/locales/it/translation.json @@ -45,7 +45,6 @@ "Total Sales & Traffic": "Vendite e traffico totali", "Commission & Traffic": "Commissione e traffico", "Top Publishers by Sales": "Migliori publisher per vendite", - "Main": "Principale", "# Previous value": "# Valore precedente", "Difference": "Differenza", "% Difference": "Differenza %", @@ -129,5 +128,10 @@ "Commission Scheme": "Struttura commissionale", "Commission applied": "Commissione applicata", "Previous value": "Valore precedente", - "Current value": "Valore attuale" + "Current value": "Valore attuale", + "Quantity": "", + "Confirmed": "", + "Delayed": "", + "Cancelled": "", + "Program ID": "" } \ No newline at end of file diff --git a/locales/nl/translation.json b/locales/nl/translation.json index a4ac4e7aa1927..32fa47fe4d70c 100644 --- a/locales/nl/translation.json +++ b/locales/nl/translation.json @@ -45,7 +45,6 @@ "Total Sales & Traffic": "Totale verkoop & verkeer", "Commission & Traffic": "Commissie & verkeer", "Top Publishers by Sales": "Beste publishers op verkoop", - "Main": "Hoofd", "# Previous value": "# vorige waarde", "Difference": "Verschil", "% Difference": "% verschil", @@ -129,5 +128,10 @@ "Commission Scheme": "Commissie schema", "Commission applied": "Commissie toegepast", "Previous value": "Vorige waarde", - "Current value": "Huidige waarde" + "Current value": "Huidige waarde", + "Quantity": "", + "Confirmed": "", + "Delayed": "", + "Cancelled": "", + "Program ID": "" } \ No newline at end of file From abe1df0051043462250fe29cf9220306dd34f0bf Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 22 Nov 2024 09:43:30 +0000 Subject: [PATCH 36/79] Update translation.json --- locales/de/translation.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/locales/de/translation.json b/locales/de/translation.json index be1c8e5de42c6..1bbe00b8fb011 100644 --- a/locales/de/translation.json +++ b/locales/de/translation.json @@ -128,10 +128,5 @@ "Commission Scheme": "Provisionsmodell", "Commission applied": "Angewendete Provision", "Previous value": "Vorheriger Wert", - "Current value": "Aktueller Wert", - "Quantity": "", - "Confirmed": "", - "Delayed": "", - "Cancelled": "", - "Program ID": "" -} \ No newline at end of file + "Current value": "Aktueller Wert" +} From f66bbb74066061c214cebb36ff9ab6028d0904a8 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 22 Nov 2024 09:44:06 +0000 Subject: [PATCH 37/79] Update translation.json --- locales/en/translation.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/locales/en/translation.json b/locales/en/translation.json index 1d2213cbcfbf6..bd3c02a759a13 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -128,10 +128,5 @@ "Commission Scheme": "Commission Scheme", "Commission applied": "Commission applied", "Previous value": "Previous value", - "Current value": "Current value", - "Quantity": "Quantity", - "Confirmed": "Confirmed", - "Delayed": "Delayed", - "Cancelled": "Cancelled", - "Program ID": "Program ID" -} \ No newline at end of file + "Current value": "Current value" +} From 415048e62dbff46ff4bc375c95ab45b8fbb1995b Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 22 Nov 2024 09:44:23 +0000 Subject: [PATCH 38/79] Update translation.json --- locales/es/translation.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/locales/es/translation.json b/locales/es/translation.json index e5dacd87c693f..275ce7e49de09 100644 --- a/locales/es/translation.json +++ b/locales/es/translation.json @@ -128,10 +128,5 @@ "Commission Scheme": "Plan de comisión", "Commission applied": "Comisión aplicada", "Previous value": "Valor anterior", - "Current value": "Valor actual", - "Quantity": "", - "Confirmed": "", - "Delayed": "", - "Cancelled": "", - "Program ID": "" -} \ No newline at end of file + "Current value": "Valor actual" +} From 1a29a6603cc68889625e21a8498caf032bc2b1b0 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 22 Nov 2024 09:44:39 +0000 Subject: [PATCH 39/79] Update translation.json --- locales/fr/translation.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/locales/fr/translation.json b/locales/fr/translation.json index c98fdb9a05be3..d4dce83d43b94 100644 --- a/locales/fr/translation.json +++ b/locales/fr/translation.json @@ -128,10 +128,5 @@ "Commission Scheme": "Plan de commission", "Commission applied": "Commission appliquée", "Previous value": "Valeur antérieure", - "Current value": "Valeur actuelle", - "Quantity": "", - "Confirmed": "", - "Delayed": "", - "Cancelled": "", - "Program ID": "" -} \ No newline at end of file + "Current value": "Valeur actuelle" +} From 1931251943cb04076a113f5af2603d9bd3202de5 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 22 Nov 2024 09:44:54 +0000 Subject: [PATCH 40/79] Update translation.json --- locales/it/translation.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/locales/it/translation.json b/locales/it/translation.json index 9185eb2569250..4809ae2a3aba6 100644 --- a/locales/it/translation.json +++ b/locales/it/translation.json @@ -128,10 +128,5 @@ "Commission Scheme": "Struttura commissionale", "Commission applied": "Commissione applicata", "Previous value": "Valore precedente", - "Current value": "Valore attuale", - "Quantity": "", - "Confirmed": "", - "Delayed": "", - "Cancelled": "", - "Program ID": "" -} \ No newline at end of file + "Current value": "Valore attuale" +} From 3f7f1c4472caffaf5c04149c1c3b89c2aba50ec2 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 22 Nov 2024 09:45:08 +0000 Subject: [PATCH 41/79] Update translation.json --- locales/nl/translation.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/locales/nl/translation.json b/locales/nl/translation.json index 32fa47fe4d70c..ec444c295de27 100644 --- a/locales/nl/translation.json +++ b/locales/nl/translation.json @@ -128,10 +128,5 @@ "Commission Scheme": "Commissie schema", "Commission applied": "Commissie toegepast", "Previous value": "Vorige waarde", - "Current value": "Huidige waarde", - "Quantity": "", - "Confirmed": "", - "Delayed": "", - "Cancelled": "", - "Program ID": "" -} \ No newline at end of file + "Current value": "Huidige waarde" +} From 37d381c10f68fcd73823e1d549f1330c43a8e242 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 22 Nov 2024 09:45:22 +0000 Subject: [PATCH 42/79] Update translation.json From 27f037c9e367a1eae13b5a89d6b5c970a2a176a6 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Thu, 12 Dec 2024 11:40:56 +0000 Subject: [PATCH 43/79] pre-commit fixes --- superset/config.py | 2 +- superset/jinja_context.py | 10 +++++----- superset/security/manager.py | 4 +++- superset/views/base.py | 6 +++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/superset/config.py b/superset/config.py index 98f8f41949ca4..9c4d61d717832 100644 --- a/superset/config.py +++ b/superset/config.py @@ -399,7 +399,7 @@ def _try_json_readsha(filepath: str, length: int) -> str | None: "it": {"flag": "it", "name": "Italian"}, "fr": {"flag": "fr", "name": "French"}, "de": {"flag": "de", "name": "German"}, - "nl": {"flag": "nl", "name": "Dutch"} + "nl": {"flag": "nl", "name": "Dutch"}, } diff --git a/superset/jinja_context.py b/superset/jinja_context.py index 797f22e757313..b0328798a67f6 100644 --- a/superset/jinja_context.py +++ b/superset/jinja_context.py @@ -354,16 +354,16 @@ def get_filters(self, column: str, remove_filter: bool = False) -> list[Filter]: val: Union[Any, list[Any]] = flt.get("comparator") op: str = flt["operator"].upper() if flt.get("operator") else None # type: ignore if ( - (flt.get("expressionType") == "SIMPLE" + flt.get("expressionType") == "SIMPLE" and flt.get("clause") == "WHERE" and flt.get("subject") == column - and val) - or - (isinstance(flt.get("subject"), dict) + and val + ) or ( + isinstance(flt.get("subject"), dict) and flt.get("expressionType") == "SIMPLE" and flt.get("clause") == "WHERE" and flt.get("subject").get("label") == column - and val) + and val ): if remove_filter: if column not in self.removed_filters: diff --git a/superset/security/manager.py b/superset/security/manager.py index 8f27472d71f95..11180e7c4409e 100644 --- a/superset/security/manager.py +++ b/superset/security/manager.py @@ -2662,7 +2662,9 @@ def has_guest_access(self, dashboard: "Dashboard") -> bool: return False dashboards = [ - r for r in user.resources if r["type"] == GuestTokenResourceType.DASHBOARD.value + r + for r in user.resources + if r["type"] == GuestTokenResourceType.DASHBOARD.value ] # TODO (embedded): remove this check once uuids are rolled out diff --git a/superset/views/base.py b/superset/views/base.py index dda668f68600b..9ddd5be422b32 100644 --- a/superset/views/base.py +++ b/superset/views/base.py @@ -31,9 +31,9 @@ g, get_flashed_messages, redirect, + request, Response, session, - request ) from flask_appbuilder import BaseView, expose, Model, ModelView from flask_appbuilder.actions import action @@ -350,8 +350,8 @@ def cached_common_bootstrap_data( # pylint: disable=unused-argument def common_bootstrap_payload() -> dict[str, Any]: locale = get_locale() - if request.args.get('lang'): - locale = Locale.parse(request.args.get('lang')) + if request.args.get("lang"): + locale = Locale.parse(request.args.get("lang")) return { **cached_common_bootstrap_data(utils.get_user_id(), locale), "flash_messages": get_flashed_messages(with_categories=True), From f21ae3bcd39e4f1cd1c0390f9b646c42f558fe74 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Thu, 12 Dec 2024 12:02:47 +0000 Subject: [PATCH 44/79] Fix for lint issue --- superset/jinja_context.py | 43 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/superset/jinja_context.py b/superset/jinja_context.py index b0328798a67f6..f4afcb06077db 100644 --- a/superset/jinja_context.py +++ b/superset/jinja_context.py @@ -356,28 +356,27 @@ def get_filters(self, column: str, remove_filter: bool = False) -> list[Filter]: if ( flt.get("expressionType") == "SIMPLE" and flt.get("clause") == "WHERE" - and flt.get("subject") == column - and val - ) or ( - isinstance(flt.get("subject"), dict) - and flt.get("expressionType") == "SIMPLE" - and flt.get("clause") == "WHERE" - and flt.get("subject").get("label") == column - and val - ): - if remove_filter: - if column not in self.removed_filters: - self.removed_filters.append(column) - if column not in self.applied_filters: - self.applied_filters.append(column) - - if op in ( - FilterOperator.IN.value, - FilterOperator.NOT_IN.value, - ) and not isinstance(val, list): - val = [val] - - filters.append({"op": op, "col": column, "val": val}) + and val + ): + if ( + flt.get("subject") == column + ) or ( + isinstance(flt.get("subject"), dict) + and flt.get("subject").get("label") == column + ): + if remove_filter: + if column not in self.removed_filters: + self.removed_filters.append(column) + if column not in self.applied_filters: + self.applied_filters.append(column) + + if op in ( + FilterOperator.IN.value, + FilterOperator.NOT_IN.value, + ) and not isinstance(val, list): + val = [val] + + filters.append({"op": op, "col": column, "val": val}) return filters From afff5dbf0fa2e37e045aed23f3acb6f4998a9615 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Thu, 12 Dec 2024 12:04:16 +0000 Subject: [PATCH 45/79] Disable workflows that are not relavent to us (yet) --- .github/workflows/license-check.yml | 5 +++-- .github/workflows/pr-lint.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml index 6001eede70da3..c8c2ce16c3f12 100644 --- a/.github/workflows/license-check.yml +++ b/.github/workflows/license-check.yml @@ -1,8 +1,9 @@ name: License Template Check on: - pull_request: - types: [synchronize, opened, reopened, ready_for_review] + workflow_dispatch: +# pull_request: +# types: [synchronize, opened, reopened, ready_for_review] # cancel previous workflow jobs for PRs concurrency: diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml index 230af3d19c097..bfbd2647be49c 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/pr-lint.yml @@ -1,12 +1,13 @@ name: PR Lint on: - pull_request: + workflow_dispatch: +# pull_request: # By default, a workflow only runs when a pull_request's activity type is opened, synchronize, or reopened. We # explicity override here so that PR titles are re-linted when the PR text content is edited. # # Possible values: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request - types: [opened, edited, reopened, synchronize] +# types: [opened, edited, reopened, synchronize] jobs: lint-check: From 6b0e03a78fee16bcb78ad3b7dc7c26a40901805d Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Thu, 12 Dec 2024 12:33:35 +0000 Subject: [PATCH 46/79] Removed whitespace --- .github/workflows/license-check.yml | 2 +- superset/jinja_context.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml index c8c2ce16c3f12..fe748d57c360c 100644 --- a/.github/workflows/license-check.yml +++ b/.github/workflows/license-check.yml @@ -1,7 +1,7 @@ name: License Template Check on: - workflow_dispatch: + workflow_dispatch: # pull_request: # types: [synchronize, opened, reopened, ready_for_review] diff --git a/superset/jinja_context.py b/superset/jinja_context.py index f4afcb06077db..cfbd556b2af64 100644 --- a/superset/jinja_context.py +++ b/superset/jinja_context.py @@ -356,7 +356,7 @@ def get_filters(self, column: str, remove_filter: bool = False) -> list[Filter]: if ( flt.get("expressionType") == "SIMPLE" and flt.get("clause") == "WHERE" - and val + and val ): if ( flt.get("subject") == column From f5447be98bb33329d2c4959584047ccaaf719dd7 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Thu, 12 Dec 2024 12:35:26 +0000 Subject: [PATCH 47/79] pre-commit reformatting --- superset/jinja_context.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/superset/jinja_context.py b/superset/jinja_context.py index cfbd556b2af64..02fbfbd064b60 100644 --- a/superset/jinja_context.py +++ b/superset/jinja_context.py @@ -357,10 +357,8 @@ def get_filters(self, column: str, remove_filter: bool = False) -> list[Filter]: flt.get("expressionType") == "SIMPLE" and flt.get("clause") == "WHERE" and val - ): - if ( - flt.get("subject") == column - ) or ( + ): + if (flt.get("subject") == column) or ( isinstance(flt.get("subject"), dict) and flt.get("subject").get("label") == column ): From 84f8798073380ddf3717b27d729fc0bf57d47b89 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Thu, 12 Dec 2024 13:47:52 +0000 Subject: [PATCH 48/79] Disable E2E tests and Frontend tests from running as they fail on our fork --- .github/workflows/superset-e2e.yml | 12 ++++++------ .github/workflows/superset-frontend.yml | 13 +++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/superset-e2e.yml b/.github/workflows/superset-e2e.yml index b5646e8f41704..0228c9f11c157 100644 --- a/.github/workflows/superset-e2e.yml +++ b/.github/workflows/superset-e2e.yml @@ -1,12 +1,12 @@ name: E2E on: - push: - branches: - - "master" - - "[0-9].[0-9]*" - pull_request: - types: [synchronize, opened, reopened, ready_for_review] +# push: +# branches: +# - "master" +# - "[0-9].[0-9]*" +# pull_request: +# types: [synchronize, opened, reopened, ready_for_review] workflow_dispatch: inputs: use_dashboard: diff --git a/.github/workflows/superset-frontend.yml b/.github/workflows/superset-frontend.yml index 9451692f5f7a5..69d61d0743df1 100644 --- a/.github/workflows/superset-frontend.yml +++ b/.github/workflows/superset-frontend.yml @@ -1,12 +1,13 @@ name: Frontend on: - push: - branches: - - "master" - - "[0-9].[0-9]*" - pull_request: - types: [synchronize, opened, reopened, ready_for_review] + workflow_dispatch: +# push: +# branches: +# - "master" +# - "[0-9].[0-9]*" +# pull_request: +# types: [synchronize, opened, reopened, ready_for_review] # cancel previous workflow jobs for PRs concurrency: From ff9773109d3d34a0fc8e0160d114fcb80f6b229f Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Fri, 13 Dec 2024 16:41:10 +0000 Subject: [PATCH 49/79] Lint fixes --- .github/workflows/superset-frontend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/superset-frontend.yml b/.github/workflows/superset-frontend.yml index 69d61d0743df1..37cb212f9b55c 100644 --- a/.github/workflows/superset-frontend.yml +++ b/.github/workflows/superset-frontend.yml @@ -1,7 +1,7 @@ name: Frontend on: - workflow_dispatch: + workflow_dispatch: # push: # branches: # - "master" From c3293f7630b4f062337ff658edf7fe6bd115feb9 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Tue, 17 Dec 2024 17:27:09 +0000 Subject: [PATCH 50/79] WI-5739 - Updates to deploy the built Docker to the feature env --- .github/workflows/build.yml | 16 ++++++--- .github/workflows/pr-closed.yml | 18 +++++++++++ .github/workflows/pr-deployment.yml | 50 +++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/pr-closed.yml create mode 100644 .github/workflows/pr-deployment.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b400eb5f1aff..70e46f1dc2768 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,8 +4,11 @@ on: push: branches: - master - pull_request: - types: [opened, reopened, synchronize] + workflow_call: + outputs: + tag_hash: + description: "The commit hash used to tag the Docker image" + value: ${{ jobs.build-image.outputs.tag_hash }} env: AWS_REGION: eu-west-1 @@ -14,6 +17,9 @@ jobs: build-image: name: Build, Tag and Upload runs-on: ubuntu-latest + env: + SUPERSET_REPOSITORY_URI: "289222877357.dkr.ecr.eu-west-1.amazonaws.com/webgains/superset" + steps: - name: Checkout code uses: actions/checkout@v4 @@ -22,14 +28,14 @@ jobs: run: mkdir dist - name: Compute labels + id: compute_labels run: | TAG_HASH="$(echo $GITHUB_SHA | head -c 8)" TAG_NAME="$(echo $GITHUB_REF | sed -E -e 's:refs/pull/([0-9]+)/merge:pr.\1:' -e 's:refs/heads/::' -e 's:tag/v?([.0-9]+):v\1:' -e 's:/:.:')" - SUPERSET_REPOSITORY_URI="289222877357.dkr.ecr.eu-west-1.amazonaws.com/webgains/superset" echo "TAG_HASH=$TAG_HASH" >> $GITHUB_ENV echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV - echo "SUPERSET_REPOSITORY_URI=$SUPERSET_REPOSITORY_URI" >> $GITHUB_ENV if [ $TAG_NAME = "main" ]; then echo "LATEST_TAG=$SUPERSET_REPOSITORY_URI:latest" >> $GITHUB_ENV; fi + echo "tag_hash=$TAG_HASH" >> $GITHUB_OUTPUT - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4.0.2 @@ -56,3 +62,5 @@ jobs: ${{ env.SUPERSET_REPOSITORY_URI }}:${{ env.TAG_HASH }} ${{ env.SUPERSET_REPOSITORY_URI }}:${{ env.TAG_NAME }} ${{ env.LATEST_TAG }} + outputs: + tag_hash: ${{ steps.compute_labels.outputs.tag_hash }} diff --git a/.github/workflows/pr-closed.yml b/.github/workflows/pr-closed.yml new file mode 100644 index 0000000000000..84105fc6a5a08 --- /dev/null +++ b/.github/workflows/pr-closed.yml @@ -0,0 +1,18 @@ +name: PR Cleanup + +on: + pull_request: + types: [closed] + +jobs: + destroy: + name: Destroy Stack + uses: webgains/github-workflows/.github/workflows/destroy-stack.yml@main + secrets: inherit + with: + environment: feature + stack: superset-pr-${{ github.event.pull_request.number }}SupersetService + permissions: + contents: read + deployments: write + id-token: write diff --git a/.github/workflows/pr-deployment.yml b/.github/workflows/pr-deployment.yml new file mode 100644 index 0000000000000..1e950824d29fe --- /dev/null +++ b/.github/workflows/pr-deployment.yml @@ -0,0 +1,50 @@ +name: PR Deployment + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build: + uses: ./.github/workflows/build.yml + name: Build + secrets: inherit + permissions: + checks: write + actions: write + contents: write + packages: read + issues: read + pull-requests: write + + labels: + runs-on: ubuntu-latest + name: Add Labels + steps: + - name: Add labels + id: add_labels + run: | + echo "feature_name=superset-pr-${{ github.event.pull_request.number }}" | sed 's:\.:-:g' >> $GITHUB_OUTPUT + outputs: + feature_name: ${{ steps.add_labels.outputs.feature_name }} + + deploy: + name: Deploy to Feature Environment + needs: [labels] + uses: webgains/github-workflows/.github/workflows/deploy-service-to-environment.yml@WI-5868-allow-service-deploy-workflow-to-use-any-repositor + secrets: inherit + with: + environment: feature + name: ${{ needs.labels.outputs.feature_name }} + stack: ${{ needs.labels.outputs.feature_name }} + service: superset + component: service + override: | + { + "namespace": "${{ needs.labels.outputs.feature_name }}", + "supersetImageTag": "${{ needs.build.outputs.tag_hash }}" + } + permissions: + contents: read + deployments: write + id-token: write From 8f2e0edb583c5d8096068357c636808973822c94 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Wed, 18 Dec 2024 10:46:25 +0000 Subject: [PATCH 51/79] WI-5739 - Added missing dependancy --- .github/workflows/pr-deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-deployment.yml b/.github/workflows/pr-deployment.yml index 1e950824d29fe..16d98955bdc5b 100644 --- a/.github/workflows/pr-deployment.yml +++ b/.github/workflows/pr-deployment.yml @@ -30,7 +30,7 @@ jobs: deploy: name: Deploy to Feature Environment - needs: [labels] + needs: [labels, build] uses: webgains/github-workflows/.github/workflows/deploy-service-to-environment.yml@WI-5868-allow-service-deploy-workflow-to-use-any-repositor secrets: inherit with: From 9e6ba60571e28b78698810f6bff345e90131871e Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Tue, 17 Dec 2024 12:17:23 +0000 Subject: [PATCH 52/79] SRV-932 security - not returning query in request if user has no permission --- superset/models/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superset/models/helpers.py b/superset/models/helpers.py index 784d86d7292d3..e031e8c6c8fbc 100644 --- a/superset/models/helpers.py +++ b/superset/models/helpers.py @@ -51,7 +51,7 @@ from sqlalchemy.sql.selectable import Alias, TableClause from sqlalchemy_utils import UUIDType -from superset import app, db, is_feature_enabled +from superset import app, db, is_feature_enabled, security_manager from superset.advanced_data_type.types import AdvancedDataTypeResponse from superset.common.db_query_status import QueryStatus from superset.common.utils.time_range_utils import get_since_until_from_time_range @@ -579,7 +579,7 @@ def __init__( # pylint: disable=too-many-arguments to_dttm: Optional[datetime] = None, ) -> None: self.df = df - self.query = query + self.query = query if security_manager.can_access('can_view_query', 'Dashboard') else '' self.duration = duration self.applied_template_filters = applied_template_filters or [] self.applied_filter_columns = applied_filter_columns or [] From cc8c03bfe2cff7f3ee6c84ba3012c42cd2786ac9 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Wed, 18 Dec 2024 17:28:26 +0000 Subject: [PATCH 53/79] SRV-932 fix - removing query from explicit view query request --- superset/common/query_actions.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/superset/common/query_actions.py b/superset/common/query_actions.py index 9e61de6e1aaa2..72066b8cc5bf5 100644 --- a/superset/common/query_actions.py +++ b/superset/common/query_actions.py @@ -21,7 +21,7 @@ from flask_babel import _ -from superset import app +from superset import app, security_manager from superset.common.chart_data import ChartDataResultType from superset.common.db_query_status import QueryStatus from superset.connectors.sqla.models import BaseDatasource @@ -87,7 +87,10 @@ def _get_query( datasource = _get_datasource(query_context, query_obj) result = {"language": datasource.query_language} try: - result["query"] = datasource.get_query_str(query_obj.to_dict()) + if security_manager.can_access('can_view_query', 'Dashboard'): + result["query"] = datasource.get_query_str(query_obj.to_dict()) + else: + result["query"] = 'Forbidden' except QueryObjectValidationError as err: result["error"] = err.message return result From 4169b403fa96d70dca1180d2cdcb2559beca46e1 Mon Sep 17 00:00:00 2001 From: "Bob T. Builder" <36963854+bob-t-builder@users.noreply.github.com> Date: Thu, 5 Dec 2024 12:28:22 +0000 Subject: [PATCH 54/79] SRV-872 --- locales/de/translation.json | 53 +++++++++++++++++++++++++++++++++-- locales/en/translation.json | 53 +++++++++++++++++++++++++++++++++-- locales/es/translation.json | 53 +++++++++++++++++++++++++++++++++-- locales/fr/translation.json | 55 +++++++++++++++++++++++++++++++++++-- locales/it/translation.json | 55 +++++++++++++++++++++++++++++++++++-- locales/nl/translation.json | 53 +++++++++++++++++++++++++++++++++-- 6 files changed, 308 insertions(+), 14 deletions(-) diff --git a/locales/de/translation.json b/locales/de/translation.json index 1bbe00b8fb011..b24922f9fae7b 100644 --- a/locales/de/translation.json +++ b/locales/de/translation.json @@ -128,5 +128,54 @@ "Commission Scheme": "Provisionsmodell", "Commission applied": "Angewendete Provision", "Previous value": "Vorheriger Wert", - "Current value": "Aktueller Wert" -} + "Current value": "Aktueller Wert", + "Quantity": "", + "Confirmed": "", + "Delayed": "", + "Cancelled": "", + "Program ID": "", + "Actual time range": "Tatsächlicher Zeitbereich", + "Applied filters (%d)": "Angewendete Filter (%d)", + "Applied filters (%s)": "Angewendete Filter (%d)", + "CANCEL": "ABBRECHEN", + "Cached %s": "%s zwischengespeichert", + "Cancel": "Abbrechen", + "Click to edit %s.": "Klicken Sie hier, um %s zu bearbeiten.", + "Configure Time Range: Current...": "Zeitraum konfigurieren: Letzte...", + "Configure Time Range: Last...": "Zeitraum konfigurieren: Letzte...", + "Configure Time Range: Previous...": "Zeitraum konfigurieren: Vorhergehende…", + "Copied to clipboard!": "In Zwischenablage kopiert!", + "Copy permalink to clipboard": "Permalink in Zwischenablage kopieren", + "Custom": "Angepasst", + "Data refreshed": "Daten aktualisiert", + "Day": "Tag", + "Display all": "Anzeigename", + "Edit chart": "Diagramm bearbeiten", + "Edit time range": "Zeitraum bearbeiten", + "Fetched %s": "%s abgerufen", + "Filter type": "Filter Typ", + "Month": "Monat", + "No applied filters": "Keine angewendete Filter", + "Quarter": "Quartal", + "RANGE TYPE": "BEREICHSTYP", + "Scope": "Geltungsbereich", + "Select columns that will be displayed in the table. You can multiselect columns.": "", + "Select filter": "Filter auswählen", + "Share chart by email": "Diagramm per Email teilen", + "Share permalink by email": "Permalink per E-Mail teilen", + "Shift + Click to sort by multiple columns": "UMSCHALT+Klicken um nach mehreren Spalten zu sortieren", + "Show %s entries": "Metrik anzeigen", + "Tabs": "Reiter", + "Time filter": "Zeitfilter", + "Time grain": "Zeitgranularität", + "Use %s to open in a new tab.": "Verwenden Sie %s, um eine neue Registerkarte zu öffnen.", + "View as table": "Als Tabelle anzeigen", + "View query": "Abfrage anzeigen", + "Week": "Woche", + "Year": "Jahr", + "date": "Datum", + "sv_current": "", + "sv_previous": "", + "sv_change": "", + "sv_change_percentage": "" +} \ No newline at end of file diff --git a/locales/en/translation.json b/locales/en/translation.json index bd3c02a759a13..0cc301ccb997c 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -128,5 +128,54 @@ "Commission Scheme": "Commission Scheme", "Commission applied": "Commission applied", "Previous value": "Previous value", - "Current value": "Current value" -} + "Current value": "Current value", + "Quantity": "Quantity", + "Confirmed": "Confirmed", + "Delayed": "Delayed", + "Cancelled": "Cancelled", + "Program ID": "Program ID", + "Actual time range": "Actual time range", + "Applied filters (%d)": "Applied filters (%d)", + "Applied filters (%s)": "Applied filters (%s)", + "CANCEL": "CANCEL", + "Cached %s": "Cached %s", + "Cancel": "Cancel", + "Click to edit %s.": "Click to edit %s.", + "Configure Time Range: Current...": "Configure Time Range: Current...", + "Configure Time Range: Last...": "Configure Time Range: Last...", + "Configure Time Range: Previous...": "Configure Time Range: Previous...", + "Copied to clipboard!": "Copied to clipboard!", + "Copy permalink to clipboard": "Copy permalink to clipboard", + "Custom": "Custom", + "Data refreshed": "Data refreshed", + "Day": "Day", + "Display all": "Display all", + "Edit chart": "Edit chart", + "Edit time range": "Edit time range", + "Fetched %s": "Fetched %s", + "Filter type": "Filter type", + "Month": "Month", + "No applied filters": "No applied filters", + "Quarter": "Quarter", + "RANGE TYPE": "RANGE TYPE", + "Scope": "Scope", + "Select columns that will be displayed in the table. You can multiselect columns.": "Select columns that will be displayed in the table. You can multiselect columns.", + "Select filter": "Select filter", + "Share chart by email": "Share chart by email", + "Share permalink by email": "Share permalink by email", + "Shift + Click to sort by multiple columns": "Shift + Click to sort by multiple columns", + "Show %s entries": "Show %s entries", + "Tabs": "Tabs", + "Time filter": "Time filter", + "Time grain": "Time grain", + "Use %s to open in a new tab.": "Use %s to open in a new tab.", + "View as table": "View as table", + "View query": "View query", + "Week": "Week", + "Year": "Year", + "date": "date", + "sv_current": "Current", + "sv_previous": "Previous", + "sv_change": "Change", + "sv_change_percentage": "Change (%)" +} \ No newline at end of file diff --git a/locales/es/translation.json b/locales/es/translation.json index 275ce7e49de09..7d1d1cc4388c9 100644 --- a/locales/es/translation.json +++ b/locales/es/translation.json @@ -128,5 +128,54 @@ "Commission Scheme": "Plan de comisión", "Commission applied": "Comisión aplicada", "Previous value": "Valor anterior", - "Current value": "Valor actual" -} + "Current value": "Valor actual", + "Quantity": "", + "Confirmed": "", + "Delayed": "", + "Cancelled": "", + "Program ID": "", + "Actual time range": "Rango de tiempo actual", + "Applied filters (%d)": "Filtros aplicados (%d)", + "Applied filters (%s)": "Filtros aplicados (%d)", + "CANCEL": "CANCELAR", + "Cached %s": "En cache %s", + "Cancel": "Cancelar", + "Click to edit %s.": "Click para editar", + "Configure Time Range: Current...": "Configurar Rango de Tiempo: Últimos..", + "Configure Time Range: Last...": "Configurar Rango de Tiempo: Últimos..", + "Configure Time Range: Previous...": "Configurar Ranfo de Tiempo: Anteriores...", + "Copied to clipboard!": "Copiar al portapapeles", + "Copy permalink to clipboard": "Copiar consulta de partición al portapapeles", + "Custom": "Personalizar", + "Data refreshed": "Última actualización de metadatos", + "Day": "día", + "Display all": "Valor del Filtro", + "Edit chart": "Editar Gráfico", + "Edit time range": "Editar rango de tiempo", + "Fetched %s": "Obtenido %s", + "Filter type": "Filtrar por usuario", + "Month": "mes", + "No applied filters": "Filtros aplicados (%d)", + "Quarter": "consulta", + "RANGE TYPE": "TIPO DE RANGO", + "Scope": "", + "Select columns that will be displayed in the table. You can multiselect columns.": "", + "Select filter": "Buscar \/ Filtrar", + "Share chart by email": "Compartir gráfico", + "Share permalink by email": "Compartir gráfico", + "Shift + Click to sort by multiple columns": "", + "Show %s entries": "Mostrar Métrica", + "Tabs": "Pestañas", + "Time filter": "Filtro de Fecha", + "Time grain": "Granularidad Temporal", + "Use %s to open in a new tab.": "Consulta en nueva pestaña", + "View as table": "Ver ejemplos", + "View query": "Ver consulta", + "Week": "semana", + "Year": "año", + "date": "fecha", + "sv_current": "", + "sv_previous": "", + "sv_change": "", + "sv_change_percentage": "" +} \ No newline at end of file diff --git a/locales/fr/translation.json b/locales/fr/translation.json index d4dce83d43b94..c284dc0a24baf 100644 --- a/locales/fr/translation.json +++ b/locales/fr/translation.json @@ -7,7 +7,7 @@ "Performance Report": "Rapport de performance", "Details": "Données détaillées", "Performance Comparison": "Comparaison des performances", - "Force refresh": "Forcer l’actualisation", + "Force refresh": "Forcer l'actualisation", "Fetched": "Récupéré", "Enter fullscreen": "Mode plein écran", "Share": "Partager", @@ -128,5 +128,54 @@ "Commission Scheme": "Plan de commission", "Commission applied": "Commission appliquée", "Previous value": "Valeur antérieure", - "Current value": "Valeur actuelle" -} + "Current value": "Valeur actuelle", + "Quantity": "", + "Confirmed": "", + "Delayed": "", + "Cancelled": "", + "Program ID": "", + "Actual time range": "Intervalle de temps courant", + "Applied filters (%d)": "Filtres appliqués (%d)", + "Applied filters (%s)": "Filtres appliqués (%d)", + "CANCEL": "CANCEL", + "Cached %s": "%s mis en cache", + "Cancel": "Annuler", + "Click to edit %s.": "Cliquer pour modifier %s.", + "Configure Time Range: Current...": "Configurer l'intervalle de temps : Dernier…", + "Configure Time Range: Last...": "Configurer l'intervalle de temps : Dernier…", + "Configure Time Range: Previous...": "Configurer intervalle de temps : Précédent…", + "Copied to clipboard!": "Copié vers le presse-papier!", + "Copy permalink to clipboard": "Copier le lien dans le presse-papiers", + "Custom": "Personnalisé", + "Data refreshed": "Données rafraîchies", + "Day": "Jour", + "Display all": "Nom d'affichage", + "Edit chart": "Modifier le graphique", + "Edit time range": "Modifier l’intervalle de temps", + "Fetched %s": "Récupération de %s", + "Filter type": "Type de filtre", + "Month": "Mois", + "No applied filters": "Aucun filtre appliqué", + "Quarter": "Trimestre", + "RANGE TYPE": "TYPE DE PLAGE", + "Scope": "Portée", + "Select columns that will be displayed in the table. You can multiselect columns.": "", + "Select filter": "Selectionner un filtre", + "Share chart by email": "Partager le graphique par courriel", + "Share permalink by email": "Partager le lien par courriel", + "Shift + Click to sort by multiple columns": "Shift + clic pour classer par plusieurs colonnes", + "Show %s entries": "Afficher la mesure", + "Tabs": "Onglets", + "Time filter": "Filtre de temps", + "Time grain": "Fragment de temps", + "Use %s to open in a new tab.": "Utilisez %s pour ouvrir un nouvel onglet.", + "View as table": "Voir sous forme de tableau", + "View query": "Voir la requête", + "Week": "Semaine", + "Year": "Année", + "date": "Date", + "sv_current": "", + "sv_previous": "", + "sv_change": "", + "sv_change_percentage": "" +} \ No newline at end of file diff --git a/locales/it/translation.json b/locales/it/translation.json index 4809ae2a3aba6..79f55448153ef 100644 --- a/locales/it/translation.json +++ b/locales/it/translation.json @@ -7,7 +7,7 @@ "Performance Report": "Report delle prestazioni", "Details": "Dettagli", "Performance Comparison": "Confronto tra prestazioni", - "Force refresh": "Forza l'aggiornamento", + "Force refresh": "", "Fetched": "Recuperato", "Enter fullscreen": "Modalità schermo intero", "Share": "Condividi", @@ -128,5 +128,54 @@ "Commission Scheme": "Struttura commissionale", "Commission applied": "Commissione applicata", "Previous value": "Valore precedente", - "Current value": "Valore attuale" -} + "Current value": "Valore attuale", + "Quantity": "", + "Confirmed": "", + "Delayed": "", + "Cancelled": "", + "Program ID": "", + "Actual time range": "", + "Applied filters (%d)": "Aggiungi filtro", + "Applied filters (%s)": "Aggiungi filtro", + "CANCEL": "", + "Cached %s": "", + "Cancel": "Annulla", + "Click to edit %s.": "", + "Configure Time Range: Current...": "", + "Configure Time Range: Last...": "", + "Configure Time Range: Previous...": "", + "Copied to clipboard!": "copia URL in appunti", + "Copy permalink to clipboard": "copia URL in appunti", + "Custom": "", + "Data refreshed": "", + "Day": "giorno", + "Display all": "Valore del filtro", + "Edit chart": "Modifica grafico", + "Edit time range": "", + "Fetched %s": "", + "Filter type": "Valore del filtro", + "Month": "mese", + "No applied filters": "Aggiungi filtro", + "Quarter": "condividi query", + "RANGE TYPE": "", + "Scope": "", + "Select columns that will be displayed in the table. You can multiselect columns.": "", + "Select filter": "Seleziona data finale", + "Share chart by email": "Esplora grafico", + "Share permalink by email": "Esplora grafico", + "Shift + Click to sort by multiple columns": "", + "Show %s entries": "Mostra metrica", + "Tabs": "", + "Time filter": "Aggiungi filtro", + "Time grain": "", + "Use %s to open in a new tab.": "Query in un nuovo tab", + "View as table": "", + "View query": "condividi query", + "Week": "settimana", + "Year": "anno", + "date": "", + "sv_current": "", + "sv_previous": "", + "sv_change": "", + "sv_change_percentage": "" +} \ No newline at end of file diff --git a/locales/nl/translation.json b/locales/nl/translation.json index ec444c295de27..b4c95c2450d96 100644 --- a/locales/nl/translation.json +++ b/locales/nl/translation.json @@ -128,5 +128,54 @@ "Commission Scheme": "Commissie schema", "Commission applied": "Commissie toegepast", "Previous value": "Vorige waarde", - "Current value": "Huidige waarde" -} + "Current value": "Huidige waarde", + "Quantity": "", + "Confirmed": "", + "Delayed": "", + "Cancelled": "", + "Program ID": "", + "Actual time range": "Werkelijk tijdsbereik", + "Applied filters (%d)": "Toegepaste filters (%d)", + "Applied filters (%s)": "Toegepaste filters (%d)", + "CANCEL": "ANNULEER", + "Cached %s": "Gebufferd %s", + "Cancel": "Annuleer", + "Click to edit %s.": "Klik om te bewerken %s.", + "Configure Time Range: Current...": "Configureer Tijdbereik: Laatste...", + "Configure Time Range: Last...": "Configureer Tijdbereik: Laatste...", + "Configure Time Range: Previous...": "Configureer Tijdbereik: Vorige...", + "Copied to clipboard!": "Gekopieerd naar het klembord!", + "Copy permalink to clipboard": "Kopieer permalink naar klembord", + "Custom": "Aangepast", + "Data refreshed": "Gegevens verversen", + "Day": "Dag", + "Display all": "Toon naam", + "Edit chart": "Bewerk grafiek", + "Edit time range": "Tijdsbereik bewerken", + "Fetched %s": "Opgehaald %s", + "Filter type": "Filter type", + "Month": "Maand", + "No applied filters": "Geen toegepaste filters", + "Quarter": "Kwartaal", + "RANGE TYPE": "BEREIK TYPE", + "Scope": "Scope", + "Select columns that will be displayed in the table. You can multiselect columns.": "", + "Select filter": "Selecteer filter", + "Share chart by email": "Deel grafiek per e-mail", + "Share permalink by email": "Deel permalink via e-mail", + "Shift + Click to sort by multiple columns": "Shift + Klik om te sorteren op meerdere kolommen", + "Show %s entries": "Toon metriek", + "Tabs": "Tabs", + "Time filter": "Tijdfilter", + "Time grain": "Tijdsinterval", + "Use %s to open in a new tab.": "Gebruik %s om een nieuw tabblad te openen.", + "View as table": "Bekijk als tabel", + "View query": "Bekijk zoekopdracht", + "Week": "Week", + "Year": "Jaar", + "date": "datum", + "sv_current": "", + "sv_previous": "", + "sv_change": "", + "sv_change_percentage": "" +} \ No newline at end of file From ef4cb28df3ce12f7ef370e8de0c8cb9da14f3e8c Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Wed, 18 Dec 2024 15:11:58 +0000 Subject: [PATCH 55/79] SRV-872 feat - adding better translations for comparison table --- .../src/translation/TranslatorSingleton.ts | 7 ++- .../plugin-chart-table/src/TableChart.tsx | 8 +-- .../plugin-chart-table/src/transformProps.ts | 56 +++++++++---------- superset/translations/utils.py | 4 +- 4 files changed, 40 insertions(+), 35 deletions(-) diff --git a/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts b/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts index cc38e3012ab2e..f2ec700c73c55 100644 --- a/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts +++ b/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts @@ -64,7 +64,12 @@ function addLocaleData(data: LocaleData) { } function t(input: string, ...args: unknown[]) { - return getInstance().translate(input, ...args); + input = null as unknown as string + try { + return getInstance().translate(input, ...args); + } catch (e) { + return `${input}` + } } function tn(key: string, ...args: unknown[]) { diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index b04cd0417f277..9c8485bb282f9 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -270,9 +270,9 @@ export default function TableChart( } = props; const comparisonColumns = [ { key: 'all', label: t('Display all') }, - { key: '#', label: '#' }, - { key: '△', label: '△' }, - { key: '%', label: '%' }, + { key: t('sv_previous'), label: t('sv_previous') }, + { key: t('sv_change') , label: t('sv_change') }, + { key: t('sv_change_percentage') label: t('sv_change_percentage') }, ]; const timestampFormatter = useCallback( value => getTimeFormatterForGranularity(timeGrain)(value), @@ -407,7 +407,7 @@ export default function TableChart( }; }; - const comparisonLabels = [t('Main'), '#', '△', '%']; + const comparisonLabels = [t('sv_current'), t('sv_previous'), t('sv_change'), t('sv_change_percentage')]; const filteredColumnsMeta = useMemo(() => { if (!isUsingTimeComparison) { return columnsMeta; diff --git a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts index 48871e4ea4185..c8ba4e690cf1f 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts @@ -118,21 +118,21 @@ const processComparisonTotals = ( totals.map((totalRecord: DataRecord) => Object.keys(totalRecord).forEach(key => { if (totalRecord[key] !== undefined && !key.includes(comparisonSuffix)) { - transformedTotals[`Main ${key}`] = - parseInt(transformedTotals[`Main ${key}`]?.toString() || '0', 10) + + transformedTotals[`${t('sv_current')} ${key}`] = + parseInt(transformedTotals[`${t('sv_current')} ${key}`]?.toString() || '0', 10) + parseInt(totalRecord[key]?.toString() || '0', 10); - transformedTotals[`# ${key}`] = - parseInt(transformedTotals[`# ${key}`]?.toString() || '0', 10) + + transformedTotals[`${t('sv_previous')} ${key}`] = + parseInt(transformedTotals[`${t('sv_previous')} ${key}`]?.toString() || '0', 10) + parseInt( totalRecord[`${key}__${comparisonSuffix}`]?.toString() || '0', 10, ); const { valueDifference, percentDifferenceNum } = calculateDifferences( - transformedTotals[`Main ${key}`] as number, - transformedTotals[`# ${key}`] as number, + transformedTotals[`${t('sv_current')} ${key}`] as number, + transformedTotals[`${t('sv_previous')} ${key}`] as number, ); - transformedTotals[`△ ${key}`] = valueDifference; - transformedTotals[`% ${key}`] = percentDifferenceNum; + transformedTotals[`${t('sv_change')} ${key}`] = valueDifference; + transformedTotals[`${t('sv_change_percentage')} ${key}`] = percentDifferenceNum; } }), ); @@ -166,10 +166,10 @@ const processComparisonDataRecords = memoizeOne( comparisonValue as number, ); - transformedItem[`Main ${origCol.key}`] = originalValue; - transformedItem[`# ${origCol.key}`] = comparisonValue; - transformedItem[`△ ${origCol.key}`] = valueDifference; - transformedItem[`% ${origCol.key}`] = percentDifferenceNum; + transformedItem[`${t('sv_current')} ${origCol.key}`] = originalValue; + transformedItem[`${t('sv_previous')} ${origCol.key}`] = comparisonValue; + transformedItem[`${t('sv_change')} ${origCol.key}`] = valueDifference; + transformedItem[`${t('sv_change_percentage')} ${origCol.key}`] = percentDifferenceNum; } }); @@ -355,11 +355,11 @@ const processComparisonColumns = ( return [ { ...col, - label: t('Main'), - key: `${t('Main')} ${col.key}`, - config: getComparisonColConfig(t('Main'), col.key, columnConfig), + label: t('sv_current'), + key: `${t('sv_current')} ${col.key}`, + config: getComparisonColConfig(t('sv_current'), col.key, columnConfig), formatter: getComparisonColFormatter( - t('Main'), + t('sv_current'), col, columnConfig, savedFormat, @@ -368,11 +368,11 @@ const processComparisonColumns = ( }, { ...col, - label: `#`, - key: `# ${col.key}`, - config: getComparisonColConfig(`#`, col.key, columnConfig), + label: t('sv_previous'), + key: `${t('sv_previous')} ${col.key}`, + config: getComparisonColConfig(t('sv_previous'), col.key, columnConfig), formatter: getComparisonColFormatter( - `#`, + t('sv_previous'), col, columnConfig, savedFormat, @@ -381,11 +381,11 @@ const processComparisonColumns = ( }, { ...col, - label: `△`, - key: `△ ${col.key}`, - config: getComparisonColConfig(`△`, col.key, columnConfig), + label: t('sv_change'), + key: `${t('sv_change')} ${col.key}`, + config: getComparisonColConfig(t('sv_change'), col.key, columnConfig), formatter: getComparisonColFormatter( - `△`, + t('sv_change'), col, columnConfig, savedFormat, @@ -394,11 +394,11 @@ const processComparisonColumns = ( }, { ...col, - label: `%`, - key: `% ${col.key}`, - config: getComparisonColConfig(`%`, col.key, columnConfig), + label: t('sv_change_percentage'), + key: `${t('sv_change_percentage')} ${col.key}`, + config: getComparisonColConfig(t('sv_change_percentage'), col.key, columnConfig), formatter: getComparisonColFormatter( - `%`, + t('sv_change_percentage'), col, columnConfig, savedFormat, diff --git a/superset/translations/utils.py b/superset/translations/utils.py index 36be0331a4d77..e4f8ae80ffd10 100644 --- a/superset/translations/utils.py +++ b/superset/translations/utils.py @@ -38,7 +38,7 @@ def get_language_pack(locale: str) -> Optional[dict[str, Any]]: pack = ALL_LANGUAGE_PACKS.get(locale) if not pack: filename = DIR + f"/{locale}/LC_MESSAGES/messages.json" - if not locale or locale == "en": + if not locale: # Forcing a dummy, quasy-empty language pack for English since the file # in the en directory is contains data with empty mappings filename = DIR + "/empty_language_pack.json" @@ -50,5 +50,5 @@ def get_language_pack(locale: str) -> Optional[dict[str, Any]]: logger.error( "Error loading language pack for, falling back on en %s", locale ) - pack = get_language_pack("en") + pack = get_language_pack('') return pack From 65115890d711ab751a66cd154e50bdf8ce0bf627 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Wed, 18 Dec 2024 15:14:29 +0000 Subject: [PATCH 56/79] SRV-872 fix - removing input overwrite --- .../superset-ui-core/src/translation/TranslatorSingleton.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts b/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts index f2ec700c73c55..a974d554315c0 100644 --- a/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts +++ b/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts @@ -64,7 +64,6 @@ function addLocaleData(data: LocaleData) { } function t(input: string, ...args: unknown[]) { - input = null as unknown as string try { return getInstance().translate(input, ...args); } catch (e) { From b3aaf4ecd27d0dece911f06e18d3780b4939b26e Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Thu, 19 Dec 2024 15:25:28 +0000 Subject: [PATCH 57/79] SRV-920 feat - calculating correct date for 'X ... ago' tooltips --- .../src/MixedTimeseries/transformProps.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts index d4d19f9c2f6af..3c774f582f2a3 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts @@ -96,6 +96,7 @@ import { getXAxisFormatter, getYAxisFormatter, } from '../utils/formatters'; +import moment from 'moment'; const getFormatter = ( customFormatters: Record, @@ -580,7 +581,7 @@ export default function transformProps( show: !inContextMenu, trigger: richTooltip ? 'axis' : 'item', formatter: (params: any) => { - const xValue: number = richTooltip + let xValue: number = richTooltip ? params[0].value[0] : params.value[0]; const forecastValue: any[] = richTooltip ? params : [params]; @@ -639,6 +640,15 @@ export default function transformProps( focusedRow = rows.length - 1; } }); + const { seriesName } = params + if (seriesName) { + const regex = new RegExp(".*(\\d+) (\\w+) ago") + const result = seriesName.match(regex) + if (result && result.length == 3) { + const [_, diff, diffType] = result + xValue = moment.utc(xValue).subtract(Number(diff), diffType).valueOf() + } + } return tooltipHtml(rows, tooltipFormatter(xValue), focusedRow); }, }, From 626111b4e717bdb82ff874d747024f57fd98c49a Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Fri, 20 Dec 2024 17:18:21 +0000 Subject: [PATCH 58/79] SRV-872 fix - missing comma --- superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index 9c8485bb282f9..67cd63fb65d2d 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -272,7 +272,7 @@ export default function TableChart( { key: 'all', label: t('Display all') }, { key: t('sv_previous'), label: t('sv_previous') }, { key: t('sv_change') , label: t('sv_change') }, - { key: t('sv_change_percentage') label: t('sv_change_percentage') }, + { key: t('sv_change_percentage'), label: t('sv_change_percentage') }, ]; const timestampFormatter = useCallback( value => getTimeFormatterForGranularity(timeGrain)(value), From 4356bc01db967808e35b28275bb44da729d5b5b0 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 6 Jan 2025 10:50:27 +0000 Subject: [PATCH 59/79] SRV-948 fix - pre-commit fixes --- locales/de/translation.json | 2 +- locales/en/translation.json | 2 +- locales/es/translation.json | 2 +- locales/fr/translation.json | 2 +- locales/it/translation.json | 2 +- locales/nl/translation.json | 2 +- .../src/translation/TranslatorSingleton.ts | 2 +- .../src/MixedTimeseries/transformProps.ts | 17 +++---- .../plugin-chart-table/src/TableChart.tsx | 9 +++- .../plugin-chart-table/src/transformProps.ts | 44 ++++++++++++++----- .../FilterControls/FilterControl.tsx | 5 ++- superset/common/query_actions.py | 4 +- superset/models/helpers.py | 4 +- superset/translations/utils.py | 2 +- 14 files changed, 67 insertions(+), 32 deletions(-) diff --git a/locales/de/translation.json b/locales/de/translation.json index b24922f9fae7b..1d8e61d47432e 100644 --- a/locales/de/translation.json +++ b/locales/de/translation.json @@ -178,4 +178,4 @@ "sv_previous": "", "sv_change": "", "sv_change_percentage": "" -} \ No newline at end of file +} diff --git a/locales/en/translation.json b/locales/en/translation.json index 0cc301ccb997c..0d34b8e2276b2 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -178,4 +178,4 @@ "sv_previous": "Previous", "sv_change": "Change", "sv_change_percentage": "Change (%)" -} \ No newline at end of file +} diff --git a/locales/es/translation.json b/locales/es/translation.json index 7d1d1cc4388c9..ea3c3787f3e5e 100644 --- a/locales/es/translation.json +++ b/locales/es/translation.json @@ -178,4 +178,4 @@ "sv_previous": "", "sv_change": "", "sv_change_percentage": "" -} \ No newline at end of file +} diff --git a/locales/fr/translation.json b/locales/fr/translation.json index c284dc0a24baf..b826877993e63 100644 --- a/locales/fr/translation.json +++ b/locales/fr/translation.json @@ -178,4 +178,4 @@ "sv_previous": "", "sv_change": "", "sv_change_percentage": "" -} \ No newline at end of file +} diff --git a/locales/it/translation.json b/locales/it/translation.json index 79f55448153ef..c5b5bb608a746 100644 --- a/locales/it/translation.json +++ b/locales/it/translation.json @@ -178,4 +178,4 @@ "sv_previous": "", "sv_change": "", "sv_change_percentage": "" -} \ No newline at end of file +} diff --git a/locales/nl/translation.json b/locales/nl/translation.json index b4c95c2450d96..e3115ed2130e5 100644 --- a/locales/nl/translation.json +++ b/locales/nl/translation.json @@ -178,4 +178,4 @@ "sv_previous": "", "sv_change": "", "sv_change_percentage": "" -} \ No newline at end of file +} diff --git a/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts b/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts index a974d554315c0..7af6a7d0debe4 100644 --- a/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts +++ b/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts @@ -67,7 +67,7 @@ function t(input: string, ...args: unknown[]) { try { return getInstance().translate(input, ...args); } catch (e) { - return `${input}` + return `${input}`; } } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts index 3c774f582f2a3..e9390f34f8126 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts @@ -581,9 +581,7 @@ export default function transformProps( show: !inContextMenu, trigger: richTooltip ? 'axis' : 'item', formatter: (params: any) => { - let xValue: number = richTooltip - ? params[0].value[0] - : params.value[0]; + let xValue: number = richTooltip ? params[0].value[0] : params.value[0]; const forecastValue: any[] = richTooltip ? params : [params]; const sortedKeys = extractTooltipKeys( @@ -640,13 +638,16 @@ export default function transformProps( focusedRow = rows.length - 1; } }); - const { seriesName } = params + const { seriesName } = params; if (seriesName) { - const regex = new RegExp(".*(\\d+) (\\w+) ago") - const result = seriesName.match(regex) + const regex = new RegExp('.*(\\d+) (\\w+) ago'); + const result = seriesName.match(regex); if (result && result.length == 3) { - const [_, diff, diffType] = result - xValue = moment.utc(xValue).subtract(Number(diff), diffType).valueOf() + const [_, diff, diffType] = result; + xValue = moment + .utc(xValue) + .subtract(Number(diff), diffType) + .valueOf(); } } return tooltipHtml(rows, tooltipFormatter(xValue), focusedRow); diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index 67cd63fb65d2d..c8610befad662 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -271,7 +271,7 @@ export default function TableChart( const comparisonColumns = [ { key: 'all', label: t('Display all') }, { key: t('sv_previous'), label: t('sv_previous') }, - { key: t('sv_change') , label: t('sv_change') }, + { key: t('sv_change'), label: t('sv_change') }, { key: t('sv_change_percentage'), label: t('sv_change_percentage') }, ]; const timestampFormatter = useCallback( @@ -407,7 +407,12 @@ export default function TableChart( }; }; - const comparisonLabels = [t('sv_current'), t('sv_previous'), t('sv_change'), t('sv_change_percentage')]; + const comparisonLabels = [ + t('sv_current'), + t('sv_previous'), + t('sv_change'), + t('sv_change_percentage'), + ]; const filteredColumnsMeta = useMemo(() => { if (!isUsingTimeComparison) { return columnsMeta; diff --git a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts index c8ba4e690cf1f..476690a4a8969 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts @@ -119,10 +119,15 @@ const processComparisonTotals = ( Object.keys(totalRecord).forEach(key => { if (totalRecord[key] !== undefined && !key.includes(comparisonSuffix)) { transformedTotals[`${t('sv_current')} ${key}`] = - parseInt(transformedTotals[`${t('sv_current')} ${key}`]?.toString() || '0', 10) + - parseInt(totalRecord[key]?.toString() || '0', 10); + parseInt( + transformedTotals[`${t('sv_current')} ${key}`]?.toString() || '0', + 10, + ) + parseInt(totalRecord[key]?.toString() || '0', 10); transformedTotals[`${t('sv_previous')} ${key}`] = - parseInt(transformedTotals[`${t('sv_previous')} ${key}`]?.toString() || '0', 10) + + parseInt( + transformedTotals[`${t('sv_previous')} ${key}`]?.toString() || '0', + 10, + ) + parseInt( totalRecord[`${key}__${comparisonSuffix}`]?.toString() || '0', 10, @@ -132,7 +137,8 @@ const processComparisonTotals = ( transformedTotals[`${t('sv_previous')} ${key}`] as number, ); transformedTotals[`${t('sv_change')} ${key}`] = valueDifference; - transformedTotals[`${t('sv_change_percentage')} ${key}`] = percentDifferenceNum; + transformedTotals[`${t('sv_change_percentage')} ${key}`] = + percentDifferenceNum; } }), ); @@ -167,9 +173,11 @@ const processComparisonDataRecords = memoizeOne( ); transformedItem[`${t('sv_current')} ${origCol.key}`] = originalValue; - transformedItem[`${t('sv_previous')} ${origCol.key}`] = comparisonValue; + transformedItem[`${t('sv_previous')} ${origCol.key}`] = + comparisonValue; transformedItem[`${t('sv_change')} ${origCol.key}`] = valueDifference; - transformedItem[`${t('sv_change_percentage')} ${origCol.key}`] = percentDifferenceNum; + transformedItem[`${t('sv_change_percentage')} ${origCol.key}`] = + percentDifferenceNum; } }); @@ -357,7 +365,11 @@ const processComparisonColumns = ( ...col, label: t('sv_current'), key: `${t('sv_current')} ${col.key}`, - config: getComparisonColConfig(t('sv_current'), col.key, columnConfig), + config: getComparisonColConfig( + t('sv_current'), + col.key, + columnConfig, + ), formatter: getComparisonColFormatter( t('sv_current'), col, @@ -370,7 +382,11 @@ const processComparisonColumns = ( ...col, label: t('sv_previous'), key: `${t('sv_previous')} ${col.key}`, - config: getComparisonColConfig(t('sv_previous'), col.key, columnConfig), + config: getComparisonColConfig( + t('sv_previous'), + col.key, + columnConfig, + ), formatter: getComparisonColFormatter( t('sv_previous'), col, @@ -383,7 +399,11 @@ const processComparisonColumns = ( ...col, label: t('sv_change'), key: `${t('sv_change')} ${col.key}`, - config: getComparisonColConfig(t('sv_change'), col.key, columnConfig), + config: getComparisonColConfig( + t('sv_change'), + col.key, + columnConfig, + ), formatter: getComparisonColFormatter( t('sv_change'), col, @@ -396,7 +416,11 @@ const processComparisonColumns = ( ...col, label: t('sv_change_percentage'), key: `${t('sv_change_percentage')} ${col.key}`, - config: getComparisonColConfig(t('sv_change_percentage'), col.key, columnConfig), + config: getComparisonColConfig( + t('sv_change_percentage'), + col.key, + columnConfig, + ), formatter: getComparisonColFormatter( t('sv_change_percentage'), col, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx index a34637bc4bfd8..df6b13408e36f 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx @@ -252,7 +252,10 @@ const FilterControl = ({ const label = useMemo( () => ( - + {t(name)} {isRequired && } diff --git a/superset/common/query_actions.py b/superset/common/query_actions.py index 72066b8cc5bf5..04423fbc4cf73 100644 --- a/superset/common/query_actions.py +++ b/superset/common/query_actions.py @@ -87,10 +87,10 @@ def _get_query( datasource = _get_datasource(query_context, query_obj) result = {"language": datasource.query_language} try: - if security_manager.can_access('can_view_query', 'Dashboard'): + if security_manager.can_access("can_view_query", "Dashboard"): result["query"] = datasource.get_query_str(query_obj.to_dict()) else: - result["query"] = 'Forbidden' + result["query"] = "Forbidden" except QueryObjectValidationError as err: result["error"] = err.message return result diff --git a/superset/models/helpers.py b/superset/models/helpers.py index e031e8c6c8fbc..690d92cfe1a1d 100644 --- a/superset/models/helpers.py +++ b/superset/models/helpers.py @@ -579,7 +579,9 @@ def __init__( # pylint: disable=too-many-arguments to_dttm: Optional[datetime] = None, ) -> None: self.df = df - self.query = query if security_manager.can_access('can_view_query', 'Dashboard') else '' + self.query = ( + query if security_manager.can_access("can_view_query", "Dashboard") else "" + ) self.duration = duration self.applied_template_filters = applied_template_filters or [] self.applied_filter_columns = applied_filter_columns or [] diff --git a/superset/translations/utils.py b/superset/translations/utils.py index e4f8ae80ffd10..d6e4f86411b2e 100644 --- a/superset/translations/utils.py +++ b/superset/translations/utils.py @@ -50,5 +50,5 @@ def get_language_pack(locale: str) -> Optional[dict[str, Any]]: logger.error( "Error loading language pack for, falling back on en %s", locale ) - pack = get_language_pack('') + pack = get_language_pack("") return pack From 8aa2bc29e323bc21afba490963d1667ef0aa03e7 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 6 Jan 2025 14:52:05 +0000 Subject: [PATCH 60/79] SRV-948 chore - disabling integration tests --- .../workflows/superset-python-integrationtest.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/superset-python-integrationtest.yml b/.github/workflows/superset-python-integrationtest.yml index a511882e6563d..c6e2147de6590 100644 --- a/.github/workflows/superset-python-integrationtest.yml +++ b/.github/workflows/superset-python-integrationtest.yml @@ -2,12 +2,12 @@ name: Python-Integration on: - push: - branches: - - "master" - - "[0-9].[0-9]*" - pull_request: - types: [synchronize, opened, reopened, ready_for_review] + # push: + # branches: + # - "master" + # - "[0-9].[0-9]*" + # pull_request: + # types: [synchronize, opened, reopened, ready_for_review] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} From 9981f8cd6b77212f7779394613944c72860cead8 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 6 Jan 2025 14:59:44 +0000 Subject: [PATCH 61/79] SRV-948 chore - disabling integration tests --- .github/workflows/superset-python-presto-hive.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/superset-python-presto-hive.yml b/.github/workflows/superset-python-presto-hive.yml index ba17dd41d1c2d..1cade24f27f9d 100644 --- a/.github/workflows/superset-python-presto-hive.yml +++ b/.github/workflows/superset-python-presto-hive.yml @@ -2,12 +2,12 @@ name: Python Presto/Hive on: - push: - branches: - - "master" - - "[0-9].[0-9]*" - pull_request: - types: [synchronize, opened, reopened, ready_for_review] + # push: + # branches: + # - "master" + # - "[0-9].[0-9]*" + # pull_request: + # types: [synchronize, opened, reopened, ready_for_review] # cancel previous workflow jobs for PRs concurrency: From a5090654a761c6118441916e447dd3ae2863029b Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 6 Jan 2025 15:01:20 +0000 Subject: [PATCH 62/79] SRV-948 chore - disable validation checks - they check disabled flows --- .github/workflows/github-action-validator.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github-action-validator.yml b/.github/workflows/github-action-validator.yml index 3bdefddc00806..3d184131a3f8c 100644 --- a/.github/workflows/github-action-validator.yml +++ b/.github/workflows/github-action-validator.yml @@ -1,12 +1,12 @@ name: Validate All GitHub Actions on: - push: - branches: - - "master" - - "[0-9].[0-9]*" - pull_request: - types: [synchronize, opened, reopened, ready_for_review] + # push: + # branches: + # - "master" + # - "[0-9].[0-9]*" + # pull_request: + # types: [synchronize, opened, reopened, ready_for_review] jobs: From a3cd0629014df7d68f712ccd6cc67969eb0057cb Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 6 Jan 2025 15:10:49 +0000 Subject: [PATCH 63/79] SRV-948 chore - dummy checks run --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 6fbb7f358d915..692e287120b81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ ###################################################################### # Node stage to deal with static asset construction ###################################################################### +#test ARG PY_VER=3.10-slim-bookworm # If BUILDPLATFORM is null, set it to 'amd64' (or leave as is otherwise). From f5475afd047958f5c4b39e5973d137648bcc8621 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 6 Jan 2025 15:20:47 +0000 Subject: [PATCH 64/79] SRV-948 chore - removing dummy comment --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 692e287120b81..6fbb7f358d915 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,6 @@ ###################################################################### # Node stage to deal with static asset construction ###################################################################### -#test ARG PY_VER=3.10-slim-bookworm # If BUILDPLATFORM is null, set it to 'amd64' (or leave as is otherwise). From 4467aca8d2e40b441e6dd10a6c1bb9de023364cd Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Wed, 18 Dec 2024 12:54:02 +0000 Subject: [PATCH 65/79] WI-5739 - Updated build badge to point at Webgains repo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7928904a2f3b0..b8d4155412ab9 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ under the License. [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/license/apache-2-0) [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/apache/superset?sort=semver)](https://github.com/apache/superset/tree/latest) -[![Build Status](https://github.com/apache/superset/workflows/Python/badge.svg)](https://github.com/apache/superset/actions) +[![Build Status](https://github.com/Webgains/superset/workflows/Python/badge.svg)](https://github.com/Webgains/superset/actions) [![PyPI version](https://badge.fury.io/py/apache-superset.svg)](https://badge.fury.io/py/apache-superset) [![Coverage Status](https://codecov.io/github/apache/superset/coverage.svg?branch=master)](https://codecov.io/github/apache/superset) [![PyPI](https://img.shields.io/pypi/pyversions/apache-superset.svg?maxAge=2592000)](https://pypi.python.org/pypi/apache-superset) From 62a30376cb92f9d0c17451d45a48b1531e3f0fa9 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Wed, 18 Dec 2024 13:26:33 +0000 Subject: [PATCH 66/79] WI-5739 - Updated to use local deployment workflow We can not use workflows in private repos from a public repo :( --- .../deploy-service-to-environment.yml | 146 ++++++++++++++++++ .github/workflows/pr-deployment.yml | 2 +- 2 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy-service-to-environment.yml diff --git a/.github/workflows/deploy-service-to-environment.yml b/.github/workflows/deploy-service-to-environment.yml new file mode 100644 index 0000000000000..ea33d5a611e1c --- /dev/null +++ b/.github/workflows/deploy-service-to-environment.yml @@ -0,0 +1,146 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +name: Deploy CDK Application to Environment + +# Need different workflows for service deployments and UI deployments +# Possibly need different workflows for the destruction of the stacks as well +# UI deployments require the build artifact to be built before triggering the deployment +# static-site-deploy repository includes shell scripts to replace variables at deploy-time +# Service deployments will need environment variables replaced at deploy-time too, not sure how we'll do that yet + + +on: + workflow_call: + inputs: + name: + description: The subdomain name to deploy to + required: false + default: helloworld + type: string + ref: + description: The git tag/branch/hash to deploy, defaults to `github.ref` + required: false + type: string + default: ${{ github.ref }} + stack: + description: The CloudFormation stack name + required: false + default: '' + type: string + environment: + description: The environment to deploy to + required: true + default: dev + type: string + repository: + description: The repository to deploy + required: false + type: string + default: ${{ github.repository }} + cdk_working_directory: + description: The directory the CDK application is in, can be omitted if it is the root directory + required: false + type: string + default: . + service: + description: The service this deployment relates to, the CDK application will be tagged with this value + required: true + type: string + component: + description: The service component this deployment relates to, the CDK application will be tagged with this value + required: true + type: string + override: + description: JSON object of vars to override in the .env file + required: false + type: string + default: '' + outputs: + endpoint: + description: The endpoint of the deployed service + value: ${{ jobs.deploy.outputs.endpoint }} + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + env: + AWS_ACCOUNT_ID: ${{ vars.AWS_ACCOUNT_ID }} + AWS_REGION: ${{ vars.AWS_REGION }} + DEPLOY_ROLE_ARN: ${{ vars.DEPLOY_ROLE_ARN }} + DOMAIN_NAME: ${{ vars.DOMAIN_NAME }} + STACK_CONFIG: ${{ vars.STACK_CONFIG }} + environment: + name: ${{ inputs.environment }} + url: ${{ steps.set_endpoint.outputs.endpoint }} + concurrency: + group: ${{ inputs.environment }}-${{ inputs.name }} + permissions: + contents: read + id-token: write + deployments: write + + steps: + - name: Bootstrap Environment Variables + run: | + INPUT_STACK=${{ inputs.stack }} + echo "STACK_NAME=$(tr '[:upper:]' '[:lower:]' <<< "${INPUT_STACK:-${{ inputs.name }}-${{ inputs.environment }}}")" >> $GITHUB_ENV + echo "HAS_STACK_SECRETS=$([ -n "${{ (secrets.STACK_SECRETS != '') || '' }}" ] && echo 1 || echo 0)" >> "$GITHUB_ENV" + + - name: Checkout code + uses: actions/checkout@v4 + with: + repository: ${{ inputs.repository || github.repository }} + ref: ${{ inputs.ref || github.ref }} + + - name: Assume AWS role + id: assume_role + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ env.AWS_REGION }} + role-to-assume: ${{ env.DEPLOY_ROLE_ARN }} + role-session-name: deploy-${{ github.run_id }} + + - name: Create Environment File + uses: webgains/action-generate-dotenv@main + with: + file: .env + template: .env.dist + name: ${{ inputs.name }} + environment: ${{ inputs.environment }} + stack_name: ${{ env.STACK_NAME }} + aws_account_id: ${{ env.AWS_ACCOUNT_ID }} + aws_region: ${{ env.AWS_REGION }} + domain_name: ${{ env.DOMAIN_NAME }} + stack_config: ${{ env.STACK_CONFIG }} + stack_secrets: ${{ secrets.STACK_SECRETS }} + cdk_working_directory: ${{ inputs.cdk_working_directory }} + override: ${{ inputs.override }} + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + working-directory: ${{ inputs.cdk_working_directory }} + run: npm install + + - name: CDK Deploy + working-directory: ${{ inputs.cdk_working_directory }} + run: | + cat .env + npm run cdk deploy -- \ + --ci \ + --require-approval never \ + --tags Name=${{ inputs.name }}-${{ inputs.environment }}-${{ inputs.service }} \ + --tags Service=${{ inputs.service }} --tags Component=${{ inputs.component }} \ + --tags Environment=${{ inputs.environment }} --tags AutomatedBy=cdk/github \ + --tags Version=${{ github.ref_name }} --tags GitHash=${{ github.sha }} + + # TODO get from stack outputs + - name: Set the endpoint + id: set_endpoint + run: echo "endpoint=https://${{ inputs.name }}.${{ env.DOMAIN_NAME }}" >> $GITHUB_OUTPUT + + outputs: + endpoint: ${{ steps.set_endpoint.outputs.endpoint }} diff --git a/.github/workflows/pr-deployment.yml b/.github/workflows/pr-deployment.yml index 16d98955bdc5b..c2355367b1fe3 100644 --- a/.github/workflows/pr-deployment.yml +++ b/.github/workflows/pr-deployment.yml @@ -31,7 +31,7 @@ jobs: deploy: name: Deploy to Feature Environment needs: [labels, build] - uses: webgains/github-workflows/.github/workflows/deploy-service-to-environment.yml@WI-5868-allow-service-deploy-workflow-to-use-any-repositor + uses: ./.github/workflows/deploy-service-to-environment.yml secrets: inherit with: environment: feature From 4a784610ad0e183ece5de008fd36482612d8d8f7 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Wed, 18 Dec 2024 17:25:55 +0000 Subject: [PATCH 67/79] WI-5739 - Access AWS resources via a role (OIDC) rather than long lived credentials --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70e46f1dc2768..cd0ce598aa2ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,7 @@ jobs: runs-on: ubuntu-latest env: SUPERSET_REPOSITORY_URI: "289222877357.dkr.ecr.eu-west-1.amazonaws.com/webgains/superset" + BUILD_ROLE_ARN: arn:aws:iam::289222877357:role/github-superset-access steps: - name: Checkout code @@ -40,9 +41,9 @@ jobs: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4.0.2 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ env.AWS_REGION }} + role-to-assume: ${{ env.DEPLOY_ROLE_ARN }} + role-session-name: build-${{ github.run_id }} - name: Login to Amazon ECR id: login-ecr From 5110d02fe21b914894d2bab8ef730ae6e777ace9 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Thu, 19 Dec 2024 10:58:37 +0000 Subject: [PATCH 68/79] WI-5739 - Corrected cut and paste error --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd0ce598aa2ac..05150470ff95a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,7 +42,7 @@ jobs: uses: aws-actions/configure-aws-credentials@v4.0.2 with: aws-region: ${{ env.AWS_REGION }} - role-to-assume: ${{ env.DEPLOY_ROLE_ARN }} + role-to-assume: ${{ env.BUILD_ROLE_ARN }} role-session-name: build-${{ github.run_id }} - name: Login to Amazon ECR From eab737f4afd0ab4047c2ff7031df29914a0b820c Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Fri, 20 Dec 2024 12:22:06 +0000 Subject: [PATCH 69/79] WI-5739 - Changed to not need the shared workflow --- .github/workflows/pr-closed.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-closed.yml b/.github/workflows/pr-closed.yml index 84105fc6a5a08..00de94787c272 100644 --- a/.github/workflows/pr-closed.yml +++ b/.github/workflows/pr-closed.yml @@ -7,12 +7,23 @@ on: jobs: destroy: name: Destroy Stack - uses: webgains/github-workflows/.github/workflows/destroy-stack.yml@main - secrets: inherit - with: - environment: feature - stack: superset-pr-${{ github.event.pull_request.number }}SupersetService + runs-on: ubuntu-latest + environment: feature + concurrency: + group: superset-pr-${{ github.event.pull_request.number }}SupersetService-feature permissions: contents: read deployments: write id-token: write + + steps: + - name: Assume AWS role + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ vars.AWS_REGION }} + role-to-assume: ${{ vars.DEPLOY_ROLE_ARN }} + role-session-name: deploy-${{ github.run_id }} + + - name: Delete Stack + run: aws cloudformation delete-stack --stack-name superset-pr-${{ github.event.pull_request.number }}SupersetService + From 75483e03af6ecd68fda48f632e632f37bf28f571 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Fri, 20 Dec 2024 12:22:19 +0000 Subject: [PATCH 70/79] WI-5739 - Adding missing token permission --- .github/workflows/pr-deployment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-deployment.yml b/.github/workflows/pr-deployment.yml index c2355367b1fe3..df8b3c1b609b5 100644 --- a/.github/workflows/pr-deployment.yml +++ b/.github/workflows/pr-deployment.yml @@ -16,6 +16,7 @@ jobs: packages: read issues: read pull-requests: write + id-token: write labels: runs-on: ubuntu-latest From d153837c35c4045d09a53f005f526efc98d69bd0 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Fri, 20 Dec 2024 13:32:49 +0000 Subject: [PATCH 71/79] WI-5739 - We need the superset-service repo to deploy --- .github/workflows/pr-deployment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-deployment.yml b/.github/workflows/pr-deployment.yml index df8b3c1b609b5..8125ba991aab8 100644 --- a/.github/workflows/pr-deployment.yml +++ b/.github/workflows/pr-deployment.yml @@ -40,6 +40,7 @@ jobs: stack: ${{ needs.labels.outputs.feature_name }} service: superset component: service + repository: Webgbains/superset-service override: | { "namespace": "${{ needs.labels.outputs.feature_name }}", From 0e286aab5f75311a2f0091708844aad5adf07b7d Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Fri, 20 Dec 2024 13:56:22 +0000 Subject: [PATCH 72/79] WI-5739 - Typo fix --- .github/workflows/pr-deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-deployment.yml b/.github/workflows/pr-deployment.yml index 8125ba991aab8..f8681173b7699 100644 --- a/.github/workflows/pr-deployment.yml +++ b/.github/workflows/pr-deployment.yml @@ -40,7 +40,7 @@ jobs: stack: ${{ needs.labels.outputs.feature_name }} service: superset component: service - repository: Webgbains/superset-service + repository: Webgains/superset-service override: | { "namespace": "${{ needs.labels.outputs.feature_name }}", From 3df5594945689892ab7a9e0e19ad1de4e301610b Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Fri, 20 Dec 2024 15:07:50 +0000 Subject: [PATCH 73/79] WI-5739 - Fixes to fetch superset-service --- .github/workflows/deploy-service-to-environment.yml | 3 ++- .github/workflows/pr-deployment.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-service-to-environment.yml b/.github/workflows/deploy-service-to-environment.yml index ea33d5a611e1c..d8a40ab5e9c11 100644 --- a/.github/workflows/deploy-service-to-environment.yml +++ b/.github/workflows/deploy-service-to-environment.yml @@ -89,8 +89,9 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - repository: ${{ inputs.repository || github.repository }} + repository: Webgains/superset-service ref: ${{ inputs.ref || github.ref }} + ssh-key: ${{ secrets.SSH_KEY }} - name: Assume AWS role id: assume_role diff --git a/.github/workflows/pr-deployment.yml b/.github/workflows/pr-deployment.yml index f8681173b7699..68a09ee1b761d 100644 --- a/.github/workflows/pr-deployment.yml +++ b/.github/workflows/pr-deployment.yml @@ -40,12 +40,12 @@ jobs: stack: ${{ needs.labels.outputs.feature_name }} service: superset component: service - repository: Webgains/superset-service override: | { "namespace": "${{ needs.labels.outputs.feature_name }}", "supersetImageTag": "${{ needs.build.outputs.tag_hash }}" } + permissions: contents: read deployments: write From b87410c5a88c5ee101d92ca7c4004bb3f2c2e723 Mon Sep 17 00:00:00 2001 From: Jeremy Poulter Date: Fri, 20 Dec 2024 15:55:12 +0000 Subject: [PATCH 74/79] WI-5739 - We need the `main` branch of the superset-service, not the current one --- .github/workflows/deploy-service-to-environment.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/deploy-service-to-environment.yml b/.github/workflows/deploy-service-to-environment.yml index d8a40ab5e9c11..c5c8b2063d63c 100644 --- a/.github/workflows/deploy-service-to-environment.yml +++ b/.github/workflows/deploy-service-to-environment.yml @@ -16,11 +16,6 @@ on: required: false default: helloworld type: string - ref: - description: The git tag/branch/hash to deploy, defaults to `github.ref` - required: false - type: string - default: ${{ github.ref }} stack: description: The CloudFormation stack name required: false @@ -31,11 +26,6 @@ on: required: true default: dev type: string - repository: - description: The repository to deploy - required: false - type: string - default: ${{ github.repository }} cdk_working_directory: description: The directory the CDK application is in, can be omitted if it is the root directory required: false @@ -90,7 +80,7 @@ jobs: uses: actions/checkout@v4 with: repository: Webgains/superset-service - ref: ${{ inputs.ref || github.ref }} + ref: main ssh-key: ${{ secrets.SSH_KEY }} - name: Assume AWS role From d353d8ba60bae8f3e3844098d5a3a6b6ee49608a Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Mon, 6 Jan 2025 15:45:42 +0000 Subject: [PATCH 75/79] SRV-948 fix - pre-commit fixes --- .github/workflows/pr-closed.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-closed.yml b/.github/workflows/pr-closed.yml index 00de94787c272..57c0a797096dd 100644 --- a/.github/workflows/pr-closed.yml +++ b/.github/workflows/pr-closed.yml @@ -26,4 +26,3 @@ jobs: - name: Delete Stack run: aws cloudformation delete-stack --stack-name superset-pr-${{ github.event.pull_request.number }}SupersetService - From af949e6e34eedc022fb88575db64670dce760eda Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Tue, 7 Jan 2025 10:18:57 +0000 Subject: [PATCH 76/79] SRV-948 fix - adding uv python dependencies to build --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Dockerfile b/Dockerfile index 6fbb7f358d915..33e73eae42d50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -243,3 +243,14 @@ USER superset FROM lean AS ci CMD ["/app/docker/entrypoints/docker-ci.sh"] + +###################################################################### +# Webgains image... +###################################################################### +FROM lean AS webgains + +RUN --mount=type=cache,target=/root/.cache/uv \ + uv pip install \ + psycopg2-binary==2.9.6 \ + flask-cors==4.0.0 \ + mysqlclient==2.2.4 \ No newline at end of file From cad0e2feb858289499e0d840d12e0a2ea6c80624 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Tue, 7 Jan 2025 10:41:10 +0000 Subject: [PATCH 77/79] SRV-948 fix - assigning root user to allow package installations --- .github/workflows/build.yml | 1 + Dockerfile | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 05150470ff95a..a6964e803dbf8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,5 +63,6 @@ jobs: ${{ env.SUPERSET_REPOSITORY_URI }}:${{ env.TAG_HASH }} ${{ env.SUPERSET_REPOSITORY_URI }}:${{ env.TAG_NAME }} ${{ env.LATEST_TAG }} + target: webgains outputs: tag_hash: ${{ steps.compute_labels.outputs.tag_hash }} diff --git a/Dockerfile b/Dockerfile index 33e73eae42d50..d9bd966659e17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -249,8 +249,16 @@ CMD ["/app/docker/entrypoints/docker-ci.sh"] ###################################################################### FROM lean AS webgains +USER root + +RUN /app/docker/apt-install.sh \ + pkg-config \ + default-libmysqlclient-dev + RUN --mount=type=cache,target=/root/.cache/uv \ uv pip install \ psycopg2-binary==2.9.6 \ flask-cors==4.0.0 \ - mysqlclient==2.2.4 \ No newline at end of file + mysqlclient==2.2.4 + +USER superset \ No newline at end of file From b892061278c128833e9d51c3f67bc59fdbe24bd9 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Tue, 7 Jan 2025 10:57:06 +0000 Subject: [PATCH 78/79] SRV-948 fix - requiring essentials before pip packages installation --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d9bd966659e17..2bd6ed69f0a9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -256,7 +256,7 @@ RUN /app/docker/apt-install.sh \ default-libmysqlclient-dev RUN --mount=type=cache,target=/root/.cache/uv \ - uv pip install \ + /app/docker/pip-install.sh --requires-build-essential \ psycopg2-binary==2.9.6 \ flask-cors==4.0.0 \ mysqlclient==2.2.4 From bd9759f1817cadf46644d6a54112d79f897ccd51 Mon Sep 17 00:00:00 2001 From: Ricardo Caceres Date: Tue, 7 Jan 2025 12:06:24 +0000 Subject: [PATCH 79/79] SRV-948 fix - linter fixes --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2bd6ed69f0a9b..2901bd55803be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -261,4 +261,4 @@ RUN --mount=type=cache,target=/root/.cache/uv \ flask-cors==4.0.0 \ mysqlclient==2.2.4 -USER superset \ No newline at end of file +USER superset