Skip to content

Commit 86ba0e3

Browse files
authored
Merge pull request #346 from clowder-framework/release/1.20.1
Release/1.20.1
2 parents a9c2700 + 68201ab commit 86ba0e3

File tree

15 files changed

+632
-446
lines changed

15 files changed

+632
-446
lines changed

CHANGELOG.md

Lines changed: 191 additions & 68 deletions
Large diffs are not rendered by default.

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Following is a list of contributors in alphabetical order:
1010
- Chris Navarro
1111
- Chrysovalantis Constantinou
1212
- Constantinos Sophocleous
13+
- Dipannita Dey
1314
- Gene Roeder
1415
- Gregory Jansen
1516
- Indira Gutierrez

app/controllers/Datasets.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,8 @@ class Datasets @Inject() (
681681
(SortingUtils.sortFolders(filteredFolders, sortOrder).slice(limit * filepageUpdate, limit * (filepageUpdate + 1)),
682682
SortingUtils.sortFiles(filteredFiles, sortOrder).slice(limit * filepageUpdate - filteredFolders.length, limit * (filepageUpdate + 1) - filteredFolders.length))
683683
} else {
684-
(folders.get(childFolders.reverse.slice(limit * filepageUpdate, limit * (filepageUpdate + 1))).found,
685-
files.get(childFiles.reverse.slice(limit * filepageUpdate - childFolders.length, limit * (filepageUpdate + 1) - childFolders.length)).found)
684+
(folders.get(childFolders.reverse.slice(limit * filepageUpdate, limit * (filepageUpdate + 1))).found.reverse,
685+
files.get(childFiles.reverse.slice(limit * filepageUpdate - childFolders.length, limit * (filepageUpdate + 1) - childFolders.length)).found.reverse)
686686
}
687687

688688
// Get comment counts per file

app/views/collections/parentAllocation.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ <h4>Parent collections</h4>
7676
allowClear: true,
7777
ajax: {
7878
url: function(params) {
79-
return jsRoutes.api.Collections.listPossibleParents( '@resourceId', params.term,null, 5).url;
79+
return jsRoutes.api.Collections.listPossibleParents(null, '@resourceId', params.term, null, 5).url;
8080
},
8181
data: function(params) {
8282
return { title: params.term };

app/views/curations/publishedGrid.scala.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666

6767
<script src="@routes.Assets.at("javascripts/filtrify.js")" type="text/javascript"></script>
6868
<link rel="stylesheet" href="@routes.Assets.at("stylesheets/filtrify.css")">
69-
<script src="/assets/javascripts/lib/masonry.pkgd.min.js" type="text/javascript"></script>
69+
70+
<script src="@routes.Assets.at("javascripts/lib/masonry.pkgd.min.js")" type="text/javascript"></script>
7071
<script>
7172

7273
$(document).ready(function(){

doc/src/sphinx/admin/customizing.rst

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,73 @@
11
.. _customization:
22

3-
******
4-
Customization
5-
******
3+
********************************
4+
Customizing
5+
********************************
6+
7+
The default configuration
8+
==========================
9+
10+
.. warning::
11+
Do **not** make changes to the original files in ``/conf``. Instead, create a ``/custom`` folder shown below.
12+
13+
The default configuration is fine for simple testing, but if you would like to modify any of the settings, you can find
14+
all the configuration files under the ``/conf`` directory. The following files are of particular importance:
15+
16+
- ``/conf/application.conf`` includes all the basic configuration entries. For example the MongoDB credentials for
17+
deployments where MongoDB has non default configuration.
18+
- ``/conf/play.plugins`` is used to turn on and off specific functionality in the system. Plugins specific to Clowder are
19+
available under ``/app/services``.
20+
- ``/conf/securesocial.conf`` includes configuration settings for email functionality when signup as well as ways to
21+
configure the different identity providers (for example Twitter or Facebook). More information can be found on the
22+
`securesocial <http://securesocial.ws/>`_ website.
23+
24+
25+
How to customize Clowder
26+
============================
27+
28+
To customize Clowder, create a folder called ``custom`` inside the Clowder folder (``clowder/custom``).
29+
Add the following. Modifications included in these files will overwrite defaults in ``/conf/application.conf`` and ``/conf/play.plugins``.
30+
31+
.. code:: bash
32+
33+
cd clowder
34+
mkdir custom
35+
touch custom/application.conf custom/play.plugins
36+
37+
38+
If you are working on the source code this folder is excluded from git so you can use that also to customize your development environment, and not accidentally commit changes to either ``play.plugins`` or ``application.conf``. If you make any changes to the files in the custom folder you will need to `restart the application` (both in production and development).
639

7-
To customize Clowder you can put all configuration changes in a folder called custom inside the Clowder folder. If you are working on the source code this folder is excluded from git so you can use that also to customize your development environment, and not accidentally commit changes to either play.plugins or application.conf. If you make any changes to the files in the custom folder you will need to restart the application (both in production and development).
840

941
play.plugins
10-
============
42+
--------------
1143

12-
The play.plugins file is used to enable plugins. You can only enable plugins, you can not disable plugins. This is one of the reasons why we minimize the number plugins that are enabled by default. For example most instances at NCSA will have the following plugins enabled.
44+
The ``/custom/play.plugins`` file describes all the `additional` plugins that should be enabled. **This file can only add additional plugins,
45+
and is not capable of turning off any of the default ones enabled in** ``/conf/play.plugins``.
46+
For example the following ``play.plugins`` file will enable some additional plugins:
1347

1448
.. code-block:: properties
1549
:caption: play.plugins
1650
1751
9992:services.RabbitmqPlugin
52+
10002:securesocial.core.providers.GoogleProvider
1853
11002:services.ElasticsearchPlugin
1954
55+
2056
custom.conf
21-
===========
57+
--------------
58+
59+
``/custom/custom.conf`` is used to override any of the defaults in the ``application.conf`` or any included conf files (such as ``securesocial.conf``). Common changes we do is to modify Clowder to use a directory on disk to store all blobs instead of storing them in mongo. Following is an example that we use for some of the instances we have at NCSA.
60+
61+
- **One change every instance of Clowder should do is to modify the commKey and application.secret.**
62+
2263

23-
The custom.conf file is used to override any of the changes in the application.conf or any included conf files (such as securesocial.conf). One change every instance of Clowder should do is to modify the commKey and application.secret. Common changes we do is to modify Clowder to use a directory on disk to store all blobs instead of storing them in mongo. Following is an example that we use for some of the instances we have at NCSA.
2464

2565
.. code-block:: properties
2666
:caption: custom.conf
2767
28-
# security options
29-
application.secret="1234567890123456789012345678901234567890"
30-
commKey=notreallyit
68+
# security options -- should be changed!
69+
application.secret="some magic string"
70+
commKey=magickey
3171
3272
# email when new user tries to sign up
3373
smtp.from="[email protected]"
@@ -36,7 +76,7 @@ The custom.conf file is used to override any of the changes in the application.c
3676
# URL to mongo
3777
mongodbURI = "mongodb://mongo1:27017,mongo2:27017,mongo3:27017/server1?replicaSet=CLOWDER"
3878
39-
# where to store the blobs
79+
# where to store the blobs (highly recommended)
4080
service.byteStorage=services.filesystem.DiskByteStorageService
4181
medici2.diskStorage.path="/home/clowder/data"
4282
@@ -52,7 +92,9 @@ The custom.conf file is used to override any of the changes in the application.c
5292
elasticsearchSettings.serverPort=9300
5393
5494
# securesocial customization
95+
# set this to true if using https
5596
securesocial.ssl=true
97+
# this will make the default timeout be 8 hours
5698
securesocial.cookie.idleTimeoutInMinutes=480
5799
58100
# twitter setup
@@ -62,17 +104,24 @@ The custom.conf file is used to override any of the changes in the application.c
62104
securesocial.twitter.consumerKey="key"
63105
securesocial.twitter.consumerSecret="secret"
64106
107+
# google setup
108+
securesocial.google.authorizationUrl="https://accounts.google.com/o/oauth2/auth"
109+
securesocial.google.accessTokenUrl="https://accounts.google.com/o/oauth2/token"
110+
securesocial.google.clientId="magic"
111+
securesocial.google.clientSecret="magic"
112+
securesocial.google.scope="https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email"
113+
65114
# enable cache
66115
ehcacheplugin = enabled
67116
68117
69118
messages.XY
70-
===========
119+
---------------------
71120

72121
This allows to translate or customize certain aspects of Clowder. All messages in Clowder are in english and are as messages.default. Unfortunately it is not possible to use messages.default to use for translations since it falls back to those embedded in the Clowder jar files. To update the messages in english, you can use messages.en. The default is for Clowder to only know about english, this can be changed in your custom.conf with ``application.langs="nl"``.
73122

74123
Customizing Web UI
75-
==================
124+
---------------------
76125

77126
The ``public`` folder is place where you can place customizations for previews, as well as new stylesheets. To add a new stylesheet you should place it in the public/stylesheets/themes/ folder. The name should be <something>.min.css or <something>.css. The user will at this point see in their customization settings the option to select <something> as their new theme to be used.
78127

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Changelog
2+
***********
3+
4+
.. To read our changelog.md file, this plugin converts markdown to .rst formatting (`pip install m2r2`)
5+
6+
.. mdinclude:: changelog.md

doc/src/sphinx/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'Luigi Marini'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '1.20.0'
25+
release = '1.20.1'
2626

2727

2828
# -- General configuration ---------------------------------------------------
@@ -31,6 +31,7 @@
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
3333
extensions = [
34+
"sphinx_rtd_theme", "sphinx_design", "m2r2"
3435
]
3536

3637
# Add any paths that contain templates here, relative to this directory.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
.. index:: How to Contribute Documentation
2+
3+
How to Contribute Documentation
4+
=====================================
5+
6+
Documentation is stored in ``doc/src/sphinx``.
7+
8+
Dependencies are stored in ``doc/src/sphinx/requirements.txt``.
9+
10+
11+
12+
13+
.. tab-set::
14+
15+
.. tab-item:: conda
16+
17+
Create a virtual environment for documentation:
18+
19+
.. code:: bash
20+
21+
conda create -n clowder_docs python=3.8 -y
22+
conda activate clowder_docs
23+
24+
Now we must edit the `requirements.txt` file to be compatible with Conda. These packages are not available on conda-forge.
25+
26+
Comment out the top three lines like so:
27+
28+
.. code:: properties
29+
30+
# -i https://pypi.org/simple/
31+
# sphinx-rtd-theme==0.5.0
32+
# sphinx_design==0.0.13
33+
...
34+
35+
Install the dependencies. It's always better to run all conda commands before installing pip packages.
36+
37+
.. code:: bash
38+
39+
conda install --file requirements.txt -y
40+
pip install sphinx-rtd-theme==0.5.0 sphinx_design==0.0.13
41+
42+
.. tab-item:: pyenv
43+
44+
Create a virtual environment for documentation:
45+
46+
.. code:: bash
47+
48+
pyenv install 3.7.12 # or any 3.{7,8,9}
49+
pyenv virtualenv 3.7.12 clowder_docs
50+
51+
# make virtual environemnt auto-activate
52+
cd doc/src/sphinx
53+
pyenv local clowder_docs
54+
55+
Install doc dependencies:
56+
57+
.. code:: bash
58+
59+
pip install -r requirements.txt
60+
61+
Now, build HTML docs for viewing:
62+
63+
.. code:: bash
64+
65+
# run from doc/src/sphinx
66+
sphinx-autobuild . _build/html
67+
68+
Open http://127.0.0.1:8000 in your browser. Saved changes will be auto-updated in the browser.
69+
70+
71+
.. dropdown:: (Optional alternative) Static builds
72+
73+
If you do not want dynamic builds, you can statically generate the HTML this way.
74+
75+
.. code:: bash
76+
77+
cd doc/src/sphinx
78+
make html
79+
80+
View docs by opening ``index.html`` in the browser
81+
``clowder/doc/src/sphinx/_build/html/index.html``
82+
83+
84+
85+
⭐ If you experience *any* trouble, come ask us on `Slack here <https://join.slack.com/t/clowder-software/shared_invite/enQtMzQzOTg0Nzk3OTUzLTYwZDlkZDI0NGI4YmI0ZjE5MTZiYmZhZTIyNWE1YzM0NWMwMzIxODNhZTA1Y2E3MTQzOTg1YThiNzkwOWQwYWE>`_! ⭐
86+
87+
.. note::
88+
89+
To see how to install Clowder, please see :ref:`installing_clowder`.

doc/src/sphinx/develop/setup_dev.rst

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)