This is an automated email from the ASF dual-hosted git repository.
graceguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 7d27996 chore: remove a few obsolete logic (#11676)
7d27996 is described below
commit 7d279968670363c745211ecc9cd6f97f6c88babf
Author: Grace Guo <[email protected]>
AuthorDate: Fri Nov 13 23:16:05 2020 -0800
chore: remove a few obsolete logic (#11676)
---
.../src/dashboard/actions/sliceEntities.js | 32 ++++++++++------------
.../dashboard/components/gridComponents/Tabs.jsx | 3 --
superset-frontend/src/dashboard/util/constants.ts | 3 --
3 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/superset-frontend/src/dashboard/actions/sliceEntities.js
b/superset-frontend/src/dashboard/actions/sliceEntities.js
index 5f86b6c..01512dd 100644
--- a/superset-frontend/src/dashboard/actions/sliceEntities.js
+++ b/superset-frontend/src/dashboard/actions/sliceEntities.js
@@ -85,23 +85,21 @@ export function fetchAllSlices(userId) {
datasource,
};
}
- if (['markup', 'separator'].indexOf(slice.viz_type) === -1) {
- slices[slice.id] = {
- slice_id: slice.id,
- slice_url: slice.url,
- slice_name: slice.slice_name,
- edit_url: slice.edit_url,
- form_data,
- datasource_name: slice.datasource_name_text,
- datasource_url: slice.datasource_url,
- changed_on: new Date(slice.changed_on_utc).getTime(),
- description: slice.description,
- description_markdown: slice.description_markeddown,
- viz_type: slice.viz_type,
- modified: slice.changed_on_delta_humanized,
- changed_on_humanized: slice.changed_on_delta_humanized,
- };
- }
+ slices[slice.id] = {
+ slice_id: slice.id,
+ slice_url: slice.url,
+ slice_name: slice.slice_name,
+ edit_url: slice.edit_url,
+ form_data,
+ datasource_name: slice.datasource_name_text,
+ datasource_url: slice.datasource_url,
+ changed_on: new Date(slice.changed_on_utc).getTime(),
+ description: slice.description,
+ description_markdown: slice.description_markeddown,
+ viz_type: slice.viz_type,
+ modified: slice.changed_on_delta_humanized,
+ changed_on_humanized: slice.changed_on_delta_humanized,
+ };
});
return dispatch(setAllSlices(slices));
diff --git a/superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx
b/superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx
index 02f4cfd..455a41a 100644
--- a/superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx
+++ b/superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx
@@ -35,8 +35,6 @@ import { NEW_TAB_ID, DASHBOARD_ROOT_ID } from
'../../util/constants';
import { RENDER_TAB, RENDER_TAB_CONTENT } from './Tab';
import { TAB_TYPE } from '../../util/componentTypes';
-const MAX_TAB_COUNT = 10;
-
const propTypes = {
id: PropTypes.string.isRequired,
parentId: PropTypes.string.isRequired,
@@ -305,7 +303,6 @@ class Tabs extends React.PureComponent {
this.handleClickTab(tabIds.indexOf(key));
}}
onEdit={this.handleEdit}
- hideAdd={tabIds.length >= MAX_TAB_COUNT}
data-test="nav-list"
type={editMode ? 'editable-card' : 'card'}
>
diff --git a/superset-frontend/src/dashboard/util/constants.ts
b/superset-frontend/src/dashboard/util/constants.ts
index dbfd61b..b743d09 100644
--- a/superset-frontend/src/dashboard/util/constants.ts
+++ b/superset-frontend/src/dashboard/util/constants.ts
@@ -63,9 +63,6 @@ export const SAVE_TYPE_NEWDASHBOARD = 'newDashboard';
// could be overwritten by server-side config
export const DASHBOARD_POSITION_DATA_LIMIT = 65535;
-// filter indicators display length
-export const FILTER_INDICATORS_DISPLAY_LENGTH = 3;
-
// in-component element types: can be added into
// directPathToChild, used for in dashboard navigation and focus
export const IN_COMPONENT_ELEMENT_TYPES = ['LABEL'];