Skip to content
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

Run webviz from source build without launching docs page #406

Open
ben-greenberg opened this issue Apr 21, 2020 · 7 comments
Open

Run webviz from source build without launching docs page #406

ben-greenberg opened this issue Apr 21, 2020 · 7 comments

Comments

@ben-greenberg
Copy link

I've built webviz from source and have been using it with great success. The only kink in my system is that currently when I want to open up the webviz application in a browser, I have to run npm run docs which launches the docs app in addition to running the webviz application.

Is there another way to run just the application without launching the docs page?

@janpaul123
Copy link
Contributor

You could host it online somewhere? We host webviz.io/app using Github Pages.

@castaway2000
Copy link

@janpaul123 I think what they are saying is that they would like to run the webviz App as landing page. Is there an easy way to implement the webviz-core package in a standard html page or modify the existing React application to point the landing page to be the webviz app?

I was also looking into doing this using the webviz-core package as a static website however it seems the webviz-core package is not able to source /dist/webvizCoreBundle.js and is not in the repo from what I can tell, How is this bundle sourced?

if the bundle was included it would make for an easier solution to the problem by simply running the package as a standalone app.

@janpaul123
Copy link
Contributor

janpaul123 commented Apr 28, 2020

You can see here how we publish our gh-pages branch:

"docs-deploy": "cp -r docs/public __temp_deploy__ && cp --remove-destination packages/webviz-core/public/index.html __temp_deploy__/app/index.html && echo 'webviz.io' > __temp_deploy__/CNAME && gh-pages -d __temp_deploy__ && rm -rf __temp_deploy__",

You can also statically host the gh-pages branch directly yourself. It's what gets hosted on webviz.io. You can see that it has an app/index.html that contains the actual application.

@janpaul123
Copy link
Contributor

Maybe we should pull that out into its own command so everyone can easily generate a static build? Happy to take PRs for that!

@kevinrev26
Copy link

What if I wanted to use the individual components of the WebViz Core?

How should I import them?

@janpaul123
Copy link
Contributor

We don't currently support that. Those are considered internal API and might change heavily on every release. But if you really want to I guess you can just import them like any other component; e.g. import useDataSourceInfo from "webviz-core/src/PanelAPI/useDataSourceInfo";

janpaul123 pushed a commit that referenced this issue May 11, 2020
+ a Docker image that has just Webviz installed in it.

There have been multiple requests for something like this, especially
from people who want to use Webviz in situations with limited internet
connectivity. See e.g. #120, #267, and #406.

I’ve also renamed the current Dockerfile.

I’ll follow up with another PR that updates the README to explain how to
use the new Docker image once I’ve figured out how to set up automated
Docker builds.

Test plan: tested this locally. There’s some risk of this getting out of
sync since we don’t run this in CI, but hopefully with the automated
Docker build which I’ll set up later we’ll at least get some coverage on
this flow.
janpaul123 added a commit that referenced this issue May 12, 2020
+ a Docker image that has just Webviz installed in it.

There have been multiple requests for something like this, especially
from people who want to use Webviz in situations with limited internet
connectivity. See e.g. #120, #267, and #406.

I’ve also renamed the current Dockerfile.

I’ll follow up with another PR that updates the README to explain how to
use the new Docker image once I’ve figured out how to set up automated
Docker builds.

Test plan: tested this locally. There’s some risk of this getting out of
sync since we don’t run this in CI, but hopefully with the automated
Docker build which I’ll set up later we’ll at least get some coverage on
this flow.
@janpaul123
Copy link
Contributor

Btw I set up a Slack workspace to make it easier for us to chat; join us using the link here: #461

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants