From cc5368c873f74fe8f4b8aea7d07ea90d6618744f Mon Sep 17 00:00:00 2001 From: Cara Fisher Date: Mon, 6 Nov 2023 11:37:46 +0000 Subject: [PATCH 1/4] VUU83: Add layout management documentation - Configuring local/remote - Running the remote server --- README.md | 74 +++++++++++++------ .../src/main/resources/LayoutServer.run.xml | 13 ++++ 2 files changed, 66 insertions(+), 21 deletions(-) create mode 100644 layout-server/src/main/resources/LayoutServer.run.xml diff --git a/README.md b/README.md index b4d6bc4bd..6f080931a 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,13 @@ https://vuu.finos.org/docs/introduction/intro ## Installation - Server -### Prerequisites +### Vuu Server + +#### Prerequisites See the [Docs](https://vuu.finos.org/docs/getting_started/developing) for Java versions and install dependencies you need to have. -OS X & Linux: +#### OS X & Linux: ```sh #In your favourite code directory... @@ -29,40 +31,41 @@ cd example/main mvn exec:exec ``` -Windows: +#### Windows: ```sh this should be the same as Linux & macos just with windows adjusted paths ``` -## Installation - Client +### Layout Server -The UI scripts all run from the vuu/vuu-ui directory. +Layout management requires persisting layouts. Layouts can either be persisted locally or remotely. The remote implementation requires spinning up a Springboot server instance, but is more robust and reflective of a real-world application. -```sh -#from top-level vuu repo (not vuu child directory in repo) -cd vuu-ui -npm install -npm run build -npm run build:app -``` +#### Choosing local or remote -You can now open the demo app in your browser at https://127.0.0.1:8443/index.html +Changing whether local/remote is used is configured with the following flag: -Alternatively, you may choose to run the demo app in Electron. First install Electron in the tools/electron folder: +1. Open `finos-vuu\vuu-ui\showcase\vite.config.js` +2. Set `"process.env.LOCAL"` flag to `true` for local, or `false` for remote + +The local implementation is default. It uses browser local storage. If you have chosen the remote implementation, ensure you are running the remote server. + +#### Running the remote server + +You can run the remote server from IntelliJ or via CLI. Once running, use `http://localhost:8081/api/swagger` to review endpoints and contracts. It uses an in-memory H2 database, and can be accessed at `http://localhost:8081/api/h2-console`. + +##### CLI ```sh #from top-level vuu repo (not vuu child directory in repo) -cd vuu-ui/tools/electron -npm install +cd layout-server +mvn spring-boot:run ``` -Then, back in vuu-ui, run the launch script" +##### From IntelliJ -```sh -#from vuu/vuu-ui -npm run launch:demo:electron -``` +1. Follow steps 3-5 outlined in 'Configuring IntelliJ' below +2. Select 'LayoutServer' config and click run ## Configuring IntelliJ @@ -89,6 +92,35 @@ npm run build 8. In IntelliJ, select 'SimulMain' config and click run 9. If you get a 'certificate-unknown' error, set 'Allow invalid certificates for resources loaded from localhost' to 'Enabled' in your chrome settings +## Installation - Client + +The UI scripts all run from the vuu/vuu-ui directory. + +```sh +#from top-level vuu repo (not vuu child directory in repo) +cd vuu-ui +npm install +npm run build +npm run build:app +``` + +You can now open the demo app in your browser at https://127.0.0.1:8443/index.html + +Alternatively, you may choose to run the demo app in Electron. First install Electron in the tools/electron folder: + +```sh +#from top-level vuu repo (not vuu child directory in repo) +cd vuu-ui/tools/electron +npm install +``` + +Then, back in vuu-ui, run the launch script" + +```sh +#from vuu/vuu-ui +npm run launch:demo:electron +``` + ## Usage example ``` diff --git a/layout-server/src/main/resources/LayoutServer.run.xml b/layout-server/src/main/resources/LayoutServer.run.xml new file mode 100644 index 000000000..660ef7082 --- /dev/null +++ b/layout-server/src/main/resources/LayoutServer.run.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file From ff0309a2f5d28e0243fa90fcb5b70c2583bc385e Mon Sep 17 00:00:00 2001 From: Cara Fisher Date: Mon, 6 Nov 2023 11:38:42 +0000 Subject: [PATCH 2/4] VUU86: Apply markdown-lint fixes to main README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6f080931a..00c2f03f3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Welcome. We maintain a docusaurus site containing all the details of the project. Why not get started there: -https://vuu.finos.org/docs/introduction/intro + ## Installation - Server @@ -16,7 +16,7 @@ https://vuu.finos.org/docs/introduction/intro See the [Docs](https://vuu.finos.org/docs/getting_started/developing) for Java versions and install dependencies you need to have. -#### OS X & Linux: +#### OS X & Linux ```sh #In your favourite code directory... @@ -31,7 +31,7 @@ cd example/main mvn exec:exec ``` -#### Windows: +#### Windows ```sh this should be the same as Linux & macos just with windows adjusted paths @@ -104,7 +104,7 @@ npm run build npm run build:app ``` -You can now open the demo app in your browser at https://127.0.0.1:8443/index.html +You can now open the demo app in your browser at Alternatively, you may choose to run the demo app in Electron. First install Electron in the tools/electron folder: From ffc992b5ce1f3f688004323e2a6adfaee7f2e25f Mon Sep 17 00:00:00 2001 From: Cara Fisher Date: Fri, 17 Nov 2023 09:51:49 +0000 Subject: [PATCH 3/4] VUU83: Fix run config --- .../src/main/resources/LayoutServer.run.xml | 13 ------------- .../runconfigurations/LayoutServer.run.xml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 13 deletions(-) delete mode 100644 layout-server/src/main/resources/LayoutServer.run.xml create mode 100644 layout-server/src/main/resources/runconfigurations/LayoutServer.run.xml diff --git a/layout-server/src/main/resources/LayoutServer.run.xml b/layout-server/src/main/resources/LayoutServer.run.xml deleted file mode 100644 index 660ef7082..000000000 --- a/layout-server/src/main/resources/LayoutServer.run.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - \ No newline at end of file diff --git a/layout-server/src/main/resources/runconfigurations/LayoutServer.run.xml b/layout-server/src/main/resources/runconfigurations/LayoutServer.run.xml new file mode 100644 index 000000000..02724b289 --- /dev/null +++ b/layout-server/src/main/resources/runconfigurations/LayoutServer.run.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file From 58054746696baef070889822b53c22648765d7f1 Mon Sep 17 00:00:00 2001 From: Cara Fisher Date: Mon, 20 Nov 2023 14:27:08 +0000 Subject: [PATCH 4/4] SLVUU-113: Add instructions for sample-app envar local/remote configuration --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00c2f03f3..6eff79e88 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Layout management requires persisting layouts. Layouts can either be persisted l Changing whether local/remote is used is configured with the following flag: -1. Open `finos-vuu\vuu-ui\showcase\vite.config.js` +1. Open `finos-vuu\vuu-ui\showcase\vite.config.js` (for Showcase), or `finos-vuu\vuu-ui\sample-apps\app-vuu-example\esbuild.mjs` (for sample app) 2. Set `"process.env.LOCAL"` flag to `true` for local, or `false` for remote The local implementation is default. It uses browser local storage. If you have chosen the remote implementation, ensure you are running the remote server.