grafana / grafana-iot-twinmaker-app

AWS IoT TwinMaker Application Plugin for Grafana
Apache License 2.0
19 stars 14 forks source link

How to contribute to "aws-iot-twinmaker-grafana-utils" package? #93

Closed eercanayar closed 2 years ago

eercanayar commented 2 years ago

Hi all, I would like to contribute to "aws-iot-twinmaker-grafana-utils" package, which is referred to a static file in package.json

...
  "dependencies": {
    "aws-iot-twinmaker-grafana-utils": "file:libs/aws-iot-twinmaker-grafana-utils-1.0.0.tgz",
...

Where do we maintain this package? Who is responsible to build the tgz file when it's changed and place it to this repo?

What I'm trying to do? When a panel in Grafana set up to visualize a TwinMaker scene, it fails if its corresponding S3 bucket for 3D model resources isn’t configured for CORS access properly. Customers are able to resolve the issue by searching the error message on internet and applying what is recommended on repost.aws. However, the error message is not explicit enough:

Load 3D Scene failed with Network Failure

I know that the browser itself can’t know if it’s a CORS error or something else. Even though, we can have a better error message to guide customers/users to find the issue quicker.

Load 3D Scene failed with Network Failure: Some of the 3D model resources are missing, or your browser isn’t able to access the 3D model resource files due to missing CORS configuration. Please reach out to your administrator.

This error message is defined in ./aws-iot-twinmaker-grafana-utils/dist/index.js. So, this is why I'm investigating how to contribute that package.

...
        this.renderErrorView = () => {
            const errorMessage = this.state.loadSceneError;
            return (React__default["default"].createElement("div", { className: styles.loadingWrapper },
                React__default["default"].createElement(vendor.Box, { margin: 'xs' },
                    "Load 3D Scene failed ",
                    errorMessage ? 'with ' + errorMessage : '')));
        };
...
TheEvilDev commented 2 years ago

aws-iot-twinmaker-grafana-utils is a pseudo package created internally, and vended to grafana plugin. We are working to open source this, but that hasn't been released yet.

I looked into this issue, and this area of the application is undergoing significant refactoring currently, so while the request seems likely to be valid post the open source release, it'll take a different form.

For now closing this issue, but it should be much easier to contribute to these elements in the near future.

taleena commented 2 years ago

Closing per comment above.