i2group / notebook-sdk

Create plug-ins that expand and enhance the functionality of the i2 Notebook web client by using the i2 Notebook SDK. The SDK is comprised of documentation, tools, and sample code.
https://i2group.github.io/notebook-sdk/
MIT License
4 stars 1 forks source link

Rebuild plugins #5

Closed stvdo closed 12 months ago

stvdo commented 1 year ago

Good afternoon,

I changed a react plugin and uploaded the build folder content to my config in an i2 Analyze (4.4.2) in the i2a-plugin folder/{plugin_name}.

I changed among other things the SVG in the entrypoint.js. After I uploaded the files, I redeployed my config. But the plugin icon didn't change.

I also changed the version in public/plugin.json. But this didn't help neither.

And I did a clean deploy and a normal deploy, but nothing changed.

I use i2 Analyze containers v 2.6.0.

What else can I do?

stvdo commented 1 year ago

Also the code in the ToolView.tsx is not updated. I changed the logic for the position, I ran 'npm run build', removed the static plugin folder on our demo server (2.7.0 instead of 2.6.0) and copied the new files to it. After this I deployed the config again. But the ToolView.tsx keeps the old code, while it was changed in the static plugin folder.

I tried also via incognito, but this didn't fix the issue.

image image

On the server the code seems to be correct. image

Tim-Mawson-i2 commented 1 year ago

Hello @sdorresteijn88,

This feels like either a deployment or configuration issue of the plugin in i2 Analyze (https://github.com/i2group/analyze-containers/issues), or a caching problem. Can you first try making sure your browser cache is cleared?

Tim

stvdo commented 1 year ago

Hello Tim,

Thanks for your response! I cleared the cache, this doesn't solve the issue.

Should I create a new issue there or can you forward it to a colleague?

Tim-Mawson-i2 commented 1 year ago

For now, try raising an issue at https://github.com/i2group/analyze-containers/issues, I'll forward it to someone in that area of knowledge.

Tim-Mawson-i2 commented 12 months ago

Hi @sdorresteijn88, could you list the exact contents of your i2a-plugins/{plugin name}/static/js folder? I noticed that your search for your "fixed" code returned matches in the main.044b8a2b.js.map file, I'm wondering why there isn't a match for the actual main.044b8a2b.js file. Also I notice that the file shown in the browser is main.41eea9fd.js, which makes me wonder if it's a copying/uploading issue to the i2a-plugins folder. You could also double check that i2a-plugins/{plugin name}/index.html has a <script> element pointing to the expected ./static/js/main.044b82b.js file.

stvdo commented 12 months ago

Hi Tim,

See this printscreen for the static/js folder content. image

Left the 'new code' on the server, right the 'new code' in the build folder of my local dev plugin. image

Below the search in the src folder, the code is in the ToolView.tsx image

So something must go wrong during the local deployment. So I deployed again. image

And again the new code is only visible in the .map file. image

I think I forgot to copy the index.html, the source is indeed wrong. image

I changed the index.html and now it works again.

Thanks a lot for your help!

stvdo commented 12 months ago

I forgot to close the issue.