forked from deephaven/web-client-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loads the widget - Fixes deephaven#1629
- Loading branch information
Showing
26 changed files
with
642 additions
and
22 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# See the values in [code sudio](../code-studio/.env) for more details | ||
BASE_URL=./ | ||
# We assume embed-chart is served at a nested path, e.g. '/iframe/chart' | ||
VITE_CORE_API_URL=../../jsapi | ||
VITE_MODULE_PLUGINS_URL=/js-plugins | ||
VITE_CORE_API_NAME=dh-core.js | ||
VITE_BUILD_PATH=./build | ||
VITE_LOG_LEVEL=2 | ||
VITE_FAVICON=/favicon-cc-app.svg | ||
VITE_PROXY_URL=http://localhost:10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
BASE_URL=/iframe/chart/ | ||
VITE_LOG_LEVEL=4 | ||
VITE_ENABLE_LOG_PROXY=false | ||
VITE_FAVICON=./favicon-cc-app-dev.svg | ||
|
||
# 4030 So not to conflict with code-studio | ||
PORT=4030 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./public/__mocks__/dh-core.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Embedded Deephaven Widget | ||
|
||
This project uses [Vite](https://vitejs.dev/guide/). It is to provide an example React application connecting to Deephaven and displaying a widget. | ||
|
||
## Getting Started | ||
|
||
1. **Start the server**: Following instructions on GitHub to run deephaven-core with python: https://github.com/deephaven/deephaven-core/#run-deephaven. | ||
2. **Install dependencies**: Run `npm install` to install all dependencies required. | ||
3. **Start the UI**: Run `npm start` to start up the UI. It should automatically open up at http://localhost:4030. | ||
|
||
## Query Parameters | ||
|
||
- `name`: Required. The name of the widget to load | ||
|
||
## Advanced | ||
|
||
### Application Mode | ||
|
||
See the guide for how to set up core in Application Mode: https://deephaven.io/core/docs/how-to-guides/application-mode/ | ||
|
||
Once Deephaven is running, you can open a widget with a specific name by adding the query param `name`, e.g. http://localhost:4030/?name=world | ||
|
||
### Configuring Server Address | ||
|
||
By default, this project assumes you are hosting Deephaven with Python on the default port at http://localhost:10000. If Deephaven is running on a different port/server, update the `VITE_CORE_API_URL` environment variable to point to the correct server. See [.env](./.env) file for the default definition, and [vite docs](https://vitejs.dev/guide/env-and-mode.html#env-variables-and-modes) for other ways to set this environment variable. | ||
|
||
## Available Scripts | ||
|
||
In the project directory, you can run: | ||
|
||
### `npm start` | ||
|
||
Runs the app in the development mode.\ | ||
Open [http://localhost:4030](http://localhost:4030) to view it in the browser. | ||
|
||
The page will reload if you make edits.\ | ||
You will also see any lint errors in the console. | ||
|
||
### `npm test` | ||
|
||
Launches the test runner in the interactive watch mode.\ | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
|
||
### `npm run build` | ||
|
||
Builds the app for production to the `build` folder.\ | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
|
||
The build is minified and the filenames include the hashes.\ | ||
Your app is ready to be deployed! | ||
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<base href="%BASE_URL%" /> | ||
<meta name="ui-version" content="v%npm_package_version%" /> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1, shrink-to-fit=no" | ||
/> | ||
<meta name="theme-color" content="#2d2a2e" /> | ||
<!-- | ||
manifest.json provides metadata used when your web app is added to the | ||
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/ | ||
--> | ||
<link rel="manifest" href="/manifest.json" /> | ||
|
||
<link rel="icon" href="%VITE_FAVICON%" /> | ||
<title>Deephaven Embedded Chart</title> | ||
</head> | ||
<body> | ||
<noscript> You need to enable JavaScript to run this app. </noscript> | ||
<div id="root"></div> | ||
<script type="module" src="/src/index.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const baseConfig = require('../../jest.config.base.cjs'); | ||
const packageJson = require('./package'); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
displayName: packageJson.name, | ||
resetMocks: false, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
├─ @deephaven/code-studio@0.0.1 | ||
│ ├─ licenses: Apache-2.0 | ||
│ └─ repository: https://github.com/deephaven/web-client-ui | ||
├─ @deephaven/components@0.0.1 | ||
│ ├─ licenses: Apache-2.0 | ||
│ └─ repository: https://github.com/deephaven/web-client-ui | ||
├─ @deephaven/grid@0.0.1 | ||
│ ├─ licenses: Apache-2.0 | ||
│ └─ repository: https://github.com/deephaven/web-client-ui | ||
├─ @deephaven/icons@0.0.1 | ||
│ ├─ licenses: Apache-2.0 | ||
│ └─ repository: https://github.com/deephaven/web-client-ui | ||
├─ @deephaven/jsapi-shim@0.0.1 | ||
│ ├─ licenses: Apache-2.0 | ||
│ └─ repository: https://github.com/deephaven/web-client-ui | ||
├─ @deephaven/log@0.0.1 | ||
│ ├─ licenses: Apache-2.0 | ||
│ └─ repository: https://github.com/deephaven/web-client-ui | ||
└─ @deephaven/utils@0.0.1 | ||
├─ licenses: Apache-2.0 | ||
└─ repository: https://github.com/deephaven/web-client-ui | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"name": "@deephaven/embed-widget", | ||
"version": "0.55.0", | ||
"description": "Deephaven Embedded Chart", | ||
"author": "Deephaven Data Labs LLC", | ||
"license": "Apache-2.0", | ||
"type": "module", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/deephaven/web-client-ui.git", | ||
"directory": "packages/embed-widget" | ||
}, | ||
"homepage": ".", | ||
"main": "public/index.js", | ||
"files": [ | ||
"build" | ||
], | ||
"dependencies": { | ||
"@deephaven/app-utils": "file:../app-utils", | ||
"@deephaven/components": "file:../components", | ||
"@deephaven/dashboard-core-plugins": "file:../dashboard-core-plugins", | ||
"@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", | ||
"@deephaven/jsapi-components": "file:../jsapi-components", | ||
"@deephaven/jsapi-types": "file:../jsapi-types", | ||
"@deephaven/jsapi-utils": "file:../jsapi-utils", | ||
"@deephaven/log": "file:../log", | ||
"@deephaven/plugin": "file:../plugin", | ||
"fira": "mozilla/fira#4.202", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2" | ||
}, | ||
"scripts": { | ||
"analyze": "source-map-explorer build/assets/*.js --no-border-checks", | ||
"start": "vite", | ||
"build": "NODE_OPTIONS='--max-old-space-size=4096' vite build", | ||
"preview": "vite preview" | ||
}, | ||
"devDependencies": { | ||
"@deephaven/eslint-config": "file:../eslint-config", | ||
"@deephaven/mocks": "file:../mocks", | ||
"@deephaven/prettier-config": "file:../prettier-config", | ||
"@deephaven/stylelint-config": "file:../stylelint-config" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"short_name": "Deephaven", | ||
"name": "Deephaven Community App", | ||
"icons": [ | ||
{ | ||
"src": "favicon-cc-app.svg", | ||
"sizes": "any", | ||
"type": "image/svg+xml" | ||
} | ||
], | ||
"start_url": "./index.html", | ||
"display": "standalone", | ||
"theme_color": "#2d2a2e", | ||
"background_color": "#2d2a2e" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Import Deephaven styling so we can use it's variables | ||
@import '@deephaven/components/scss/custom.scss'; | ||
|
||
.App { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
height: 100%; | ||
width: 100%; | ||
background: $black; | ||
color: $white; | ||
} |
Oops, something went wrong.