-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using Chartlets 0.0.28; generating developer reference
- Loading branch information
Showing
14 changed files
with
215 additions
and
79 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## Server-side UI Contributions | ||
|
||
Starting with xcube Server 1.8 and xcube Viewer it is possible to enhance | ||
the viewer UI by _server-side contributions_ programmed in Python. | ||
For this to work, service providers can now configure xcube Server to load | ||
one or more Python modules that provide UI-contributions of type | ||
`xcube.webapi.viewer.contrib.Panel`. | ||
Users can create `Panel` objects and use the two decorators | ||
`layout()` and `callback()` to implement the UI and the interaction | ||
behaviour, respectively. The new functionality is provided by the | ||
[Chartlets](https://bcdev.github.io/chartlets/) Python library. | ||
|
||
A working example can be found in the | ||
[xcube repository](https://github.com/xcube-dev/xcube/tree/5ebf4c76fdccebdd3b65f4e04218e112410f561b/examples/serve/panels-demo). | ||
|
||
## Available State Properties | ||
|
||
In the following, xcube Viewer's state properties are listed. | ||
These properties can be accessed in the input and state channels you pass | ||
to the `layout()` and `callback()` decorators. To trigger a callback | ||
call when a state property changes use the input syntax | ||
`Input("@app", <property>)`. To just read a property from the state use | ||
`State("@app", <property>)`. | ||
|
||
${text} |
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 was deleted.
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
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,20 @@ | ||
import { Dispatch, Store } from "redux"; | ||
import { initializeContributions } from "chartlets"; | ||
|
||
import { AppState } from "@/states/appState"; | ||
import { selectedServerSelector } from "@/selectors/controlSelectors"; | ||
import { newDerivedStore } from "./store"; | ||
|
||
export function initializeExtensions(store: Store) { | ||
return (_dispatch: Dispatch, getState: () => AppState) => { | ||
const apiServer = selectedServerSelector(getState()); | ||
initializeContributions({ | ||
hostStore: newDerivedStore(store), | ||
logging: { enabled: import.meta.env.DEV }, | ||
api: { | ||
serverUrl: apiServer.url, | ||
endpointName: "viewer/ext", | ||
}, | ||
}); | ||
}; | ||
} |
File renamed without changes.
Oops, something went wrong.