Statistics
| Branch: | Tag: | Revision:

root / snf-pithos-webclient / README @ 02f1204b

History | View | Annotate | Download (2.7 kB)

1 97940d2e Kostas Papadimitriou
snf-pithos-webclient
2 0ecaec63 Kostas Papadimitriou
********************
3 0ecaec63 Kostas Papadimitriou
4 0ecaec63 Kostas Papadimitriou
This is the python package of the pithos frontend web application. It consists
5 0ecaec63 Kostas Papadimitriou
of a django application module which includes a prebuilt version of the pithos
6 0ecaec63 Kostas Papadimitriou
gwt project contained in `../src` directory.
7 0ecaec63 Kostas Papadimitriou
8 0ecaec63 Kostas Papadimitriou
The gwt build files are not included in the repository. Ant hooks has been
9 0ecaec63 Kostas Papadimitriou
added in setup.py so that each time you run ``python setup.py {develop,
10 0ecaec63 Kostas Papadimitriou
install, sdist}`` ant build gets executed automatically for you.  Additionally
11 0ecaec63 Kostas Papadimitriou
after each successfull build, compiled js and other asset files are copied in
12 0ecaec63 Kostas Papadimitriou
the appropriate locations so that they will get included in the created python
13 0ecaec63 Kostas Papadimitriou
package.
14 0ecaec63 Kostas Papadimitriou
15 0ecaec63 Kostas Papadimitriou
16 0ecaec63 Kostas Papadimitriou
Installation
17 0ecaec63 Kostas Papadimitriou
============
18 0ecaec63 Kostas Papadimitriou
19 0ecaec63 Kostas Papadimitriou
1. Install the ``snf-pithos-webclient`` python package:
20 0ecaec63 Kostas Papadimitriou
21 0ecaec63 Kostas Papadimitriou
    pip install snf-pithos-webclient -f http://docs.dev.grnet.gr/pypi/
22 0ecaec63 Kostas Papadimitriou
23 0ecaec63 Kostas Papadimitriou
2. Add ``pithos_webclient`` in your django project INSTALLED_APPS setting.
24 0ecaec63 Kostas Papadimitriou
25 0ecaec63 Kostas Papadimitriou
3. Configure your web server to serve package static files placed in
26 0ecaec63 Kostas Papadimitriou
   pithos_web_client/static/pithos_web_client under the
27 0ecaec63 Kostas Papadimitriou
   ``/static/pithos_web_client`` url (``/static/`` is the default django
28 0ecaec63 Kostas Papadimitriou
   MEDIA_URL).
29 0ecaec63 Kostas Papadimitriou
30 0ecaec63 Kostas Papadimitriou
31 0ecaec63 Kostas Papadimitriou
Available settings
32 0ecaec63 Kostas Papadimitriou
==================
33 0ecaec63 Kostas Papadimitriou
34 0ecaec63 Kostas Papadimitriou
The pithos webclient use the following settings 
35 0ecaec63 Kostas Papadimitriou
36 0ecaec63 Kostas Papadimitriou
37 0ecaec63 Kostas Papadimitriou
PITHOS_UI_LOGIN_URL
38 0ecaec63 Kostas Papadimitriou
-------------------
39 0ecaec63 Kostas Papadimitriou
Web client checks for existing ``PITHOS_UI_AUTH_COOKIE_NAME`` cookie on the
40 0ecaec63 Kostas Papadimitriou
browser and if found, uses the stored token to make requests to the pithos api
41 0ecaec63 Kostas Papadimitriou
service. If cookie is not found or if api response with 401 error, the
42 0ecaec63 Kostas Papadimitriou
application will redirect to the ``PITHOS_UI_LOGIN_URL``. ``next`` parameter
43 0ecaec63 Kostas Papadimitriou
gets automatically appended in the url by the webclient.
44 0ecaec63 Kostas Papadimitriou
45 0ecaec63 Kostas Papadimitriou
**default value:** ``https://accounts.okeanos.grnet.gr/im/login?next=``
46 0ecaec63 Kostas Papadimitriou
47 0ecaec63 Kostas Papadimitriou
48 0ecaec63 Kostas Papadimitriou
PITHOS_UI_FEEDBACK_URL
49 0ecaec63 Kostas Papadimitriou
----------------------
50 0ecaec63 Kostas Papadimitriou
Should be set to match your astakos deployment feedback endpoint. This is used
51 0ecaec63 Kostas Papadimitriou
in error messages, if user want to submit the error as feedback to the service
52 0ecaec63 Kostas Papadimitriou
administrators.
53 0ecaec63 Kostas Papadimitriou
54 0ecaec63 Kostas Papadimitriou
**default value:** ``https://accounts.okeanos.grnet.gr/im/feedback``
55 0ecaec63 Kostas Papadimitriou
56 0ecaec63 Kostas Papadimitriou
57 0ecaec63 Kostas Papadimitriou
PITHOS_UI_AUTH_COOKIE_NAME
58 0ecaec63 Kostas Papadimitriou
--------------------------
59 0ecaec63 Kostas Papadimitriou
The cookie name the webclient will check for user authenticity. This
60 0ecaec63 Kostas Papadimitriou
should match the ``ASTAKOS_COOKIE_NAME`` setting of your astakos deployment.
61 0ecaec63 Kostas Papadimitriou
62 0ecaec63 Kostas Papadimitriou
**default value:** ``_pithos2_a``
63 0ecaec63 Kostas Papadimitriou
64 0ecaec63 Kostas Papadimitriou
65 0ecaec63 Kostas Papadimitriou
PITHOS_CLOUDBAR_ACTIVE_SERVICE
66 0ecaec63 Kostas Papadimitriou
------------------------------
67 0ecaec63 Kostas Papadimitriou
This is passed as a setting to the cloudbar js script to set focus to the
68 0ecaec63 Kostas Papadimitriou
appropriate service menu. This should match the `id` key of
69 0ecaec63 Kostas Papadimitriou
``ASTAKOS_CLOUD_SERVICES`` entry which refers to pithos application.
70 0ecaec63 Kostas Papadimitriou
71 0ecaec63 Kostas Papadimitriou
**default value:** ``pithos``
72 0ecaec63 Kostas Papadimitriou
73 0ecaec63 Kostas Papadimitriou
74 0ecaec63 Kostas Papadimitriou
CLOUDBAR_SETTINGS
75 0ecaec63 Kostas Papadimitriou
-----------------
76 0ecaec63 Kostas Papadimitriou
Webclient also makes use of the ``cloudbar`` context processor located in
77 0ecaec63 Kostas Papadimitriou
``snf-common`` package which requires ``CLOUDBAR_ACTIVE``,
78 0ecaec63 Kostas Papadimitriou
``CLOUDBAR_LOCATION``, ``CLOUDBAR_COOKIE_NAME``, ``CLOUDBAR_SERVICES_URL``,
79 0ecaec63 Kostas Papadimitriou
``CLOUDBAR_MENU_URL`` settings to be set.