superset payload 源码

  • 2022-10-20
  • 浏览 (253)

superset payload 代码

文件路径:/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-deckgl/Path/payload.js

/*
 * 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.
 */

/* eslint-disable sort-keys */
/* eslint-disable no-magic-numbers */
export const payload = theme => ({
  cache_key: null,
  cached_dttm: null,
  cache_timeout: 86400,
  error: null,
  form_data: {
    datasource: '11__table',
    viz_type: 'deck_path',
    slice_id: 72,
    url_params: {},
    granularity_sqla: null,
    time_grain_sqla: null,
    time_range: ' : ',
    line_column: 'path_json',
    line_type: 'json',
    row_limit: 5000,
    filter_nulls: true,
    adhoc_filters: [
      {
        clause: 'WHERE',
        expressionType: 'SIMPLE',
        filterOptionName: 'b4c1a7de-17ef-4505-b688-2760c0c22e1f',
        comparator: '',
        operator: 'IS NOT NULL',
        subject: 'path_json',
      },
    ],
    mapbox_style: 'mapbox://styles/mapbox/light-v9',
    viewport: {
      altitude: 1.5,
      bearing: 0,
      height: 1094,
      latitude: 37.73671752604488,
      longitude: -122.18885402582598,
      maxLatitude: 85.05113,
      maxPitch: 60,
      maxZoom: 20,
      minLatitude: -85.05113,
      minPitch: 0,
      minZoom: 0,
      pitch: 0,
      width: 669,
      zoom: 9.51847667620428,
    },
    color_picker: { a: 1, b: 135, g: 122, r: 0 },
    line_width: 150,
    reverse_long_lat: false,
    autozoom: true,
    js_columns: ['color'],
    where: '',
    having: '',
    having_filters: [],
    filters: [{ col: 'path_json', op: 'IS NOT NULL', val: '' }],
  },
  is_cached: false,
  query:
    'SELECT color AS color,\n       path_json AS path_json\nFROM bart_lines\nWHERE path_json IS NOT NULL\nLIMIT 5000\nOFFSET 0',
  status: 'success',
  stacktrace: null,
  rowcount: 5,
  data: {
    features: [
      {
        color: theme.colors.primary.base,
        path: [
          [-122.3535851, 37.9360513],
          [-122.3179784, 37.9249513],
          [-122.300284, 37.902646],
          [-122.2843653, 37.8735039],
          [-122.269058, 37.8694562],
          [-122.2709185, 37.85301],
          [-122.2689342, 37.8283973],
          [-122.2707195, 37.8080566],
          [-122.2718706, 37.804996],
          [-122.2948251, 37.8064628],
          [-122.3971496, 37.794745],
          [-122.4030149, 37.7905282],
          [-122.4084631, 37.7862646],
          [-122.4157833, 37.7803439],
          [-122.4219476, 37.7653052],
          [-122.4206096, 37.7528545],
          [-122.4359052, 37.7340058],
          [-122.448995, 37.723273],
          [-122.471192, 37.7067871],
          [-122.4672607, 37.6842548],
          [-122.4449822, 37.6635925],
          [-122.4169649, 37.6372339],
          [-122.3876274, 37.5993171],
        ],
        __timestamp: null,
        extraProps: { color: theme.colors.primary.base },
      },
      {
        color: theme.colors.warning.base,
        path: [
          [-122.353165, 37.936887],
          [-122.317269, 37.925655],
          [-122.299272, 37.903059],
          [-122.283451, 37.87404],
          [-122.268045, 37.869867],
          [-122.26978, 37.853024],
          [-122.2677961, 37.8284091],
          [-122.2695925, 37.8079322],
          [-122.2721546, 37.8035508],
          [-122.2666476, 37.7964139],
          [-122.2253433, 37.7739122],
          [-122.1985085, 37.7530763],
          [-122.1625282, 37.7216747],
          [-122.1280105, 37.6961822],
          [-122.0888196, 37.669805],
          [-122.0584803, 37.6342836],
          [-122.0187396, 37.5906334],
          [-121.9772135, 37.5567286],
        ],
        __timestamp: null,
        extraProps: { color: theme.colors.warning.base },
      },
      {
        color: theme.colors.error.base,
        path: [
          [-121.945154, 38.018914],
          [-122.024597, 38.003275],
          [-122.029095, 37.973737],
          [-122.056013, 37.928403],
          [-122.067423, 37.905628],
          [-122.123801, 37.893394],
          [-122.183791, 37.878361],
          [-122.251793, 37.844601],
          [-122.2666934, 37.8282587],
          [-122.2684655, 37.8078078],
          [-122.2715151, 37.80322],
          [-122.2947035, 37.8055689],
          [-122.3969458, 37.7938605],
          [-122.402211, 37.7898921],
          [-122.40766, 37.7856278],
          [-122.4147696, 37.779936],
          [-122.4208208, 37.7651836],
          [-122.4195378, 37.7525542],
          [-122.4349986, 37.7334634],
          [-122.4482045, 37.722627],
          [-122.4701365, 37.7064541],
          [-122.466233, 37.684638],
          [-122.444116, 37.664174],
          [-122.416038, 37.637753000000004],
          [-122.392612, 37.616035],
          [-122.38666, 37.599787],
        ],
        __timestamp: null,
        extraProps: { color: theme.colors.error.base },
      },
      {
        color: theme.colors.success.base,
        path: [
          [-121.900367, 37.701695],
          [-121.928099, 37.699759],
          [-122.075567, 37.690754],
          [-122.1266292, 37.6975918],
          [-122.160905, 37.7229335],
          [-122.1968609, 37.7543157],
          [-122.2239172, 37.7753131],
          [-122.2653405, 37.7978803],
          [-122.294582, 37.804675],
          [-122.396742, 37.792976],
          [-122.401407, 37.789256],
          [-122.406857, 37.784991],
          [-122.413756, 37.779528],
          [-122.419694, 37.765062],
          [-122.418466, 37.752254],
          [-122.434092, 37.732921],
          [-122.447414, 37.721981],
          [-122.469081, 37.706121],
        ],
        __timestamp: null,
        extraProps: { color: theme.colors.success.base },
      },
      {
        color: theme.colors.warning.base,
        path: [
          [-121.9764, 37.557355],
          [-122.017867, 37.591208],
          [-122.057551, 37.6348],
          [-122.087967, 37.670399],
          [-122.1272512, 37.696851],
          [-122.161717, 37.7223045],
          [-122.1976851, 37.7536963],
          [-122.2246308, 37.7746129],
          [-122.2658775, 37.7970877],
          [-122.2945333, 37.8037768],
          [-122.3965382, 37.7920915],
          [-122.4006031, 37.7886199],
          [-122.406054, 37.7843542],
          [-122.4127424, 37.77912],
          [-122.4185672, 37.7649404],
          [-122.4173942, 37.7519538],
          [-122.4331854, 37.7323786],
          [-122.4466235, 37.721335],
          [-122.4683093, 37.705461],
        ],
        __timestamp: null,
        extraProps: { color: theme.colors.warning.base },
      },
    ],
    mapboxApiKey:
      'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
    metricLabels: [],
  },
});

相关信息

superset 源码目录

相关文章

superset caches 源码

superset changelog 源码

superset generate_email 源码

superset superset_config 源码

superset babel.config 源码

superset docusaurus.config 源码

superset sidebars 源码

superset data 源码

superset utils 源码

superset matomo 源码

0  赞