-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable locally runnable visualiser #982
Comments
hey @osamajandali I hope you have had a chance to check out the video that @jawache sent on the 9th of August about the IF website. He mentioned needing to film a quick walk through where he wants to be able to frequently visualise a manifest file that's only available on the local machine without needing to upload it. He envisages running I wanted to hear your thoughts on how this could work. Please give your opinion on how this could be implemented and what development steps would need to be done. 🙏 |
I agree with the approach of creating a command that takes the manifest file and sends it to the visualizer. The next step is to determine the mechanism for sending the file. Given the file size, it cannot be stringified and sent as a parameter via the URL. I suggest that when the command is executed, it should upload the file to a CDN (e.g., S3). The visualizer can then fetch the file from the CDN URL and proceed to handle it as it normally would. |
Thanks @zanete and @osamajandali generally I'm against uploading it to something like S3 since people might have sensitive data on their manifest files. For the demo can I just run the visualizer locally and then drag a local filesystem file in there? I was proposing in the video maybe we can just POST the file over https and never store it? Best solution is a command that just opens a localhost browser with visualizer running and the file passed via localhost or something? Basically, best solution is a solution where the manifest file doesn't leave your computer. |
fyi @jawache @osamajandali, @narekhovhannisyan will do some investigation on how the manifest could be passed to the visualiser and will let us know |
@narekhovhannisyan and folk can you describe in detail what is being proposed as a solution? |
@jawache @zanete @osamajandali if we are going to run |
Gotcha, so just POST the local file to a local (?) web server. On POST web server injects the YAML in the JavaScript as a string and then when the visualizer loads, the YAML is right there for it to load and display? If so that works for me and the demo onstage, will look good. if-vis doesn't need to launch a browser, I will just open one up pointed to localhost:8080, make it fit the right size of the screen, and just refresh that. It will be annoying if it keeps on opening up a browser every time I run it, and then I have to make sure that new browser window is in the right place. If the above is the approach let's just use localhost for now. In fact, I'd say if-vis IS the local web server, when you run if-vis, it just launches a localhost:8080 server which if you load has the YAML injected into it! |
@jawache almost yeah, I think for not making things complicated with requests, we can just await for the readFile operation, and then render the website with the YAML injected. WDYT? |
Final resolution:
|
Why: Sub of #951
What: enable visualising a manifest file locally without needing to upload it anywhere to get a URL
Scope of work:
Acceptance Criteria
Scenario 1: Happy path
GIVEN user has IF set up on their localhost
AND user has a webserver and runnable if visualiser code
AND user has prepared a manifest file stored in
path A
WHEN user calls
if-vis
withpath A
as parameterTHEN TBC
Scenario 2: Refresh after changes
GIVEN user has IF set up on their localhost
AND user has a webserver and runnable if visualiser code
AND user has prepared a manifest file stored in
path A
AND user has successfully run
if-vis
for the manifest file stored inpath A
AND user has made changes to the manifest file stored in
path A
WHEN user TBC - what is the trigger to get the web to update
THEN
Scenario 3: Errors
GIVEN user has IF set up on their localhost
WHEN user calls
if-vis
in conditions described in table belowTHEN user gets an error message that corresponds to the condition as described in the table below
NOTES:
The text was updated successfully, but these errors were encountered: