payload.js 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. /* eslint-disable sort-keys */
  20. /* eslint-disable no-magic-numbers */
  21. export const payload = theme => ({
  22. cache_key: null,
  23. cached_dttm: null,
  24. cache_timeout: 86400,
  25. error: null,
  26. form_data: {
  27. datasource: '11__table',
  28. viz_type: 'deck_path',
  29. slice_id: 72,
  30. url_params: {},
  31. granularity_sqla: null,
  32. time_grain_sqla: null,
  33. time_range: ' : ',
  34. line_column: 'path_json',
  35. line_type: 'json',
  36. row_limit: 5000,
  37. filter_nulls: true,
  38. adhoc_filters: [
  39. {
  40. clause: 'WHERE',
  41. expressionType: 'SIMPLE',
  42. filterOptionName: 'b4c1a7de-17ef-4505-b688-2760c0c22e1f',
  43. comparator: '',
  44. operator: 'IS NOT NULL',
  45. subject: 'path_json',
  46. },
  47. ],
  48. mapbox_style: 'mapbox://styles/mapbox/light-v9',
  49. viewport: {
  50. altitude: 1.5,
  51. bearing: 0,
  52. height: 1094,
  53. latitude: 37.73671752604488,
  54. longitude: -122.18885402582598,
  55. maxLatitude: 85.05113,
  56. maxPitch: 60,
  57. maxZoom: 20,
  58. minLatitude: -85.05113,
  59. minPitch: 0,
  60. minZoom: 0,
  61. pitch: 0,
  62. width: 669,
  63. zoom: 9.51847667620428,
  64. },
  65. color_picker: { a: 1, b: 135, g: 122, r: 0 },
  66. line_width: 150,
  67. reverse_long_lat: false,
  68. autozoom: true,
  69. js_columns: ['color'],
  70. where: '',
  71. having: '',
  72. filters: [{ col: 'path_json', op: 'IS NOT NULL', val: '' }],
  73. },
  74. is_cached: false,
  75. query:
  76. 'SELECT color AS color,\n path_json AS path_json\nFROM bart_lines\nWHERE path_json IS NOT NULL\nLIMIT 5000\nOFFSET 0',
  77. status: 'success',
  78. stacktrace: null,
  79. rowcount: 5,
  80. data: {
  81. features: [
  82. {
  83. color: theme.colorPrimary,
  84. path: [
  85. [-122.3535851, 37.9360513],
  86. [-122.3179784, 37.9249513],
  87. [-122.300284, 37.902646],
  88. [-122.2843653, 37.8735039],
  89. [-122.269058, 37.8694562],
  90. [-122.2709185, 37.85301],
  91. [-122.2689342, 37.8283973],
  92. [-122.2707195, 37.8080566],
  93. [-122.2718706, 37.804996],
  94. [-122.2948251, 37.8064628],
  95. [-122.3971496, 37.794745],
  96. [-122.4030149, 37.7905282],
  97. [-122.4084631, 37.7862646],
  98. [-122.4157833, 37.7803439],
  99. [-122.4219476, 37.7653052],
  100. [-122.4206096, 37.7528545],
  101. [-122.4359052, 37.7340058],
  102. [-122.448995, 37.723273],
  103. [-122.471192, 37.7067871],
  104. [-122.4672607, 37.6842548],
  105. [-122.4449822, 37.6635925],
  106. [-122.4169649, 37.6372339],
  107. [-122.3876274, 37.5993171],
  108. ],
  109. __timestamp: null,
  110. extraProps: { color: theme.colorPrimary },
  111. },
  112. {
  113. color: theme.colorWarning,
  114. path: [
  115. [-122.353165, 37.936887],
  116. [-122.317269, 37.925655],
  117. [-122.299272, 37.903059],
  118. [-122.283451, 37.87404],
  119. [-122.268045, 37.869867],
  120. [-122.26978, 37.853024],
  121. [-122.2677961, 37.8284091],
  122. [-122.2695925, 37.8079322],
  123. [-122.2721546, 37.8035508],
  124. [-122.2666476, 37.7964139],
  125. [-122.2253433, 37.7739122],
  126. [-122.1985085, 37.7530763],
  127. [-122.1625282, 37.7216747],
  128. [-122.1280105, 37.6961822],
  129. [-122.0888196, 37.669805],
  130. [-122.0584803, 37.6342836],
  131. [-122.0187396, 37.5906334],
  132. [-121.9772135, 37.5567286],
  133. ],
  134. __timestamp: null,
  135. extraProps: { color: theme.colorWarning },
  136. },
  137. {
  138. color: theme.colorError,
  139. path: [
  140. [-121.945154, 38.018914],
  141. [-122.024597, 38.003275],
  142. [-122.029095, 37.973737],
  143. [-122.056013, 37.928403],
  144. [-122.067423, 37.905628],
  145. [-122.123801, 37.893394],
  146. [-122.183791, 37.878361],
  147. [-122.251793, 37.844601],
  148. [-122.2666934, 37.8282587],
  149. [-122.2684655, 37.8078078],
  150. [-122.2715151, 37.80322],
  151. [-122.2947035, 37.8055689],
  152. [-122.3969458, 37.7938605],
  153. [-122.402211, 37.7898921],
  154. [-122.40766, 37.7856278],
  155. [-122.4147696, 37.779936],
  156. [-122.4208208, 37.7651836],
  157. [-122.4195378, 37.7525542],
  158. [-122.4349986, 37.7334634],
  159. [-122.4482045, 37.722627],
  160. [-122.4701365, 37.7064541],
  161. [-122.466233, 37.684638],
  162. [-122.444116, 37.664174],
  163. [-122.416038, 37.637753000000004],
  164. [-122.392612, 37.616035],
  165. [-122.38666, 37.599787],
  166. ],
  167. __timestamp: null,
  168. extraProps: { color: theme.colorError },
  169. },
  170. {
  171. color: theme.colorSuccess,
  172. path: [
  173. [-121.900367, 37.701695],
  174. [-121.928099, 37.699759],
  175. [-122.075567, 37.690754],
  176. [-122.1266292, 37.6975918],
  177. [-122.160905, 37.7229335],
  178. [-122.1968609, 37.7543157],
  179. [-122.2239172, 37.7753131],
  180. [-122.2653405, 37.7978803],
  181. [-122.294582, 37.804675],
  182. [-122.396742, 37.792976],
  183. [-122.401407, 37.789256],
  184. [-122.406857, 37.784991],
  185. [-122.413756, 37.779528],
  186. [-122.419694, 37.765062],
  187. [-122.418466, 37.752254],
  188. [-122.434092, 37.732921],
  189. [-122.447414, 37.721981],
  190. [-122.469081, 37.706121],
  191. ],
  192. __timestamp: null,
  193. extraProps: { color: theme.colorSuccess },
  194. },
  195. {
  196. color: theme.colorWarning,
  197. path: [
  198. [-121.9764, 37.557355],
  199. [-122.017867, 37.591208],
  200. [-122.057551, 37.6348],
  201. [-122.087967, 37.670399],
  202. [-122.1272512, 37.696851],
  203. [-122.161717, 37.7223045],
  204. [-122.1976851, 37.7536963],
  205. [-122.2246308, 37.7746129],
  206. [-122.2658775, 37.7970877],
  207. [-122.2945333, 37.8037768],
  208. [-122.3965382, 37.7920915],
  209. [-122.4006031, 37.7886199],
  210. [-122.406054, 37.7843542],
  211. [-122.4127424, 37.77912],
  212. [-122.4185672, 37.7649404],
  213. [-122.4173942, 37.7519538],
  214. [-122.4331854, 37.7323786],
  215. [-122.4466235, 37.721335],
  216. [-122.4683093, 37.705461],
  217. ],
  218. __timestamp: null,
  219. extraProps: { color: theme.colorWarning },
  220. },
  221. ],
  222. mapboxApiKey:
  223. 'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
  224. metricLabels: [],
  225. },
  226. });