Skip to content
Snippets Groups Projects
Verified Commit 88bb7bd4 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

More docs, update CHANGELOG and example config for bottom_line

parent c6d367a5
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added (for new features, dependecies etc.)
* ext_bottom_line module (v0.1 - Experimental)
* A module which adds a preview section where any kind of summarizing
information (like plots, video players, thumbnails...) can be shown.
* Apart from some limitted standard configuration for images and videos,
the content of the preview section (the bottom line) has to be configured
in `conf/ext/json/ext_bottom_line.json`. An example configuration with
made-up entities is located in `conf/core/json/ext_bottom_line.json`.
* More documentation in `src/core/js/ext_bottom_line.js`.
* Map (v0.3)
* Adds a button to the navbar which toggles a map in the top of the main
panel. The map currently shows all known entities which have geolocation
......
{ "version": 0.1,
"creators": [
{ "id": "test.success",
"is_applicable": "(entity) => getParents(entity).map(par => par.name).includes('TestPreviewRecordType') && getEntityName(entity) === 'TestPreviewRecord-success'",
"create": "(entity) => 'SUCCESS'"
},
{ "id": "test.error",
"is_applicable": "(entity) => getParents(entity).map(par => par.name).includes('TestPreviewRecordType') && getEntityName(entity) === 'TestPreviewRecord-error'",
"create": "(entity) => new Promise((res,rej) => {rej('Test Error');})"
},
{ "id": "test.load-forever",
"is_applicable": "(entity) => getParents(entity).map(par => par.name).includes('TestPreviewRecordType') && getEntityName(entity) === 'TestPreviewRecord-load-forever'",
"create": "(entity) => new Promise((res,rej) => {})"
},
{ "id": "test.success-2",
"is_applicable": "(entity) => getParents(entity).map(par => par.name).includes('TestPreviewRecordType') && getEntityName(entity) !== 'TestPreviewRecord-fall-back'",
"create": "(entity) => { return plotly_preview.create_plot([{x: [1,2,3,4,5], y: [1,2,4,8,16]}]); }"
}
]
}
......@@ -28,6 +28,11 @@
* Add a special section to each entity one the current page where a thumbnail,
* a video preview or any other kind of summary for the entity is shown.
*
* Apart from some defaults, the content for the bottom line has to be
* configured in the file `conf/ext/json/ext_bottom_line.json` which must
* contain a {@link BottomLineConfig}. An example is located at
* `conf/core/json/ext_bottom_line.json`.
*
* @module ext_bottom_line
* @version 0.1
*
......@@ -40,6 +45,26 @@
*/
var ext_bottom_line = function ($, logger, is_in_view_port, load_config, getEntityPath, connection) {
/**
* @type {BottomLineConfig}
* @property {string} version - the version of the configuration which must
* match this module's version.
* @property {CreatorConfig[]} creators - an array of creators.
*/
/**
* @type {CreatorConfig}
* @property {string} [id] - a unique id for the creator. optional, for
* debuggin purposes.
* @property {string} is_applicable - This has to be valid javascript! A
* function which accepts one parameter, an entity in html
* representation, and returns a truth value.
* @property {string} create - This has to be valid javascript! A function
* which accepts one parameter, an entity in html representation, and
* returns a HTMLElement which will be shown in the bottom line
* container.
*/
/**
* Check if an entity has a path attribute and one of a set of extensions.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment