Commit 89620d11 authored by Carsten  Rose's avatar Carsten Rose

Merge branch 'master' into F7849UploadOptionallyDisableTrash

parents a547c2b2 af5e6844
Pipeline #2326 passed with stages
in 2 minutes and 44 seconds
# EditorConfig is awesome: http://EditorConfig.org
#
# Use as master: https://github.com/TYPO3-Documentation/T3DocTeam/blob/master/.editorconfig
# top-most EditorConfig file
root = false
[{*.rst, *.rst.txt}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 3
# MD-Files
[*.md]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
# ignore generated documentation
*GENERATED*
# ignore typical clutter of IDEs and editors (this could be added in .git/info/exclude,
# but we add it here for convenience)
*~
*.bak
*.idea
*.project
*.swp
.project
.webprj
nbprojec
# Created by .ignore support plugin (hsz.mobi)
.python_virtualenv/
.virtual_env
......@@ -13,20 +27,26 @@
.support
.support_plantuml
.support_sonar
qfq.flowchart.dia.autosave
test.json
test.php
test.html
*.autosave
composer.lock
/Documentation-GENERATED-temp
/bower_components
/composer.phar
/css
/dist/
/doc/*.pdf
/doc/jsdoc
/doc/phpdoc
/doc/plantuml
/extension/Documentation/_make/build
/extension/Documentation/html
/extension/Resources/Private/vendor
/Documentation-develop/*.pdf
/Documentation-develop/jsdoc
/Documentation-develop/phpdoc
/Documentation-develop/plantuml
/extension/vendor
/extension/Resources/Public/Css
/extension/Resources/Public/fonts
/extension/Resources/Public/JavaScript
......
before_script:
- VERSION=`cat ./version`
- RELDATE=`date '+%Y%m%d%H%M'`
- mkdir build || true
variables:
SELENIUM_LOGS_PATH: "/scratch/tmp/7/"
stages:
- before
- build
- selenium
documentation:
stage: before
script:
- docker pull t3docs/render-documentation
- source <(docker run --rm t3docs/render-documentation show-shell-commands)
- dockrun_t3rd makehtml
snapshot:
stage: build
except:
- tags
artifacts:
expire_in: 1 week
paths:
- build/
script:
- make VERSION=$VERSION phpunit_snapshot
- chmod a+r qfq_$VERSION_*.zip
- mv qfq_$VERSION_*.zip qfq_${VERSION}_${RELDATE}-${CI_BUILD_REF_NAME}.zip
- scp qfq_$VERSION_*.zip w16:qfq/snapshots/
- mv qfq_$VERSION_*.zip build/qfq.zip
release:
stage: build
only:
- tags
artifacts:
expire_in: 1 week
paths:
- build/
script:
- make VERSION=$VERSION phpunit_release
- chmod a+r qfq_$VERSION_*.zip
- scp qfq_$VERSION_*.zip w16:qfq/releases/
- mv qfq_$VERSION_*.zip build/qfq.zip
selenium:
stage: selenium
script:
- unzip -q build/qfq.zip -d qfq
- cd docker/
- ./run_qfq_docker.sh -no-deploy
- ./deploy_to_container.sh ../qfq
- ./run_selenium_tests_docker.sh
- echo "hello"
after_script:
# remove containers and move logs to persistent location
- cd docker; ./remove-containers.sh <<< "y"
- cd ..
- umask 002
- mkdir "$SELENIUM_LOGS_PATH/$CI_COMMIT_SHORT_SHA"
- cp extension/Tests/selenium/selenium_logs/* "$SELENIUM_LOGS_PATH/$CI_COMMIT_SHORT_SHA/"
- echo "Selenium Logs copied to $SELENIUM_LOGS_PATH/$CI_COMMIT_SHORT_SHA/"
This diff is collapsed.
......@@ -280,8 +280,8 @@ FORM_LOG_EXPIRE (typically 1800 seconds).
* Correspondig expired logfiles will be deleted.
* Active logfiles will be filled.
Errormessages & Exceptions
==========================
Error Messages & Exceptions
===========================
* Exception types:
* Code
......
......@@ -40,25 +40,25 @@ Neue Versionsnummer
**Auto**: ./setVersion.sh <MAJOR>.<MINOR>.<MICRO>
Manuell:
* extension/Documentation/_make/conf.py: release, version
* extension/Documentation/Settings.cfg: version
* extension/Documentation/_make/conf.py: release, version-
* Documentation/Settings.cfg: version
* extension/ext_emconf.php: version
4) Im Projektverzeichnis: **Doc**
4) **Documentation**
make t3sphinx (dadurch fallen Fehler in der RESTdoc Syntax auf)
make doc-local (dadurch fallen Fehler in der RESTdoc Syntax auf)
5) **Update Version & Commit**
* Update the version number in this document (topic 6)
* Commit & Push new version changes to master branch:
New version 19.3.2
New version 19.8.0
6) **New Tag**:
git tag v19.3.2
git push -u origin v19.3.2
git tag v19.8.0
git push -u origin v19.8.0
7) Tickets:
* Schliessen und der QFQ Version zuweisen.
......@@ -66,7 +66,7 @@ Neue Versionsnummer
8) T3 Doc aktualisieren
make update-qfq-doc
Sollte durch den git.math.uzh.ch WebHook passieren.
9) Extension hochladen
......@@ -80,7 +80,7 @@ Neue Versionsnummer
Update Doku auf docs.typo3.org
==============================
https://docs.typo3.org/typo3cms/drafts/github/T3DocumentationStarter/Public-Info-053/
https://docs.typo3.org/p/IMATHUZH/qfq/master/en-us/
1) Copy 'qfq' doc to github project 'qfq-doc'. Commit changes. Push changes to github::
......@@ -91,4 +91,4 @@ Upload new version to TER
* https://extensions.typo3.org/ > Log in > My Extensions.
* Rename the ZIP file to be TER compatible: e.g. qfq_18.6.0.zip.
* Upload - that's all.
\ No newline at end of file
* Upload - that's all.
......@@ -563,3 +563,30 @@ Current Page
Redirect
: Issued by the Server. It is a command prompting the Client to
navigate away from the Current Page.
### Tablesorter Save View
To save a table view the client sends a post request with the following data:
{
"name": "<name of view>",
"public": <boolean>,
"tableId": "<id of table to which view belongs>",
"view": {
"columnSelection": <array of chosen column ids>,
"filters": <array of strings>,
"sortList": <array of arrays of length 2>
}
}
Request URL
: api/save.php
Request Method
: POST
URL Parameters
: `s=<SIP>` - to prove permission.
Server Response
: The response contains at least a [Minimal Response].
......@@ -12,11 +12,11 @@ General Concept
* There is one PHP file to handle all REST calls:
typo3conf/ext/qfq/Source/api/rest.php
typo3conf/ext/qfq/Classes/Api/rest.php
* All further endpoints are appended after rest.php, seperated by '/'. Example:
http://localhost/qfq/typo3conf/ext/qfq/Source/api/rest.php/restPerson/1/restAddress/123?myEmail=jonni@miller.com
http://localhost/qfq/typo3conf/ext/qfq/Classes/Api/rest.php/restPerson/1/restAddress/123?myEmail=jonni@miller.com
The argument 'myEmail' is just to show how GET variables will be submitted.
......@@ -39,7 +39,7 @@ GET - export
Example:
curl -X GET "http://localhost/qfq/typo3conf/ext/qfq/Source/api/rest.php/restPerson"
curl -X GET "http://localhost/qfq/typo3conf/ext/qfq/Classes/Api/rest.php/restPerson"
Details:
......@@ -55,7 +55,7 @@ POST - insert
Example:
curl -X POST "http://localhost/qfq/typo3conf/ext/qfq/Source/api/rest.php/restPerson" -d '{"name":"Miller","firstname":"Jonni"}'
curl -X POST "http://localhost/qfq/typo3conf/ext/qfq/Classes/Api/rest.php/restPerson" -d '{"name":"Miller","firstname":"Jonni"}'
Details:
......@@ -69,7 +69,7 @@ PUT - update
Example:
curl -X PUT "http://localhost/qfq/typo3conf/ext/qfq/Source/api/rest.php/restPerson/1" -d '{"name":"Miller","firstname":"Jonni"}'
curl -X PUT "http://localhost/qfq/typo3conf/ext/qfq/Classes/Api/rest.php/restPerson/1" -d '{"name":"Miller","firstname":"Jonni"}'
Details:
......@@ -83,7 +83,7 @@ Delete
Example:
curl -X DELETE "http://localhost/qfq/typo3conf/ext/qfq/Source/api/rest.php/restPerson/1"
curl -X DELETE "http://localhost/qfq/typo3conf/ext/qfq/Classes/Api/rest.php/restPerson/1"
Details:
......@@ -97,7 +97,7 @@ Header Token Authorization
Example:
curl -X GET -H 'Authorization: Token token="mySuperSecretToken"' "http://localhost/qfq/typo3conf/ext/qfq/Source/api/rest.php/restPerson/"
curl -X GET -H 'Authorization: Token token="mySuperSecretToken"' "http://localhost/qfq/typo3conf/ext/qfq/Classes/Api/rest.php/restPerson/"
Static token
------------
......@@ -120,6 +120,6 @@ Append the GET variable `?XDEBUG_SESSION_START=1`
Example:
curl -X POST "http://localhost/qfq/typo3conf/ext/qfq/Source/api/rest.php/restPerson?XDEBUG_SESSION_START=1" -d '{"name":"Miller","firstname":"Jonni"}'
curl -X POST "http://localhost/qfq/typo3conf/ext/qfq/Classes/Api/rest.php/restPerson?XDEBUG_SESSION_START=1" -d '{"name":"Miller","firstname":"Jonni"}'
PhpStorm with activated debugger will stop at any breakpoint and 'stepping' through the code is possible.
T3 Documentation
================
* QFQ Documentation: https://docs.typo3.org/p/IMATHUZH/qfq/master/en-us/Index.html
* Build local documentation: ``make doc-local``
* https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingDocForExtension
* Example Code Documentation: https://github.com/TYPO3-Documentation/TYPO3CMS-Example-ExtensionManual.git
* Pushing a tag on the project triggers a rebuild.
Manual trigger of documentation rebuild
---------------------------------------
* https://git.math.uzh.ch > QFQ > Settings > Integrations > Webhook: https://docs-hook.typo3.org: Test
Log errors
----------
* https://intercept.typo3.com/admin/docs/deployments >> Recent Actions
* https://git.math.uzh.ch > QFQ > Settings > Integrations > Webhook: https://docs-hook.typo3.org > Edit: Recent Deliveries
Best Practice T3 reST
---------------------
* Best Practice T3 reST: https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingReST/CheatSheet.html
* Reference: https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingReST/Index.html
===========
Tablesorter
===========
* https://mottie.github.io/tablesorter/docs/index.html
General Concept
===============
Tablesorter supports filter, column on/off and sort.
A QFQ enhancement allows save/delete/activate of custom tablesorter `views`. This feature is described in this document.
QFQ uses the table 'Setting' to store per user, public and readonly settings. At time of writing only 'tablesorter' settings
are supported. Further settings might come in the future.
Show table with tablesorter activate/save/delete
================================================
A page with a HTML table includes the command `{{'<uniqueName>' AS _tablesorter-view-saver}}` inside of the HTML table tag.
QFQ will replace the command::
<table {{ 'allperson' AS _tablesorter-view-saver }} class="tablesorter tablesorter-filter tablesorter-column-selector"> ... </table>
by
<table data-tablesorter-id='allperson' data-tablesorter-sip='5d0e29c4eacc2'
data-tablesorter-view='[{"name":"test","public":false,"tableId":"mytable","view":"eyJjb2x1bW5TZWxlY3Rpb24iOlswLDEsMiwzXSwiZmlsdGVycyI6WyIiLCIiLCIiLCIiXSwic29ydExpc3QiOltdfQ=="}]' class="table tablesorter tablesorter-column-selector tablesorter-filter tablesorter-pager">
data-tablesorter-id:
'<uniqueName>'
data-tablesorter-sip:
tableId: the '<uniqueName>', in the example it's 'allperson'
feUser: the current logged in FE user. If no FE user is logged in, take the QFQ cookie. With this workaround, it's at
least possible to work with 'views' during a browser session.
data-tablesorter-view: JSON encoded array
Array of views.
Each view:
['name'] - Name of the view. Value is html entity encoded.
['public'] - true or false. false mean's 'private'.
['tableId'] - '<uniqueName>' - this is the filter to assign views to a specific HTML table.
['view'] - base64 encoded JSON array. It's base64 encoded for two reasons:
a) we do not have to take care about SQL injection (the user might supply filter strings, incl. regex expressions)
b) the JSON array will contain '}}', which confuses QFQ/evaluate.
QFQ will collect all views:
a) all private views of the current table and FE User,
b) all public views of the current table.
Save tablesorter view
=====================
The user might click on 'Save Private View' or 'Save Public View'.
A Ajax Post request to
http://localhost/qfq/typo3conf/ext/qfq/Classes/Api/setting.php?s=badcaffee1234
The SIP is the one given by `data-tablesorter-sip` and contains `tableId` and `feUser`. The SIP is right to manipulate the views.
The POST contains:
feUser - fe user login name
mode - missing or 'delete' if the given view should be deleted
public - true|false
name - name of the view
view - base64 encoded tablesorter filter/order/column selector.
Response setting.php
====================
setting.php will always answer with a JSON stream (Minimal response):
{
"status": "success"|"error",
"message": "<message>"
}
# EditorConfig is awesome: http://EditorConfig.org
#
# Use as master: https://github.com/TYPO3-Documentation/T3DocTeam/blob/master/.editorconfig
# top-most EditorConfig file
root = false
[{*.rst, *.rst.txt}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 3
# MD-Files
[*.md]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4