Skip to content

Commit 8a93661

Browse files
committed
Merge branch 'main' into yogesh-dashi-vega
# Conflicts: # dashi/package-lock.json # dashi/package.json
2 parents a8d65bf + 45921d4 commit 8a93661

File tree

9 files changed

+3381
-1191
lines changed

9 files changed

+3381
-1191
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# dashi
2-
Dashboard experiments
2+
3+
See [here](dashi/README.md).

dashi/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 by Brockmann Consult GmbH and contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

dashi/README.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,54 @@
11
# dashi
22

3-
Dashi is a demo for server-configured panels using Plotly + Tornado.
3+
Dashi is a JavaScript library that allows configuring server-side widgets
4+
and plugging them into existing web frontends.
45

5-
### Run UI
6+
_Note, this library is experimental and under development still._
7+
8+
## How it is supposed to work
9+
10+
Users write the widgets in, e.g. Python, and a REST server implements three
11+
endpoints to publish the widgets:
12+
13+
- `GET /contributions`: Called once after application UI starts up.
14+
Returns an object whose keys are contribution points (e.g., "panels")
15+
and whose values are arrays of contribution objects.
16+
- `POST /layout/{contribPoint}/{contribIndex}`:
17+
Called once for every contribution when it becomes visible in the UI.
18+
Returns the contribution's initial component tree
19+
- `POST /callback`:
20+
Called when users interact with the component tree or on application
21+
state changes. Returns an array of contribution changes where each
22+
contribution change contains an array of actions to be applied to the
23+
component tree.
24+
25+
The following sequence diagram depicts how the library is supposed to
26+
work. The top shows the JavaScript frontend that uses this library.
27+
The bottom shows the lifeline of the backend REST server.
28+
29+
![docs/sequence.png](docs/sequence.png)
30+
31+
## How to run the demo
632

733
```bash
34+
git clone https://github.com/bcdev/dashi.git
35+
```
36+
37+
### Run the server
38+
39+
```bash
40+
cd dashi/dashipy
41+
conda env create
42+
conda activate dashi
43+
pip install -ve .
44+
python -m dashipy.demo.server
45+
```
46+
47+
### Run the UI
48+
49+
```bash
50+
cd ../dashi
851
npm install
952
npm run dev
1053
```
54+

dashi/docs/sequence.png

60.5 KB
Loading

0 commit comments

Comments
 (0)