Coder Social home page Coder Social logo

apache-superset / superset-ui Goto Github PK

View Code? Open in Web Editor NEW
326.0 326.0 274.0 133.25 MB

Apache Superset UI packages

Home Page: https://apache-superset.github.io/superset-ui/

License: Apache License 2.0

JavaScript 8.54% CSS 0.32% TypeScript 52.54% HTML 0.51% Shell 1.22% Jupyter Notebook 36.86%
data-visualization monorepo

superset-ui's People

Contributors

betodealmeida avatar conglei avatar datability-io avatar dependabot-preview[bot] avatar dependabot[bot] avatar etr2460 avatar geido avatar john-bodley avatar junlincc avatar kgabryje avatar khtruong avatar kristw avatar krsnik93 avatar ktmud avatar maloun96 avatar maltoze avatar mayurnewase avatar michael-s-molina avatar mistercrunch avatar nytai avatar pkdotson avatar rusackas avatar simcha90 avatar stephenlyz avatar suddjian avatar villebro avatar williaster avatar xiezhongfu avatar xtinec avatar zhaoyongjie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

superset-ui's Issues

Build broken due to eslint 5.14.0

Describe the bug
eslint just releases a new version that has a bug.

To Reproduce
Steps to reproduce the behavior:
See CI

Expected behavior
CI completes successfully

Additional context
I have opened an issue and submit PR to eslint, but it may take some time until they release a new version. We have to pin our eslint to 5.13.0 meanwhile.

eslint/eslint#11402
eslint/eslint#11403

Address core-js dependency in @superset-ui/core

Describe the bug

Reported on incubator-superset
apache/superset#6541

ERROR in ./node_modules/@superset-ui/chart/node_modules/@superset-ui/core/esm/models/Registry.js
Module not found: Error: Can't resolve 'core-js/modules/es6.array.iterator' in '/home/travis/build/mistercrunch/superset/superset/assets/node_modules/@superset-ui/chart/node_modules/@superset-ui/core/esm/models'
 @ ./node_modules/@superset-ui/chart/node_modules/@superset-ui/core/esm/models/Registry.js 1:125-168
 @ ./node_modules/@superset-ui/chart/node_modules/@superset-ui/core/esm/index.js
 @ ./node_modules/@superset-ui/chart/esm/registries/ChartTransformPropsRegistrySingleton.js
 @ ./node_modules/@superset-ui/chart/esm/index.js
 @ ./src/addSlice/AddSliceContainer.jsx
 @ ./src/addSlice/App.jsx
 @ ./src/addSlice/index.jsx
 @ multi babel-polyfill ./src/preamble.js ./src/addSlice/index.jsx

Expected behavior
Bundle without error

Environment (please complete the following information):

  • superset-ui version: 0.7.0

Multiple Line Chart - Cannot read property 'onAddFilter' of undefined

@AndLLA commented on Oct 9, 2019, 5:26 AM UTC:

Multiple Line Chart fails due to a js error in the browser.
This happens both for a custom configuration and for the "out of the box" configuration of superset, with the demo data in the Misc Charts dashboard.

--> Cannot read property 'onAddFilter' of undefined
Seems to be related to missing "hooks" in the object received by the function below.

explore.9143456362a2ecd682d2.entry.js:formatted:141465 TypeError: Cannot read property 'onAddFilter' of undefined
at t.default (explore.9143456362a2ecd682d2.entry.js:formatted:28990)
at t.n.render (explore.9143456362a2ecd682d2.entry.js:formatted:135774)
at ba (vendors-major.1ca42289e8c2b845f403.chunk.js:formatted:11830)
at ga (vendors-major.1ca42289e8c2b845f403.chunk.js:formatted:11820)
at Ks (vendors-major.1ca42289e8c2b845f403.chunk.js:formatted:13954)
at zs (vendors-major.1ca42289e8c2b845f403.chunk.js:formatted:12981)
at js (vendors-major.1ca42289e8c2b845f403.chunk.js:formatted:12841)
at Ds (vendors-major.1ca42289e8c2b845f403.chunk.js:formatted:12714)
at vendors-major.1ca42289e8c2b845f403.chunk.js:formatted:10563
at t.unstable_runWithPriority (vendors-major.1ca42289e8c2b845f403.chunk.js:formatted:14990)

MultiLineChartError

This issue was moved by kristw from apache-superset/superset-ui-plugins#225.

Modifying table view to a gallery view to show images contained in a table row.

@yashsaxena commented on Aug 27, 2019, 12:23 PM UTC:

We're building a reporting tool that will show resultant values in table view as images+text values ( image link being one of the columns). What will be the best way to achieve this? if some one can shed light on how can we achieve this? I'll be able to get this built and do PR upstream ( as and when we're allowed to).

image

Also above image is representative - we would like to show only the image in larger size with accompanying information bundled below it or sideways.

Use case: Where the visual information in the table columns is more important than the text data to make a decision or analysis.

This issue was moved by kristw from apache-superset/superset-ui-plugins#185.

Not able to get the Chart Loaded, Successfully retrieved the payload but not able to render.

Hi,

Since NDV3 plugin dont provide typescript interface, created simple definition to expose Bar Chart like below.
....

declare module "@superset-ui/legacy-preset-chart-nvd3" {
  export { default as AreaChartPlugin } from "./lib/Area";
  export { default as BarChartPlugin } from "./lib/Bar";

} 

In my component configured the client and BarChartClient as per expectation

 SupersetClient.configure({
            host: 'myhost',
            mode: 'cors',
            protocol: "https:",
            headers: { ...Auth },
            csrfToken: 'csrf_token'
        }).init();

       const a = new BarChartPlugin()
            .configure({ key: 'bar' })
            .register();

.. received the below payload but the payload is not rendering as NDV3 bar chart

{"cache_key":null,"cached_dttm":null,"cache_timeout":10,"error":null,"form_data":{"datasource":"1__druid","viz_type":"bar","url_params":{},"granularity":"P1D","druid_time_origin":null,"time_range":"1970-01-01T00:00:00 : 2019-08-27T00:00:00","metrics":[{"expressionType":"SIMPLE","column":{"id":11,"column_name":"value_sum","verbose_name":null,"description":null,"expression":null,"filterable":false,"groupby":false,"is_dttm":null,"type":"DOUBLE","optionName":"_col_value_sum"},"aggregate":"SUM","sqlExpression":null,"hasCustomLabel":false,"fromFormData":false,"label":"SUM(value_sum)","optionName":"metric_3zmf7p8a4g9_p7fsi4zsl1j"}],"adhoc_filters":[{"expressionType":"SIMPLE","subject":"queue_id","operator":"==","comparator":"185","clause":"WHERE","sqlExpression":null,"fromFormData":true,"filterOptionName":"filter_lprl60y1x67_b4zndsnjkx"}],"groupby":["operation"],"columns":[],"row_limit":10000,"contribution":false,"color_scheme":"bnbColors","show_legend":true,"show_bar_value":false,"bar_stacked":false,"order_bars":false,"y_axis_format":".3s","y_axis_label":"","show_controls":false,"x_axis_label":"","bottom_margin":"auto","x_ticks_layout":"auto","reduce_x_ticks":false,"where":"","having":"","having_filters":[],"filters":[{"col":"queue_id","op":"==","val":"185"}]},"is_cached":false,"query":"// Two phase query\n// Phase 1\n{\n \"queryType\": \"topN\",\n \"dataSource\": \"visitor-metrics\",\n \"aggregations\": [\n {\n \"fieldName\": \"value_sum\",\n \"fieldNames\": [\n \"value_sum\"\n ],\n \"type\": \"doubleSum\",\n \"name\": \"SUM(value_sum)\"\n }\n ],\n \"granularity\": \"all\",\n \"postAggregations\": [],\n \"intervals\": \"1970-01-01T00:00:00+00:00/2019-08-27T00:00:00+00:00\",\n \"filter\": {\n \"type\": \"selector\",\n \"dimension\": \"queue_id\",\n \"value\": \"185\"\n },\n \"threshold\": 10000,\n \"metric\": \"SUM(value_sum)\",\n \"dimension\": \"operation\"\n}\n// Phase 2 (built based on phase one's results)\n{\n \"queryType\": \"topN\",\n \"dataSource\": \"visitor-metrics\",\n \"aggregations\": [\n {\n \"fieldName\": \"value_sum\",\n \"fieldNames\": [\n \"value_sum\"\n ],\n \"type\": \"doubleSum\",\n \"name\": \"SUM(value_sum)\"\n }\n ],\n \"granularity\": {\n \"type\": \"period\",\n \"timeZone\": \"UTC\",\n \"period\": \"P1D\"\n },\n \"postAggregations\": [],\n \"intervals\": \"1970-01-01T00:00:00+00:00/2019-08-27T00:00:00+00:00\",\n \"filter\": {\n \"type\": \"and\",\n \"fields\": [\n {\n \"type\": \"or\",\n \"fields\": [\n {\n \"type\": \"selector\",\n \"dimension\": \"operation\",\n \"value\": \"joining\"\n }\n ]\n },\n {\n \"type\": \"selector\",\n \"dimension\": \"queue_id\",\n \"value\": \"185\"\n }\n ]\n },\n \"threshold\": 1000,\n \"dimension\": \"operation\",\n \"metric\": \"SUM(value_sum)\"\n}","status":"success","stacktrace":null,"rowcount":1,"data":[{"key":["joining"],"values":[{"x":1566777600000.0,"y":4.0}]}]}

my render function

 return (
            <Col xs="12" sm="6" lg="3">
                <ChartDataProvider client={SupersetClient} formData={JSON.parse(formData)}>
                    {({ loading, payload, error }) => {
                        if (loading) return <div>Loading!</div>;
                        if (error) return <div>error</div>;
                        if (payload) {
                            return (
                                <SuperChart chartType={'bar'} formData={formData} chartProps={{ formData, payload, width, height }}
                                    onRenderFailure={(data: any) => {
                                        console.log(data)
                                    }} disableErrorBoundary={true} />
                            )
                        }
                    }}
                </ChartDataProvider>
            </Col>

no error in the console, In the REACT debugger I can see no component attached after PartentSize

Can you please suggest what is going wrong?

Thanks,
Rathish

Stacked area chart shows gaps when null values present

move[bot] commented on Apr 10, 2019, 4:41 PM UTC:

vylc commented on Feb 18, 2019, 7:00 AM UTC:

Chart has weird gaps when there are null values in the dataset. Expectation is that areas with null values are shaded a darker color to represent null or are not rendered (go to 0)
screen shot 2019-02-17 at 10 56 00 pm

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Superset version

Expected results

Actual results

Steps to reproduce

This issue was moved by kristw from apache/incubator-superset#6906.

This issue was moved by kristw from apache-superset/superset-ui-plugins#54.

use commit-config

Is your feature request related to a problem? Please describe.
Having a standardize commitlint as well as command line tool for creating commit messages.

Describe the solution you'd like
Use @superset-ui/commit-config similar to @superset-ui-plugins repo

make `release` script compatible with forks

Describe the bug
The current lerna release script was written assuming that the origin branch is the primary apache-superset/superset-ui repo, as opposed to a fork. This is problematic because

  • forks may not be up to date with apache-superset/superset-ui
  • publishing pushes tags and package version number changes to the fork instead of apache-superset/superset-ui, requiring a second PR to update the main repo.

cc @kristw @soboko @xtinec @conglei

Using Jinja params every where and not just in raw query views

Is your feature request related to a problem? Please describe.
No, just a "nice to have"

Describe the solution you'd like
Given that I am creating a Superset chart
when I input a custom y axis label string value
then I will use a Jinja parameter I previously set

Describe alternatives you've considered
Writing it in

Additional context
It'd be cool to use Jinja parameters every where and not just queries, I tried it out but it doesn't seem to work is this possible yet? Thank you!

Update thumbnails of all packages

@kristw commented on Apr 12, 2019, 9:53 PM UTC:

Is your feature request related to a problem? Please describe.

Most of the thumbnails are not updated. Please take new screenshots and replace thumbnail.png and thumbnailLarge with new ones.

  • thumbnail.png is 400x400 pixels
  • thumbnailLarge.png can be same with above or larger version of it.

This issue was moved by kristw from apache-superset/superset-ui-plugins#64.

is CORS working for anybody ?

I have been trying to run superset-storybook for 2 days now and I keep on getting CORS error.
Yes I have followed the guides ; installed superset[cors] and set enable_cors to true;

other than that I have also followed this guide
#118 (comment)

looking at the response from the server i noticed we are not getting the response header
Access-Control-Allow-Origin

this is what my superset_config.py looks like

ENABLE_CORS = True
CORS_OPTIONS = {
    'supports_credentials': True,
    'allow_headers': [
        'X-CSRFToken', 'Content-Type', 'Origin', 'X-Requested-With', 'Accept',
    ],
    'resources': [
         '/superset/csrf_token/'  # auth
         '/api/v1/formData/',  # sliceId => formData
         '/superset/explore_json/*',  # legacy query API, formData => queryData
         '/api/v1/query/',  # new query API, queryContext => queryData
         '/superset/fetch_datasource_metadata/'  # datasource metadata

    ],
    'origins': ['http://localhost:9001','http://localhost:3000'],
}

And the following are the error in chrome and HTTP request and response headers.

Screenshot from 2019-08-14 15-31-31
Screenshot from 2019-08-14 17-02-42 (1)

FYI the superset-storybook live demo does n't work as well.
https://apache-superset.github.io/superset-ui/

has any one faced the same issue ?
thank you

remove `diff hit` threshold

Described in #6 here

I will also fix the 90.9% of diff hit issue in another PR. there is still 98.5% coverage after this PR, I think the percentage of the lines changed in a PR is not as relevant and the threshold should be on total coverage %.

How often Superset UI is released?

Hi all,

This PR (#182) is solving an issue that it's important for me, no pressure on that :) but I would like to know how often you release Superset UI or when are going to release the next version?

Thank you in advance.

superset-ui-connection: Allow callAPI to handle PUT and PATCH requests to support superset SQLlab

Is your feature request related to a problem? Please describe.
The call API in super ui connection component currently only supports the POST command. SQLlab in superset, when saving queries, executes a PUT request to save queries. Because that function uses this component, this component needs to be changed to allow for PUT and PATCH to be executed as well. By support I mean parsing the payload in json into form variables for the request. The call API only does this for POST only. See this for the problem in superset -> apache/superset#5804

Describe the solution you'd like
The call API should work exactly the same (parsing JSON payload into form parameters) for PUT and PATCH the same way

Describe alternatives you've considered
SQLlab is already developed with SQLAlchemy to use these other verbs automatically in the framework. Changing this outside of the callAPI would be too cumbersome and unnecessary, considering that this support should exist in this component.

Additional context
The change is fairly simple. The call API should simply allow these additional verses to be used. See the

Migrate off react-loadable

Is your feature request related to a problem? Please describe.

react-loadable was the recommended way for React code splitting for a long time. However, today it is not maintained any more and it is not compatible with Webpack v4+ and Babel v7+.
If you use it, it is recommended to migrate to React.lazy or @loadable/component.
https://www.smooth-code.com/open-source/loadable-components/docs/loadable-vs-react-lazy/

Describe the solution you'd like

Migrate to React.lazy or @loadable/component.

Additional context

React.lazy is available since [email protected]

Warning "export 'xxx' was not found in '...'"

Describe the bug

Warning message about missing types. The types code are strip when transpile to javascript, but the exports are not.

WARNING in ./node_modules/@superset-ui/core/esm/index.js 1:178-260
"export 'RegistryConfig' was not found in './models/Registry'
 @ ./node_modules/@superset-ui/color/esm/CategoricalColorScale.js
 @ ./node_modules/@superset-ui/color/esm/CategoricalColorNamespace.js
 @ ./node_modules/@superset-ui/color/esm/index.js
 @ ./src/setup/setupColors.js
 @ ./src/preamble.js
 @ multi (webpack)-dev-server/client?http://localhost:9000 (webpack)/hot/dev-server.js babel-polyfill ./src/preamble.js

WARNING in ./node_modules/@superset-ui/core/esm/index.js 1:260-368
"export 'RegistryWithDefaultKeyConfig' was not found in './models/RegistryWithDefaultKey'
 @ ./node_modules/@superset-ui/color/esm/CategoricalColorScale.js
 @ ./node_modules/@superset-ui/color/esm/CategoricalColorNamespace.js
 @ ./node_modules/@superset-ui/color/esm/index.js
 @ ./src/setup/setupColors.js
 @ ./src/preamble.js
 @ multi (webpack)-dev-server/client?http://localhost:9000 (webpack)/hot/dev-server.js babel-polyfill ./src/preamble.js

WARNING in ./node_modules/@superset-ui/color/esm/index.js 1:459-542
"export 'SequentialSchemeConfig' was not found in './SequentialScheme'
 @ ./src/setup/setupColors.js
 @ ./src/preamble.js
 @ multi (webpack)-dev-server/client?http://localhost:9000 (webpack)/hot/dev-server.js babel-polyfill ./src/preamble.js

WARNING in ./node_modules/@superset-ui/connection/esm/index.js 1:42-122
"export 'SupersetClientInterface' was not found in './SupersetClient'
 @ ./src/setup/setupClient.js
 @ ./src/preamble.js
 @ multi (webpack)-dev-server/client?http://localhost:9000 (webpack)/hot/dev-server.js babel-polyfill ./src/preamble.js

See more details of similar issues.
webpack/webpack#7378

To Reproduce
Use the @superset-ui packages (that was written in TypeScript) in another app.

Expected behavior
Build successfully without warning.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • superset-ui version: 0.9.3
  • Node version: 10.10
  • npm version: 6.4.1

Cannot build recent superset-ui on certain environments

Describe the bug
I'm trying to build different versions on my Ubuntu environment, And I always get Typescript driver failure.

To Reproduce
Steps to reproduce the behavior:
yarn build
yarn install
lots of errors

**Command failed with exit code 1 (EPERM): tsc --emitDeclarationOnly

Command failed with exit code 1 (EPERM): tsc --emitDeclarationOnly

Command failed with exit code 1 (EPERM): tsc --emitDeclarationOnly

Command failed with exit code 1 (EPERM): tsc --emitDeclarationOnly

Command failed with exit code 1 (EPERM): tsc --emitDeclarationOnly

Command failed with exit code 1 (EPERM): tsc --emitDeclarationOnly

Command failed with exit code 1 (EPERM): tsc --emitDeclarationOnly

Command failed with exit code 1 (EPERM): tsc --emitDeclarationOnly

Command failed with exit code 1 (EPERM): tsc --emitDeclarationOnly**

Expected behavior
A clear and concise description of what you expected to happen.

Environment (please complete the following information):

  • superset-ui version: [e.g. v0.5.0] current, and 0.11.9
  • Node version: node -v 12.10.0
  • npm version: npm -v 6.11.3

Add support for localization of DataTables

@oskarhinc commented on Oct 15, 2019, 8:30 AM UTC:

Is your feature request related to a problem? Please describe.
DataTable components are not translated - strings are always displayed in English. It could be improved so it's customizable.

Describe the solution you'd like
DataTables support localization, and it's described in the docs. I think we could set the proper language when initializing the table components - here and here. It has to be established how to best detect which language to set - maybe by using localStorage or passing it in parameters of the plugin.

This issue was moved by kristw from apache-superset/superset-ui-plugins#232.

Modify Chord Chart D3 code to fix text labels / import custom Chord diagram

Your question.

  • How do I take chord diagram D3 source code (https://github.com/apache-superset/superset-ui/blob/master/plugins/legacy-plugin-chart-chord/src/Chord.js) that i plan to modify to improve the labeling of the diagram and then build my own custom plugin/chord diagram and use it in my build of superset?
    I've tried following along with how to do this in various scattered github conversations, and I can't seem to find a step-by-step process that is clear (to a data analyst anyway). Would appreciate any help and willing to talk outside of Github

Thanks

Simplify SupersetClient singleton

Is your feature request related to a problem? Please describe.
SupersetClient wrapper creates overhead in maintaining another type and cause confusion as there is the original class and the wrapper.

Describe the solution you'd like
Use same pattern with other singletons, but may involves breaking change to how to get the singleton which affects incubator-superset

Describe alternatives you've considered
Keep it like this

Google Map Integration as visualisation

We are working with Superset for last 6 months and primarily using it as a visualization tool with Druid. Recently we tried out Mapbox but could not find any google map integration free or licensed version.

We would be happy to contribute but you guys can review PR whenever you organize and make things stables but It would be great if you can share some pointers about integration new visualizations.

I see that I need to update viz.py and few js files. But still not very clear about new structures with plugin development. Some pointers will be very helpful.

add a new option to callApi, to turn conditional request on/off.

Is your feature request related to a problem? Please describe.
callApi GET use the etag and cached results by default. There is no choice to opt-out.

Describe the solution you'd like
Add a new option to callApi, to turn conditional request on/off.

This is a follow-up from #119

Safeguard JSON.stringify

Is your feature request related to a problem? Please describe.
JSON.stringify crashes when given circular structure.

Describe alternatives you've considered

  1. Use non-native alternative such as
    https://www.npmjs.com/package/fast-safe-stringify
  2. Consider developer needs to pass non-circular structure.

Additional context
Currently JSON.stringify is only used in SupersetClient

CountryMap can translated by message.po

@cdmikechen commented on Dec 5, 2019, 2:59 AM UTC:

I found that in CountryMap.js country name can be replace by ID_2, but it can not translated by message.po. If someone changes BABEL_DEFAULT_LOCALE in apache-superset (like zh) , he can not see province name by Chinese. Can we use @superset-ui/translation to translate name in *.geojson?

import { t } from '@superset-ui/translation';

  const selectAndDisplayNameOfRegion = function selectAndDisplayNameOfRegion(feature) {
    let name = '';
    if (feature && feature.properties) {
      if (feature.properties.ID_2) {
        name = feature.properties.NAME_2;
      } else {
        name = feature.properties.NAME_1;
      }
    }
    bigText.text(t(name));
  };

This issue was moved by kristw from apache-superset/superset-ui-plugins#288.

Split @superset-ui/query from @superset-ui/chart

Is your feature request related to a problem? Please describe.

Logic for creating QueryContext and QueryObject are in the @superset-ui/chart package.

Describe the solution you'd like

Separate them into another package for simplicity.

Describe alternatives you've considered

Don't do anything.

Rename FormData

Is your feature request related to a problem? Please describe.

One thing to watch out in TypeScript is FormData refers to browser FormData by default. If you don’t import { FormData } from '@superset-ui/chart' It will show quite confusing error. Perhaps we should rename FormData to something else to avoid name collision.

Describe the solution you'd like
Rename FormData to SupersetFormData or `something else

Describe alternatives you've considered
Keeping it as-is

Make test in @superset-ui/dimension use fake timers

Is your feature request related to a problem? Please describe.
Tests are using real timers. If this can be switch to fake timers, it can complete faster.

Describe the solution you'd like
Wait time due to real timer is greatly reduced.

Describe alternatives you've considered
Now the tests are using real timers and we accept 0.5s wait time for the action to happen before assertion.

Additional context
extracted from #281

All fetch operations fail on Firefox

Describe the bug

See apache/superset#7364. Essentially:

callApi in superset-ui-connection will try to find an existing version of the data in the cache if the window.caches object exists. Unfortunately, as MDN states:

CacheStorage always rejects with a SecurityError on untrusted origins (i.e. those that aren't using HTTPS [...])

At that point, the CacheStorage API throws and the request for the CSRF token as well as the real request are never made.

I believe the correct solution to this problem would probably be to change the constant CACHE_AVAILABLE in superset-ui-connection/src/constants.ts to something like:

export const CACHE_AVAILABLE = 'caches' in self && (self.location && self.location.protocol) === 'https:';

To Reproduce

Steps to reproduce the behavior:

  1. Setup on a non-TLS site
  2. Visit with Firefox
  3. Observe network panel in developer tools
  4. See no fetch ever being launched

Expected behavior

Fetches should be executed

Environment (please complete the following information):

  • superset-ui version: [e.g. v0.11.13]
  • Node version: 10.16.0
  • npm version: 6.9.0

Calendar heatmap dates shifted by one (converting to local time zone)

move[bot] commented on Apr 10, 2019, 4:33 PM UTC:

hyperborea commented on Jan 8, 2019, 5:17 PM UTC:

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Related to #3326, which is closed but has not been resolved.

Superset version

0.28.1

Expected results

Time is displayed consistently in the same time zone on the calendar heat map as for the data queried. The January day view should start with the 1st of January for example.

Actual results

The January day view starts with the 31st of December 23:00 for setups using CET. The data is queried correctly in UTC, but somehow seems to be displayed in local time zone instead.

Steps to reproduce

  • create calendar heatmap
  • configure with "day" time grain, "month" domain and "day" subdomain
  • observe months starting with the previous months day for time zones east of GTM and all days shifted accordingly

This issue was moved by kristw from apache/incubator-superset#6619.

This issue was moved by kristw from apache-superset/superset-ui-plugins#52.

about translation

Your question.

  • How do I use translation in chart component?

thanks!

Table filter not working

@gbrian commented on Jun 11, 2019, 10:06 AM UTC:

Describe the bug
Table filter does not remove filters and dashboards ends up storing the filters on metadata.

To Reproduce

  1. Add a Table slice to dashboard with "Emit Filter" option enabled
  2. Click on row (dashboard is filtered)
  3. Click again same row (nothing happens)
  4. Dashboard keeps filter forever

Expected behavior
Add/Remove filter

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • superset-ui version: latest
  • Node version: node -v
  • npm version: npm -v

Additional context
onRemoveFilter is never passed to the Table control. transformPropsdoes not map any removeFilter option

This issue was moved by kristw from apache-superset/superset-ui-plugins#125.

Can not build in project with 0.12.1

I clone project and run yarn install successfully, but yarn build failed.

yarn run v1.21.0
$ yarn run build:cjs && yarn run build:esm && yarn run type:dts && yarn run build:assets
$ NODE_ENV=production beemo babel --extensions=".js,.jsx,.ts,.tsx" ./src --out-dir lib/ --delete-dir-on-start --minify --workspaces="@superset-ui/!(demo|generator-superset)"
[1/2] CONFIG Creating config files
[2/2] DRIVER Running Babel v7.6.4 driver

Successfully compiled 17 files with Babel.
Successfully compiled 14 files with Babel.
Successfully compiled 10 files with Babel.
Successfully compiled 11 files with Babel.
Successfully compiled 4 files with Babel.
Successfully compiled 10 files with Babel.
Successfully compiled 17 files with Babel.
Successfully compiled 22 files with Babel.
Successfully compiled 20 files with Babel.
Successfully compiled 5 files with Babel.
Successfully compiled 18 files with Babel.

🤖  Powered by Beemo v1.1.1
$ NODE_ENV=production beemo babel --extensions=".js,.jsx,.ts,.tsx" ./src --out-dir esm/ --delete-dir-on-start --esm --minify --workspaces="@superset-ui/!(demo|generator-superset)"
[1/2] CONFIG Creating config files
[2/2] DRIVER Running Babel v7.6.4 driver

Successfully compiled 17 files with Babel.
Successfully compiled 14 files with Babel.
Successfully compiled 10 files with Babel.
Successfully compiled 11 files with Babel.
Successfully compiled 4 files with Babel.
Successfully compiled 10 files with Babel.
Successfully compiled 17 files with Babel.
Successfully compiled 22 files with Babel.
Successfully compiled 20 files with Babel.
Successfully compiled 5 files with Babel.
Successfully compiled 18 files with Babel.

🤖  Powered by Beemo v1.1.1
$ NODE_ENV=production beemo typescript --workspaces="@superset-ui/!(demo|generator-superset)" --emitDeclarationOnly
[1/2] CONFIG Creating config files (failed)

The "to" argument must be of type string. Received type object
TypeError [ERR_INVALID_ARG_TYPE]: The "to" argument must be of type string. Received type object
    at validateString (internal/validators.js:125:11)
    at Object.relative (path.js:1163:5)
    at context.workspaces.forEach.wsPath (/Volumes/Transcend/Apache/superset-ui/node_modules/@superset-ui/build-config/configs/typescript.js:24:33)
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Volumes/Transcend/Apache/superset-ui/node_modules/@superset-ui/build-config/configs/typescript.js:23:22)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Can anybody help me to check the cause?
my env version is :
node.js version: v10.16.0
npm version: 6.9.0
typescript version: 3.7.3
I have merged #227

How to implement default color scheme?

Hello everyone,

I am trying to implement a default color scheme that is coming from superset. If, for example, superset returns a query that has color_scheme: 'bnbColors' this currently is not used automatically. So I have implemented this manually with

import { getCategoricalSchemeRegistry, CategoricalScheme } from '@superset-ui/color';
import AirBnBColorScheme from '@superset-ui/color/lib/colorSchemes/categorical/airbnb';

getCategoricalSchemeRegistry().registerValue(
  data.form_data.color_scheme, // i.e. bnbColors
  new CategoricalScheme(AirBnBColorScheme)
);

But this generates the warning backend.js:6 Item with key "bnbColors" already exists. You are assigning a new value.

So: How do I set the color scheme without triggering that warning?

Sadly I can't find any kind of documentation on this matter, hence this question...

Have a way of registering a "supported" list of viz types

Is your feature request related to a problem? Please describe.
There is a need to include experimental viz types like apache/superset@43ed9a6
Currently, we hardcord the viz types we want to register in various preset files in superset.

Describe the solution you'd like
It seems we need a config value in superset called SUPPORTED_VIZ_TYPES, which contains an array of keys of supported viz types (e.g. 'table', 'word_cloud', ...) and different instances of superset can choose to include or exclude experimental viz types like kelper. Available values for SUPPORTED_VIZ_TYPES will be populated by superset-ui using keys of plugins that are found undersuperset-ui and superset-ui-legacy

Describe alternatives you've considered
We could define one-off feature flags for kepler in superset but it doesn't seem right as the viz plugin themselves would be located in superset-ui or superset-ui-legacy.

Additional context
None.

@kristw @williaster @mistercrunch

Not able to build

The yarn build command is failing and I don't know why.
Here is the snippet of the error log.

superset/superset-ui# yarn build
yarn run v1.22.4
$ yarn babel && yarn type && yarn build:assets
$ yarn babel:cjs && yarn babel:esm
$ nimbus babel --clean --workspaces="@superset-ui/!(demo|generator-superset)"
[1/2] CONFIG Creating config files
[2/2] DRIVER Running Babel v7.8.3 driver (failed)

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in /root/superset/superset-ui/node_modules/@babel/helper-compilation-targets/package.json
    at applyExports (internal/modules/cjs/loader.js:524:9)
    at resolveExports (internal/modules/cjs/loader.js:541:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:661:22)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:963:27)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/root/superset/superset-ui/node_modules/@babel/preset-env/lib/debug.js:8:33)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

node version used: v13.12.0
yarn version used: 1.22.4

X axis of Time Series does not show proper date formats

move[bot] commented on Apr 10, 2019, 4:31 PM UTC:

phellstrand77 commented on Mar 4, 2019, 10:29 PM UTC:

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Superset version

0.29.0rc8

Expected results

Expecting 'Dual Axis Line Chart' to display X axis with proper dates; e.g. 1970, 1971, 1972, etc. or Jan 1 2008, Jan 2 2008, Jan 3 2008, etc; whatever data exist and date level selected.

Actual results

The X axis does not show proper date formats. Attached show the results from the demo 'Birth' dashboard. Same erroneous results is aceived when using other datasets too. When using other BI, e.g. Tableau, the X axis shows dates correctly using the same datasets.

Steps to reproduce

Simply view the 'Birth' demo dashboard, when explore the 'Average and Sum Trends' chart.

screen shot 2019-03-04 at 5 18 16 pm

This issue was moved by kristw from apache/incubator-superset#6975.

This issue was moved by kristw from apache-superset/superset-ui-plugins#50.

SuperChart module error

i try to use superchart module

import { SuperChart } from '@superset-ui/chart';
export class Chart extends React.Component {
render() {
const { height, width,formdata,payload,CHART_TYPE } = this.state;
return (
<SuperChart type={CHART_TYPE} chartProps={{ formdata, payload, width, height }} />
);
}
but when i add data to the values i am facing some issues
error

Use d3 localization for time-format package

Is your feature request related to a problem? Please describe.
The date and time presented within the time-format package are not translated for different languages. It could be changed, so the localization would be supported.

Describe the solution you'd like
D3 library supports localization, as described in the project description. The easiest way would be probably changing the default locale at a proper moment.

Describe alternatives you've considered
According to d3 docs it is also possible to avoid setting the default locale multiple times, and use proper locale definition when needed, but this might be more complex.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.