Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-webui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-webui
Commits
88bb7bd4
Verified
Commit
88bb7bd4
authored
5 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+8
-0
8 additions, 0 deletions
CHANGELOG.md
conf/core/json/ext_bottom_line.json
+20
-0
20 additions, 0 deletions
conf/core/json/ext_bottom_line.json
src/core/js/ext_bottom_line.js
+25
-0
25 additions, 0 deletions
src/core/js/ext_bottom_line.js
with
53 additions
and
0 deletions
CHANGELOG.md
+
8
−
0
View file @
88bb7bd4
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
conf/core/json/ext_bottom_line.json
0 → 100644
+
20
−
0
View file @
88bb7bd4
{
"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]}]); }"
}
]
}
This diff is collapsed.
Click to expand it.
src/core/js/ext_bottom_line.js
+
25
−
0
View file @
88bb7bd4
...
...
@@ -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.
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment