You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/11/29 09:20:34 UTC
[GitHub] [superset] geido opened a new pull request #17570: fix: Save properties after applying changes in Dashboard
geido opened a new pull request #17570:
URL: https://github.com/apache/superset/pull/17570
### SUMMARY
This PR fixes a severe issue for which changes in the properties modal of a Dashboard won't be fully saved when the `onlyApply` prop was used. This PR https://github.com/apache/superset/pull/17392 enabled the `onlyApply` tag. Later, manual tests have shown that the tag wasn't ready to be used as both the frontend and the backend were not fully implemented for that to work properly. In addition to that, this PR does the following:
- Refactors the `PropertiesModal` to use typescript
- Fixes an issue in the Dashboard detail page for which when applying changes and re-opening the properties modal it would not show the latest changes
- Fixes an issue for which changes in the json_metadata for namespace, expanded_slices, timed_refresh_immune_slices were not saved
### TESTING INSTRUCTIONS
1. Open a Dashboard
2. Edit the properties, including the json metadata
3. Apply the changes
4. Reopen the modal and make sure the latest changes are there
4. Finally, save the changes
5. Reload the Dashboard and make sure the properties were fully saved
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] rusackas commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r765440743
##########
File path: superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
##########
@@ -0,0 +1,603 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { useCallback, useEffect, useState } from 'react';
+import { Form, Row, Col, Input } from 'src/common/components';
+import { FormItem } from 'src/components/Form';
+import jsonStringify from 'json-stringify-pretty-compact';
+import Button from 'src/components/Button';
+import { Select } from 'src/components';
+import rison from 'rison';
+import {
+ styled,
+ t,
+ SupersetClient,
+ getCategoricalSchemeRegistry,
+ ensureIsArray,
+} from '@superset-ui/core';
+
+import Modal from 'src/components/Modal';
+import { JsonEditor } from 'src/components/AsyncAceEditor';
+
+import ColorSchemeControlWrapper from 'src/dashboard/components/ColorSchemeControlWrapper';
+import { getClientErrorObject } from 'src/utils/getClientErrorObject';
+import withToasts from 'src/components/MessageToasts/withToasts';
+import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
+
+const StyledFormItem = styled(FormItem)`
+ margin-bottom: 0;
+`;
+
+const StyledJsonEditor = styled(JsonEditor)`
+ border-radius: ${({ theme }) => theme.borderRadius}px;
+ border: 1px solid ${({ theme }) => theme.colors.secondary.light2};
+`;
+
+type PropertiesModalProps = {
+ dashboardId: number;
+ dashboardTitle?: string;
+ dashboardInfo?: Record<string, any>;
+ show?: boolean;
+ onHide?: () => void;
+ colorScheme?: string;
+ setColorSchemeAndUnsavedChanges?: () => void;
+ onSubmit?: (params: Record<string, any>) => void;
+ addSuccessToast: (message: string) => void;
+ onlyApply?: boolean;
+};
+
+type Roles = { id: number; name: string }[];
+type Owners = {
+ id: number;
+ full_name?: string;
+ first_name?: string;
+ last_name?: string;
+}[];
+type DashboardInfo = {
+ id: number;
+ title: string;
+ slug: string;
+ certifiedBy: string;
+ certificationDetails: string;
+};
+
+const PropertiesModal = ({
+ addSuccessToast,
+ colorScheme: currentColorScheme,
+ dashboardId,
+ dashboardInfo: currentDashboardInfo,
+ dashboardTitle,
+ onHide = () => {},
+ onlyApply = false,
+ onSubmit = () => {},
+ show = false,
+}: PropertiesModalProps) => {
+ const [form] = Form.useForm();
+ const [isLoading, setIsLoading] = useState(false);
+ const [isAdvancedOpen, setIsAdvancedOpen] = useState(false);
+ const [colorScheme, setColorScheme] = useState(currentColorScheme);
+ const [jsonMetadata, setJsonMetadata] = useState('');
+ const [dashboardInfo, setDashboardInfo] = useState<DashboardInfo>();
+ const [owners, setOwners] = useState<Owners>([]);
+ const [roles, setRoles] = useState<Roles>([]);
+ const saveLabel = onlyApply ? t('Apply') : t('Save');
+
+ const handleErrorResponse = async (response: Response) => {
+ const { error, statusText, message } = await getClientErrorObject(response);
+ let errorText = error || statusText || t('An error has occurred');
+ if (typeof message === 'object' && 'json_metadata' in message) {
+ errorText = (message as { json_metadata: string }).json_metadata;
+ } else if (typeof message === 'string') {
+ errorText = message;
+
+ if (message === 'Forbidden') {
+ errorText = t('You do not have permission to edit this dashboard');
+ }
+ }
+
+ Modal.error({
+ title: 'Error',
Review comment:
Maybe a `t()` here - not worth holding up the PR over this though. Looks like there are a few more of these floating around in the codebase to sweep up anyway
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] geido commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
geido commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r761315664
##########
File path: superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx
##########
@@ -59,7 +59,8 @@ fetchMock.get('glob:*/api/v1/dashboard/*', {
},
});
-describe('PropertiesModal', () => {
+// all these tests need to be moved to dashboard/components/PropertiesModal/PropertiesModal.test.tsx
+describe.skip('PropertiesModal', () => {
Review comment:
All these tests need to be refactored since this PR changes the component to be functional. I'll work on these in a separate PR to avoid holding this PR too long
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] geido commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
geido commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r761315044
##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts
##########
@@ -97,10 +97,6 @@ describe('Dashboard edit action', () => {
.get('[data-test="dashboard-title-input"]')
.type(`{selectall}{backspace}${dashboardTitle}`);
- cy.wait('@dashboardGet').then(() => {
- selectColorScheme('d3Category20b');
- });
-
Review comment:
This was here because the color scheme was considered to e mandatory. This is not the case any longer
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] geido commented on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
geido commented on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-985772338
/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_DASHBOARD_NATIVE_FILTERS_SET=true FEATURE_DASHBOARD_FILTERS_EXPERIMENTAL=true
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e87ea22) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **increase** coverage by `0.25%`.
> The diff coverage is `72.69%`.
> :exclamation: Current head e87ea22 differs from pull request most recent head 37cde71. Consider uploading reports for the commit 37cde71 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
+ Coverage 68.55% 68.80% +0.25%
==========================================
Files 1601 1597 -4
Lines 65271 65264 -7
Branches 6966 6950 -16
==========================================
+ Hits 44745 44906 +161
+ Misses 18636 18473 -163
+ Partials 1890 1885 -5
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `82.11% <96.77%> (+0.31%)` | :arrow_up: |
| postgres | `82.12% <96.77%> (+0.31%)` | :arrow_up: |
| presto | `81.99% <96.77%> (+0.31%)` | :arrow_up: |
| python | `82.35% <96.77%> (+0.05%)` | :arrow_up: |
| sqlite | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...es/superset-ui-core/src/query/buildQueryContext.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvYnVpbGRRdWVyeUNvbnRleHQudHM=) | `100.00% <ø> (ø)` | |
| [...packages/superset-ui-core/src/query/types/Query.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvdHlwZXMvUXVlcnkudHM=) | `100.00% <ø> (ø)` | |
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...end/src/visualizations/TimeTable/SparklineCell.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9TcGFya2xpbmVDZWxsLnRzeA==) | `0.00% <ø> (ø)` | |
| [...c/visualizations/TimeTable/TimeTableChartPlugin.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9UaW1lVGFibGVDaGFydFBsdWdpbi50cw==) | `71.42% <ø> (ø)` | |
| ... and [71 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...37cde71](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c79aa5f) into [master](https://codecov.io/gh/apache/superset/commit/8c25f2f356e488120d7ce3ff852a4b6b9a049b3b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8c25f2f) will **decrease** coverage by `0.03%`.
> The diff coverage is `63.63%`.
> :exclamation: Current head c79aa5f differs from pull request most recent head 9bb937e. Consider uploading reports for the commit 9bb937e to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.86% 68.82% -0.04%
==========================================
Files 1598 1598
Lines 65297 65370 +73
Branches 6952 6961 +9
==========================================
+ Hits 44966 44993 +27
- Misses 18446 18486 +40
- Partials 1885 1891 +6
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `57.42% <57.84%> (-0.05%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `51.16% <0.00%> (+1.16%)` | :arrow_up: |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `35.79% <36.84%> (+0.45%)` | :arrow_up: |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `61.11% <37.50%> (+2.08%)` | :arrow_up: |
| [superset/dashboards/api.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9hcGkucHk=) | `91.86% <57.14%> (ø)` | |
| [superset/dashboards/commands/update.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy91cGRhdGUucHk=) | `83.07% <66.66%> (ø)` | |
| [...src/dashboard/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1Byb3BlcnRpZXNNb2RhbC9pbmRleC50c3g=) | `66.87% <66.87%> (ø)` | |
| [superset/dashboards/dao.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9kYW8ucHk=) | `96.09% <97.36%> (ø)` | |
| [superset/dashboards/schemas.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9zY2hlbWFzLnB5) | `99.40% <100.00%> (ø)` | |
| ... and [3 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8c25f2f...9bb937e](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (183cce7) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **increase** coverage by `0.02%`.
> The diff coverage is `60.00%`.
> :exclamation: Current head 183cce7 differs from pull request most recent head bc9b461. Consider uploading reports for the commit bc9b461 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
+ Coverage 68.55% 68.57% +0.02%
==========================================
Files 1601 1602 +1
Lines 65271 65362 +91
Branches 6966 6992 +26
==========================================
+ Hits 44745 44824 +79
- Misses 18636 18652 +16
+ Partials 1890 1886 -4
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `81.39% <97.77%> (+<0.01%)` | :arrow_up: |
| mysql | `81.81% <97.77%> (+<0.01%)` | :arrow_up: |
| postgres | `81.81% <97.77%> (-0.01%)` | :arrow_down: |
| presto | `81.68% <97.77%> (+<0.01%)` | :arrow_up: |
| python | `82.29% <97.77%> (-0.01%)` | :arrow_down: |
| sqlite | `81.50% <97.77%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `89.97% <ø> (-0.42%)` | :arrow_down: |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `35.33% <21.15%> (ø)` | |
| [...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL0ZpbHRlcnNDb25maWdGb3JtLnRzeA==) | `56.37% <37.50%> (+0.45%)` | :arrow_up: |
| [...src/filters/components/Range/RangeFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9SYW5nZS9SYW5nZUZpbHRlclBsdWdpbi50c3g=) | `74.56% <75.47%> (+19.17%)` | :arrow_up: |
| ... and [20 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...bc9b461](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9bb937e) into [master](https://codecov.io/gh/apache/superset/commit/8c25f2f356e488120d7ce3ff852a4b6b9a049b3b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8c25f2f) will **decrease** coverage by `0.14%`.
> The diff coverage is `62.64%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.86% 68.71% -0.15%
==========================================
Files 1598 1597 -1
Lines 65297 65378 +81
Branches 6952 6961 +9
==========================================
- Hits 44966 44926 -40
- Misses 18446 18561 +115
- Partials 1885 1891 +6
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `82.14% <97.67%> (?)` | |
| postgres | `82.14% <97.67%> (-0.01%)` | :arrow_down: |
| python | `82.23% <97.67%> (-0.23%)` | :arrow_down: |
| sqlite | `81.84% <97.67%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `51.16% <0.00%> (+1.16%)` | :arrow_up: |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `34.68% <32.07%> (-0.66%)` | :arrow_down: |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `61.11% <37.50%> (+2.08%)` | :arrow_up: |
| [...src/dashboard/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1Byb3BlcnRpZXNNb2RhbC9pbmRleC50c3g=) | `65.21% <65.00%> (ø)` | |
| [superset/dashboards/dao.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9kYW8ucHk=) | `96.26% <97.22%> (+0.17%)` | :arrow_up: |
| [superset/dashboards/api.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9hcGkucHk=) | `91.89% <100.00%> (+0.02%)` | :arrow_up: |
| [superset/dashboards/commands/update.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy91cGRhdGUucHk=) | `83.82% <100.00%> (+0.74%)` | :arrow_up: |
| [superset/dashboards/schemas.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9zY2hlbWFzLnB5) | `99.41% <100.00%> (+<0.01%)` | :arrow_up: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
| ... and [17 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8c25f2f...9bb937e](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (183cce7) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **decrease** coverage by `0.03%`.
> The diff coverage is `60.00%`.
> :exclamation: Current head 183cce7 differs from pull request most recent head bc9b461. Consider uploading reports for the commit bc9b461 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.55% 68.51% -0.04%
==========================================
Files 1601 1602 +1
Lines 65271 65362 +91
Branches 6966 6992 +26
==========================================
+ Hits 44745 44782 +37
- Misses 18636 18694 +58
+ Partials 1890 1886 -4
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `81.39% <97.77%> (+<0.01%)` | :arrow_up: |
| mysql | `81.81% <97.77%> (+<0.01%)` | :arrow_up: |
| postgres | `81.81% <97.77%> (-0.01%)` | :arrow_down: |
| presto | `?` | |
| python | `82.15% <97.77%> (-0.15%)` | :arrow_down: |
| sqlite | `81.50% <97.77%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `84.34% <ø> (-6.06%)` | :arrow_down: |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `35.33% <21.15%> (ø)` | |
| [...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL0ZpbHRlcnNDb25maWdGb3JtLnRzeA==) | `56.37% <37.50%> (+0.45%)` | :arrow_up: |
| [...src/filters/components/Range/RangeFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9SYW5nZS9SYW5nZUZpbHRlclBsdWdpbi50c3g=) | `74.56% <75.47%> (+19.17%)` | :arrow_up: |
| ... and [22 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...bc9b461](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763778818
##########
File path: superset-frontend/src/dashboard/actions/dashboardState.js
##########
@@ -194,52 +196,176 @@ export function saveDashboardRequest(data, id, saveType) {
const serializedFilters = serializeActiveFilterValues(getActiveFilters());
// serialize filter scope for each filter field, grouped by filter id
const serializedFilterScopes = serializeFilterScopes(dashboardFilters);
+ const {
+ certified_by,
+ certification_details,
+ css,
+ dashboard_title,
+ owners,
+ roles,
+ slug,
+ } = data;
+
+ // making sure the data is what the backend expects
+ const cleanedData = {
+ ...data,
+ certified_by: certified_by || '',
+ certification_details:
+ certified_by && certification_details ? certification_details : '',
+ css: css || '',
+ dashboard_title: dashboard_title || t('[ untitled dashboard ]'),
+ owners: owners && owners.length ? owners.map(o => (o.id ? o.id : o)) : [],
Review comment:
`owners && owners.length` -> `ensureIsArray(owners)`
`owners.map(o => (o.id ? o.id : o))` - I assume that means that owner can either be a string or an object with id? Maybe we could use a type guard to make it a bit clearer?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] github-actions[bot] commented on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-989143503
@rusackas Ephemeral environment spinning up at http://34.217.207.248:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e87ea22) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **increase** coverage by `0.16%`.
> The diff coverage is `72.69%`.
> :exclamation: Current head e87ea22 differs from pull request most recent head 37cde71. Consider uploading reports for the commit 37cde71 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
+ Coverage 68.55% 68.72% +0.16%
==========================================
Files 1601 1597 -4
Lines 65271 65264 -7
Branches 6966 6950 -16
==========================================
+ Hits 44745 44851 +106
+ Misses 18636 18528 -108
+ Partials 1890 1885 -5
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `82.11% <96.77%> (+0.31%)` | :arrow_up: |
| postgres | `82.12% <96.77%> (+0.31%)` | :arrow_up: |
| presto | `?` | |
| python | `82.16% <96.77%> (-0.14%)` | :arrow_down: |
| sqlite | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...es/superset-ui-core/src/query/buildQueryContext.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvYnVpbGRRdWVyeUNvbnRleHQudHM=) | `100.00% <ø> (ø)` | |
| [...packages/superset-ui-core/src/query/types/Query.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvdHlwZXMvUXVlcnkudHM=) | `100.00% <ø> (ø)` | |
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...end/src/visualizations/TimeTable/SparklineCell.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9TcGFya2xpbmVDZWxsLnRzeA==) | `0.00% <ø> (ø)` | |
| [...c/visualizations/TimeTable/TimeTableChartPlugin.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9UaW1lVGFibGVDaGFydFBsdWdpbi50cw==) | `71.42% <ø> (ø)` | |
| ... and [76 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...37cde71](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] geido commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
geido commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r761314740
##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts
##########
@@ -97,10 +97,6 @@ describe('Dashboard edit action', () => {
.get('[data-test="dashboard-title-input"]')
.type(`{selectall}{backspace}${dashboardTitle}`);
- cy.wait('@dashboardGet').then(() => {
Review comment:
This was here because the color scheme was considered to e mandatory. This is not the case any longer
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (183cce7) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **decrease** coverage by `0.15%`.
> The diff coverage is `60.00%`.
> :exclamation: Current head 183cce7 differs from pull request most recent head bc9b461. Consider uploading reports for the commit bc9b461 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.55% 68.39% -0.16%
==========================================
Files 1601 1602 +1
Lines 65271 65362 +91
Branches 6966 6992 +26
==========================================
- Hits 44745 44705 -40
- Misses 18636 18771 +135
+ Partials 1890 1886 -4
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `81.81% <97.77%> (+<0.01%)` | :arrow_up: |
| postgres | `81.81% <97.77%> (-0.01%)` | :arrow_down: |
| presto | `?` | |
| python | `81.89% <97.77%> (-0.41%)` | :arrow_down: |
| sqlite | `81.50% <97.77%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.50% <ø> (-6.89%)` | :arrow_down: |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `35.33% <21.15%> (ø)` | |
| [...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL0ZpbHRlcnNDb25maWdGb3JtLnRzeA==) | `56.37% <37.50%> (+0.45%)` | :arrow_up: |
| [...src/filters/components/Range/RangeFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9SYW5nZS9SYW5nZUZpbHRlclBsdWdpbi50c3g=) | `74.56% <75.47%> (+19.17%)` | :arrow_up: |
| ... and [27 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...bc9b461](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8715b72) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **decrease** coverage by `0.15%`.
> The diff coverage is `60.00%`.
> :exclamation: Current head 8715b72 differs from pull request most recent head a5c3bd1. Consider uploading reports for the commit a5c3bd1 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.55% 68.40% -0.16%
==========================================
Files 1601 1602 +1
Lines 65271 65362 +91
Branches 6966 6992 +26
==========================================
- Hits 44745 44708 -37
- Misses 18636 18768 +132
+ Partials 1890 1886 -4
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `81.81% <97.77%> (+<0.01%)` | :arrow_up: |
| postgres | `81.82% <97.77%> (+<0.01%)` | :arrow_up: |
| presto | `?` | |
| python | `81.90% <97.77%> (-0.40%)` | :arrow_down: |
| sqlite | `81.50% <97.77%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.50% <ø> (-6.89%)` | :arrow_down: |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `35.33% <21.15%> (ø)` | |
| [...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL0ZpbHRlcnNDb25maWdGb3JtLnRzeA==) | `56.37% <37.50%> (+0.45%)` | :arrow_up: |
| [...src/filters/components/Range/RangeFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9SYW5nZS9SYW5nZUZpbHRlclBsdWdpbi50c3g=) | `74.56% <75.47%> (+19.17%)` | :arrow_up: |
| ... and [24 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...a5c3bd1](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8da49ba) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **increase** coverage by `0.03%`.
> The diff coverage is `66.92%`.
> :exclamation: Current head 8da49ba differs from pull request most recent head df8fe9f. Consider uploading reports for the commit df8fe9f to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
+ Coverage 68.55% 68.58% +0.03%
==========================================
Files 1601 1596 -5
Lines 65271 65234 -37
Branches 6966 6949 -17
==========================================
- Hits 44745 44741 -4
+ Misses 18636 18610 -26
+ Partials 1890 1883 -7
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `81.82% <95.83%> (+0.01%)` | :arrow_up: |
| postgres | `81.83% <95.83%> (+0.01%)` | :arrow_up: |
| presto | `?` | |
| python | `81.91% <95.83%> (-0.39%)` | :arrow_down: |
| sqlite | `81.51% <95.83%> (+0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...es/superset-ui-core/src/query/buildQueryContext.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvYnVpbGRRdWVyeUNvbnRleHQudHM=) | `100.00% <ø> (ø)` | |
| [...packages/superset-ui-core/src/query/types/Query.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvdHlwZXMvUXVlcnkudHM=) | `100.00% <ø> (ø)` | |
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...end/src/visualizations/TimeTable/SparklineCell.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9TcGFya2xpbmVDZWxsLnRzeA==) | `0.00% <ø> (ø)` | |
| [...c/visualizations/TimeTable/TimeTableChartPlugin.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9UaW1lVGFibGVDaGFydFBsdWdpbi50cw==) | `71.42% <ø> (ø)` | |
| ... and [45 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...df8fe9f](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] github-actions[bot] commented on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-985773434
@geido Ephemeral environment spinning up at http://35.86.163.153:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] jinghua-qa commented on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
jinghua-qa commented on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-986334379
I found a bug that edit native filter in meta data did not reflect changes after save. See video for details:
https://user-images.githubusercontent.com/81597121/144770187-2df63a4e-9f46-48f6-a568-b3acb5aa1e24.mov
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763793700
##########
File path: superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
##########
@@ -0,0 +1,609 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { useCallback, useEffect, useMemo, useState } from 'react';
+import { Form, Row, Col, Input } from 'src/common/components';
+import { FormItem } from 'src/components/Form';
+import jsonStringify from 'json-stringify-pretty-compact';
+import Button from 'src/components/Button';
+import { Select } from 'src/components';
+import rison from 'rison';
+import {
+ styled,
+ t,
+ SupersetClient,
+ getCategoricalSchemeRegistry,
+} from '@superset-ui/core';
+
+import Modal from 'src/components/Modal';
+import { JsonEditor } from 'src/components/AsyncAceEditor';
+
+import ColorSchemeControlWrapper from 'src/dashboard/components/ColorSchemeControlWrapper';
+import { getClientErrorObject } from 'src/utils/getClientErrorObject';
+import withToasts from 'src/components/MessageToasts/withToasts';
+import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
+
+const StyledFormItem = styled(FormItem)`
+ margin-bottom: 0;
+`;
+
+const StyledJsonEditor = styled(JsonEditor)`
+ border-radius: ${({ theme }) => theme.borderRadius}px;
+ border: 1px solid ${({ theme }) => theme.colors.secondary.light2};
+`;
+
+type PropertiesModalProps = {
+ dashboardId: number;
+ dashboardTitle?: string;
+ dashboardInfo?: Record<string, any>;
+ show?: boolean;
+ onHide?: () => void;
+ colorScheme?: string;
+ setColorSchemeAndUnsavedChanges?: () => void;
+ onSubmit?: (params: Record<string, any>) => void;
+ addSuccessToast: (message: string) => void;
+ onlyApply?: boolean;
+};
+
+type Roles = { id: number; name: string }[];
+type Owners = {
+ id: number;
+ full_name?: string;
+ first_name?: string;
+ last_name?: string;
+}[];
+type DashboardInfo = {
+ id: number;
+ title: string;
+ slug: string;
+ certifiedBy: string;
+ certificationDetails: string;
+};
+
+const PropertiesModal = ({
+ addSuccessToast,
+ colorScheme: currentColorScheme,
+ dashboardId,
+ dashboardInfo: currentDashboardInfo,
+ dashboardTitle,
+ onHide = () => {},
+ onlyApply = false,
+ onSubmit = () => {},
+ show = false,
+}: PropertiesModalProps) => {
+ const [form] = Form.useForm();
+ const [isLoading, setIsLoading] = useState(false);
+ const [isAdvancedOpen, setIsAdvancedOpen] = useState(false);
+ const [colorScheme, setColorScheme] = useState(currentColorScheme);
+ const [jsonMetadata, setJsonMetadata] = useState('');
+ const [dashboardInfo, setDashboardInfo] = useState<DashboardInfo>();
+ const [owners, setOwners] = useState<Owners>([]);
+ const [roles, setRoles] = useState<Roles>([]);
+ const saveLabel = onlyApply ? t('Apply') : t('Save');
+
+ const handleErrorResponse = async (response: Response) => {
+ const { error, statusText, message } = await getClientErrorObject(response);
+ let errorText = error || statusText || t('An error has occurred');
+ if (typeof message === 'object' && 'json_metadata' in message) {
+ errorText = (message as { json_metadata: string }).json_metadata;
+ } else if (typeof message === 'string') {
+ errorText = message;
+
+ if (message === 'Forbidden') {
+ errorText = t('You do not have permission to edit this dashboard');
+ }
+ }
+
+ Modal.error({
+ title: 'Error',
+ content: errorText,
+ okButtonProps: { danger: true, className: 'btn-danger' },
+ });
+ };
+
+ const loadAccessOptions = useMemo(
Review comment:
You can `useCallback` instead and remove the first `() =>`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763796804
##########
File path: superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
##########
@@ -0,0 +1,609 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { useCallback, useEffect, useMemo, useState } from 'react';
+import { Form, Row, Col, Input } from 'src/common/components';
+import { FormItem } from 'src/components/Form';
+import jsonStringify from 'json-stringify-pretty-compact';
+import Button from 'src/components/Button';
+import { Select } from 'src/components';
+import rison from 'rison';
+import {
+ styled,
+ t,
+ SupersetClient,
+ getCategoricalSchemeRegistry,
+} from '@superset-ui/core';
+
+import Modal from 'src/components/Modal';
+import { JsonEditor } from 'src/components/AsyncAceEditor';
+
+import ColorSchemeControlWrapper from 'src/dashboard/components/ColorSchemeControlWrapper';
+import { getClientErrorObject } from 'src/utils/getClientErrorObject';
+import withToasts from 'src/components/MessageToasts/withToasts';
+import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
+
+const StyledFormItem = styled(FormItem)`
+ margin-bottom: 0;
+`;
+
+const StyledJsonEditor = styled(JsonEditor)`
+ border-radius: ${({ theme }) => theme.borderRadius}px;
+ border: 1px solid ${({ theme }) => theme.colors.secondary.light2};
+`;
+
+type PropertiesModalProps = {
+ dashboardId: number;
+ dashboardTitle?: string;
+ dashboardInfo?: Record<string, any>;
+ show?: boolean;
+ onHide?: () => void;
+ colorScheme?: string;
+ setColorSchemeAndUnsavedChanges?: () => void;
+ onSubmit?: (params: Record<string, any>) => void;
+ addSuccessToast: (message: string) => void;
+ onlyApply?: boolean;
+};
+
+type Roles = { id: number; name: string }[];
+type Owners = {
+ id: number;
+ full_name?: string;
+ first_name?: string;
+ last_name?: string;
+}[];
+type DashboardInfo = {
+ id: number;
+ title: string;
+ slug: string;
+ certifiedBy: string;
+ certificationDetails: string;
+};
+
+const PropertiesModal = ({
+ addSuccessToast,
+ colorScheme: currentColorScheme,
+ dashboardId,
+ dashboardInfo: currentDashboardInfo,
+ dashboardTitle,
+ onHide = () => {},
+ onlyApply = false,
+ onSubmit = () => {},
+ show = false,
+}: PropertiesModalProps) => {
+ const [form] = Form.useForm();
+ const [isLoading, setIsLoading] = useState(false);
+ const [isAdvancedOpen, setIsAdvancedOpen] = useState(false);
+ const [colorScheme, setColorScheme] = useState(currentColorScheme);
+ const [jsonMetadata, setJsonMetadata] = useState('');
+ const [dashboardInfo, setDashboardInfo] = useState<DashboardInfo>();
+ const [owners, setOwners] = useState<Owners>([]);
+ const [roles, setRoles] = useState<Roles>([]);
+ const saveLabel = onlyApply ? t('Apply') : t('Save');
+
+ const handleErrorResponse = async (response: Response) => {
+ const { error, statusText, message } = await getClientErrorObject(response);
+ let errorText = error || statusText || t('An error has occurred');
+ if (typeof message === 'object' && 'json_metadata' in message) {
+ errorText = (message as { json_metadata: string }).json_metadata;
+ } else if (typeof message === 'string') {
+ errorText = message;
+
+ if (message === 'Forbidden') {
+ errorText = t('You do not have permission to edit this dashboard');
+ }
+ }
+
+ Modal.error({
+ title: 'Error',
+ content: errorText,
+ okButtonProps: { danger: true, className: 'btn-danger' },
+ });
+ };
+
+ const loadAccessOptions = useMemo(
+ () =>
+ (accessType = 'owners', input = '', page: number, pageSize: number) => {
+ const query = rison.encode({
+ filter: input,
+ page,
+ page_size: pageSize,
+ });
+ return SupersetClient.get({
+ endpoint: `/api/v1/dashboard/related/${accessType}?q=${query}`,
+ }).then(response => ({
+ data: response.json.result.map(
+ (item: { value: number; text: string }) => ({
+ value: item.value,
+ label: item.text,
+ }),
+ ),
+ totalCount: response.json.count,
+ }));
+ },
+ [],
+ );
+
+ const handleDashboardData = useCallback(
+ dashboardData => {
+ const {
+ id,
+ dashboard_title,
+ slug,
+ certified_by,
+ certification_details,
+ owners,
+ roles,
+ metadata,
+ } = dashboardData;
+ const dashboardInfo = {
+ id,
+ title: dashboard_title,
+ slug: slug || '',
+ certifiedBy: certified_by || '',
+ certificationDetails: certification_details || '',
+ };
+
+ form.setFieldsValue(dashboardInfo);
+ setDashboardInfo(dashboardInfo);
+ setJsonMetadata(metadata ? jsonStringify(metadata) : '');
+ setOwners(owners);
+ setRoles(roles);
+ setColorScheme(metadata.color_scheme);
+ },
+ [form],
+ );
+
+ const fetchDashboardDetails = useCallback(() => {
+ setIsLoading(true);
+ // We fetch the dashboard details because not all code
+ // that renders this component have all the values we need.
+ // At some point when we have a more consistent frontend
+ // datamodel, the dashboard could probably just be passed as a prop.
+ SupersetClient.get({
+ endpoint: `/api/v1/dashboard/${dashboardId}`,
+ }).then(response => {
+ const dashboard = response.json.result;
+ const jsonMetadataObj = dashboard.json_metadata?.length
+ ? JSON.parse(dashboard.json_metadata)
+ : {};
+
+ handleDashboardData({
+ ...dashboard,
+ metadata: jsonMetadataObj,
+ });
+
+ setIsLoading(false);
+ }, handleErrorResponse);
+ }, [dashboardId, handleDashboardData]);
+
+ const getJsonMetadata = () => {
+ try {
+ const jsonMetadataObj = jsonMetadata?.length
+ ? JSON.parse(jsonMetadata)
+ : {};
+ return jsonMetadataObj;
+ } catch (_) {
+ return {};
+ }
+ };
+
+ const handleOnChangeOwners = (owners: { value: number; label: string }[]) => {
+ let parsedOwners: Owners = [];
+ if (owners && owners.length) {
+ parsedOwners = owners.map(o => ({
+ id: o.value,
+ full_name: o.label,
+ }));
+ }
+ setOwners(parsedOwners);
+ };
+
+ const handleOnChangeRoles = (roles: { value: number; label: string }[]) => {
+ let parsedRoles: Roles = [];
+ if (roles && roles.length) {
+ parsedRoles = roles.map(r => ({
+ id: r.value,
+ name: r.label,
+ }));
+ }
+ setRoles(parsedRoles);
+ };
+
+ const handleOwnersSelectValue = () => {
+ const parsedOwners = (owners || []).map(
+ (owner: {
+ id: number;
+ first_name?: string;
+ last_name?: string;
+ full_name?: string;
+ }) => ({
+ value: owner.id,
+ label: owner.full_name || `${owner.first_name} ${owner.last_name}`,
+ }),
+ );
+ return parsedOwners;
+ };
+
+ const handleRolesSelectValue = () => {
+ const parsedRoles = (roles || []).map(
+ (role: { id: number; name: string }) => ({
+ value: role.id,
+ label: `${role.name}`,
+ }),
+ );
+ return parsedRoles;
+ };
+
+ const onColorSchemeChange = (
+ colorScheme?: string,
+ { updateMetadata = true } = {},
+ ) => {
+ // check that color_scheme is valid
+ const colorChoices = getCategoricalSchemeRegistry().keys();
+ const jsonMetadataObj = getJsonMetadata();
+
+ // only fire if the color_scheme is present and invalid
+ if (colorScheme && !colorChoices.includes(colorScheme)) {
+ Modal.error({
+ title: 'Error',
+ content: t('A valid color scheme is required'),
+ okButtonProps: { danger: true, className: 'btn-danger' },
+ });
+ throw new Error('A valid color scheme is required');
+ }
+
+ // update metadata to match selection
+ if (updateMetadata) {
+ jsonMetadataObj.color_scheme = colorScheme;
+ jsonMetadataObj.label_colors = jsonMetadataObj.label_colors || {};
+
+ setJsonMetadata(jsonStringify(jsonMetadataObj));
+ }
+ setColorScheme(colorScheme);
+ };
+
+ const onFinish = () => {
+ const { title, slug, certifiedBy, certificationDetails } =
+ form.getFieldsValue();
+ let currentColorScheme = colorScheme;
+ let colorNamespace = '';
+
+ // color scheme in json metadata has precedence over selection
+ if (jsonMetadata?.length) {
+ const metadata = JSON.parse(jsonMetadata);
+ currentColorScheme = metadata?.color_scheme || colorScheme;
+ colorNamespace = metadata?.color_namespace || '';
+ }
+
+ onColorSchemeChange(currentColorScheme, {
+ updateMetadata: false,
+ });
+
+ const moreOnSubmitProps: { roles?: Roles } = {};
+ const morePutProps: { roles?: number[] } = {};
+ if (isFeatureEnabled(FeatureFlag.DASHBOARD_RBAC)) {
+ moreOnSubmitProps.roles = roles;
+ morePutProps.roles = (roles || []).map(r => r.id);
+ }
+ const onSubmitProps = {
+ id: dashboardId,
+ title,
+ slug,
+ jsonMetadata,
+ owners,
+ colorScheme: currentColorScheme,
+ colorNamespace,
+ certifiedBy,
+ certificationDetails,
+ ...moreOnSubmitProps,
+ };
+ if (onlyApply) {
+ onSubmit(onSubmitProps);
+ onHide();
+ } else {
+ SupersetClient.put({
+ endpoint: `/api/v1/dashboard/${dashboardId}`,
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({
+ dashboard_title: title,
+ slug: slug || null,
+ json_metadata: jsonMetadata || null,
+ owners: (owners || []).map(o => o.id),
+ certified_by: certifiedBy || null,
+ certification_details:
+ certifiedBy && certificationDetails ? certificationDetails : null,
+ ...morePutProps,
+ }),
+ }).then(() => {
+ addSuccessToast(t('The dashboard has been saved'));
+ onSubmit(onSubmitProps);
+ onHide();
+ }, handleErrorResponse);
+ }
+ };
+
+ const getRowsWithoutRoles = () => {
+ const jsonMetadataObj = getJsonMetadata();
+ const hasCustomLabelColors = !!Object.keys(
+ jsonMetadataObj?.label_colors || {},
+ ).length;
+
+ return (
+ <Row gutter={16}>
+ <Col xs={24} md={12}>
+ <h3 style={{ marginTop: '1em' }}>{t('Access')}</h3>
+ <StyledFormItem label={t('Owners')}>
+ <Select
+ allowClear
+ ariaLabel={t('Owners')}
+ disabled={isLoading}
+ mode="multiple"
+ onChange={handleOnChangeOwners}
+ options={(input, page, pageSize) =>
+ loadAccessOptions('owners', input, page, pageSize)
+ }
+ value={handleOwnersSelectValue()}
+ />
+ </StyledFormItem>
+ <p className="help-block">
+ {t(
+ 'Owners is a list of users who can alter the dashboard. Searchable by name or username.',
+ )}
+ </p>
+ </Col>
+ <Col xs={24} md={12}>
+ <h3 style={{ marginTop: '1em' }}>{t('Colors')}</h3>
+ <ColorSchemeControlWrapper
+ hasCustomLabelColors={hasCustomLabelColors}
+ onChange={onColorSchemeChange}
+ colorScheme={colorScheme}
+ labelMargin={4}
+ />
+ </Col>
+ </Row>
+ );
+ };
+
+ const getRowsWithRoles = () => {
+ const jsonMetadataObj = getJsonMetadata();
+ const hasCustomLabelColors = !!Object.keys(
+ jsonMetadataObj?.label_colors || {},
+ ).length;
+
+ return (
+ <>
+ <Row>
+ <Col xs={24} md={24}>
+ <h3 style={{ marginTop: '1em' }}>{t('Access')}</h3>
+ </Col>
+ </Row>
+ <Row gutter={16}>
+ <Col xs={24} md={12}>
+ <StyledFormItem label={t('Owners')}>
+ <Select
+ allowClear
+ ariaLabel={t('Owners')}
+ disabled={isLoading}
+ mode="multiple"
+ onChange={handleOnChangeOwners}
+ options={(input, page, pageSize) =>
+ loadAccessOptions('owners', input, page, pageSize)
+ }
+ value={handleOwnersSelectValue()}
+ />
+ </StyledFormItem>
+ <p className="help-block">
+ {t(
+ 'Owners is a list of users who can alter the dashboard. Searchable by name or username.',
+ )}
+ </p>
+ </Col>
+ <Col xs={24} md={12}>
+ <StyledFormItem label={t('Roles')}>
+ <Select
+ allowClear
+ ariaLabel={t('Roles')}
+ disabled={isLoading}
+ mode="multiple"
+ onChange={handleOnChangeRoles}
+ options={(input, page, pageSize) =>
+ loadAccessOptions('roles', input, page, pageSize)
+ }
+ value={handleRolesSelectValue()}
+ />
+ </StyledFormItem>
+ <p className="help-block">
+ {t(
+ 'Roles is a list which defines access to the dashboard. Granting a role access to a dashboard will bypass dataset level checks. If no roles defined then the dashboard is available to all roles.',
Review comment:
```suggestion
'Roles is a list which defines access to the dashboard. Granting a role access to a dashboard will bypass dataset level checks. If no roles are defined, then the dashboard is available to all roles.',
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9bb937e) into [master](https://codecov.io/gh/apache/superset/commit/8c25f2f356e488120d7ce3ff852a4b6b9a049b3b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8c25f2f) will **decrease** coverage by `0.14%`.
> The diff coverage is `62.64%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.86% 68.72% -0.15%
==========================================
Files 1598 1597 -1
Lines 65297 65378 +81
Branches 6952 6961 +9
==========================================
- Hits 44966 44929 -37
- Misses 18446 18558 +112
- Partials 1885 1891 +6
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `82.14% <97.67%> (?)` | |
| postgres | `82.15% <97.67%> (+<0.01%)` | :arrow_up: |
| python | `82.24% <97.67%> (-0.22%)` | :arrow_down: |
| sqlite | `81.84% <97.67%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `51.16% <0.00%> (+1.16%)` | :arrow_up: |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `34.68% <32.07%> (-0.66%)` | :arrow_down: |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `61.11% <37.50%> (+2.08%)` | :arrow_up: |
| [...src/dashboard/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1Byb3BlcnRpZXNNb2RhbC9pbmRleC50c3g=) | `65.21% <65.00%> (ø)` | |
| [superset/dashboards/dao.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9kYW8ucHk=) | `96.26% <97.22%> (+0.17%)` | :arrow_up: |
| [superset/dashboards/api.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9hcGkucHk=) | `91.89% <100.00%> (+0.02%)` | :arrow_up: |
| [superset/dashboards/commands/update.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy91cGRhdGUucHk=) | `83.82% <100.00%> (+0.74%)` | :arrow_up: |
| [superset/dashboards/schemas.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9zY2hlbWFzLnB5) | `99.41% <100.00%> (+<0.01%)` | :arrow_up: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
| ... and [14 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8c25f2f...9bb937e](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] geido commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
geido commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r761315044
##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts
##########
@@ -97,10 +97,6 @@ describe('Dashboard edit action', () => {
.get('[data-test="dashboard-title-input"]')
.type(`{selectall}{backspace}${dashboardTitle}`);
- cy.wait('@dashboardGet').then(() => {
- selectColorScheme('d3Category20b');
- });
-
Review comment:
This was here because the color scheme was considered to be mandatory. This is not the case any longer
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] betodealmeida commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
betodealmeida commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763526321
##########
File path: superset/dashboards/dao.py
##########
@@ -173,79 +173,103 @@ def bulk_delete(models: Optional[List[Dashboard]], commit: bool = True) -> None:
raise ex
@staticmethod
- def set_dash_metadata(
+ def set_dash_metadata( # pylint: disable=too-many-locals
dashboard: Dashboard,
data: Dict[Any, Any],
old_to_new_slice_ids: Optional[Dict[int, int]] = None,
- ) -> None:
- positions = data["positions"]
- # find slices in the position data
- slice_ids = [
- value.get("meta", {}).get("chartId")
- for value in positions.values()
- if isinstance(value, dict)
- ]
-
- session = db.session()
- current_slices = session.query(Slice).filter(Slice.id.in_(slice_ids)).all()
-
- dashboard.slices = current_slices
-
- # add UUID to positions
- uuid_map = {slice.id: str(slice.uuid) for slice in current_slices}
- for obj in positions.values():
- if (
- isinstance(obj, dict)
- and obj["type"] == "CHART"
- and obj["meta"]["chartId"]
- ):
- chart_id = obj["meta"]["chartId"]
- obj["meta"]["uuid"] = uuid_map.get(chart_id)
-
- # remove leading and trailing white spaces in the dumped json
- dashboard.position_json = json.dumps(
- positions, indent=None, separators=(",", ":"), sort_keys=True
- )
+ commit: bool = False,
+ ) -> Dashboard:
+ positions = data.get("positions")
+ new_filter_scopes = {}
md = dashboard.params_dict
- dashboard.css = data.get("css")
- dashboard.dashboard_title = data["dashboard_title"]
- if "timed_refresh_immune_slices" not in md:
- md["timed_refresh_immune_slices"] = []
- new_filter_scopes = {}
- if "filter_scopes" in data:
- # replace filter_id and immune ids from old slice id to new slice id:
- # and remove slice ids that are not in dash anymore
- slc_id_dict: Dict[int, int] = {}
- if old_to_new_slice_ids:
- slc_id_dict = {
- old: new
- for old, new in old_to_new_slice_ids.items()
- if new in slice_ids
- }
- else:
- slc_id_dict = {sid: sid for sid in slice_ids}
- new_filter_scopes = copy_filter_scopes(
- old_to_new_slc_id_dict=slc_id_dict,
- old_filter_scopes=json.loads(data["filter_scopes"] or "{}"),
+ if positions is not None:
+ # find slices in the position data
+ slice_ids = [
+ value.get("meta", {}).get("chartId")
+ for value in positions.values()
+ if isinstance(value, dict)
+ ]
+
+ session = db.session()
+ current_slices = session.query(Slice).filter(Slice.id.in_(slice_ids)).all()
+
+ dashboard.slices = current_slices
+
+ # add UUID to positions
+ uuid_map = {slice.id: str(slice.uuid) for slice in current_slices}
+ for obj in positions.values():
+ if (
+ isinstance(obj, dict)
+ and obj["type"] == "CHART"
+ and obj["meta"]["chartId"]
+ ):
+ chart_id = obj["meta"]["chartId"]
+ obj["meta"]["uuid"] = uuid_map.get(chart_id)
+
+ # remove leading and trailing white spaces in the dumped json
+ dashboard.position_json = json.dumps(
+ positions, indent=None, separators=(",", ":"), sort_keys=True
)
+
+ if "filter_scopes" in data:
+ # replace filter_id and immune ids from old slice id to new slice id:
+ # and remove slice ids that are not in dash anymore
+ slc_id_dict: Dict[int, int] = {}
+ if old_to_new_slice_ids:
+ slc_id_dict = {
+ old: new
+ for old, new in old_to_new_slice_ids.items()
+ if new in slice_ids
+ }
+ else:
+ slc_id_dict = {sid: sid for sid in slice_ids}
+ new_filter_scopes = copy_filter_scopes(
+ old_to_new_slc_id_dict=slc_id_dict,
+ old_filter_scopes=json.loads(data["filter_scopes"] or "{}")
+ if isinstance(data["filter_scopes"], str)
+ else data["filter_scopes"],
+ )
+
+ default_filters_data = json.loads(data.get("default_filters", "{}"))
+ applicable_filters = {
+ key: v
+ for key, v in default_filters_data.items()
+ if int(key) in slice_ids
+ }
+ md["default_filters"] = json.dumps(applicable_filters)
+
+ # css and dashboard_title are not part of the metadata
+ # TODO remove by refactoring/deprecating save_dash endpoint
Review comment:
```suggestion
# TODO (geido): remove by refactoring/deprecating save_dash endpoint
```
I'm planning to write a bot that emails committers that leave TODOs open for too long. :)
##########
File path: superset/dashboards/dao.py
##########
@@ -173,79 +173,103 @@ def bulk_delete(models: Optional[List[Dashboard]], commit: bool = True) -> None:
raise ex
@staticmethod
- def set_dash_metadata(
+ def set_dash_metadata( # pylint: disable=too-many-locals
dashboard: Dashboard,
data: Dict[Any, Any],
old_to_new_slice_ids: Optional[Dict[int, int]] = None,
- ) -> None:
- positions = data["positions"]
- # find slices in the position data
- slice_ids = [
- value.get("meta", {}).get("chartId")
- for value in positions.values()
- if isinstance(value, dict)
- ]
-
- session = db.session()
- current_slices = session.query(Slice).filter(Slice.id.in_(slice_ids)).all()
-
- dashboard.slices = current_slices
-
- # add UUID to positions
- uuid_map = {slice.id: str(slice.uuid) for slice in current_slices}
- for obj in positions.values():
- if (
- isinstance(obj, dict)
- and obj["type"] == "CHART"
- and obj["meta"]["chartId"]
- ):
- chart_id = obj["meta"]["chartId"]
- obj["meta"]["uuid"] = uuid_map.get(chart_id)
-
- # remove leading and trailing white spaces in the dumped json
- dashboard.position_json = json.dumps(
- positions, indent=None, separators=(",", ":"), sort_keys=True
- )
+ commit: bool = False,
+ ) -> Dashboard:
+ positions = data.get("positions")
+ new_filter_scopes = {}
md = dashboard.params_dict
- dashboard.css = data.get("css")
- dashboard.dashboard_title = data["dashboard_title"]
- if "timed_refresh_immune_slices" not in md:
- md["timed_refresh_immune_slices"] = []
- new_filter_scopes = {}
- if "filter_scopes" in data:
- # replace filter_id and immune ids from old slice id to new slice id:
- # and remove slice ids that are not in dash anymore
- slc_id_dict: Dict[int, int] = {}
- if old_to_new_slice_ids:
- slc_id_dict = {
- old: new
- for old, new in old_to_new_slice_ids.items()
- if new in slice_ids
- }
- else:
- slc_id_dict = {sid: sid for sid in slice_ids}
- new_filter_scopes = copy_filter_scopes(
- old_to_new_slc_id_dict=slc_id_dict,
- old_filter_scopes=json.loads(data["filter_scopes"] or "{}"),
+ if positions is not None:
+ # find slices in the position data
+ slice_ids = [
+ value.get("meta", {}).get("chartId")
+ for value in positions.values()
+ if isinstance(value, dict)
+ ]
+
+ session = db.session()
+ current_slices = session.query(Slice).filter(Slice.id.in_(slice_ids)).all()
+
+ dashboard.slices = current_slices
+
+ # add UUID to positions
+ uuid_map = {slice.id: str(slice.uuid) for slice in current_slices}
+ for obj in positions.values():
+ if (
+ isinstance(obj, dict)
+ and obj["type"] == "CHART"
+ and obj["meta"]["chartId"]
+ ):
+ chart_id = obj["meta"]["chartId"]
+ obj["meta"]["uuid"] = uuid_map.get(chart_id)
+
+ # remove leading and trailing white spaces in the dumped json
+ dashboard.position_json = json.dumps(
+ positions, indent=None, separators=(",", ":"), sort_keys=True
)
+
+ if "filter_scopes" in data:
+ # replace filter_id and immune ids from old slice id to new slice id:
+ # and remove slice ids that are not in dash anymore
+ slc_id_dict: Dict[int, int] = {}
+ if old_to_new_slice_ids:
+ slc_id_dict = {
+ old: new
+ for old, new in old_to_new_slice_ids.items()
+ if new in slice_ids
+ }
+ else:
+ slc_id_dict = {sid: sid for sid in slice_ids}
+ new_filter_scopes = copy_filter_scopes(
+ old_to_new_slc_id_dict=slc_id_dict,
+ old_filter_scopes=json.loads(data["filter_scopes"] or "{}")
+ if isinstance(data["filter_scopes"], str)
+ else data["filter_scopes"],
+ )
+
+ default_filters_data = json.loads(data.get("default_filters", "{}"))
+ applicable_filters = {
+ key: v
+ for key, v in default_filters_data.items()
+ if int(key) in slice_ids
+ }
+ md["default_filters"] = json.dumps(applicable_filters)
+
+ # css and dashboard_title are not part of the metadata
+ # TODO remove by refactoring/deprecating save_dash endpoint
+ if data.get("css") is not None:
+ dashboard.css = data.get("css")
+ if data.get("dashboard_title") is not None:
+ dashboard.dashboard_title = data.get("dashboard_title")
+
if new_filter_scopes:
md["filter_scopes"] = new_filter_scopes
else:
md.pop("filter_scopes", None)
+
+ if "timed_refresh_immune_slices" not in md:
+ md["timed_refresh_immune_slices"] = []
Review comment:
Python dictionaries have an odd-named method for this:
```suggestion
md.setdefault("timed_refresh_immune_slices", [])
```
##########
File path: superset/dashboards/commands/update.py
##########
@@ -51,6 +52,12 @@ def run(self) -> Model:
try:
dashboard = DashboardDAO.update(self._model, self._properties, commit=False)
dashboard = DashboardDAO.update_charts_owners(dashboard, commit=True)
+ if self._properties.get("json_metadata") is not None:
+ dashboard = DashboardDAO.set_dash_metadata(
+ dashboard,
+ data=json.loads(self._properties.get("json_metadata", "{}")),
Review comment:
If for some reason `json_metadata` is an empty string this would raise an error:
```python
>>> properties = {'json_metadata': ''}
>>> properties.get('json_metadata') is not None
True
>>> json.loads(properties.get("json_metadata", "{}"))
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```
You might wanna do instead:
```suggestion
if self._properties.get("json_metadata"):
dashboard = DashboardDAO.set_dash_metadata(
dashboard,
data=json.loads(self._properties.get("json_metadata", "{}")),
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763778818
##########
File path: superset-frontend/src/dashboard/actions/dashboardState.js
##########
@@ -194,52 +196,176 @@ export function saveDashboardRequest(data, id, saveType) {
const serializedFilters = serializeActiveFilterValues(getActiveFilters());
// serialize filter scope for each filter field, grouped by filter id
const serializedFilterScopes = serializeFilterScopes(dashboardFilters);
+ const {
+ certified_by,
+ certification_details,
+ css,
+ dashboard_title,
+ owners,
+ roles,
+ slug,
+ } = data;
+
+ // making sure the data is what the backend expects
+ const cleanedData = {
+ ...data,
+ certified_by: certified_by || '',
+ certification_details:
+ certified_by && certification_details ? certification_details : '',
+ css: css || '',
+ dashboard_title: dashboard_title || t('[ untitled dashboard ]'),
+ owners: owners && owners.length ? owners.map(o => (o.id ? o.id : o)) : [],
Review comment:
`owners && owners.length ? owners.map(o => (o.id ? o.id : o)) : []` -> `ensureIsArray(owners).map(o => (o.id ? o.id : o))`
`owners.map(o => (o.id ? o.id : o))` - I assume that means that owner can either be a string or an object with id? Maybe we could use a type guard to make it a bit clearer? Or maybe extract that logic to some `getOwnerId` function?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763781276
##########
File path: superset-frontend/src/dashboard/actions/dashboardState.js
##########
@@ -194,52 +196,176 @@ export function saveDashboardRequest(data, id, saveType) {
const serializedFilters = serializeActiveFilterValues(getActiveFilters());
// serialize filter scope for each filter field, grouped by filter id
const serializedFilterScopes = serializeFilterScopes(dashboardFilters);
+ const {
+ certified_by,
+ certification_details,
+ css,
+ dashboard_title,
+ owners,
+ roles,
+ slug,
+ } = data;
+
+ // making sure the data is what the backend expects
+ const cleanedData = {
+ ...data,
+ certified_by: certified_by || '',
+ certification_details:
+ certified_by && certification_details ? certification_details : '',
+ css: css || '',
+ dashboard_title: dashboard_title || t('[ untitled dashboard ]'),
+ owners: owners && owners.length ? owners.map(o => (o.id ? o.id : o)) : [],
+ roles: !isFeatureEnabled(FeatureFlag.DASHBOARD_RBAC)
Review comment:
`isFeatureEnabled(FeatureFlag.DASHBOARD_RBAC) ? ensureIsArray(roles).map(r => (r.id ? r.id : r)) : undefined`
`.map(r => (r.id ? r.id : r))` - same as above (comment about owners)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e87ea22) into [master](https://codecov.io/gh/apache/superset/commit/8c25f2f356e488120d7ce3ff852a4b6b9a049b3b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8c25f2f) will **decrease** coverage by `0.05%`.
> The diff coverage is `54.20%`.
> :exclamation: Current head e87ea22 differs from pull request most recent head d63fc65. Consider uploading reports for the commit d63fc65 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.86% 68.80% -0.06%
==========================================
Files 1598 1597 -1
Lines 65297 65264 -33
Branches 6952 6950 -2
==========================================
- Hits 44966 44906 -60
- Misses 18446 18473 +27
Partials 1885 1885
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `82.11% <97.72%> (?)` | |
| postgres | `82.12% <97.72%> (-0.03%)` | :arrow_down: |
| presto | `81.99% <97.72%> (?)` | |
| python | `82.35% <97.72%> (-0.10%)` | :arrow_down: |
| sqlite | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `35.33% <26.31%> (ø)` | |
| [superset/dashboards/dao.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9kYW8ucHk=) | `96.29% <97.29%> (+0.20%)` | :arrow_up: |
| [superset/dashboards/api.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9hcGkucHk=) | `91.89% <100.00%> (+0.02%)` | :arrow_up: |
| [superset/dashboards/commands/update.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy91cGRhdGUucHk=) | `83.82% <100.00%> (+0.74%)` | :arrow_up: |
| [superset/dashboards/schemas.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9zY2hlbWFzLnB5) | `99.41% <100.00%> (+<0.01%)` | :arrow_up: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `70.27% <0.00%> (-16.99%)` | :arrow_down: |
| ... and [25 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8c25f2f...d63fc65](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] rusackas commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r765981621
##########
File path: superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
##########
@@ -0,0 +1,603 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { useCallback, useEffect, useState } from 'react';
+import { Form, Row, Col, Input } from 'src/common/components';
+import { FormItem } from 'src/components/Form';
+import jsonStringify from 'json-stringify-pretty-compact';
+import Button from 'src/components/Button';
+import { Select } from 'src/components';
+import rison from 'rison';
+import {
+ styled,
+ t,
+ SupersetClient,
+ getCategoricalSchemeRegistry,
+ ensureIsArray,
+} from '@superset-ui/core';
+
+import Modal from 'src/components/Modal';
+import { JsonEditor } from 'src/components/AsyncAceEditor';
+
+import ColorSchemeControlWrapper from 'src/dashboard/components/ColorSchemeControlWrapper';
+import { getClientErrorObject } from 'src/utils/getClientErrorObject';
+import withToasts from 'src/components/MessageToasts/withToasts';
+import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
+
+const StyledFormItem = styled(FormItem)`
+ margin-bottom: 0;
+`;
+
+const StyledJsonEditor = styled(JsonEditor)`
+ border-radius: ${({ theme }) => theme.borderRadius}px;
+ border: 1px solid ${({ theme }) => theme.colors.secondary.light2};
+`;
+
+type PropertiesModalProps = {
+ dashboardId: number;
+ dashboardTitle?: string;
+ dashboardInfo?: Record<string, any>;
+ show?: boolean;
+ onHide?: () => void;
+ colorScheme?: string;
+ setColorSchemeAndUnsavedChanges?: () => void;
+ onSubmit?: (params: Record<string, any>) => void;
+ addSuccessToast: (message: string) => void;
+ onlyApply?: boolean;
+};
+
+type Roles = { id: number; name: string }[];
+type Owners = {
+ id: number;
+ full_name?: string;
+ first_name?: string;
+ last_name?: string;
+}[];
+type DashboardInfo = {
+ id: number;
+ title: string;
+ slug: string;
+ certifiedBy: string;
+ certificationDetails: string;
+};
+
+const PropertiesModal = ({
+ addSuccessToast,
+ colorScheme: currentColorScheme,
+ dashboardId,
+ dashboardInfo: currentDashboardInfo,
+ dashboardTitle,
+ onHide = () => {},
+ onlyApply = false,
+ onSubmit = () => {},
+ show = false,
+}: PropertiesModalProps) => {
+ const [form] = Form.useForm();
+ const [isLoading, setIsLoading] = useState(false);
+ const [isAdvancedOpen, setIsAdvancedOpen] = useState(false);
+ const [colorScheme, setColorScheme] = useState(currentColorScheme);
+ const [jsonMetadata, setJsonMetadata] = useState('');
+ const [dashboardInfo, setDashboardInfo] = useState<DashboardInfo>();
+ const [owners, setOwners] = useState<Owners>([]);
+ const [roles, setRoles] = useState<Roles>([]);
+ const saveLabel = onlyApply ? t('Apply') : t('Save');
+
+ const handleErrorResponse = async (response: Response) => {
+ const { error, statusText, message } = await getClientErrorObject(response);
+ let errorText = error || statusText || t('An error has occurred');
+ if (typeof message === 'object' && 'json_metadata' in message) {
+ errorText = (message as { json_metadata: string }).json_metadata;
+ } else if (typeof message === 'string') {
+ errorText = message;
+
+ if (message === 'Forbidden') {
+ errorText = t('You do not have permission to edit this dashboard');
+ }
+ }
+
+ Modal.error({
+ title: 'Error',
+ content: errorText,
+ okButtonProps: { danger: true, className: 'btn-danger' },
+ });
+ };
+
+ const loadAccessOptions = useCallback(
+ (accessType = 'owners', input = '', page: number, pageSize: number) => {
+ const query = rison.encode({
+ filter: input,
+ page,
+ page_size: pageSize,
+ });
+ return SupersetClient.get({
+ endpoint: `/api/v1/dashboard/related/${accessType}?q=${query}`,
+ }).then(response => ({
+ data: response.json.result.map(
+ (item: { value: number; text: string }) => ({
+ value: item.value,
+ label: item.text,
+ }),
+ ),
+ totalCount: response.json.count,
+ }));
+ },
+ [],
+ );
+
+ const handleDashboardData = useCallback(
+ dashboardData => {
+ const {
+ id,
+ dashboard_title,
+ slug,
+ certified_by,
+ certification_details,
+ owners,
+ roles,
+ metadata,
+ } = dashboardData;
+ const dashboardInfo = {
+ id,
+ title: dashboard_title,
+ slug: slug || '',
+ certifiedBy: certified_by || '',
+ certificationDetails: certification_details || '',
+ };
+
+ form.setFieldsValue(dashboardInfo);
+ setDashboardInfo(dashboardInfo);
+ setJsonMetadata(metadata ? jsonStringify(metadata) : '');
+ setOwners(owners);
+ setRoles(roles);
+ setColorScheme(metadata.color_scheme);
+ },
+ [form],
+ );
+
+ const fetchDashboardDetails = useCallback(() => {
+ setIsLoading(true);
+ // We fetch the dashboard details because not all code
+ // that renders this component have all the values we need.
+ // At some point when we have a more consistent frontend
+ // datamodel, the dashboard could probably just be passed as a prop.
+ SupersetClient.get({
+ endpoint: `/api/v1/dashboard/${dashboardId}`,
+ }).then(response => {
+ const dashboard = response.json.result;
+ const jsonMetadataObj = dashboard.json_metadata?.length
+ ? JSON.parse(dashboard.json_metadata)
+ : {};
+
+ handleDashboardData({
+ ...dashboard,
+ metadata: jsonMetadataObj,
+ });
+
+ setIsLoading(false);
+ }, handleErrorResponse);
+ }, [dashboardId, handleDashboardData]);
+
+ const getJsonMetadata = () => {
+ try {
+ const jsonMetadataObj = jsonMetadata?.length
+ ? JSON.parse(jsonMetadata)
+ : {};
+ return jsonMetadataObj;
+ } catch (_) {
+ return {};
+ }
+ };
+
+ const handleOnChangeOwners = (owners: { value: number; label: string }[]) => {
+ const parsedOwners: Owners = ensureIsArray(owners).map(o => ({
+ id: o.value,
+ full_name: o.label,
+ }));
+ setOwners(parsedOwners);
+ };
+
+ const handleOnChangeRoles = (roles: { value: number; label: string }[]) => {
+ const parsedRoles: Roles = ensureIsArray(roles).map(r => ({
+ id: r.value,
+ name: r.label,
+ }));
+ setRoles(parsedRoles);
+ };
+
+ const handleOwnersSelectValue = () => {
+ const parsedOwners = (owners || []).map(
+ (owner: {
+ id: number;
+ first_name?: string;
+ last_name?: string;
+ full_name?: string;
+ }) => ({
+ value: owner.id,
+ label: owner.full_name || `${owner.first_name} ${owner.last_name}`,
+ }),
+ );
+ return parsedOwners;
+ };
+
+ const handleRolesSelectValue = () => {
+ const parsedRoles = (roles || []).map(
+ (role: { id: number; name: string }) => ({
+ value: role.id,
+ label: `${role.name}`,
+ }),
+ );
+ return parsedRoles;
+ };
+
+ const onColorSchemeChange = (
+ colorScheme?: string,
+ { updateMetadata = true } = {},
+ ) => {
+ // check that color_scheme is valid
+ const colorChoices = getCategoricalSchemeRegistry().keys();
+ const jsonMetadataObj = getJsonMetadata();
+
+ // only fire if the color_scheme is present and invalid
+ if (colorScheme && !colorChoices.includes(colorScheme)) {
+ Modal.error({
+ title: 'Error',
+ content: t('A valid color scheme is required'),
+ okButtonProps: { danger: true, className: 'btn-danger' },
+ });
+ throw new Error('A valid color scheme is required');
Review comment:
```suggestion
throw new Error('A valid color scheme is required');
```
Could use a `t()` here. Not blocking the PR for this!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] rusackas merged pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
rusackas merged pull request #17570:
URL: https://github.com/apache/superset/pull/17570
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8715b72) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **decrease** coverage by `0.15%`.
> The diff coverage is `60.00%`.
> :exclamation: Current head 8715b72 differs from pull request most recent head a1b6922. Consider uploading reports for the commit a1b6922 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.55% 68.40% -0.16%
==========================================
Files 1601 1602 +1
Lines 65271 65362 +91
Branches 6966 6992 +26
==========================================
- Hits 44745 44708 -37
- Misses 18636 18768 +132
+ Partials 1890 1886 -4
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `81.81% <97.77%> (+<0.01%)` | :arrow_up: |
| postgres | `81.82% <97.77%> (+<0.01%)` | :arrow_up: |
| presto | `?` | |
| python | `81.90% <97.77%> (-0.40%)` | :arrow_down: |
| sqlite | `81.50% <97.77%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.50% <ø> (-6.89%)` | :arrow_down: |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `35.33% <21.15%> (ø)` | |
| [...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL0ZpbHRlcnNDb25maWdGb3JtLnRzeA==) | `56.37% <37.50%> (+0.45%)` | :arrow_up: |
| [...src/filters/components/Range/RangeFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9SYW5nZS9SYW5nZUZpbHRlclBsdWdpbi50c3g=) | `74.56% <75.47%> (+19.17%)` | :arrow_up: |
| ... and [24 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...a1b6922](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (42ade6d) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **decrease** coverage by `0.17%`.
> The diff coverage is `54.90%`.
> :exclamation: Current head 42ade6d differs from pull request most recent head bc9b461. Consider uploading reports for the commit bc9b461 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.55% 68.37% -0.18%
==========================================
Files 1601 1601
Lines 65271 65285 +14
Branches 6966 6966
==========================================
- Hits 44745 44638 -107
- Misses 18636 18757 +121
Partials 1890 1890
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `81.81% <97.72%> (+<0.01%)` | :arrow_up: |
| postgres | `81.82% <97.72%> (+<0.01%)` | :arrow_up: |
| presto | `?` | |
| python | `81.90% <97.72%> (-0.40%)` | :arrow_down: |
| sqlite | `81.50% <97.72%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `35.33% <20.40%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <37.50%> (ø)` | |
| [superset/dashboards/dao.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9kYW8ucHk=) | `96.29% <97.29%> (+0.20%)` | :arrow_up: |
| [superset/dashboards/api.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9hcGkucHk=) | `91.89% <100.00%> (+0.02%)` | :arrow_up: |
| [superset/dashboards/commands/update.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy91cGRhdGUucHk=) | `83.82% <100.00%> (+0.74%)` | :arrow_up: |
| [superset/dashboards/schemas.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9zY2hlbWFzLnB5) | `99.41% <100.00%> (+<0.01%)` | :arrow_up: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `70.27% <0.00%> (-16.99%)` | :arrow_down: |
| ... and [11 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...bc9b461](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763784653
##########
File path: superset-frontend/src/dashboard/actions/dashboardState.js
##########
@@ -194,52 +196,176 @@ export function saveDashboardRequest(data, id, saveType) {
const serializedFilters = serializeActiveFilterValues(getActiveFilters());
// serialize filter scope for each filter field, grouped by filter id
const serializedFilterScopes = serializeFilterScopes(dashboardFilters);
+ const {
+ certified_by,
+ certification_details,
+ css,
+ dashboard_title,
+ owners,
+ roles,
+ slug,
+ } = data;
+
+ // making sure the data is what the backend expects
+ const cleanedData = {
+ ...data,
+ certified_by: certified_by || '',
+ certification_details:
+ certified_by && certification_details ? certification_details : '',
+ css: css || '',
+ dashboard_title: dashboard_title || t('[ untitled dashboard ]'),
+ owners: owners && owners.length ? owners.map(o => (o.id ? o.id : o)) : [],
+ roles: !isFeatureEnabled(FeatureFlag.DASHBOARD_RBAC)
+ ? undefined
+ : roles && roles.length
+ ? roles.map(r => (r.id ? r.id : r))
+ : [],
+ slug: slug || null,
+ metadata: {
+ ...data.metadata,
+ color_namespace: data.metadata?.color_namespace || undefined,
+ color_scheme: data.metadata?.color_scheme || '',
+ expanded_slices: data.metadata?.expanded_slices || {},
+ label_colors: data.metadata?.label_colors || {},
+ refresh_frequency: data.metadata?.refresh_frequency || 0,
+ timed_refresh_immune_slices:
+ data.metadata?.timed_refresh_immune_slices || [],
+ },
+ };
+
+ const handleChartConfiguration = () => {
+ const {
+ dashboardInfo: {
+ metadata: { chart_configuration = {} },
+ },
+ } = getState();
+ const chartConfiguration = Object.values(chart_configuration).reduce(
+ (prev, next) => {
+ // If chart removed from dashboard - remove it from metadata
+ if (
+ Object.values(layout).find(
+ layoutItem => layoutItem?.meta?.chartId === next.id,
+ )
+ ) {
+ return { ...prev, [next.id]: next };
+ }
+ return prev;
+ },
+ {},
+ );
+ return chartConfiguration;
+ };
+
+ const onCopySuccess = response => {
+ const lastModifiedTime = response.json.last_modified_time;
+ if (lastModifiedTime) {
+ dispatch(saveDashboardRequestSuccess(lastModifiedTime));
+ }
+ if (isFeatureEnabled(FeatureFlag.DASHBOARD_CROSS_FILTERS)) {
+ const chartConfiguration = handleChartConfiguration();
+ dispatch(setChartConfiguration(chartConfiguration));
+ }
+ dispatch(addSuccessToast(t('This dashboard was saved successfully.')));
+ return response;
+ };
+
+ const onUpdateSuccess = response => {
+ const updatedDashboard = response.json.result;
+ const lastModifiedTime = response.json.last_modified_time;
+ // synching with the backend transformations of the metadata
+ if (updatedDashboard.json_metadata) {
+ const metadata = JSON.parse(updatedDashboard.json_metadata);
+ dispatch(
+ dashboardInfoChanged({
+ metadata: JSON.parse(updatedDashboard.json_metadata),
Review comment:
Json metadata is already parsed in line 277 🙂
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a5c3bd1) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **decrease** coverage by `0.18%`.
> The diff coverage is `67.44%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.55% 68.37% -0.19%
==========================================
Files 1601 1602 +1
Lines 65271 65441 +170
Branches 6966 6999 +33
==========================================
- Hits 44745 44743 -2
- Misses 18636 18812 +176
+ Partials 1890 1886 -4
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `?` | |
| postgres | `81.83% <97.72%> (+0.01%)` | :arrow_up: |
| presto | `?` | |
| python | `81.87% <97.72%> (-0.44%)` | :arrow_down: |
| sqlite | `81.51% <97.72%> (+0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `51.16% <0.00%> (+1.16%)` | :arrow_up: |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `61.11% <37.50%> (+2.08%)` | :arrow_up: |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `37.12% <41.66%> (+1.78%)` | :arrow_up: |
| [...src/dashboard/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1Byb3BlcnRpZXNNb2RhbC9pbmRleC50c3g=) | `68.78% <68.78%> (ø)` | |
| [superset/dashboards/dao.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9kYW8ucHk=) | `96.29% <97.29%> (+0.20%)` | :arrow_up: |
| [superset/dashboards/api.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9hcGkucHk=) | `91.89% <100.00%> (+0.02%)` | :arrow_up: |
| [superset/dashboards/commands/update.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy91cGRhdGUucHk=) | `83.82% <100.00%> (+0.74%)` | :arrow_up: |
| [superset/dashboards/schemas.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9zY2hlbWFzLnB5) | `99.41% <100.00%> (+<0.01%)` | :arrow_up: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
| ... and [25 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...a5c3bd1](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763794313
##########
File path: superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
##########
@@ -0,0 +1,609 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { useCallback, useEffect, useMemo, useState } from 'react';
+import { Form, Row, Col, Input } from 'src/common/components';
+import { FormItem } from 'src/components/Form';
+import jsonStringify from 'json-stringify-pretty-compact';
+import Button from 'src/components/Button';
+import { Select } from 'src/components';
+import rison from 'rison';
+import {
+ styled,
+ t,
+ SupersetClient,
+ getCategoricalSchemeRegistry,
+} from '@superset-ui/core';
+
+import Modal from 'src/components/Modal';
+import { JsonEditor } from 'src/components/AsyncAceEditor';
+
+import ColorSchemeControlWrapper from 'src/dashboard/components/ColorSchemeControlWrapper';
+import { getClientErrorObject } from 'src/utils/getClientErrorObject';
+import withToasts from 'src/components/MessageToasts/withToasts';
+import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
+
+const StyledFormItem = styled(FormItem)`
+ margin-bottom: 0;
+`;
+
+const StyledJsonEditor = styled(JsonEditor)`
+ border-radius: ${({ theme }) => theme.borderRadius}px;
+ border: 1px solid ${({ theme }) => theme.colors.secondary.light2};
+`;
+
+type PropertiesModalProps = {
+ dashboardId: number;
+ dashboardTitle?: string;
+ dashboardInfo?: Record<string, any>;
+ show?: boolean;
+ onHide?: () => void;
+ colorScheme?: string;
+ setColorSchemeAndUnsavedChanges?: () => void;
+ onSubmit?: (params: Record<string, any>) => void;
+ addSuccessToast: (message: string) => void;
+ onlyApply?: boolean;
+};
+
+type Roles = { id: number; name: string }[];
+type Owners = {
+ id: number;
+ full_name?: string;
+ first_name?: string;
+ last_name?: string;
+}[];
+type DashboardInfo = {
+ id: number;
+ title: string;
+ slug: string;
+ certifiedBy: string;
+ certificationDetails: string;
+};
+
+const PropertiesModal = ({
+ addSuccessToast,
+ colorScheme: currentColorScheme,
+ dashboardId,
+ dashboardInfo: currentDashboardInfo,
+ dashboardTitle,
+ onHide = () => {},
+ onlyApply = false,
+ onSubmit = () => {},
+ show = false,
+}: PropertiesModalProps) => {
+ const [form] = Form.useForm();
+ const [isLoading, setIsLoading] = useState(false);
+ const [isAdvancedOpen, setIsAdvancedOpen] = useState(false);
+ const [colorScheme, setColorScheme] = useState(currentColorScheme);
+ const [jsonMetadata, setJsonMetadata] = useState('');
+ const [dashboardInfo, setDashboardInfo] = useState<DashboardInfo>();
+ const [owners, setOwners] = useState<Owners>([]);
+ const [roles, setRoles] = useState<Roles>([]);
+ const saveLabel = onlyApply ? t('Apply') : t('Save');
+
+ const handleErrorResponse = async (response: Response) => {
+ const { error, statusText, message } = await getClientErrorObject(response);
+ let errorText = error || statusText || t('An error has occurred');
+ if (typeof message === 'object' && 'json_metadata' in message) {
+ errorText = (message as { json_metadata: string }).json_metadata;
+ } else if (typeof message === 'string') {
+ errorText = message;
+
+ if (message === 'Forbidden') {
+ errorText = t('You do not have permission to edit this dashboard');
+ }
+ }
+
+ Modal.error({
+ title: 'Error',
+ content: errorText,
+ okButtonProps: { danger: true, className: 'btn-danger' },
+ });
+ };
+
+ const loadAccessOptions = useMemo(
+ () =>
+ (accessType = 'owners', input = '', page: number, pageSize: number) => {
+ const query = rison.encode({
+ filter: input,
+ page,
+ page_size: pageSize,
+ });
+ return SupersetClient.get({
+ endpoint: `/api/v1/dashboard/related/${accessType}?q=${query}`,
+ }).then(response => ({
+ data: response.json.result.map(
+ (item: { value: number; text: string }) => ({
+ value: item.value,
+ label: item.text,
+ }),
+ ),
+ totalCount: response.json.count,
+ }));
+ },
+ [],
+ );
+
+ const handleDashboardData = useCallback(
+ dashboardData => {
+ const {
+ id,
+ dashboard_title,
+ slug,
+ certified_by,
+ certification_details,
+ owners,
+ roles,
+ metadata,
+ } = dashboardData;
+ const dashboardInfo = {
+ id,
+ title: dashboard_title,
+ slug: slug || '',
+ certifiedBy: certified_by || '',
+ certificationDetails: certification_details || '',
+ };
+
+ form.setFieldsValue(dashboardInfo);
+ setDashboardInfo(dashboardInfo);
+ setJsonMetadata(metadata ? jsonStringify(metadata) : '');
+ setOwners(owners);
+ setRoles(roles);
+ setColorScheme(metadata.color_scheme);
+ },
+ [form],
+ );
+
+ const fetchDashboardDetails = useCallback(() => {
+ setIsLoading(true);
+ // We fetch the dashboard details because not all code
+ // that renders this component have all the values we need.
+ // At some point when we have a more consistent frontend
+ // datamodel, the dashboard could probably just be passed as a prop.
+ SupersetClient.get({
+ endpoint: `/api/v1/dashboard/${dashboardId}`,
+ }).then(response => {
+ const dashboard = response.json.result;
+ const jsonMetadataObj = dashboard.json_metadata?.length
+ ? JSON.parse(dashboard.json_metadata)
+ : {};
+
+ handleDashboardData({
+ ...dashboard,
+ metadata: jsonMetadataObj,
+ });
+
+ setIsLoading(false);
+ }, handleErrorResponse);
+ }, [dashboardId, handleDashboardData]);
+
+ const getJsonMetadata = () => {
+ try {
+ const jsonMetadataObj = jsonMetadata?.length
+ ? JSON.parse(jsonMetadata)
+ : {};
+ return jsonMetadataObj;
+ } catch (_) {
+ return {};
+ }
+ };
+
+ const handleOnChangeOwners = (owners: { value: number; label: string }[]) => {
+ let parsedOwners: Owners = [];
+ if (owners && owners.length) {
+ parsedOwners = owners.map(o => ({
Review comment:
`ensureIsArray(owners)
##########
File path: superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
##########
@@ -0,0 +1,609 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { useCallback, useEffect, useMemo, useState } from 'react';
+import { Form, Row, Col, Input } from 'src/common/components';
+import { FormItem } from 'src/components/Form';
+import jsonStringify from 'json-stringify-pretty-compact';
+import Button from 'src/components/Button';
+import { Select } from 'src/components';
+import rison from 'rison';
+import {
+ styled,
+ t,
+ SupersetClient,
+ getCategoricalSchemeRegistry,
+} from '@superset-ui/core';
+
+import Modal from 'src/components/Modal';
+import { JsonEditor } from 'src/components/AsyncAceEditor';
+
+import ColorSchemeControlWrapper from 'src/dashboard/components/ColorSchemeControlWrapper';
+import { getClientErrorObject } from 'src/utils/getClientErrorObject';
+import withToasts from 'src/components/MessageToasts/withToasts';
+import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
+
+const StyledFormItem = styled(FormItem)`
+ margin-bottom: 0;
+`;
+
+const StyledJsonEditor = styled(JsonEditor)`
+ border-radius: ${({ theme }) => theme.borderRadius}px;
+ border: 1px solid ${({ theme }) => theme.colors.secondary.light2};
+`;
+
+type PropertiesModalProps = {
+ dashboardId: number;
+ dashboardTitle?: string;
+ dashboardInfo?: Record<string, any>;
+ show?: boolean;
+ onHide?: () => void;
+ colorScheme?: string;
+ setColorSchemeAndUnsavedChanges?: () => void;
+ onSubmit?: (params: Record<string, any>) => void;
+ addSuccessToast: (message: string) => void;
+ onlyApply?: boolean;
+};
+
+type Roles = { id: number; name: string }[];
+type Owners = {
+ id: number;
+ full_name?: string;
+ first_name?: string;
+ last_name?: string;
+}[];
+type DashboardInfo = {
+ id: number;
+ title: string;
+ slug: string;
+ certifiedBy: string;
+ certificationDetails: string;
+};
+
+const PropertiesModal = ({
+ addSuccessToast,
+ colorScheme: currentColorScheme,
+ dashboardId,
+ dashboardInfo: currentDashboardInfo,
+ dashboardTitle,
+ onHide = () => {},
+ onlyApply = false,
+ onSubmit = () => {},
+ show = false,
+}: PropertiesModalProps) => {
+ const [form] = Form.useForm();
+ const [isLoading, setIsLoading] = useState(false);
+ const [isAdvancedOpen, setIsAdvancedOpen] = useState(false);
+ const [colorScheme, setColorScheme] = useState(currentColorScheme);
+ const [jsonMetadata, setJsonMetadata] = useState('');
+ const [dashboardInfo, setDashboardInfo] = useState<DashboardInfo>();
+ const [owners, setOwners] = useState<Owners>([]);
+ const [roles, setRoles] = useState<Roles>([]);
+ const saveLabel = onlyApply ? t('Apply') : t('Save');
+
+ const handleErrorResponse = async (response: Response) => {
+ const { error, statusText, message } = await getClientErrorObject(response);
+ let errorText = error || statusText || t('An error has occurred');
+ if (typeof message === 'object' && 'json_metadata' in message) {
+ errorText = (message as { json_metadata: string }).json_metadata;
+ } else if (typeof message === 'string') {
+ errorText = message;
+
+ if (message === 'Forbidden') {
+ errorText = t('You do not have permission to edit this dashboard');
+ }
+ }
+
+ Modal.error({
+ title: 'Error',
+ content: errorText,
+ okButtonProps: { danger: true, className: 'btn-danger' },
+ });
+ };
+
+ const loadAccessOptions = useMemo(
+ () =>
+ (accessType = 'owners', input = '', page: number, pageSize: number) => {
+ const query = rison.encode({
+ filter: input,
+ page,
+ page_size: pageSize,
+ });
+ return SupersetClient.get({
+ endpoint: `/api/v1/dashboard/related/${accessType}?q=${query}`,
+ }).then(response => ({
+ data: response.json.result.map(
+ (item: { value: number; text: string }) => ({
+ value: item.value,
+ label: item.text,
+ }),
+ ),
+ totalCount: response.json.count,
+ }));
+ },
+ [],
+ );
+
+ const handleDashboardData = useCallback(
+ dashboardData => {
+ const {
+ id,
+ dashboard_title,
+ slug,
+ certified_by,
+ certification_details,
+ owners,
+ roles,
+ metadata,
+ } = dashboardData;
+ const dashboardInfo = {
+ id,
+ title: dashboard_title,
+ slug: slug || '',
+ certifiedBy: certified_by || '',
+ certificationDetails: certification_details || '',
+ };
+
+ form.setFieldsValue(dashboardInfo);
+ setDashboardInfo(dashboardInfo);
+ setJsonMetadata(metadata ? jsonStringify(metadata) : '');
+ setOwners(owners);
+ setRoles(roles);
+ setColorScheme(metadata.color_scheme);
+ },
+ [form],
+ );
+
+ const fetchDashboardDetails = useCallback(() => {
+ setIsLoading(true);
+ // We fetch the dashboard details because not all code
+ // that renders this component have all the values we need.
+ // At some point when we have a more consistent frontend
+ // datamodel, the dashboard could probably just be passed as a prop.
+ SupersetClient.get({
+ endpoint: `/api/v1/dashboard/${dashboardId}`,
+ }).then(response => {
+ const dashboard = response.json.result;
+ const jsonMetadataObj = dashboard.json_metadata?.length
+ ? JSON.parse(dashboard.json_metadata)
+ : {};
+
+ handleDashboardData({
+ ...dashboard,
+ metadata: jsonMetadataObj,
+ });
+
+ setIsLoading(false);
+ }, handleErrorResponse);
+ }, [dashboardId, handleDashboardData]);
+
+ const getJsonMetadata = () => {
+ try {
+ const jsonMetadataObj = jsonMetadata?.length
+ ? JSON.parse(jsonMetadata)
+ : {};
+ return jsonMetadataObj;
+ } catch (_) {
+ return {};
+ }
+ };
+
+ const handleOnChangeOwners = (owners: { value: number; label: string }[]) => {
+ let parsedOwners: Owners = [];
+ if (owners && owners.length) {
+ parsedOwners = owners.map(o => ({
Review comment:
`ensureIsArray(owners)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763794849
##########
File path: superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
##########
@@ -0,0 +1,609 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { useCallback, useEffect, useMemo, useState } from 'react';
+import { Form, Row, Col, Input } from 'src/common/components';
+import { FormItem } from 'src/components/Form';
+import jsonStringify from 'json-stringify-pretty-compact';
+import Button from 'src/components/Button';
+import { Select } from 'src/components';
+import rison from 'rison';
+import {
+ styled,
+ t,
+ SupersetClient,
+ getCategoricalSchemeRegistry,
+} from '@superset-ui/core';
+
+import Modal from 'src/components/Modal';
+import { JsonEditor } from 'src/components/AsyncAceEditor';
+
+import ColorSchemeControlWrapper from 'src/dashboard/components/ColorSchemeControlWrapper';
+import { getClientErrorObject } from 'src/utils/getClientErrorObject';
+import withToasts from 'src/components/MessageToasts/withToasts';
+import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
+
+const StyledFormItem = styled(FormItem)`
+ margin-bottom: 0;
+`;
+
+const StyledJsonEditor = styled(JsonEditor)`
+ border-radius: ${({ theme }) => theme.borderRadius}px;
+ border: 1px solid ${({ theme }) => theme.colors.secondary.light2};
+`;
+
+type PropertiesModalProps = {
+ dashboardId: number;
+ dashboardTitle?: string;
+ dashboardInfo?: Record<string, any>;
+ show?: boolean;
+ onHide?: () => void;
+ colorScheme?: string;
+ setColorSchemeAndUnsavedChanges?: () => void;
+ onSubmit?: (params: Record<string, any>) => void;
+ addSuccessToast: (message: string) => void;
+ onlyApply?: boolean;
+};
+
+type Roles = { id: number; name: string }[];
+type Owners = {
+ id: number;
+ full_name?: string;
+ first_name?: string;
+ last_name?: string;
+}[];
+type DashboardInfo = {
+ id: number;
+ title: string;
+ slug: string;
+ certifiedBy: string;
+ certificationDetails: string;
+};
+
+const PropertiesModal = ({
+ addSuccessToast,
+ colorScheme: currentColorScheme,
+ dashboardId,
+ dashboardInfo: currentDashboardInfo,
+ dashboardTitle,
+ onHide = () => {},
+ onlyApply = false,
+ onSubmit = () => {},
+ show = false,
+}: PropertiesModalProps) => {
+ const [form] = Form.useForm();
+ const [isLoading, setIsLoading] = useState(false);
+ const [isAdvancedOpen, setIsAdvancedOpen] = useState(false);
+ const [colorScheme, setColorScheme] = useState(currentColorScheme);
+ const [jsonMetadata, setJsonMetadata] = useState('');
+ const [dashboardInfo, setDashboardInfo] = useState<DashboardInfo>();
+ const [owners, setOwners] = useState<Owners>([]);
+ const [roles, setRoles] = useState<Roles>([]);
+ const saveLabel = onlyApply ? t('Apply') : t('Save');
+
+ const handleErrorResponse = async (response: Response) => {
+ const { error, statusText, message } = await getClientErrorObject(response);
+ let errorText = error || statusText || t('An error has occurred');
+ if (typeof message === 'object' && 'json_metadata' in message) {
+ errorText = (message as { json_metadata: string }).json_metadata;
+ } else if (typeof message === 'string') {
+ errorText = message;
+
+ if (message === 'Forbidden') {
+ errorText = t('You do not have permission to edit this dashboard');
+ }
+ }
+
+ Modal.error({
+ title: 'Error',
+ content: errorText,
+ okButtonProps: { danger: true, className: 'btn-danger' },
+ });
+ };
+
+ const loadAccessOptions = useMemo(
+ () =>
+ (accessType = 'owners', input = '', page: number, pageSize: number) => {
+ const query = rison.encode({
+ filter: input,
+ page,
+ page_size: pageSize,
+ });
+ return SupersetClient.get({
+ endpoint: `/api/v1/dashboard/related/${accessType}?q=${query}`,
+ }).then(response => ({
+ data: response.json.result.map(
+ (item: { value: number; text: string }) => ({
+ value: item.value,
+ label: item.text,
+ }),
+ ),
+ totalCount: response.json.count,
+ }));
+ },
+ [],
+ );
+
+ const handleDashboardData = useCallback(
+ dashboardData => {
+ const {
+ id,
+ dashboard_title,
+ slug,
+ certified_by,
+ certification_details,
+ owners,
+ roles,
+ metadata,
+ } = dashboardData;
+ const dashboardInfo = {
+ id,
+ title: dashboard_title,
+ slug: slug || '',
+ certifiedBy: certified_by || '',
+ certificationDetails: certification_details || '',
+ };
+
+ form.setFieldsValue(dashboardInfo);
+ setDashboardInfo(dashboardInfo);
+ setJsonMetadata(metadata ? jsonStringify(metadata) : '');
+ setOwners(owners);
+ setRoles(roles);
+ setColorScheme(metadata.color_scheme);
+ },
+ [form],
+ );
+
+ const fetchDashboardDetails = useCallback(() => {
+ setIsLoading(true);
+ // We fetch the dashboard details because not all code
+ // that renders this component have all the values we need.
+ // At some point when we have a more consistent frontend
+ // datamodel, the dashboard could probably just be passed as a prop.
+ SupersetClient.get({
+ endpoint: `/api/v1/dashboard/${dashboardId}`,
+ }).then(response => {
+ const dashboard = response.json.result;
+ const jsonMetadataObj = dashboard.json_metadata?.length
+ ? JSON.parse(dashboard.json_metadata)
+ : {};
+
+ handleDashboardData({
+ ...dashboard,
+ metadata: jsonMetadataObj,
+ });
+
+ setIsLoading(false);
+ }, handleErrorResponse);
+ }, [dashboardId, handleDashboardData]);
+
+ const getJsonMetadata = () => {
+ try {
+ const jsonMetadataObj = jsonMetadata?.length
+ ? JSON.parse(jsonMetadata)
+ : {};
+ return jsonMetadataObj;
+ } catch (_) {
+ return {};
+ }
+ };
+
+ const handleOnChangeOwners = (owners: { value: number; label: string }[]) => {
+ let parsedOwners: Owners = [];
+ if (owners && owners.length) {
+ parsedOwners = owners.map(o => ({
+ id: o.value,
+ full_name: o.label,
+ }));
+ }
+ setOwners(parsedOwners);
+ };
+
+ const handleOnChangeRoles = (roles: { value: number; label: string }[]) => {
+ let parsedRoles: Roles = [];
+ if (roles && roles.length) {
Review comment:
`ensureIsArray`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] rusackas commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r765981621
##########
File path: superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
##########
@@ -0,0 +1,603 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { useCallback, useEffect, useState } from 'react';
+import { Form, Row, Col, Input } from 'src/common/components';
+import { FormItem } from 'src/components/Form';
+import jsonStringify from 'json-stringify-pretty-compact';
+import Button from 'src/components/Button';
+import { Select } from 'src/components';
+import rison from 'rison';
+import {
+ styled,
+ t,
+ SupersetClient,
+ getCategoricalSchemeRegistry,
+ ensureIsArray,
+} from '@superset-ui/core';
+
+import Modal from 'src/components/Modal';
+import { JsonEditor } from 'src/components/AsyncAceEditor';
+
+import ColorSchemeControlWrapper from 'src/dashboard/components/ColorSchemeControlWrapper';
+import { getClientErrorObject } from 'src/utils/getClientErrorObject';
+import withToasts from 'src/components/MessageToasts/withToasts';
+import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
+
+const StyledFormItem = styled(FormItem)`
+ margin-bottom: 0;
+`;
+
+const StyledJsonEditor = styled(JsonEditor)`
+ border-radius: ${({ theme }) => theme.borderRadius}px;
+ border: 1px solid ${({ theme }) => theme.colors.secondary.light2};
+`;
+
+type PropertiesModalProps = {
+ dashboardId: number;
+ dashboardTitle?: string;
+ dashboardInfo?: Record<string, any>;
+ show?: boolean;
+ onHide?: () => void;
+ colorScheme?: string;
+ setColorSchemeAndUnsavedChanges?: () => void;
+ onSubmit?: (params: Record<string, any>) => void;
+ addSuccessToast: (message: string) => void;
+ onlyApply?: boolean;
+};
+
+type Roles = { id: number; name: string }[];
+type Owners = {
+ id: number;
+ full_name?: string;
+ first_name?: string;
+ last_name?: string;
+}[];
+type DashboardInfo = {
+ id: number;
+ title: string;
+ slug: string;
+ certifiedBy: string;
+ certificationDetails: string;
+};
+
+const PropertiesModal = ({
+ addSuccessToast,
+ colorScheme: currentColorScheme,
+ dashboardId,
+ dashboardInfo: currentDashboardInfo,
+ dashboardTitle,
+ onHide = () => {},
+ onlyApply = false,
+ onSubmit = () => {},
+ show = false,
+}: PropertiesModalProps) => {
+ const [form] = Form.useForm();
+ const [isLoading, setIsLoading] = useState(false);
+ const [isAdvancedOpen, setIsAdvancedOpen] = useState(false);
+ const [colorScheme, setColorScheme] = useState(currentColorScheme);
+ const [jsonMetadata, setJsonMetadata] = useState('');
+ const [dashboardInfo, setDashboardInfo] = useState<DashboardInfo>();
+ const [owners, setOwners] = useState<Owners>([]);
+ const [roles, setRoles] = useState<Roles>([]);
+ const saveLabel = onlyApply ? t('Apply') : t('Save');
+
+ const handleErrorResponse = async (response: Response) => {
+ const { error, statusText, message } = await getClientErrorObject(response);
+ let errorText = error || statusText || t('An error has occurred');
+ if (typeof message === 'object' && 'json_metadata' in message) {
+ errorText = (message as { json_metadata: string }).json_metadata;
+ } else if (typeof message === 'string') {
+ errorText = message;
+
+ if (message === 'Forbidden') {
+ errorText = t('You do not have permission to edit this dashboard');
+ }
+ }
+
+ Modal.error({
+ title: 'Error',
+ content: errorText,
+ okButtonProps: { danger: true, className: 'btn-danger' },
+ });
+ };
+
+ const loadAccessOptions = useCallback(
+ (accessType = 'owners', input = '', page: number, pageSize: number) => {
+ const query = rison.encode({
+ filter: input,
+ page,
+ page_size: pageSize,
+ });
+ return SupersetClient.get({
+ endpoint: `/api/v1/dashboard/related/${accessType}?q=${query}`,
+ }).then(response => ({
+ data: response.json.result.map(
+ (item: { value: number; text: string }) => ({
+ value: item.value,
+ label: item.text,
+ }),
+ ),
+ totalCount: response.json.count,
+ }));
+ },
+ [],
+ );
+
+ const handleDashboardData = useCallback(
+ dashboardData => {
+ const {
+ id,
+ dashboard_title,
+ slug,
+ certified_by,
+ certification_details,
+ owners,
+ roles,
+ metadata,
+ } = dashboardData;
+ const dashboardInfo = {
+ id,
+ title: dashboard_title,
+ slug: slug || '',
+ certifiedBy: certified_by || '',
+ certificationDetails: certification_details || '',
+ };
+
+ form.setFieldsValue(dashboardInfo);
+ setDashboardInfo(dashboardInfo);
+ setJsonMetadata(metadata ? jsonStringify(metadata) : '');
+ setOwners(owners);
+ setRoles(roles);
+ setColorScheme(metadata.color_scheme);
+ },
+ [form],
+ );
+
+ const fetchDashboardDetails = useCallback(() => {
+ setIsLoading(true);
+ // We fetch the dashboard details because not all code
+ // that renders this component have all the values we need.
+ // At some point when we have a more consistent frontend
+ // datamodel, the dashboard could probably just be passed as a prop.
+ SupersetClient.get({
+ endpoint: `/api/v1/dashboard/${dashboardId}`,
+ }).then(response => {
+ const dashboard = response.json.result;
+ const jsonMetadataObj = dashboard.json_metadata?.length
+ ? JSON.parse(dashboard.json_metadata)
+ : {};
+
+ handleDashboardData({
+ ...dashboard,
+ metadata: jsonMetadataObj,
+ });
+
+ setIsLoading(false);
+ }, handleErrorResponse);
+ }, [dashboardId, handleDashboardData]);
+
+ const getJsonMetadata = () => {
+ try {
+ const jsonMetadataObj = jsonMetadata?.length
+ ? JSON.parse(jsonMetadata)
+ : {};
+ return jsonMetadataObj;
+ } catch (_) {
+ return {};
+ }
+ };
+
+ const handleOnChangeOwners = (owners: { value: number; label: string }[]) => {
+ const parsedOwners: Owners = ensureIsArray(owners).map(o => ({
+ id: o.value,
+ full_name: o.label,
+ }));
+ setOwners(parsedOwners);
+ };
+
+ const handleOnChangeRoles = (roles: { value: number; label: string }[]) => {
+ const parsedRoles: Roles = ensureIsArray(roles).map(r => ({
+ id: r.value,
+ name: r.label,
+ }));
+ setRoles(parsedRoles);
+ };
+
+ const handleOwnersSelectValue = () => {
+ const parsedOwners = (owners || []).map(
+ (owner: {
+ id: number;
+ first_name?: string;
+ last_name?: string;
+ full_name?: string;
+ }) => ({
+ value: owner.id,
+ label: owner.full_name || `${owner.first_name} ${owner.last_name}`,
+ }),
+ );
+ return parsedOwners;
+ };
+
+ const handleRolesSelectValue = () => {
+ const parsedRoles = (roles || []).map(
+ (role: { id: number; name: string }) => ({
+ value: role.id,
+ label: `${role.name}`,
+ }),
+ );
+ return parsedRoles;
+ };
+
+ const onColorSchemeChange = (
+ colorScheme?: string,
+ { updateMetadata = true } = {},
+ ) => {
+ // check that color_scheme is valid
+ const colorChoices = getCategoricalSchemeRegistry().keys();
+ const jsonMetadataObj = getJsonMetadata();
+
+ // only fire if the color_scheme is present and invalid
+ if (colorScheme && !colorChoices.includes(colorScheme)) {
+ Modal.error({
+ title: 'Error',
+ content: t('A valid color scheme is required'),
+ okButtonProps: { danger: true, className: 'btn-danger' },
+ });
+ throw new Error('A valid color scheme is required');
Review comment:
```suggestion
throw new Error(t('A valid color scheme is required'));
```
Could use a `t()` here. Not blocking the PR for this!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (aed13fc) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **increase** coverage by `0.03%`.
> The diff coverage is `66.92%`.
> :exclamation: Current head aed13fc differs from pull request most recent head bc908a8. Consider uploading reports for the commit bc908a8 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
+ Coverage 68.55% 68.58% +0.03%
==========================================
Files 1601 1596 -5
Lines 65271 65234 -37
Branches 6966 6949 -17
==========================================
- Hits 44745 44741 -4
+ Misses 18636 18610 -26
+ Partials 1890 1883 -7
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `81.82% <95.83%> (+0.01%)` | :arrow_up: |
| postgres | `81.83% <95.83%> (+0.01%)` | :arrow_up: |
| presto | `?` | |
| python | `81.91% <95.83%> (-0.39%)` | :arrow_down: |
| sqlite | `81.51% <95.83%> (+0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...es/superset-ui-core/src/query/buildQueryContext.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvYnVpbGRRdWVyeUNvbnRleHQudHM=) | `100.00% <ø> (ø)` | |
| [...packages/superset-ui-core/src/query/types/Query.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvdHlwZXMvUXVlcnkudHM=) | `100.00% <ø> (ø)` | |
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...end/src/visualizations/TimeTable/SparklineCell.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9TcGFya2xpbmVDZWxsLnRzeA==) | `0.00% <ø> (ø)` | |
| [...c/visualizations/TimeTable/TimeTableChartPlugin.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9UaW1lVGFibGVDaGFydFBsdWdpbi50cw==) | `71.42% <ø> (ø)` | |
| ... and [45 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...bc908a8](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (183cce7) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **increase** coverage by `0.02%`.
> The diff coverage is `60.00%`.
> :exclamation: Current head 183cce7 differs from pull request most recent head a1b6922. Consider uploading reports for the commit a1b6922 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
+ Coverage 68.55% 68.57% +0.02%
==========================================
Files 1601 1602 +1
Lines 65271 65362 +91
Branches 6966 6992 +26
==========================================
+ Hits 44745 44824 +79
- Misses 18636 18652 +16
+ Partials 1890 1886 -4
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `81.39% <97.77%> (+<0.01%)` | :arrow_up: |
| mysql | `81.81% <97.77%> (+<0.01%)` | :arrow_up: |
| postgres | `81.81% <97.77%> (-0.01%)` | :arrow_down: |
| presto | `81.68% <97.77%> (+<0.01%)` | :arrow_up: |
| python | `82.29% <97.77%> (-0.01%)` | :arrow_down: |
| sqlite | `81.50% <97.77%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `89.97% <ø> (-0.42%)` | :arrow_down: |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `35.33% <21.15%> (ø)` | |
| [...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL0ZpbHRlcnNDb25maWdGb3JtLnRzeA==) | `56.37% <37.50%> (+0.45%)` | :arrow_up: |
| [...src/filters/components/Range/RangeFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9SYW5nZS9SYW5nZUZpbHRlclBsdWdpbi50c3g=) | `74.56% <75.47%> (+19.17%)` | :arrow_up: |
| ... and [20 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...a1b6922](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763778818
##########
File path: superset-frontend/src/dashboard/actions/dashboardState.js
##########
@@ -194,52 +196,176 @@ export function saveDashboardRequest(data, id, saveType) {
const serializedFilters = serializeActiveFilterValues(getActiveFilters());
// serialize filter scope for each filter field, grouped by filter id
const serializedFilterScopes = serializeFilterScopes(dashboardFilters);
+ const {
+ certified_by,
+ certification_details,
+ css,
+ dashboard_title,
+ owners,
+ roles,
+ slug,
+ } = data;
+
+ // making sure the data is what the backend expects
+ const cleanedData = {
+ ...data,
+ certified_by: certified_by || '',
+ certification_details:
+ certified_by && certification_details ? certification_details : '',
+ css: css || '',
+ dashboard_title: dashboard_title || t('[ untitled dashboard ]'),
+ owners: owners && owners.length ? owners.map(o => (o.id ? o.id : o)) : [],
Review comment:
`owners && owners.length ? owners.map(o => (o.id ? o.id : o)) : []` -> `ensureIsArray(owners).map(o => (o.id ? o.id : o))`
`owners.map(o => (o.id ? o.id : o))` - I assume that means that owner can either be a string or an object with id? Maybe we could use a type guard to make it a bit clearer?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] rusackas commented on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
rusackas commented on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-989140361
/testenv up
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] github-actions[bot] commented on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-990042800
Ephemeral environment shutdown and build artifacts deleted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763771279
##########
File path: superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx
##########
@@ -59,7 +59,8 @@ fetchMock.get('glob:*/api/v1/dashboard/*', {
},
});
-describe('PropertiesModal', () => {
+// all these tests need to be moved to dashboard/components/PropertiesModal/PropertiesModal.test.tsx
+describe.skip('PropertiesModal', () => {
Review comment:
I hate those enzyme tests, great to see them go one by one
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763770619
##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/save.test.js
##########
@@ -71,28 +71,26 @@ describe('Dashboard save action', () => {
cy.get('[aria-label="edit-alt"]').click({ timeout: 5000 });
cy.get('[data-test="dashboard-delete-component-button"]')
.last()
- .trigger('moustenter')
Review comment:
How on earth did that work 🤦
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e87ea22) into [master](https://codecov.io/gh/apache/superset/commit/8c25f2f356e488120d7ce3ff852a4b6b9a049b3b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8c25f2f) will **decrease** coverage by `0.05%`.
> The diff coverage is `54.20%`.
> :exclamation: Current head e87ea22 differs from pull request most recent head 9bb937e. Consider uploading reports for the commit 9bb937e to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.86% 68.80% -0.06%
==========================================
Files 1598 1597 -1
Lines 65297 65264 -33
Branches 6952 6950 -2
==========================================
- Hits 44966 44906 -60
- Misses 18446 18473 +27
Partials 1885 1885
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `82.11% <97.72%> (?)` | |
| postgres | `82.12% <97.72%> (-0.03%)` | :arrow_down: |
| presto | `81.99% <97.72%> (?)` | |
| python | `82.35% <97.72%> (-0.10%)` | :arrow_down: |
| sqlite | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `35.33% <26.31%> (ø)` | |
| [superset/dashboards/dao.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9kYW8ucHk=) | `96.29% <97.29%> (+0.20%)` | :arrow_up: |
| [superset/dashboards/api.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9hcGkucHk=) | `91.89% <100.00%> (+0.02%)` | :arrow_up: |
| [superset/dashboards/commands/update.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy91cGRhdGUucHk=) | `83.82% <100.00%> (+0.74%)` | :arrow_up: |
| [superset/dashboards/schemas.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9zY2hlbWFzLnB5) | `99.41% <100.00%> (+<0.01%)` | :arrow_up: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `70.27% <0.00%> (-16.99%)` | :arrow_down: |
| ... and [25 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8c25f2f...9bb937e](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8da49ba) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **increase** coverage by `0.03%`.
> The diff coverage is `66.92%`.
> :exclamation: Current head 8da49ba differs from pull request most recent head bc908a8. Consider uploading reports for the commit bc908a8 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
+ Coverage 68.55% 68.58% +0.03%
==========================================
Files 1601 1596 -5
Lines 65271 65234 -37
Branches 6966 6949 -17
==========================================
- Hits 44745 44741 -4
+ Misses 18636 18610 -26
+ Partials 1890 1883 -7
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `81.82% <95.83%> (+0.01%)` | :arrow_up: |
| postgres | `81.83% <95.83%> (+0.01%)` | :arrow_up: |
| presto | `?` | |
| python | `81.91% <95.83%> (-0.39%)` | :arrow_down: |
| sqlite | `81.51% <95.83%> (+0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...es/superset-ui-core/src/query/buildQueryContext.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvYnVpbGRRdWVyeUNvbnRleHQudHM=) | `100.00% <ø> (ø)` | |
| [...packages/superset-ui-core/src/query/types/Query.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvdHlwZXMvUXVlcnkudHM=) | `100.00% <ø> (ø)` | |
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...end/src/visualizations/TimeTable/SparklineCell.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9TcGFya2xpbmVDZWxsLnRzeA==) | `0.00% <ø> (ø)` | |
| [...c/visualizations/TimeTable/TimeTableChartPlugin.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9UaW1lVGFibGVDaGFydFBsdWdpbi50cw==) | `71.42% <ø> (ø)` | |
| ... and [45 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...bc908a8](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (239cb77) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **increase** coverage by `0.03%`.
> The diff coverage is `66.92%`.
> :exclamation: Current head 239cb77 differs from pull request most recent head df8fe9f. Consider uploading reports for the commit df8fe9f to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
+ Coverage 68.55% 68.58% +0.03%
==========================================
Files 1601 1596 -5
Lines 65271 65234 -37
Branches 6966 6949 -17
==========================================
- Hits 44745 44741 -4
+ Misses 18636 18610 -26
+ Partials 1890 1883 -7
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `81.82% <95.83%> (+0.01%)` | :arrow_up: |
| postgres | `81.83% <95.83%> (+0.01%)` | :arrow_up: |
| presto | `?` | |
| python | `81.91% <95.83%> (-0.39%)` | :arrow_down: |
| sqlite | `81.51% <95.83%> (+0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...es/superset-ui-core/src/query/buildQueryContext.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvYnVpbGRRdWVyeUNvbnRleHQudHM=) | `100.00% <ø> (ø)` | |
| [...packages/superset-ui-core/src/query/types/Query.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvdHlwZXMvUXVlcnkudHM=) | `100.00% <ø> (ø)` | |
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...end/src/visualizations/TimeTable/SparklineCell.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9TcGFya2xpbmVDZWxsLnRzeA==) | `0.00% <ø> (ø)` | |
| [...c/visualizations/TimeTable/TimeTableChartPlugin.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9UaW1lVGFibGVDaGFydFBsdWdpbi50cw==) | `71.42% <ø> (ø)` | |
| ... and [45 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...df8fe9f](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] geido edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
geido edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-986832774
> This is the test plan i tested:
https://docs.google.com/spreadsheets/d/1uJvJcVd0sL5ta_EhKnMfbFD-btu8K2N4nzSSv12KJoM/edit#gid=0
I found a bug that edit native filter in meta data did not reflect changes after save. See video for details:
Hey @jinghua-qa that seems to be affecting master as well and it is not related to this PR. Would you mind opening a separate issue for that? Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] jinghua-qa edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
jinghua-qa edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-986334379
This is the test plan i tested:
https://docs.google.com/spreadsheets/d/1uJvJcVd0sL5ta_EhKnMfbFD-btu8K2N4nzSSv12KJoM/edit#gid=0
I found a bug that edit native filter in meta data did not reflect changes after save. See video for details:
https://user-images.githubusercontent.com/81597121/144770187-2df63a4e-9f46-48f6-a568-b3acb5aa1e24.mov
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a5c3bd1) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **decrease** coverage by `0.18%`.
> The diff coverage is `67.44%`.
> :exclamation: Current head a5c3bd1 differs from pull request most recent head c94d684. Consider uploading reports for the commit c94d684 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.55% 68.37% -0.19%
==========================================
Files 1601 1602 +1
Lines 65271 65441 +170
Branches 6966 6999 +33
==========================================
- Hits 44745 44743 -2
- Misses 18636 18812 +176
+ Partials 1890 1886 -4
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `?` | |
| postgres | `81.83% <97.72%> (+0.01%)` | :arrow_up: |
| presto | `?` | |
| python | `81.87% <97.72%> (-0.44%)` | :arrow_down: |
| sqlite | `81.51% <97.72%> (+0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `51.16% <0.00%> (+1.16%)` | :arrow_up: |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `61.11% <37.50%> (+2.08%)` | :arrow_up: |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `37.12% <41.66%> (+1.78%)` | :arrow_up: |
| [...src/dashboard/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1Byb3BlcnRpZXNNb2RhbC9pbmRleC50c3g=) | `68.78% <68.78%> (ø)` | |
| [superset/dashboards/dao.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9kYW8ucHk=) | `96.29% <97.29%> (+0.20%)` | :arrow_up: |
| [superset/dashboards/api.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9hcGkucHk=) | `91.89% <100.00%> (+0.02%)` | :arrow_up: |
| [superset/dashboards/commands/update.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy91cGRhdGUucHk=) | `83.82% <100.00%> (+0.74%)` | :arrow_up: |
| [superset/dashboards/schemas.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9zY2hlbWFzLnB5) | `99.41% <100.00%> (+<0.01%)` | :arrow_up: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
| ... and [25 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...c94d684](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (aed13fc) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **increase** coverage by `0.03%`.
> The diff coverage is `66.92%`.
> :exclamation: Current head aed13fc differs from pull request most recent head c94d684. Consider uploading reports for the commit c94d684 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
+ Coverage 68.55% 68.58% +0.03%
==========================================
Files 1601 1596 -5
Lines 65271 65234 -37
Branches 6966 6949 -17
==========================================
- Hits 44745 44741 -4
+ Misses 18636 18610 -26
+ Partials 1890 1883 -7
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `81.82% <95.83%> (+0.01%)` | :arrow_up: |
| postgres | `81.83% <95.83%> (+0.01%)` | :arrow_up: |
| presto | `?` | |
| python | `81.91% <95.83%> (-0.39%)` | :arrow_down: |
| sqlite | `81.51% <95.83%> (+0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...es/superset-ui-core/src/query/buildQueryContext.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvYnVpbGRRdWVyeUNvbnRleHQudHM=) | `100.00% <ø> (ø)` | |
| [...packages/superset-ui-core/src/query/types/Query.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvdHlwZXMvUXVlcnkudHM=) | `100.00% <ø> (ø)` | |
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...end/src/visualizations/TimeTable/SparklineCell.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9TcGFya2xpbmVDZWxsLnRzeA==) | `0.00% <ø> (ø)` | |
| [...c/visualizations/TimeTable/TimeTableChartPlugin.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9UaW1lVGFibGVDaGFydFBsdWdpbi50cw==) | `71.42% <ø> (ø)` | |
| ... and [45 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...c94d684](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] geido commented on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
geido commented on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-986832774
Hey @jinghua-qa that seems to be affecting master as well and it is not related to this PR. Would you mind opening a separate issue for that? Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (239cb77) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **increase** coverage by `0.03%`.
> The diff coverage is `66.92%`.
> :exclamation: Current head 239cb77 differs from pull request most recent head 37cde71. Consider uploading reports for the commit 37cde71 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
+ Coverage 68.55% 68.58% +0.03%
==========================================
Files 1601 1596 -5
Lines 65271 65234 -37
Branches 6966 6949 -17
==========================================
- Hits 44745 44741 -4
+ Misses 18636 18610 -26
+ Partials 1890 1883 -7
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `81.82% <95.83%> (+0.01%)` | :arrow_up: |
| postgres | `81.83% <95.83%> (+0.01%)` | :arrow_up: |
| presto | `?` | |
| python | `81.91% <95.83%> (-0.39%)` | :arrow_down: |
| sqlite | `81.51% <95.83%> (+0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...es/superset-ui-core/src/query/buildQueryContext.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvYnVpbGRRdWVyeUNvbnRleHQudHM=) | `100.00% <ø> (ø)` | |
| [...packages/superset-ui-core/src/query/types/Query.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvdHlwZXMvUXVlcnkudHM=) | `100.00% <ø> (ø)` | |
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [...end/src/visualizations/TimeTable/SparklineCell.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9TcGFya2xpbmVDZWxsLnRzeA==) | `0.00% <ø> (ø)` | |
| [...c/visualizations/TimeTable/TimeTableChartPlugin.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9UaW1lVGFibGVDaGFydFBsdWdpbi50cw==) | `71.42% <ø> (ø)` | |
| ... and [45 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...37cde71](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17570:
URL: https://github.com/apache/superset/pull/17570#issuecomment-984725214
# [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#17570](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8715b72) into [master](https://codecov.io/gh/apache/superset/commit/0544bee74eb1cb36aa2a12847aaa6ac4ff082f90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0544bee) will **decrease** coverage by `0.15%`.
> The diff coverage is `60.00%`.
> :exclamation: Current head 8715b72 differs from pull request most recent head a1b6922. Consider uploading reports for the commit a1b6922 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17570/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #17570 +/- ##
==========================================
- Coverage 68.55% 68.39% -0.16%
==========================================
Files 1601 1602 +1
Lines 65271 65362 +91
Branches 6966 6992 +26
==========================================
- Hits 44745 44705 -40
- Misses 18636 18771 +135
+ Partials 1890 1886 -4
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `81.81% <97.77%> (+<0.01%)` | :arrow_up: |
| postgres | `81.81% <97.77%> (-0.01%)` | :arrow_down: |
| presto | `?` | |
| python | `81.89% <97.77%> (-0.41%)` | :arrow_down: |
| sqlite | `81.50% <97.77%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...gacy-preset-chart-nvd3/src/DistBar/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL0Rpc3RCYXIvY29udHJvbFBhbmVsLnRz) | `38.46% <ø> (ø)` | |
| [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.02% <0.00%> (ø)` | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | `50.00% <0.00%> (ø)` | |
| [...nfigModal/FiltersConfigForm/getControlItemsMap.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL2dldENvbnRyb2xJdGVtc01hcC50c3g=) | `68.18% <ø> (ø)` | |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `71.87% <ø> (ø)` | |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.50% <ø> (-6.89%)` | :arrow_down: |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `35.33% <21.15%> (ø)` | |
| [...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL0ZpbHRlcnNDb25maWdGb3JtLnRzeA==) | `56.37% <37.50%> (+0.45%)` | :arrow_up: |
| [...src/filters/components/Range/RangeFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9SYW5nZS9SYW5nZUZpbHRlclBsdWdpbi50c3g=) | `74.56% <75.47%> (+19.17%)` | :arrow_up: |
| ... and [27 more](https://codecov.io/gh/apache/superset/pull/17570/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0544bee...a1b6922](https://codecov.io/gh/apache/superset/pull/17570?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #17570: fix: Save properties after applying changes in Dashboard
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #17570:
URL: https://github.com/apache/superset/pull/17570#discussion_r763786823
##########
File path: superset-frontend/src/dashboard/actions/dashboardState.js
##########
@@ -194,52 +196,176 @@ export function saveDashboardRequest(data, id, saveType) {
const serializedFilters = serializeActiveFilterValues(getActiveFilters());
// serialize filter scope for each filter field, grouped by filter id
const serializedFilterScopes = serializeFilterScopes(dashboardFilters);
+ const {
+ certified_by,
+ certification_details,
+ css,
+ dashboard_title,
+ owners,
+ roles,
+ slug,
+ } = data;
+
+ // making sure the data is what the backend expects
+ const cleanedData = {
+ ...data,
+ certified_by: certified_by || '',
+ certification_details:
+ certified_by && certification_details ? certification_details : '',
+ css: css || '',
+ dashboard_title: dashboard_title || t('[ untitled dashboard ]'),
+ owners: owners && owners.length ? owners.map(o => (o.id ? o.id : o)) : [],
+ roles: !isFeatureEnabled(FeatureFlag.DASHBOARD_RBAC)
+ ? undefined
+ : roles && roles.length
+ ? roles.map(r => (r.id ? r.id : r))
+ : [],
+ slug: slug || null,
+ metadata: {
+ ...data.metadata,
+ color_namespace: data.metadata?.color_namespace || undefined,
+ color_scheme: data.metadata?.color_scheme || '',
+ expanded_slices: data.metadata?.expanded_slices || {},
+ label_colors: data.metadata?.label_colors || {},
+ refresh_frequency: data.metadata?.refresh_frequency || 0,
+ timed_refresh_immune_slices:
+ data.metadata?.timed_refresh_immune_slices || [],
+ },
+ };
+
+ const handleChartConfiguration = () => {
+ const {
+ dashboardInfo: {
+ metadata: { chart_configuration = {} },
+ },
+ } = getState();
+ const chartConfiguration = Object.values(chart_configuration).reduce(
+ (prev, next) => {
+ // If chart removed from dashboard - remove it from metadata
+ if (
+ Object.values(layout).find(
+ layoutItem => layoutItem?.meta?.chartId === next.id,
+ )
+ ) {
+ return { ...prev, [next.id]: next };
+ }
+ return prev;
+ },
+ {},
+ );
+ return chartConfiguration;
+ };
+
+ const onCopySuccess = response => {
+ const lastModifiedTime = response.json.last_modified_time;
+ if (lastModifiedTime) {
+ dispatch(saveDashboardRequestSuccess(lastModifiedTime));
+ }
+ if (isFeatureEnabled(FeatureFlag.DASHBOARD_CROSS_FILTERS)) {
+ const chartConfiguration = handleChartConfiguration();
+ dispatch(setChartConfiguration(chartConfiguration));
+ }
+ dispatch(addSuccessToast(t('This dashboard was saved successfully.')));
+ return response;
+ };
+
+ const onUpdateSuccess = response => {
+ const updatedDashboard = response.json.result;
+ const lastModifiedTime = response.json.last_modified_time;
+ // synching with the backend transformations of the metadata
+ if (updatedDashboard.json_metadata) {
+ const metadata = JSON.parse(updatedDashboard.json_metadata);
+ dispatch(
+ dashboardInfoChanged({
+ metadata: JSON.parse(updatedDashboard.json_metadata),
+ }),
+ );
+ if (metadata.chart_configuration) {
+ dispatch({
+ type: SET_CHART_CONFIG_COMPLETE,
+ chartConfiguration: metadata.chart_configuration,
+ });
+ }
+ }
+ if (lastModifiedTime) {
+ dispatch(saveDashboardRequestSuccess(lastModifiedTime));
+ }
+ // redirect to the new slug or id
+ window.history.pushState(
+ { event: 'dashboard_properties_changed' },
+ '',
+ `/superset/dashboard/${slug || id}/`,
+ );
+
+ dispatch(addSuccessToast(t('This dashboard was saved successfully.')));
+ return response;
+ };
+
+ const onError = async response => {
+ const { error, message } = await getClientErrorObject(response);
+ let errorText = t(
+ 'Sorry, there was an error saving this dashboard: %s',
+ error || t('Unknown'),
Review comment:
Hmm, I think that in the case of undefined error the message would sound a bit strange: "Sorry, there was an error saving this dashboard: Unknown". Maybe we should have a separate error message for such case? Like "Unknown error has occurred" or something
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org