Skip to content
Snippets Groups Projects
Commit dbfe0311 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

Merge branch 'dev' into dev-bmpg

parents 331f4c24 23102304
No related branches found
No related tags found
1 merge request!90F citation cff
Pipeline #17448 failed
Showing
with 470 additions and 248 deletions
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
.* .*
!/.git* !/.git*
# backup files
*~
# extracted libraries # extracted libraries
/libs/** /libs/**
!/libs/*.zip !/libs/*.zip
...@@ -26,3 +29,4 @@ xerr.log ...@@ -26,3 +29,4 @@ xerr.log
conf/ext conf/ext
test/ext test/ext
src/ext src/ext
*~
...@@ -23,9 +23,7 @@ ...@@ -23,9 +23,7 @@
variables: variables:
DEPLOY_REF: dev DEPLOY_REF: dev
CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb/caosdb-webui/testenv CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb/src/caosdb-webui/testenv
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
image: $CI_REGISTRY_IMAGE:latest image: $CI_REGISTRY_IMAGE:latest
...@@ -73,9 +71,8 @@ trigger_build: ...@@ -73,9 +71,8 @@ trigger_build:
tags: [ docker ] tags: [ docker ]
stage: deploy stage: deploy
script: script:
- echo $TOKEN
- /usr/bin/curl -X POST - /usr/bin/curl -X POST
-F token=$DEPLOY_TRIGGER_TOKEN -F token=$CI_JOB_TOKEN
-F "variables[F_BRANCH]=$CI_COMMIT_REF_NAME" -F "variables[F_BRANCH]=$CI_COMMIT_REF_NAME"
-F "variables[WEBUI]=$CI_COMMIT_REF_NAME" -F "variables[WEBUI]=$CI_COMMIT_REF_NAME"
-F "variables[TriggerdBy]=WEBUI" -F "variables[TriggerdBy]=WEBUI"
...@@ -88,6 +85,9 @@ build-testenv: ...@@ -88,6 +85,9 @@ build-testenv:
image: docker:19.03 image: docker:19.03
stage: setup stage: setup
timeout: 3 h timeout: 3 h
only:
- web
- schedules
script: script:
- cd test/docker - cd test/docker
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
...@@ -102,13 +102,13 @@ build-testenv: ...@@ -102,13 +102,13 @@ build-testenv:
# stage: deploy # stage: deploy
# Special job for serving a static website. See https://docs.gitlab.com/ee/ci/yaml/README.html#pages # Special job for serving a static website. See https://docs.gitlab.com/ee/ci/yaml/README.html#pages
pages: pages_prepare: &pages_prepare
tags: [ docker ] tags: [ cached-dind ]
stage: deploy stage: deploy
only: only:
- dev refs:
- /^release-.*$/i
script: script:
# TODO is this a good location here?
- npm install jsdoc - npm install jsdoc
- npm install jsdoc-sphinx - npm install jsdoc-sphinx
- echo "Deploying" - echo "Deploying"
...@@ -117,3 +117,8 @@ pages: ...@@ -117,3 +117,8 @@ pages:
artifacts: artifacts:
paths: paths:
- public - public
pages:
<<: *pages_prepare
only:
refs:
- main
## Summary
*Please give a short summary of what the issue is.*
## Expected Behavior
*What did you expect how the software should behave?*
## Actual Behavior
*What did the software actually do?*
## Steps to Reproduce the Problem
*Please describe, step by step, how others can reproduce the problem. Please try these steps for yourself on a clean system.*
1.
2.
3.
## Specifications
- Version: *Which version of this software?*
- Platform: *Which operating system, which other relevant software versions?*
## Possible fixes
*Do you have ideas how the issue can be resolved?*
# Changelog # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unpublished]
### Added (for new features, dependecies etc.)
### Changed (for changes in existing functionality)
### Deprecated (for soon-to-be removed features)
### Removed (for now removed features)
### Fixed (for any bug fixes)
### Security (in case of vulnerabilities)
### Documentation (for notable additions or changes of the documentation)
## [0.4.2] - 2021-12-06
### Added (for new features, dependecies etc.)
* Documentation link in standard footer
* Build properties for footer elements:
* `BUILD_FOOTER_CONTACT_HREF`
* `BUILD_FOOTER_IMPRINT_HREF`
* `BUILD_FOOTER_DOCS_HREF`
* `BUILD_FOOTER_SOURCES_HREF`
* `BUILD_FOOTER_LICENCE_HREF`
See `build.properties.d/00_default.properties` for more information
* Start editing an entity/creating a new record directly by adding an `#edit` or
`#new_record` URI fragment, respectively.
* Optional WYSIWYG editor with markdown output for text properties. Controled by
the `BUILD_MODULE_EXT_EDITMODE_WYSIWYG_TEXT` build variable which is set do
`DISABLED` by default.
- Added button to version history panel that allows restoring old versions
### Changed (for changes in existing functionality)
* Default footer elements contain invalid links for imprint, contact, and data-policy now
### Deprecated (for soon-to-be removed features)
### Removed (for now removed features)
* Build property `BUILD_CUSTOM_IMPRINT`. Please use BUILD_FOOTER_IMPRINT_HREF
and link a document instead. You can always put a html page to
`src/ext/html/` and link to that.
### Fixed (for any bug fixes)
- #156
- #251
### Security (in case of vulnerabilities)
### Documentation (for notable additions or changes of the documentation)
## [0.4.1] - 2021-11-04
### Added (for new features, dependecies etc.)
* `form_panel` module for conveniently creating a panel for web forms.
* `restore_old_version` function to base functionality (caosdb.js)
* buttons to the version history modal that allow restoring older versions
### Changed (for changes in existing functionality)
* Default footer elements contain invalid links for imprint, contact, and data-policy now
### Deprecated (for soon-to-be removed features)
### Removed (for now removed features)
* Build property `BUILD_CUSTOM_IMPRINT`. Please use BUILD_FOOTER_IMPRINT_HREF
and link a document instead. You can always put a html page to
`src/ext/html/` and link to that.
### Fixed (for any bug fixes)
* Auto-completion and edit_mode can handle entity names with empty spaces better now
* [#251](https://gitlab.indiscale.com/caosdb/src/caosdb-webui/-/issues/251) - Data loss when editing Entities with URL-like properties
### Security (in case of vulnerabilities)
### Documentation (for notable additions or changes of the documentation)
## [0.4.0] - 2021-10-28
### Added (for new features, dependecies etc.)
* Module `ext_qrcode` which generates a QR Code for an entity (pointing to the
the head or the exact version).
* Optional functionality to bookmark all query results. Note that too many
bookmarks will result in the URI being too lang and bookmarks will have to be
cleared manually.
### Changed (for changes in existing functionality)
### Deprecated (for soon-to-be removed features)
### Removed (for now removed features)
* `getEntityId`, a former duplicate of `getEntityID` which must be used instead.
### Fixed (for any bug fixes)
### Security (in case of vulnerabilities)
### Documentation (for notable additions or changes of the documentation)
## [v0.4.0-rc1] - 2021-06-16
### Added (for new features, dependecies etc.)
- `ext_applicable` module for building fancy features which append
functionality to entities (EXPERIMENTAL).
- `ext_cosmetics` module which converts http(s) uris in property values into
clickable links (with tests)
- Added a menu/toc for the tour
- Added a previous and next buttons for pages in the tour
- Added warnings to inform about minimum width when accessing tour and
edit mode on small screens.
- Added a tutorial for the edit mode to the documentation
- Documentation on how to customize reference resolving
### Changed (for changes in existing functionality)
- Updated from bootstrap 3 to bootstrap 5. This is a major change which will
possibly break existing custom implementations (e.g. a custom welcome page)
since a lot of classes where renamed by bootstrap an other classes have been
dropped entirely (e.g. "jumbotron"). Please have a look at
* https://getbootstrap.com/docs/5.0/migration/
* https://getbootstrap.com/docs/4.6/migration/
- Moved the resolving of references to Person Records to separate
example which can be disabled
### Deprecated (for soon-to-be removed features)
- css-class `.caosdb-property-text-value`. Please use
`.caosdb-f-property-text-value` or `.caosdb-v-property-text-value` instead.
### Removed (for now removed features)
* `#subnav` element from navbar which was previously used for spacing
* `caosdb.form.ready` event
### Fixed
- #212 - form_elements: Drop-down menu shows wrong value after clicking "None"
- #202 - Make filter fields in edit mode toolbox visible
- #117 - Reload data model after adding an RT or a Property
- #214 - Paging panel is hidden.
- Displaying issues with long lists in property values
- An issue whereby a grey container would appear above the map when
changing the map view.
- #200 - Re-enabled the file-upload button
### Security (in case of vulnerabilities)
## [v0.3.1] - 2021-06-15
This is the last Bootstrap-3 compatible release.
### Added (for new features, dependecies etc.)
* Displaying and interacting with the entity state.
* Change password functionality for users of the internal user source. Disable
with `BUILD_MODULE_USER_MANAGEMENT=DISABLED` and set the user realm with
`BUILD_MODULE_USER_MANAGEMENT_CHANGE_OWN_PASSWORD_REALM=CaosDB`.
* Visually highlighted drop zones for properties and parents in the edit_mode.
* two new field types for the form_elements module, `file` and `select`. See
the module documentation for more information.
### Changed (for changes in existing functionality)
- The heading attributes datatype, path, checksum and size are now placed
in a `details` html element.
### Deprecated (for soon-to-be removed features)
* Any bootstrap-3 dependencies. Please prepare upgrading to bootstrap-5 with the next release.
### Removed (for now removed features)
* `ext_revisions` module. This module was only a work-around which had been
used for versioning functionality before the native versioning was
implemented. Also, the `BUILD_MODULE_EXT_REVISIONS` is no longer used and can
be removed from the config files in `build.properties.d/`
### Fixed
* #156 - Edit mode for Safari 11
* #160 - Entity preview for Safari 11
* Several minor cosmetic flaws
* Fixed edit mode for Safari 11.
### Security (in case of vulnerabilities)
## [v0.3.0] - 2021-02-10
### Added (for new features, dependecies etc.) ### Added (for new features, dependecies etc.)
...@@ -40,11 +236,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -40,11 +236,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- #144 (Select with ANY VERSION OF).
- #136 (adding reference properties to entities in edit mode) - #136 (adding reference properties to entities in edit mode)
- exclude configuration files when reading files from build.properties.d - exclude configuration files when reading files from build.properties.d
- summaries when opening preview - summaries when opening preview
- #125 special characters like "\t", \"n", "#" are replaced in table - #125 special characters like "\t", \"n", "#" are replaced in table
download download
- #158 show preview if the entity is too large for the viewport if
bottom line is in view.
### Security (in case of vulnerabilities) ### Security (in case of vulnerabilities)
......
* CaosDB Server 0.5.x
* Make 4.2.0
# Java Script Libraries (included in this repository)
* bootstrap-5.0.1
* bootstrap-autocomplete-2.3.5
* bootstrap-icons-1.4.1
* bootstrap-select-1.14.0-beta2
* dropzone-5.5.0
* javascript-state-machine-master
* jquery-3.6.0.min.js
* loglevel-1.6.4
* qrcode-1.4.4
* showdown-1.8.6
* plotly.js-1.52.2
* UTIF-8205c1f
## For the map
* leaflet-1.5.1
* Leaflet.Coordinates-0.1.5
* leaflet.latlng-graticule-20191007
* L.Graticule.js https://github.com/turban/Leaflet.Graticule/blob/e9146fbea59ce1b0ada4ea2a012087f9a1a12473/L.Graticule.js
* proj4js-2.5.0
* Proj4Leaflet-1.0.1
## For CKEditor (WYSIWYG editor in edit mode)
* we're using a custom-built ckeditor 31.0.0 from
https://ckeditor.com/ckeditor-5/online-builder/ with a customized set of
editor plugins. Please refer to the `package.json` within
`libs/ckeditor...zip` for a full list of said plugins.
## For testing
* qunit-2.9.2
...@@ -43,7 +43,8 @@ LIBS_DIR = $(abspath libs) ...@@ -43,7 +43,8 @@ LIBS_DIR = $(abspath libs)
TEST_CORE_DIR = $(abspath test/core/) TEST_CORE_DIR = $(abspath test/core/)
TEST_EXT_DIR = $(abspath test/ext) TEST_EXT_DIR = $(abspath test/ext)
TEST_SSS_DIR =$(abspath test/server_side_scripting) TEST_SSS_DIR =$(abspath test/server_side_scripting)
LIBS = fonts css/bootstrap.css js/bootstrap.js js/state-machine.js js/jquery.js js/showdown.js js/dropzone.js css/dropzone.css js/loglevel.js js/leaflet.js css/leaflet.css css/images js/leaflet-latlng-graticule.js js/proj4.js js/proj4leaflet.js js/leaflet-coordinates.js css/leaflet-coordinates.css js/leaflet-graticule.js js/bootstrap-select.js css/bootstrap-select.css js/bootstrap-autocomplete.min.js js/plotly.js js/pako.js js/utif.js LIBS = fonts css/fonts css/bootstrap.css css/bootstrap-icons.css js/state-machine.js js/jquery.js js/showdown.js js/dropzone.js css/dropzone.css js/loglevel.js js/leaflet.js css/leaflet.css css/images js/leaflet-latlng-graticule.js js/proj4.js js/proj4leaflet.js js/leaflet-coordinates.js css/leaflet-coordinates.css js/leaflet-graticule.js js/bootstrap-select.js css/bootstrap-select.css js/bootstrap-autocomplete.min.js js/plotly.js js/pako.js js/utif.js js/bootstrap.js js/qrcode.js js/ckeditor.js
TEST_LIBS = $(LIBS) js/qunit.js css/qunit.css $(subst $(TEST_CORE_DIR)/,,$(shell find $(TEST_CORE_DIR)/)) TEST_LIBS = $(LIBS) js/qunit.js css/qunit.css $(subst $(TEST_CORE_DIR)/,,$(shell find $(TEST_CORE_DIR)/))
...@@ -52,9 +53,9 @@ LIBS_SUBDIRS = $(addprefix $(LIBS_DIR)/, js css fonts) ...@@ -52,9 +53,9 @@ LIBS_SUBDIRS = $(addprefix $(LIBS_DIR)/, js css fonts)
ALL: install ALL: install
install: clean install-sss cp-src cp-ext cp-conf $(addprefix $(PUBLIC_DIR)/, $(LIBS)) build_properties merge_xsl install: clean-ignore-zips install-sss cp-src cp-ext cp-conf $(addprefix $(PUBLIC_DIR)/, $(LIBS)) merge_js build_properties merge_xsl
test: clean install-sss cp-src cp-ext cp-ext-test cp-conf $(addprefix $(PUBLIC_DIR)/, $(TEST_LIBS)) build_properties merge_xsl test: clean-ignore-zips install-sss cp-src cp-ext cp-ext-test cp-conf $(addprefix $(PUBLIC_DIR)/, $(TEST_LIBS)) merge_js build_properties merge_xsl
@for f in $(shell find $(TEST_EXT_DIR) -type f -iname *.js) ; do \ @for f in $(shell find $(TEST_EXT_DIR) -type f -iname *.js) ; do \
sed -i "/EXTENSIONS/a \<script src=\"$${f#$(TEST_EXT_DIR)/}\" ></script>" $(PUBLIC_DIR)/index.html ; \ sed -i "/EXTENSIONS/a \<script src=\"$${f#$(TEST_EXT_DIR)/}\" ></script>" $(PUBLIC_DIR)/index.html ; \
echo include $$f; \ echo include $$f; \
...@@ -67,8 +68,12 @@ test: clean install-sss cp-src cp-ext cp-ext-test cp-conf $(addprefix $(PUBLIC_D ...@@ -67,8 +68,12 @@ test: clean install-sss cp-src cp-ext cp-ext-test cp-conf $(addprefix $(PUBLIC_D
merge_xsl: merge_xsl:
misc/merge_xsl.sh misc/merge_xsl.sh
merge_js:
for f in ${BUILDFILELIST} ; do source "$$f" ; done ; \
JS_DIST_BUNDLE=$${JS_DIST_BUNDLE} AUTO_DISCOVER_MODULES=$$AUTO_DISCOVER_MODULES misc/merge_js.sh $${MODULE_DEPENDENCIES[*]}
EXCLUDE_EXPR = %~ %.backup EXCLUDE_EXPR = %~ %.backup
BUILDFILELIST = $(filter-out $(EXCLUDE_EXPR),$(wildcard build.properties.d/*)) BUILDFILELIST = $(sort $(filter-out $(EXCLUDE_EXPR),$(wildcard build.properties.d/*)))
build_properties: build_properties:
@set -a -e ; \ @set -a -e ; \
pushd build.properties.files ; \ pushd build.properties.files ; \
...@@ -91,24 +96,24 @@ build_properties: ...@@ -91,24 +96,24 @@ build_properties:
@ln -s $(PUBLIC_DIR) $(PUBLIC_DIR)/$(BUILD_NUMBER) @ln -s $(PUBLIC_DIR) $(PUBLIC_DIR)/$(BUILD_NUMBER)
@ln -s $(PUBLIC_DIR) $(PUBLIC_DIR)/webinterface @ln -s $(PUBLIC_DIR) $(PUBLIC_DIR)/webinterface
PORT = 8000 TEST_PORT ?= 8000
TIMEOUT = 60 TIMEOUT = 60
run-test-server: test run-test-server: test
$(MISC_DIR)/unit_test_http_server.py $(PORT) $(TIMEOUT) False $(PUBLIC_DIR) $(MISC_DIR)/unit_test_http_server.py $(TEST_PORT) $(TIMEOUT) False $(PUBLIC_DIR)
keep-test-server: test keep-test-server: test
$(MISC_DIR)/unit_test_http_server.py $(PORT) -1 True $(PUBLIC_DIR) $(MISC_DIR)/unit_test_http_server.py $(TEST_PORT) -1 True $(PUBLIC_DIR)
run-qunit: test run-qunit: test
$(foreach exec, firefox Xvfb xwd,\ $(foreach exec, firefox Xvfb xwd,\
$(if $(shell which $(exec)),echo "found $(exec)",$(error "No $(exec) in PATH"))) $(if $(shell which $(exec)),echo "found $(exec)",$(error "No $(exec) in PATH")))
# start server in background # start server in background
$(MISC_DIR)/unit_test_http_server.py $(PORT) $(TIMEOUT) False $(PUBLIC_DIR) & $(MISC_DIR)/unit_test_http_server.py $(TEST_PORT) $(TIMEOUT) False $(PUBLIC_DIR) &
# start firefox with virtual xserver # start firefox with virtual xserver
Xvfb :1 -screen 0 1024x768x24 & Xvfb :1 -screen 0 1024x768x24 &
DISPLAY=:1 firefox "http://localhost:$(PORT)/?hidepassed" & DISPLAY=:1 firefox "http://localhost:$(TEST_PORT)/?hidepassed" &
while [ 1 -eq 1 ]; do \ while [ 1 -eq 1 ]; do \
sleep 5 ; \ sleep 5 ; \
...@@ -171,6 +176,9 @@ cp-ext: ...@@ -171,6 +176,9 @@ cp-ext:
for f in $(wildcard $(SRC_EXT_DIR)/xsl/*) ; do \ for f in $(wildcard $(SRC_EXT_DIR)/xsl/*) ; do \
echo "y" | $(CMD_COPY_EXT_FILES) "$$(realpath "$$f")" $(PUBLIC_DIR)/xsl/ ; \ echo "y" | $(CMD_COPY_EXT_FILES) "$$(realpath "$$f")" $(PUBLIC_DIR)/xsl/ ; \
done done
for f in $(wildcard $(SRC_EXT_DIR)/include/*) ; do \
echo "y" | $(CMD_COPY_EXT_FILES) "$$(realpath "$$f")" "$(PUBLIC_DIR)/$$(basename "$$f")" ; \
done
cp-ext-test: cp-ext-test:
for f in $(wildcard $(TEST_EXT_DIR)/js/*) ; do \ for f in $(wildcard $(TEST_EXT_DIR)/js/*) ; do \
...@@ -211,22 +219,25 @@ $(PUBLIC_DIR)/%: $(TEST_EXT_DIR)/% ...@@ -211,22 +219,25 @@ $(PUBLIC_DIR)/%: $(TEST_EXT_DIR)/%
cp -r $< $@ cp -r $< $@
$(LIBS_DIR)/fonts: unzip $(LIBS_DIR)/fonts: unzip
ln -s $(LIBS_DIR)/bootstrap-3.4.1-dist/fonts $@ ln -s $(LIBS_DIR)/bootstrap-icons-1.4.1/fonts/ $@
$(LIBS_DIR)/js/bootstrap.js: unzip $(LIBS_DIR)/js $(LIBS_DIR)/js/bootstrap.js: unzip $(LIBS_DIR)/js
ln -s $(LIBS_DIR)/bootstrap-3.4.1-dist/js/bootstrap.min.js $@ ln -s $(LIBS_DIR)/bootstrap-5.0.1-dist/js/bootstrap.bundle.min.js $@
$(LIBS_DIR)/css/bootstrap.css: unzip $(LIBS_DIR)/css $(LIBS_DIR)/css/bootstrap.css: unzip $(LIBS_DIR)/css
ln -s $(LIBS_DIR)/bootstrap-3.4.1-dist/css/bootstrap.min.css $@ ln -s $(LIBS_DIR)/bootstrap-5.0.1-dist/css/bootstrap.min.css $@
$(LIBS_DIR)/css/bootstrap-icons.css: unzip $(LIBS_DIR)/css
ln -s $(LIBS_DIR)/bootstrap-icons-1.4.1/bootstrap-icons.css $@
$(LIBS_DIR)/js/bootstrap-select.js: unzip $(LIBS_DIR)/js $(LIBS_DIR)/js/bootstrap-select.js: unzip $(LIBS_DIR)/js
ln -s $(LIBS_DIR)/bootstrap-select-1.13.9/dist/js/bootstrap-select.min.js $@ ln -s $(LIBS_DIR)/bootstrap-select-1.14.0-beta2/js/bootstrap-select.min.js $@
$(LIBS_DIR)/css/bootstrap-select.css: unzip $(LIBS_DIR)/css $(LIBS_DIR)/css/bootstrap-select.css: unzip $(LIBS_DIR)/css
ln -s $(LIBS_DIR)/bootstrap-select-1.13.9/dist/css/bootstrap-select.min.css $@ ln -s $(LIBS_DIR)/bootstrap-select-1.14.0-beta2/css/bootstrap-select.min.css $@
$(LIBS_DIR)/js/jquery.js: unzip $(LIBS_DIR)/js $(LIBS_DIR)/js/jquery.js: unzip $(LIBS_DIR)/js
ln -s $(LIBS_DIR)/jquery-3.5.1/jquery-3.5.1.min.js $@ ln -s $(LIBS_DIR)/jquery-3.6.0.min.js $@
$(LIBS_DIR)/js/showdown.js: unzip $(LIBS_DIR)/js $(LIBS_DIR)/js/showdown.js: unzip $(LIBS_DIR)/js
ln -s $(LIBS_DIR)/showdown-1.8.6/dist/showdown.min.js $@ ln -s $(LIBS_DIR)/showdown-1.8.6/dist/showdown.min.js $@
...@@ -261,6 +272,9 @@ $(LIBS_DIR)/css/images: unzip $(LIBS_DIR)/css ...@@ -261,6 +272,9 @@ $(LIBS_DIR)/css/images: unzip $(LIBS_DIR)/css
$(LIBS_DIR)/js/leaflet-graticule.js: unzip $(LIBS_DIR)/js $(LIBS_DIR)/js/leaflet-graticule.js: unzip $(LIBS_DIR)/js
ln -s $(LIBS_DIR)/L.Graticule.js $@ ln -s $(LIBS_DIR)/L.Graticule.js $@
$(LIBS_DIR)/js/bootstrap.bundle.min.js: unzip $(LIBS_DIR)/js
ln -s $(LIBS_DIR)/bootstrap.bundle.min.js $@
$(LIBS_DIR)/js/leaflet-latlng-graticule.js: unzip $(LIBS_DIR)/js $(LIBS_DIR)/js/leaflet-latlng-graticule.js: unzip $(LIBS_DIR)/js
ln -s $(LIBS_DIR)/leaflet.latlng-graticule-20191007/leaflet.latlng-graticule.js $@ ln -s $(LIBS_DIR)/leaflet.latlng-graticule-20191007/leaflet.latlng-graticule.js $@
...@@ -288,21 +302,33 @@ $(LIBS_DIR)/js/pako.js: unzip $(LIBS_DIR)/js ...@@ -288,21 +302,33 @@ $(LIBS_DIR)/js/pako.js: unzip $(LIBS_DIR)/js
$(LIBS_DIR)/js/utif.js: unzip $(LIBS_DIR)/js $(LIBS_DIR)/js/utif.js: unzip $(LIBS_DIR)/js
ln -s $(LIBS_DIR)/UTIF-8205c1f/UTIF.js $@ ln -s $(LIBS_DIR)/UTIF-8205c1f/UTIF.js $@
$(LIBS_DIR)/js/qrcode.js: unzip $(LIBS_DIR)/js
ln -s $(LIBS_DIR)/qrcode-1.4.4/qrcode.min.js $@
$(LIBS_DIR)/js/ckeditor.js: unzip $(LIBS_DIR)/js
ln -s $(LIBS_DIR)/ckeditor5-31.0.0-k356w86hp13l/build/ckeditor.js $@
$(addprefix $(LIBS_DIR)/, js css): $(addprefix $(LIBS_DIR)/, js css):
mkdir $@ || true mkdir $@ || true
.PHONY: clean $(LIBS_DIR)/css/fonts: $(LIBS_DIR)/css
clean: ln -s $(LIBS_DIR)/fonts/ $(LIBS_DIR)/css/fonts
.PHONY: clean-ignore-zips
clean-ignore-zips:
$(RM) -r $(SSS_BIN_DIR) $(RM) -r $(SSS_BIN_DIR)
$(RM) -r $(PUBLIC_DIR) $(RM) -r $(PUBLIC_DIR)
for f in $(LIBS_SUBDIRS); do unlink $$f || $(RM) -r $$f || true; done for f in $(LIBS_SUBDIRS); do unlink $$f || $(RM) -r $$f || true; done
for f in $(patsubst %.zip,%/,$(LIBS_ZIP)); do $(RM) -r $$f; done
$(RM) .server_done $(RM) .server_done
.PHONY: clean
clean: clean-ignore-zips
for f in $(patsubst %.zip,%/,$(LIBS_ZIP)); do $(RM) -r $$f; done
.PHONY: unzip .PHONY: unzip
unzip: unzip:
for f in $(LIBS_ZIP); do unzip -q -o -d libs $$f; done for f in $(LIBS_ZIP); do echo "unzip $$f" ; unzip -u -q -o -d libs $$f; done
PYLINT ?= pylint PYLINT ?= pylint
......
<!--THIS FILE HAS BEEN GENERATED BY A SCRIPT. PLEASE DON'T CHANGE IT MANUALLY.-->
Project migrated to https://gitlab.com/caosdb # README
# Welcome ## Welcome
This is the **CaosDB WebUI** repository and a part of the CaosDB project. This is the **CaosDB Web User Interface** repository and a part of the
CaosDB project.
# Setup ## Setup
Please read the [README_SETUP.md](README_SETUP.md) for instructions on how to Please read the [README_SETUP.md](README_SETUP.md) for instructions on how to
setup this code. setup this code.
# Further Reading ## Further Reading
Please refer to the [official gitlab repository of the CaosDB Please refer to the [official documentation](https://docs.indiscale.com/caosdb-webui/) for more information.
project](https://gitlab.com/caosdb/caosdb) for more information.
# License ## Contributing
Copyright (C) 2018 Research Group Biomedical Physics, Max Planck Institute for Thank you very much to all contributers—[past, present](https://gitlab.com/caosdb/caosdb/-/blob/dev/HUMANS.md), and prospective ones.
Dynamics and Self-Organization Göttingen.
### Code of Conduct
By participating, you are expected to uphold our [Code of Conduct](https://gitlab.com/caosdb/caosdb/-/blob/dev/CODE_OF_CONDUCT.md).
### How to Contribute
* You found a bug, have a question, or want to request a feature? Please
[create an issue](https://gitlab.com/caosdb/caosdb-webui/-/issues).
* You want to contribute code? Please fork the repository and create a merge
request in GitLab and choose this repository as target. Make sure to select
"Allow commits from members who can merge the target branch" under Contribution
when creating the merge request. This allows our team to work with you on your request.
- If you have a suggestion for the [documentation](https://docs.indiscale.com/caosdb-webui/),
the preferred way is also a merge request as describe above (the documentation resides in `src/doc`).
However, you can also create an issue for it.
- You can also contact us at **info (AT) caosdb.de** and join the
CaosDB community on
[#caosdb:matrix.org](https://matrix.to/#/!unwwlTfOznjEnMMXxf:matrix.org).
## License
* Copyright (C) 2018 Research Group Biomedical Physics, Max Planck Institute
for Dynamics and Self-Organization Göttingen.
* Copyright (C) 2020-2021 Indiscale GmbH <info@indiscale.com>
All files in this repository are licensed under a [GNU Affero General Public All files in this repository are licensed under a [GNU Affero General Public
License](LICENCE.md) (version 3 or later). License](LICENCE.md) (version 3 or later).
# Release Guidelines for the CaosDB MySQL Backend # Release Guidelines for the CaosDB Web Interface
This document specifies release guidelines in addition to the generel release This document specifies release guidelines in addition to the generel release
guidelines of the CaosDB Project guidelines of the CaosDB Project
...@@ -8,7 +8,7 @@ guidelines of the CaosDB Project ...@@ -8,7 +8,7 @@ guidelines of the CaosDB Project
* All tests are passing. * All tests are passing.
* FEATURES.md is up-to-date and a public API is being declared in that document. * FEATURES.md is up-to-date and a public API is being declared in that document.
* CHANGELOG.md is up-to-date. * CHANGELOG.md is up-to-date (insert version number and remove unpublished)
* DEPENDENCIES.md is up-to-date. * DEPENDENCIES.md is up-to-date.
## Steps ## Steps
...@@ -18,10 +18,12 @@ guidelines of the CaosDB Project ...@@ -18,10 +18,12 @@ guidelines of the CaosDB Project
2. Check all general prerequisites. 2. Check all general prerequisites.
3. Merge the release branch into the master branch. 3. Merge the release branch into the main branch.
4. Tag the latest commit of the master branch with `v<VERSION>`. 4. Tag the latest commit of the main branch with `v<VERSION>`.
5. Delete the release branch. 5. Delete the release branch.
6. Merge the master branch back into the dev branch. 6. Merge the main branch back into the dev branch.
7. Prepare CHANGELOG for next release cycle.
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
# Modules enabled/disabled by default # Modules enabled/disabled by default
############################################################################## ##############################################################################
BUILD_MODULE_EXT_PREVIEW=ENABLED BUILD_MODULE_EXT_PREVIEW=ENABLED
BUILD_MODULE_EXT_RESOLVE_REFERENCES=ENABLED
BUILD_MODULE_EXT_SSS_MARKDOWN=DISABLED BUILD_MODULE_EXT_SSS_MARKDOWN=DISABLED
BUILD_MODULE_EXT_TRIGGER_CRAWLER_FORM=DISABLED BUILD_MODULE_EXT_TRIGGER_CRAWLER_FORM=DISABLED
BUILD_MODULE_EXT_AUTOCOMPLETE=ENABLED BUILD_MODULE_EXT_AUTOCOMPLETE=ENABLED
...@@ -50,6 +49,18 @@ BUILD_MODULE_EXT_BOTTOM_LINE=ENABLED ...@@ -50,6 +49,18 @@ BUILD_MODULE_EXT_BOTTOM_LINE=ENABLED
BUILD_MODULE_EXT_BOTTOM_LINE_TABLE_PREVIEW=DISABLED BUILD_MODULE_EXT_BOTTOM_LINE_TABLE_PREVIEW=DISABLED
BUILD_MODULE_EXT_BOTTOM_LINE_TIFF_PREVIEW=DISABLED BUILD_MODULE_EXT_BOTTOM_LINE_TIFF_PREVIEW=DISABLED
BUILD_MODULE_EXT_BOOKMARKS=ENABLED BUILD_MODULE_EXT_BOOKMARKS=ENABLED
BUILD_MODULE_EXT_ADD_QUERY_TO_BOOKMARKS=DISABLED
BUILD_MODULE_EXT_ANNOTATION=ENABLED
BUILD_MODULE_EXT_COSMETICS_LINKIFY=DISABLED
BUILD_MODULE_EXT_QRCODE=ENABLED
BUILD_MODULE_USER_MANAGEMENT=ENABLED
BUILD_MODULE_USER_MANAGEMENT_CHANGE_OWN_PASSWORD_REALM=CaosDB
BUILD_MODULE_EXT_RESOLVE_REFERENCES=ENABLED
BUILD_EXT_REFERENCES_CUSTOM_RESOLVER=person_reference
BUILD_MODULE_EXT_EDITMODE_WYSIWYG_TEXT=DISABLED
############################################################################## ##############################################################################
# Navbar properties # Navbar properties
...@@ -68,7 +79,24 @@ BUILD_FAVICON=pics/caosdb_logo_42.png ...@@ -68,7 +79,24 @@ BUILD_FAVICON=pics/caosdb_logo_42.png
############################################################################## ##############################################################################
# Link to the data policy statement document. # Link to the data policy statement document.
BUILD_FOOTER_DATA_POLICY_HREF=https://missing-domain.com/missing-page BUILD_FOOTER_DATA_POLICY_HREF="Please configure me!"
# Contact mail or link to contact information for the responsible administrator of this caosdb server instance.
BUILD_FOOTER_CONTACT_HREF="Please configure me!"
#BUILD_FOOTER_CONTACT_HREF=mailto:info@indiscale.com
# Link to imprint for this caosdb server instance.
BUILD_FOOTER_IMPRINT_HREF="Please configure me!"
#BUILD_FOOTER_IMPRINT_HREF=https://www.indiscale.com/imprint/
# Link to docs (should rarely be changed (maybe for additional docs))
BUILD_FOOTER_DOCS_HREF="https://docs.indiscale.com"
# Link to sources (should almost never be changed (maybe for additional sources))
BUILD_FOOTER_SOURCES_HREF="https://gitlab.com/caosdb"
# Link to license (should almost never be changed (maybe for other languages))
BUILD_FOOTER_LICENCE_HREF="https://www.gnu.org/licenses/agpl-3.0.en.html"
# Custom footer elements can be placed here (will be placed inside a <div> # Custom footer elements can be placed here (will be placed inside a <div>
# element). # element).
...@@ -81,9 +109,72 @@ BUILD_FOOTER_CUSTOM_ELEMENT_ONE= ...@@ -81,9 +109,72 @@ BUILD_FOOTER_CUSTOM_ELEMENT_ONE=
# ${BUILD_NUMBER}. # ${BUILD_NUMBER}.
BUILD_FOOTER_CUSTOM_ELEMENT_TWO= BUILD_FOOTER_CUSTOM_ELEMENT_TWO=
# BUILD_FOOTER_CUSTOM_ELEMENT_TWO=$(cat footer_element_2.html) # BUILD_FOOTER_CUSTOM_ELEMENT_TWO=$(cat footer_element_2.html)
BUILD_CUSTOM_IMPRINT='<p> Put an imprint note here </p>'
############################################################################## ##############################################################################
# ext_trigger_crawler_form properties # ext_trigger_crawler_form properties
############################################################################## ##############################################################################
BUILD_MODULE_EXT_TRIGGER_CRAWLER_FORM_TOOLBOX="Tools" BUILD_MODULE_EXT_TRIGGER_CRAWLER_FORM_TOOLBOX="Tools"
##############################################################################
# Build a dist file containing all JS code from the files in the
# MODULE_DEPENDENCIES array.
##############################################################################
JS_DIST_BUNDLE=TRUE
##############################################################################
# TRUE means that all javascript sources which are no mentioned in the
# MODULE_DEPENDENCIES array will be added in no particular order into the
# build. If you need to guarantee a specific order (in which the are loaded or
# appear in the dit file) you need to add them to the MODULE_DEPENDENCIES.
##############################################################################
AUTO_DISCOVER_MODULES=TRUE
##############################################################################
# Module dependencies
# Override or extend to specify the order of js files in the resulting
# bundled js file
##############################################################################
MODULE_DEPENDENCIES=(
jquery.js
bootstrap.js
bootstrap-autocomplete.min.js
bootstrap-select.js
state-machine.js
showdown.js
dropzone.js
loglevel.js
plotly.js
webcaosdb.js
pako.js
utif.js
caosdb.js
form_elements.js
ext_autocomplete.js
preview.js
ext_references.js
ext_applicable.js
ext_table_preview.js
ext_xls_download.js
query_shortcuts.js
ext_jupyterdrag.js
annotation.js
edit_mode.js
ext_entity_state.js
ext_file_download.js
leaflet.js
leaflet-graticule.js
leaflet-latlng-graticule.js
leaflet-coordinates.js
proj4.js
proj4leaflet.js
ext_map.js
tour.js
ext_bottom_line.js
ext_sss_markdown.js
ext_trigger_crawler_form.js
ext_bookmarks.js
ext_cosmetics.js
qrcode.js
ext_qrcode.js
form_panel.js
ckeditor.js
ext_editmode_wysiwyg_text.js
)
File deleted
\documentclass{article}
% General document formatting
\usepackage[margin=0.7in]{geometry}
\usepackage[parfill]{parskip}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
% Related to math
\usepackage{amsmath,amssymb,amsfonts,amsthm}
\title{Documentation Query Shortcuts}
\begin{document}
\maketitle
\section{Introduction}\label{introduction}
The WebUI supports the creation of query shortcuts which appear below
the normal query input field. These shortcuts facilitate looking for
data as query strings which are used frequently. They can be stored and
reused.
\begin{figure}[h]
\centering
\includegraphics[width=.8\textwidth]{shortcut_toolbox.png}
\caption{The Shortcuts in the Query Panel; Note the Toolbox for in the top
right}
\end{figure}
There are two ways to integrate query templates into the WebUI:
\begin{itemize}
\item
Global shortcuts are integrated by the webmaster only. They are
defined and stored in a\\
\texttt{./conf/ext/json/globale\_query\_shortcuts.json} in the root
directory of the webui.
\item
User-defined templates can be defined by users and are only visible
for the user who created them. In this sense, user-defined shortcuts
are also private, whereas global shortcuts are always publicly
visible.
\end{itemize}
\section{User-defined Query Shortcuts}\label{user-defined-query-shortcuts}
\subsection{Create a New Shortcut}\label{create-a-new-shortcut}
New Query Shortcuts can be generated by any authenticated user with
sufficient write permissions.
In the web interface, click \texttt{Query}. In the \texttt{Shortcuts}
section, click the wrench (on the right side).
In the drop-down menu, click \texttt{Create}.
It now opens a form with two input fields, \texttt{Description} and
\texttt{Query}.
\begin{figure}[h]
\centering
\includegraphics[width=.6\textwidth]{create_shortcut.png}
\caption{The view to create a new shortcut}
\end{figure}
See \ref{basic-shortcut} and
\ref{advanced-shortcut} for further
explanation of the components of a Query Shortcut.
Edit the fields and click \texttt{Submit} for the creation of the new
shortcut or click \texttt{Cancel} to cancel the process.
The new shortcut is shown in the shortcuts section.
\begin{figure}[h]
\centering
\includegraphics[width=.6\textwidth]{create_success.png}
\caption{The view when creation was successful}
\end{figure}
\subsection{Change an Existing Shortcut}\label{change-an-existing-shortcut}
Existing Query Shortcuts which are visible in your shortcuts section can
be edited directly in the shortcuts section.
In the web interface, click \texttt{Query}. In the \texttt{Shortcuts}
section, click the wrench (on the right side).
In the drop-down menu, click \texttt{Edit}.
\begin{figure}[h]
\centering
\includegraphics[width=.6\textwidth]{choose_edit.png}
\caption{Choosing which shortcut to edit}
\end{figure}
Every editable shortcut (note: global shortcuts are not editable in the
webinterface at all) will receive a new button \texttt{Edit}
Click \texttt{Edit} of the shortcut that is to be changed.
It now opens a form with two input fields, \texttt{Description} and
\texttt{Query}, pre-filled.
See \ref{basic-shortcut} and
\ref{advanced-shortcut} for further
explanation of the components of a Query Shortcut.
Edit the fields and click \texttt{Submit} for the creation of the new
shortcut or click \texttt{Cancel} to cancel the process.
The updated shortcut is shown in the shortcuts section.
See the
\subsection{Delete an Existing Shortcut}\label{delete-an-existing-shortcut}
Existing Query Shortcut which are visible in your shortcuts section can
be edited directly in the shortcuts section.
In the web interface, click \texttt{Query}. In the \texttt{Shortcuts}
section, click the wrench (on the right side).
In the drop-down menu, click \texttt{Delete}.
\begin{figure}[h]
\centering
\includegraphics[width=.6\textwidth]{delete_shortcuts.png}
\caption{Choosing which shortcuts to delete}
\end{figure}
Every user-defined shortcut (note: global shortcuts are not deletable in
the webinterface at all) will receive checkbox and \texttt{Delete} and
\texttt{Cancel} buttons appear at the bottom of the shortcuts section.
Check all shortcuts which are to be deleted and click \texttt{Delete} or
click \texttt{Cancel} to cancel the deletion.
All deleted shortcuts are marked as deleted afterwards and will not
appear again in the shortcuts section after reload.
\subsection{Basic Shortcut}\label{basic-shortcut}
The \texttt{Description} is a verbose definition of the query,
e.g.~``Search for experiments and return a table.''. It will be the text
that is visible in the shortcuts section.
The \texttt{Query} is the query that will be executed with the shortcut.
It adheres to the definition of the CaosDB Query Language (CQL).
The corresponding query of our example is
\texttt{SELECT\ date,\ name\ FROM\ Experiment}.
\subsection{Advanced Shortcut}\label{advanced-shortcut}
The basic shortcut does not allow for any parameterization. It is just a
plain string or like a bookmark.
Advanced shortcuts use a special syntax, where text placeholders are
used to define parameters of the shortcut. The parameters can be set by
the user at the time of the execution. An example can best illustrate
what that means:
Suppose you want to search for experiments by their year. The query for
that would be
\texttt{SELECT\ date,\ name\ FROM\ Experiment\ WITH\ date\ IN\ 2018}.
Now, the actual year in the query can be made editable by replacing the
year \texttt{2018} with \texttt{\{year\}}.
The \texttt{Description} now must also contain this placeholder
\texttt{\{year\}}, e.g.~``Search for experiements conducted in year
\{year\}''. When the shortcut is displayed in the shortcuts section
below the query input field, the placeholder is replaced by a text input
field and the user can insert a year and execute the shortcut with the
year being inserted into the query.
\subsubsection{Placeholders}\label{placeholders}
The placeholders have simple rules. A placeholder always starts and ends
with curly brackets, like in the example \texttt{\{year\}}. The text
inside the brackets (the placeholder's \emph{id}) may contain any
combination of alphanumeric signs (0-9,a-z,A-Z). The use of special
characters like colons, commas or the like is discouraged. They are
reserved for future extensions of the placeholders. Apart from that, you
are free to choose any placeholder \emph{id} that seems suitable for
you.
Both components of the query shortcut (description and query) must
contain the same set of placeholders, otherwise the query shortcuts
might not work as intended. If there is a \texttt{\{year\}} in the
query, there must be a \texttt{\{year\}} in the description.
Each placeholder \emph{id} must occur only once in both components -- if
you need to use two years in your shortcut you have to use
\texttt{\{year1\}} and \texttt{\{year2\}} or any other combinations of
placeholder \emph{ids}.
\end{document}
File deleted
File added
File added
File added
File deleted
File added
File deleted
This diff is collapsed.
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment