| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288 |
- /**
- * 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 { datasourceId } from 'spec/fixtures/mockDatasource';
- import { DatasourceType, VizType } from '@superset-ui/core';
- import { sliceId } from './mockChartQueries';
- export const filterId = 127;
- export const column = 'region';
- export const sliceEntitiesForChart = {
- slices: {
- [sliceId]: {
- slice_id: sliceId,
- slice_url: '/explore/?form_data=%7B%22slice_id%22%3A%2018%7D',
- slice_name: 'Genders',
- form_data: {
- slice_id: sliceId,
- viz_type: VizType.Pie,
- row_limit: 50000,
- metric: 'sum__num',
- since: '100 years ago',
- groupby: ['gender'],
- metrics: ['sum__num'],
- compare_lag: '10',
- limit: '25',
- until: 'now',
- granularity: 'ds',
- markup_type: 'markdown',
- where: '',
- compare_suffix: 'o10Y',
- datasource: datasourceId,
- },
- viz_type: VizType.Pie,
- datasource: datasourceId,
- description: '',
- description_markdown: '',
- modified: '23 hours ago',
- changed_on: 1529453332615,
- },
- },
- isLoading: false,
- errorMessage: null,
- lastUpdated: 0,
- };
- export const sliceEntitiesForDashboard = {
- slices: {
- [filterId]: {
- slice_id: filterId,
- slice_url: '/explore/?form_data=%7B%22slice_id%22%3A%20127%7D',
- slice_name: 'Region Filter',
- form_data: {
- instant_filtering: true,
- filter_configs: [
- {
- asc: true,
- clearable: true,
- column,
- key: 'JknLrSlNL',
- multiple: true,
- label: column,
- },
- ],
- },
- viz_type: 'filter_box',
- datasource: '2__table',
- 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,
- slice_url: '/explore/?form_data=%7B%22slice_id%22%3A%20128%7D',
- slice_name: "World's Population",
- form_data: {},
- viz_type: VizType.BigNumber,
- datasource: '2__table',
- 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,
- slice_url: '/explore/?form_data=%7B%22slice_id%22%3A%20129%7D',
- slice_name: 'Most Populated Countries',
- form_data: {},
- viz_type: VizType.Table,
- datasource: '2__table',
- 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,
- slice_url: '/explore/?form_data=%7B%22slice_id%22%3A%20130%7D',
- slice_name: 'Growth Rate',
- form_data: {},
- viz_type: VizType.Line,
- datasource: '2__table',
- 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,
- slice_url: '/explore/?form_data=%7B%22slice_id%22%3A%20131%7D',
- slice_name: '% Rural',
- form_data: {},
- viz_type: VizType.WorldMap,
- datasource: '2__table',
- 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,
- slice_url: '/explore/?form_data=%7B%22slice_id%22%3A%20132%7D',
- slice_name: 'Life Expectancy VS Rural %',
- form_data: {},
- viz_type: VizType.LegacyBubble,
- datasource: '2__table',
- 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,
- slice_url: '/explore/?form_data=%7B%22slice_id%22%3A%20133%7D',
- slice_name: 'Rural Breakdown',
- form_data: {},
- viz_type: VizType.Sunburst,
- datasource: '2__table',
- 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,
- slice_url: '/explore/?form_data=%7B%22slice_id%22%3A%20134%7D',
- slice_name: "World's Pop Growth",
- form_data: {},
- viz_type: VizType.Area,
- datasource: '2__table',
- 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,
- slice_url: '/explore/?form_data=%7B%22slice_id%22%3A%20135%7D',
- slice_name: 'Box plot',
- form_data: {},
- viz_type: VizType.BoxPlot,
- datasource: '2__table',
- 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,
- slice_url: '/explore/?form_data=%7B%22slice_id%22%3A%20136%7D',
- slice_name: 'Treemap',
- form_data: {},
- viz_type: VizType.Treemap,
- datasource: '2__table',
- 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,
- errorMessage: null,
- lastUpdated: 0,
- };
|