Skip to content

Commit

Permalink
refactor: Migrate SliceAdder to typescript (apache#30697)
Browse files Browse the repository at this point in the history
  • Loading branch information
EnxDev authored Oct 31, 2024
1 parent 58edc79 commit 31aad28
Show file tree
Hide file tree
Showing 4 changed files with 269 additions and 132 deletions.
133 changes: 111 additions & 22 deletions superset-frontend/spec/fixtures/mockSliceEntities.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/
import { datasourceId } from 'spec/fixtures/mockDatasource';
import { DatasourceType } from '@superset-ui/core';
import { sliceId } from './mockChartQueries';

export const filterId = 127;
Expand Down Expand Up @@ -47,8 +48,8 @@ export const sliceEntitiesForChart = {
},
viz_type: 'pie',
datasource: datasourceId,
description: null,
description_markeddown: '',
description: '',
description_markdown: '',
modified: '23 hours ago',
changed_on: 1529453332615,
},
Expand Down Expand Up @@ -79,10 +80,18 @@ export const sliceEntitiesForDashboard = {
},
viz_type: 'filter_box',
datasource: '2__table',
description: null,
description_markeddown: '',
description: '',
description_markdown: '',
modified: '23 hours ago',
changed_on: 1529453332615,
changed_on_humanized: '',
datasource_id: 0,
datasource_type: DatasourceType.Query,
datasource_url: '',
datasource_name: '',
owners: [{ id: 0 }],
created_by: { id: 0 },
thumbnail_url: '',
},
128: {
slice_id: 128,
Expand All @@ -91,10 +100,18 @@ export const sliceEntitiesForDashboard = {
form_data: {},
viz_type: 'big_number',
datasource: '2__table',
description: null,
description_markeddown: '',
description: '',
description_markdown: '',
modified: '23 hours ago',
changed_on: 1529453332628,
changed_on_humanized: '',
datasource_id: 0,
datasource_type: DatasourceType.Query,
datasource_url: '',
datasource_name: '',
owners: [{ id: 0 }],
created_by: { id: 0 },
thumbnail_url: '',
},
129: {
slice_id: 129,
Expand All @@ -103,10 +120,19 @@ export const sliceEntitiesForDashboard = {
form_data: {},
viz_type: 'table',
datasource: '2__table',
description: null,
description_markeddown: '',
description: '',
description_markdown: 'dd',
modified: '23 hours ago',
changed_on: 1529453332637,
changed_on_humanized: '',

datasource_id: 0,
datasource_type: DatasourceType.Query,
datasource_url: '',
datasource_name: '',
owners: [{ id: 0 }],
created_by: { id: 0 },
thumbnail_url: '',
},
130: {
slice_id: 130,
Expand All @@ -115,10 +141,19 @@ export const sliceEntitiesForDashboard = {
form_data: {},
viz_type: 'line',
datasource: '2__table',
description: null,
description_markeddown: '',
description: '',
description_markdown: '',
modified: '23 hours ago',
changed_on: 1529453332645,
changed_on_humanized: '',

datasource_id: 0,
datasource_type: DatasourceType.SlTable,
datasource_url: '',
datasource_name: '',
owners: [{ id: 0 }],
created_by: { id: 0 },
thumbnail_url: '',
},
131: {
slice_id: 131,
Expand All @@ -127,10 +162,19 @@ export const sliceEntitiesForDashboard = {
form_data: {},
viz_type: 'world_map',
datasource: '2__table',
description: null,
description_markeddown: '',
description: '',
description_markdown: '',
modified: '23 hours ago',
changed_on: 1529453332654,
changed_on_humanized: '',

datasource_id: 0,
datasource_type: DatasourceType.Table,
datasource_url: '',
datasource_name: '',
owners: [{ id: 0 }],
created_by: { id: 0 },
thumbnail_url: '',
},
132: {
slice_id: 132,
Expand All @@ -139,10 +183,19 @@ export const sliceEntitiesForDashboard = {
form_data: {},
viz_type: 'bubble',
datasource: '2__table',
description: null,
description_markeddown: '',
description: '',
description_markdown: '',
modified: '23 hours ago',
changed_on: 1529453332663,
changed_on_humanized: '',

datasource_id: 0,
datasource_type: DatasourceType.Query,
datasource_url: '',
datasource_name: '',
owners: [{ id: 0 }],
created_by: { id: 0 },
thumbnail_url: '',
},
133: {
slice_id: 133,
Expand All @@ -151,10 +204,19 @@ export const sliceEntitiesForDashboard = {
form_data: {},
viz_type: 'sunburst_v2',
datasource: '2__table',
description: null,
description_markeddown: '',
description: '',
description_markdown: '',
modified: '23 hours ago',
changed_on: 1529453332673,
changed_on_humanized: '',

datasource_id: 0,
datasource_type: DatasourceType.Query,
datasource_url: '',
datasource_name: '',
owners: [{ id: 0 }],
created_by: { id: 0 },
thumbnail_url: '',
},
134: {
slice_id: 134,
Expand All @@ -163,10 +225,19 @@ export const sliceEntitiesForDashboard = {
form_data: {},
viz_type: 'area',
datasource: '2__table',
description: null,
description_markeddown: '',
description: '',
description_markdown: '',
modified: '23 hours ago',
changed_on: 1529453332680,
changed_on_humanized: '',

datasource_id: 0,
datasource_type: DatasourceType.Dataset,
datasource_url: '',
datasource_name: '',
owners: [{ id: 0 }],
created_by: { id: 0 },
thumbnail_url: '',
},
135: {
slice_id: 135,
Expand All @@ -175,10 +246,19 @@ export const sliceEntitiesForDashboard = {
form_data: {},
viz_type: 'box_plot',
datasource: '2__table',
description: null,
description_markeddown: '',
description: '',
description_markdown: '',
modified: '23 hours ago',
changed_on: 1529453332688,
changed_on_humanized: '',

datasource_id: 0,
datasource_type: DatasourceType.Table,
datasource_url: '',
datasource_name: '',
owners: [{ id: 0 }],
created_by: { id: 0 },
thumbnail_url: '',
},
136: {
slice_id: 136,
Expand All @@ -187,10 +267,19 @@ export const sliceEntitiesForDashboard = {
form_data: {},
viz_type: 'treemap_v2',
datasource: '2__table',
description: null,
description_markeddown: '',
description: '',
description_markdown: '',
modified: '23 hours ago',
changed_on: 1529453332700,
changed_on_humanized: '',

datasource_id: 0,
datasource_type: DatasourceType.Table,
datasource_url: '',
datasource_name: '',
owners: [{ id: 0 }],
created_by: { id: 0 },
thumbnail_url: '',
},
},
isLoading: false,
Expand Down
Loading

0 comments on commit 31aad28

Please sign in to comment.