Skip to content
Snippets Groups Projects
Commit 29032a59 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'f-service' into 'dev'

ENH: Add grpc entity service to webui

See merge request !137
parents 315c30b0 848d2a8e
No related branches found
No related tags found
2 merge requests!139FIX: Set horizontal scroll of property names to auto,!137ENH: Add grpc entity service to webui
Pipeline #53313 passed
......@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ###
- GRPC Entity Service can be enabled with `BUILD_MODULE_EXT_GRPC_ENTIY_SERVICE=ENABLED`. Defaults to `DISABLED`. More info on this module under `src/doc/extension/grpc-entity-service.rst`. <https://docs.indiscale.com/caosdb-webui/extension/grpc-entity-service.html>
### Changed ###
### Deprecated ###
......
......@@ -58,6 +58,7 @@ BUILD_MODULE_SHOW_ID_IN_LABEL=DISABLED
BUILD_MODULE_LEGACY_QUERY_FORM=DISABLED
BUILD_MODULE_LEGACY_MAP=ENABLED
BUILD_MODULE_EXT_FILE_UPLOAD=ENABLED
BUILD_MODULE_EXT_GRPC_ENTITY_SERVICE=DISABLED
BUILD_MODULE_USER_MANAGEMENT=ENABLED
BUILD_MODULE_USER_MANAGEMENT_CHANGE_OWN_PASSWORD_REALM=CaosDB
......
......@@ -115,6 +115,7 @@ var ext_bookmarks = function ($, logger, config) {
const set_export_button_click = config["set_export_button_click"] || function (cb) {
$("#caosdb-f-bookmarks-export-link")
.toggleClass("disabled", !cb)
.off("click") // remove old click handler
.on("click", cb);
}
......@@ -804,4 +805,4 @@ $(document).ready(function () {
ext_bookmarks = ext_bookmarks($, log.getLogger("ext_bookmarks"), config);
caosdb_modules.register(ext_bookmarks);
}
});
\ No newline at end of file
});
This diff is collapsed.
Enable GRPC Entity Service
==========================
You code against the LinkAhead GRPC API via the grpc-entity-service module.
Enable it via the build variable:
.. code-block::
BUILD_MODULE_EXT_GRPC_ENTITY_SERVICE=ENABLED
You can, among other things,
1. create a new TransactionService:
.. code-block:: javascript
var service = new window.entityService.TransactionService(
window.connection.getBasePath() + "api");
2. execute a query:
.. code-block:: javascript
var response = await service.executeQuery("FIND Something");
3. Use the Entity class to wrapp the "Entity" WebGRPC-Message:
.. code-block:: javascript
var entity = new windown.entityService.Entity(
response.getResponsesList()[0]
.getRetrieveResponse()
.getFindQueryResult()
.getResultSetList()[0]
.getEntityResponse()
.getEntity());
More information on the TransactionService class: https://gitlab.indiscale.com/caosdb/src/caosdb-webui-entity-service/-/blob/main/src/TransactionService.js
More information on the API: https://docs.indiscale.com/caosdb-proto/packages/caosdb.entity.v1.html#caosdb-entity-v1-main-proto
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment