├── .coveragerc
├── .gitignore
├── .travis.yml
├── CHANGELOG
├── LICENSE
├── MANIFEST.in
├── README.md
├── baobab.front
├── assets
│ └── fonts
│ │ ├── museo
│ │ ├── Museo_Slab_500-webfont.eot
│ │ ├── Museo_Slab_500-webfont.svg
│ │ ├── Museo_Slab_500-webfont.ttf
│ │ └── Museo_Slab_500-webfont.woff
│ │ ├── open-sans
│ │ ├── OpenSans-Bold-webfont.eot
│ │ ├── OpenSans-Bold-webfont.svg
│ │ ├── OpenSans-Bold-webfont.ttf
│ │ ├── OpenSans-Bold-webfont.woff
│ │ ├── OpenSans-BoldItalic-webfont.eot
│ │ ├── OpenSans-BoldItalic-webfont.svg
│ │ ├── OpenSans-BoldItalic-webfont.ttf
│ │ ├── OpenSans-BoldItalic-webfont.woff
│ │ ├── OpenSans-Italic-webfont.eot
│ │ ├── OpenSans-Italic-webfont.svg
│ │ ├── OpenSans-Italic-webfont.ttf
│ │ ├── OpenSans-Italic-webfont.woff
│ │ ├── OpenSans-Regular-webfont.eot
│ │ ├── OpenSans-Regular-webfont.svg
│ │ ├── OpenSans-Regular-webfont.ttf
│ │ └── OpenSans-Regular-webfont.woff
│ │ └── roboto
│ │ ├── Google Android License.txt
│ │ ├── Roboto-Black-webfont.eot
│ │ ├── Roboto-Black-webfont.svg
│ │ ├── Roboto-Black-webfont.ttf
│ │ ├── Roboto-Black-webfont.woff
│ │ ├── Roboto-BlackItalic-webfont.eot
│ │ ├── Roboto-BlackItalic-webfont.svg
│ │ ├── Roboto-BlackItalic-webfont.ttf
│ │ ├── Roboto-BlackItalic-webfont.woff
│ │ ├── Roboto-Bold-webfont.eot
│ │ ├── Roboto-Bold-webfont.svg
│ │ ├── Roboto-Bold-webfont.ttf
│ │ ├── Roboto-Bold-webfont.woff
│ │ ├── Roboto-BoldCondensed-webfont.eot
│ │ ├── Roboto-BoldCondensed-webfont.svg
│ │ ├── Roboto-BoldCondensed-webfont.ttf
│ │ ├── Roboto-BoldCondensed-webfont.woff
│ │ ├── Roboto-BoldCondensedItalic-webfont.eot
│ │ ├── Roboto-BoldCondensedItalic-webfont.svg
│ │ ├── Roboto-BoldCondensedItalic-webfont.ttf
│ │ ├── Roboto-BoldCondensedItalic-webfont.woff
│ │ ├── Roboto-BoldItalic-webfont.eot
│ │ ├── Roboto-BoldItalic-webfont.svg
│ │ ├── Roboto-BoldItalic-webfont.ttf
│ │ ├── Roboto-BoldItalic-webfont.woff
│ │ ├── Roboto-Condensed-webfont.eot
│ │ ├── Roboto-Condensed-webfont.svg
│ │ ├── Roboto-Condensed-webfont.ttf
│ │ ├── Roboto-Condensed-webfont.woff
│ │ ├── Roboto-CondensedItalic-webfont.eot
│ │ ├── Roboto-CondensedItalic-webfont.svg
│ │ ├── Roboto-CondensedItalic-webfont.ttf
│ │ ├── Roboto-CondensedItalic-webfont.woff
│ │ ├── Roboto-Italic-webfont.eot
│ │ ├── Roboto-Italic-webfont.svg
│ │ ├── Roboto-Italic-webfont.ttf
│ │ ├── Roboto-Italic-webfont.woff
│ │ ├── Roboto-Light-webfont.eot
│ │ ├── Roboto-Light-webfont.svg
│ │ ├── Roboto-Light-webfont.ttf
│ │ ├── Roboto-Light-webfont.woff
│ │ ├── Roboto-LightItalic-webfont.eot
│ │ ├── Roboto-LightItalic-webfont.svg
│ │ ├── Roboto-LightItalic-webfont.ttf
│ │ ├── Roboto-LightItalic-webfont.woff
│ │ ├── Roboto-Medium-webfont.eot
│ │ ├── Roboto-Medium-webfont.svg
│ │ ├── Roboto-Medium-webfont.ttf
│ │ ├── Roboto-Medium-webfont.woff
│ │ ├── Roboto-MediumItalic-webfont.eot
│ │ ├── Roboto-MediumItalic-webfont.svg
│ │ ├── Roboto-MediumItalic-webfont.ttf
│ │ ├── Roboto-MediumItalic-webfont.woff
│ │ ├── Roboto-Regular-webfont.eot
│ │ ├── Roboto-Regular-webfont.svg
│ │ ├── Roboto-Regular-webfont.ttf
│ │ ├── Roboto-Regular-webfont.woff
│ │ ├── Roboto-Thin-webfont.eot
│ │ ├── Roboto-Thin-webfont.svg
│ │ ├── Roboto-Thin-webfont.ttf
│ │ ├── Roboto-Thin-webfont.woff
│ │ ├── Roboto-ThinItalic-webfont.eot
│ │ ├── Roboto-ThinItalic-webfont.svg
│ │ ├── Roboto-ThinItalic-webfont.ttf
│ │ ├── Roboto-ThinItalic-webfont.woff
│ │ ├── demo.html
│ │ └── stylesheet.css
├── images
│ ├── favicon.ico
│ ├── header_contactsupport.png
│ ├── header_rss.png
│ ├── header_twitter.png
│ ├── logo_gandi.png
│ ├── status_incident.png
│ ├── status_incident_detail.png
│ ├── status_maintenance.png
│ ├── status_maintenance_detail.png
│ ├── status_ok.png
│ └── status_ok_detail.png
├── index.html
├── js
│ ├── .gitignore
│ ├── api.js
│ ├── elements
│ │ ├── events.js
│ │ ├── eventsfilter.js
│ │ ├── services.js
│ │ ├── status.js
│ │ └── statustime.js
│ ├── ie.js
│ ├── main.js
│ ├── page
│ │ ├── event.js
│ │ ├── status.js
│ │ └── timeline.js
│ ├── router.js
│ └── router_utils.js
├── less
│ ├── event.less
│ ├── fonts.less
│ ├── main.less
│ ├── reset.less
│ ├── resetie.less
│ ├── status.less
│ └── timeline.less
├── tests
│ ├── aliasifyConfig.js
│ ├── integration
│ │ ├── event.js
│ │ ├── service_details.js
│ │ ├── services.js
│ │ └── timeline.js
│ └── mocks
│ │ └── api.js
└── views
│ ├── day.html
│ ├── event.html
│ ├── maintenances.html
│ ├── service-button.html
│ ├── service-status-button.html
│ └── service.html
├── baobab
├── __init__.py
├── apirest
│ ├── __init__.py
│ ├── events.py
│ ├── modelresource.py
│ ├── models.py
│ ├── services.py
│ ├── status.py
│ ├── tests
│ │ ├── __init__.py
│ │ ├── test_events.py
│ │ ├── test_route.py
│ │ ├── test_schema.py
│ │ ├── test_services.py
│ │ ├── test_status.py
│ │ └── test_utc_date.py
│ └── urls.py
├── backoffice
│ ├── __init__.py
│ ├── admin.py
│ ├── adminform.py
│ ├── admininline.py
│ ├── management
│ │ ├── __init__.py
│ │ └── commands
│ │ │ ├── __init__.py
│ │ │ └── migrate_fixtures.py
│ ├── migrations
│ │ ├── 0001_initial.py
│ │ ├── 0002_create_services_and_set_timezone_enm.py
│ │ ├── 0003_auto__chg_field_event_title.py
│ │ ├── 0004_auto__add_field_eventlog_msg_id__add_field_eventlog_msg__add_field_eve.py
│ │ ├── 0005_auto__chg_field_event_msg.py
│ │ ├── 0006_auto__chg_field_eventlog_msg_id__chg_field_event_msg_id.py
│ │ ├── 0007_auto__add_field_event_last_update.py
│ │ ├── 0008_set_last_update.py
│ │ ├── 0009_move_twitter_to_socialnetwork.py
│ │ ├── 0010_auto__del_field_eventlog_msg_id__del_field_event_msg_id.py
│ │ └── __init__.py
│ ├── modelmanager.py
│ ├── models.py
│ └── tests
│ │ ├── __init__.py
│ │ ├── test_event.py
│ │ ├── test_event_trigger.py
│ │ ├── test_eventlog_trigger.py
│ │ └── test_status.py
├── bin
│ ├── __init__.py
│ └── cmd_baobab.py
├── conf
│ └── default.py
├── cron
│ ├── __init__.py
│ ├── close_event.py
│ ├── models.py
│ ├── socialnetwork.py
│ └── tests
│ │ ├── __init__.py
│ │ └── test_sn.py
├── fixtures
│ ├── __init__.py
│ ├── db_backoffice.json
│ ├── db_south.json
│ ├── db_translate.json
│ └── db_user.json
├── front
│ ├── __init__.py
│ ├── models.py
│ ├── tests.py
│ └── views.py
├── manage.py
├── middleware.py
├── rss
│ ├── __init__.py
│ ├── feed.py
│ ├── models.py
│ └── tests
│ │ ├── __init__.py
│ │ └── test_rss.py
├── settings.py
├── socialnetwork
│ ├── __init__.py
│ ├── base.py
│ ├── irc.py
│ ├── management
│ │ ├── __init__.py
│ │ └── commands
│ │ │ ├── __init__.py
│ │ │ └── ircd.py
│ ├── migrations
│ │ ├── 0001_initial.py
│ │ └── __init__.py
│ ├── models.py
│ ├── tests
│ │ ├── __init__.py
│ │ └── test_socialnetwork.py
│ └── twitter.py
├── static
│ ├── .gitignore
│ └── admin
│ │ ├── css
│ │ ├── base.css
│ │ ├── changelists.css
│ │ ├── dashboard.css
│ │ ├── forms.css
│ │ ├── ie.css
│ │ ├── login.css
│ │ ├── rtl.css
│ │ └── widgets.css
│ │ ├── img
│ │ ├── changelist-bg.gif
│ │ ├── changelist-bg_rtl.gif
│ │ ├── chooser-bg.gif
│ │ ├── chooser_stacked-bg.gif
│ │ ├── default-bg-reverse.gif
│ │ ├── default-bg.gif
│ │ ├── deleted-overlay.gif
│ │ ├── gis
│ │ │ ├── move_vertex_off.png
│ │ │ └── move_vertex_on.png
│ │ ├── icon-no.gif
│ │ ├── icon-unknown.gif
│ │ ├── icon-yes.gif
│ │ ├── icon_addlink.gif
│ │ ├── icon_alert.gif
│ │ ├── icon_calendar.gif
│ │ ├── icon_changelink.gif
│ │ ├── icon_clock.gif
│ │ ├── icon_deletelink.gif
│ │ ├── icon_error.gif
│ │ ├── icon_searchbox.png
│ │ ├── icon_success.gif
│ │ ├── inline-delete-8bit.png
│ │ ├── inline-delete.png
│ │ ├── inline-restore-8bit.png
│ │ ├── inline-restore.png
│ │ ├── inline-splitter-bg.gif
│ │ ├── nav-bg-grabber.gif
│ │ ├── nav-bg-reverse.gif
│ │ ├── nav-bg-selected.gif
│ │ ├── nav-bg.gif
│ │ ├── selector-icons.gif
│ │ ├── selector-search.gif
│ │ ├── sorting-icons.gif
│ │ ├── tool-left.gif
│ │ ├── tool-left_over.gif
│ │ ├── tool-right.gif
│ │ ├── tool-right_over.gif
│ │ ├── tooltag-add.gif
│ │ ├── tooltag-add_over.gif
│ │ ├── tooltag-arrowright.gif
│ │ └── tooltag-arrowright_over.gif
│ │ └── js
│ │ ├── LICENSE-JQUERY.txt
│ │ ├── SelectBox.js
│ │ ├── SelectFilter2.js
│ │ ├── actions.js
│ │ ├── actions.min.js
│ │ ├── admin
│ │ ├── DateTimeShortcuts.js
│ │ ├── RelatedObjectLookups.js
│ │ └── ordering.js
│ │ ├── calendar.js
│ │ ├── collapse.js
│ │ ├── collapse.min.js
│ │ ├── core.js
│ │ ├── getElementsBySelector.js
│ │ ├── inlines.js
│ │ ├── inlines.min.js
│ │ ├── jquery.init.js
│ │ ├── jquery.js
│ │ ├── jquery.min.js
│ │ ├── prepopulate.js
│ │ ├── prepopulate.min.js
│ │ ├── timeparse.js
│ │ └── urlify.js
├── translate
│ ├── __init__.py
│ ├── admin.py
│ ├── adminfilter.py
│ ├── adminform.py
│ ├── admininline.py
│ ├── migrations
│ │ ├── 0001_initial.py
│ │ ├── 0002_set_traduction.py
│ │ └── __init__.py
│ └── models.py
├── urls.py
├── utils
│ ├── __init__.py
│ ├── admin.py
│ ├── authentication.py
│ ├── handle_south.py
│ ├── mock.py
│ ├── set_current_timezone.py
│ └── test.py
└── wsgi.py
├── clean.sh
├── debian
├── README.Debian
├── changelog
├── compat
├── control
├── copyright
├── pydist-overrides
├── python-baobab.baobab-ircd.init
├── python-baobab.baobab-syncdb.init
├── python-baobab.baobab.cron.d
├── python-baobab.install
├── rules
└── source
│ └── format
├── gulpfile.js
├── misc
└── hooks
│ ├── README
│ ├── post-merge
│ ├── post-rebase
│ ├── post-rewrite
│ └── pre-commit
├── nginx
└── sites-available
│ ├── status.gandi.net
│ └── status.gandi.net-ssl
├── npm-shrinkwrap.json
├── package.json
├── protractor.conf.js
├── pytest.ini
├── setup.py
├── status.template
└── test.sh
/.coveragerc:
--------------------------------------------------------------------------------
1 | [report]
2 | omit = */migrations/*
3 | */tests/*
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized
2 | __pycache__/
3 | *.py[cod]
4 |
5 | # Distribution / packaging
6 | build/
7 | develop-eggs/
8 | dist/
9 | eggs/
10 | lib/
11 | lib64/
12 | parts/
13 | sdist/
14 | var/
15 | *.egg-info/
16 | .installed.cfg
17 | *.egg
18 |
19 | # Editor stuff
20 | *~
21 | .#*
22 | \#*#
23 | .*.swp
24 |
25 | # Installer logs
26 | pip-log.txt
27 | pip-delete-this-directory.txt
28 |
29 | # Unit test / coverage reports
30 | .tox/
31 | .coverage
32 | .cache
33 | nosetests.xml
34 | coverage.xml
35 | test-prod-*/
36 |
37 | # default (dev) db
38 | baobab/default.db
39 |
40 | # Node
41 | node_modules
42 |
43 | # Angular app
44 | *.ng/*.sw*
45 | *.ng/build/
46 | *.ng/locale/templates
47 | *.ng/bin/
48 | *.ng/node_modules/
49 | *.ng/vendor/
50 | *.ng/locale/static/*.json
51 | *.ng/app/spec/output
52 | *.ng/**/vendor
53 |
54 | # Generated assets
55 | baobab/front/templates/index.html
56 | baobab/static/public
57 |
58 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: python
2 | python:
3 | - "2.7"
4 | install:
5 | - pip install -e '.[test]'
6 | - python setup.py develop
7 | - pip install pytest
8 | - pip install -U 'pytest-django<3.0.0'
9 | - pip install pytest-coverage
10 | - pip install coveralls
11 | script:
12 | - py.test --cov baobab
13 | after_success:
14 | - coveralls
15 |
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include README
2 | include CHANGELOG
3 | recursive-include baobab/front/templates *.html
4 |
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/museo/Museo_Slab_500-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/museo/Museo_Slab_500-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/museo/Museo_Slab_500-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/museo/Museo_Slab_500-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/museo/Museo_Slab_500-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/museo/Museo_Slab_500-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-Bold-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-Bold-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-Bold-webfont.svg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-Bold-webfont.svg
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-Bold-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-Bold-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-Bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-Bold-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-Italic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-Italic-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-Italic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-Italic-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-Italic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-Italic-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-Regular-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-Regular-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-Regular-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-Regular-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/open-sans/OpenSans-Regular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/open-sans/OpenSans-Regular-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Google Android License.txt:
--------------------------------------------------------------------------------
1 | Copyright (C) 2008 The Android Open Source Project
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
15 | ##########
16 |
17 | This directory contains the fonts for the platform. They are licensed
18 | under the Apache 2 license.
19 |
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Black-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Black-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Black-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Black-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Black-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Black-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-BlackItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-BlackItalic-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-BlackItalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-BlackItalic-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-BlackItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-BlackItalic-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Bold-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Bold-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Bold-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Bold-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Bold-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-BoldCondensed-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-BoldCondensed-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-BoldCondensed-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-BoldCondensed-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-BoldCondensed-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-BoldCondensed-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-BoldCondensedItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-BoldCondensedItalic-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-BoldCondensedItalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-BoldCondensedItalic-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-BoldCondensedItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-BoldCondensedItalic-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-BoldItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-BoldItalic-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-BoldItalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-BoldItalic-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-BoldItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-BoldItalic-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Condensed-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Condensed-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Condensed-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Condensed-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Condensed-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Condensed-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-CondensedItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-CondensedItalic-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-CondensedItalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-CondensedItalic-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-CondensedItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-CondensedItalic-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Italic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Italic-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Italic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Italic-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Italic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Italic-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Light-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Light-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Light-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Light-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Light-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Light-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-LightItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-LightItalic-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-LightItalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-LightItalic-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-LightItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-LightItalic-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Medium-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Medium-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Medium-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Medium-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Medium-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Medium-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-MediumItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-MediumItalic-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-MediumItalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-MediumItalic-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-MediumItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-MediumItalic-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Regular-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Regular-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Regular-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Regular-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Regular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Regular-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Thin-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Thin-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Thin-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Thin-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-Thin-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-Thin-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-ThinItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-ThinItalic-webfont.eot
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-ThinItalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-ThinItalic-webfont.ttf
--------------------------------------------------------------------------------
/baobab.front/assets/fonts/roboto/Roboto-ThinItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/assets/fonts/roboto/Roboto-ThinItalic-webfont.woff
--------------------------------------------------------------------------------
/baobab.front/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/images/favicon.ico
--------------------------------------------------------------------------------
/baobab.front/images/header_contactsupport.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/images/header_contactsupport.png
--------------------------------------------------------------------------------
/baobab.front/images/header_rss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/images/header_rss.png
--------------------------------------------------------------------------------
/baobab.front/images/header_twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/images/header_twitter.png
--------------------------------------------------------------------------------
/baobab.front/images/logo_gandi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/images/logo_gandi.png
--------------------------------------------------------------------------------
/baobab.front/images/status_incident.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/images/status_incident.png
--------------------------------------------------------------------------------
/baobab.front/images/status_incident_detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/images/status_incident_detail.png
--------------------------------------------------------------------------------
/baobab.front/images/status_maintenance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/images/status_maintenance.png
--------------------------------------------------------------------------------
/baobab.front/images/status_maintenance_detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/images/status_maintenance_detail.png
--------------------------------------------------------------------------------
/baobab.front/images/status_ok.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/images/status_ok.png
--------------------------------------------------------------------------------
/baobab.front/images/status_ok_detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab.front/images/status_ok_detail.png
--------------------------------------------------------------------------------
/baobab.front/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | '+a.addText+""),h=d.find("tr:last a")):(c.filter(":last").after('"),h=c.filter(":last").next().find("a"));h.click(function(d){d.preventDefault();var f=b("#id_"+a.prefix+"-TOTAL_FORMS"),d=b("#"+a.prefix+
3 | "-empty"),c=d.clone(true);c.removeClass(a.emptyCssClass).addClass(a.formCssClass).attr("id",a.prefix+"-"+g);c.is("tr")?c.children(":last").append('"):c.is("ul")||c.is("ol")?c.append(''+a.deleteText+""):c.children(":first").append(''+a.deleteText+"");c.find("*").each(function(){i(this,
4 | a.prefix,f.val())});c.insertBefore(b(d));b(f).val(parseInt(f.val(),10)+1);g=g+1;e.val()!==""&&e.val()-f.val()<=0&&h.parent().hide();c.find("a."+a.deleteCssClass).click(function(d){d.preventDefault();d=b(this).parents("."+a.formCssClass);d.remove();g=g-1;a.removed&&a.removed(d);d=b("."+a.formCssClass);b("#id_"+a.prefix+"-TOTAL_FORMS").val(d.length);(e.val()===""||e.val()-d.length>0)&&h.parent().show();for(var c=0,f=d.length;c 0) {
25 | values.push($(field).val());
26 | }
27 | })
28 | field.val(URLify(values.join(' '), maxLength));
29 | };
30 |
31 | $(dependencies.join(',')).keyup(populate).change(populate).focus(populate);
32 | });
33 | };
34 | })(django.jQuery);
35 |
--------------------------------------------------------------------------------
/baobab/static/admin/js/prepopulate.min.js:
--------------------------------------------------------------------------------
1 | (function(a){a.fn.prepopulate=function(d,g){return this.each(function(){var b=a(this);b.data("_changed",false);b.change(function(){b.data("_changed",true)});var c=function(){if(b.data("_changed")!=true){var e=[];a.each(d,function(h,f){a(f).val().length>0&&e.push(a(f).val())});b.val(URLify(e.join(" "),g))}};a(d.join(",")).keyup(c).change(c).focus(c)})}})(django.jQuery);
2 |
--------------------------------------------------------------------------------
/baobab/static/admin/js/timeparse.js:
--------------------------------------------------------------------------------
1 | var timeParsePatterns = [
2 | // 9
3 | { re: /^\d{1,2}$/i,
4 | handler: function(bits) {
5 | if (bits[0].length == 1) {
6 | return '0' + bits[0] + ':00';
7 | } else {
8 | return bits[0] + ':00';
9 | }
10 | }
11 | },
12 | // 13:00
13 | { re: /^\d{2}[:.]\d{2}$/i,
14 | handler: function(bits) {
15 | return bits[0].replace('.', ':');
16 | }
17 | },
18 | // 9:00
19 | { re: /^\d[:.]\d{2}$/i,
20 | handler: function(bits) {
21 | return '0' + bits[0].replace('.', ':');
22 | }
23 | },
24 | // 3 am / 3 a.m. / 3am
25 | { re: /^(\d+)\s*([ap])(?:.?m.?)?$/i,
26 | handler: function(bits) {
27 | var hour = parseInt(bits[1]);
28 | if (hour == 12) {
29 | hour = 0;
30 | }
31 | if (bits[2].toLowerCase() == 'p') {
32 | if (hour == 12) {
33 | hour = 0;
34 | }
35 | return (hour + 12) + ':00';
36 | } else {
37 | if (hour < 10) {
38 | return '0' + hour + ':00';
39 | } else {
40 | return hour + ':00';
41 | }
42 | }
43 | }
44 | },
45 | // 3.30 am / 3:15 a.m. / 3.00am
46 | { re: /^(\d+)[.:](\d{2})\s*([ap]).?m.?$/i,
47 | handler: function(bits) {
48 | var hour = parseInt(bits[1]);
49 | var mins = parseInt(bits[2]);
50 | if (mins < 10) {
51 | mins = '0' + mins;
52 | }
53 | if (hour == 12) {
54 | hour = 0;
55 | }
56 | if (bits[3].toLowerCase() == 'p') {
57 | if (hour == 12) {
58 | hour = 0;
59 | }
60 | return (hour + 12) + ':' + mins;
61 | } else {
62 | if (hour < 10) {
63 | return '0' + hour + ':' + mins;
64 | } else {
65 | return hour + ':' + mins;
66 | }
67 | }
68 | }
69 | },
70 | // noon
71 | { re: /^no/i,
72 | handler: function(bits) {
73 | return '12:00';
74 | }
75 | },
76 | // midnight
77 | { re: /^mid/i,
78 | handler: function(bits) {
79 | return '00:00';
80 | }
81 | }
82 | ];
83 |
84 | function parseTimeString(s) {
85 | for (var i = 0; i < timeParsePatterns.length; i++) {
86 | var re = timeParsePatterns[i].re;
87 | var handler = timeParsePatterns[i].handler;
88 | var bits = re.exec(s);
89 | if (bits) {
90 | return handler(bits);
91 | }
92 | }
93 | return s;
94 | }
95 |
--------------------------------------------------------------------------------
/baobab/translate/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab/translate/__init__.py
--------------------------------------------------------------------------------
/baobab/translate/admin.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """
3 | Define the form for django's admin
4 | """
5 |
6 | from django.contrib import admin
7 |
8 | from baobab.utils.admin import ModelAdmin
9 |
10 | from baobab.translate.models import Lang, Event, EventLog
11 | from baobab.translate.admininline import EventDataInline, EventLogDataInline
12 | from baobab.translate.adminfilter import (EventCompleteFilter,
13 | EventLogCompleteFilter)
14 |
15 |
16 | class EventAdmin(ModelAdmin):
17 | fields = ['title_en', ]
18 | readonly_fields = ['title_en', ]
19 | list_display = ['title_en', 'complete_event', 'complete_log']
20 | list_display_dynamic = {
21 | 'val_name': Lang.objects.exclude(iso='en').values_list('iso', 'name'),
22 | 'filter': 'lang__iso',
23 | 'sub_obj': 'eventdatas',
24 | }
25 | inlines = [EventDataInline, ]
26 | list_filter = [EventCompleteFilter, ]
27 | search_fields = ['eventdatas__title']
28 |
29 | def title_en(self, obj):
30 | return obj.eventdatas.get(lang__iso='en').title
31 | title_en.short_description = 'Title'
32 |
33 | def complete_event(self, obj):
34 | if obj.eventdatas.count() == Lang.objects.count():
35 | return 'True'
36 | return 'False'
37 | complete_event.allow_tags = True
38 |
39 | def complete_log(self, obj):
40 | for eventlog in obj.eventlogs.all():
41 | if eventlog.eventlogdatas.count() != Lang.objects.count():
42 | return 'False'
43 | return 'True'
44 | complete_log.allow_tags = True
45 |
46 | # XXX for safety
47 | def has_delete_permission(self, request, obj=None):
48 | return False
49 |
50 | def has_add_permission(self, request, obj=None):
51 | return False
52 |
53 | def has_change_permission(self, request, obj=None):
54 | if request.user.groups.filter(name='translate').exists():
55 | return True
56 | return super(EventAdmin, self).has_change_permission(request, obj=obj)
57 |
58 |
59 | class EventLogAdmin(ModelAdmin):
60 | fields = ['comment_en', ]
61 | readonly_fields = ['comment_en', ]
62 | list_display = ['title_en', 'comment_en', 'complete']
63 | list_display_dynamic = {
64 | 'val_name': Lang.objects.exclude(iso='en').values_list('iso', 'name'),
65 | 'filter': 'lang__iso',
66 | 'sub_obj': 'eventlogdatas',
67 | }
68 | inlines = [EventLogDataInline, ]
69 | list_filter = [EventLogCompleteFilter, ]
70 | search_fields = ['event__eventdatas__title']
71 |
72 | def title_en(self, obj):
73 | return obj.event.eventdatas.get(lang__iso='en').title
74 | title_en.short_description = 'Title'
75 |
76 | def comment_en(self, obj):
77 | return obj.eventlogdatas.get(lang__iso='en').comment
78 | comment_en.short_description = 'Comment'
79 |
80 | def complete(self, obj):
81 | if obj.eventlogdatas.count() == Lang.objects.count():
82 | return 'True'
83 | return 'False'
84 | complete.allow_tags = True
85 |
86 | # XXX for safety
87 | def has_delete_permission(self, request, obj=None):
88 | return False
89 |
90 | def has_add_permission(self, request, obj=None):
91 | return False
92 |
93 | def has_change_permission(self, request, obj=None):
94 | if request.user.groups.filter(name='translate').exists():
95 | return True
96 | return super(EventLogAdmin, self).has_change_permission(request,
97 | obj=obj)
98 |
99 |
100 | admin.site.register(Event, EventAdmin)
101 | admin.site.register(EventLog, EventLogAdmin)
102 |
--------------------------------------------------------------------------------
/baobab/translate/adminfilter.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | Define some filter that can't be auto generated by django
5 | """
6 |
7 | from django.db.models import Q, F, Count
8 | from django.contrib.admin import SimpleListFilter
9 |
10 | from baobab.translate.models import Lang, Event
11 |
12 |
13 | class EventCompleteFilter(SimpleListFilter):
14 | title = 'Complete'
15 | parameter_name = 'complete'
16 |
17 | def lookups(self, request, model_admin):
18 | return (
19 | ('true', 'True'),
20 | ('false', 'False'),
21 | )
22 |
23 | def queryset(self, request, queryset):
24 | if not self.value():
25 | return queryset
26 | nb_lang = Lang.objects.count()
27 | queryset = queryset.annotate(sum=Count('eventdatas'))
28 | events = queryset.filter(sum=nb_lang)
29 | ids = []
30 | for event in events:
31 | annotate = {'sum': Count('eventlogdatas__lang')}
32 | nb_logdatas = event.eventlogs.annotate(**annotate).values('sum')
33 | if not all(map(lambda e: e['sum'] == nb_lang, nb_logdatas)):
34 | continue
35 | ids.append(event.id)
36 | if self.value() == 'true':
37 | return Event.objects.filter(id__in=ids)
38 | return Event.objects.exclude(id__in=ids)
39 |
40 |
41 | class EventLogCompleteFilter(SimpleListFilter):
42 | title = 'CompleteLog'
43 | parameter_name = 'completelog'
44 |
45 | def lookups(self, request, model_admin):
46 | return (
47 | ('true', 'True'),
48 | ('false', 'False'),
49 | )
50 |
51 | def queryset(self, request, queryset):
52 | if not self.value():
53 | return queryset
54 | nb_lang = Lang.objects.count()
55 | annotate = {'sum': Count('eventlogdatas__lang')}
56 | queryset = queryset.annotate(**annotate)
57 | if self.value() == 'true':
58 | return queryset.filter(sum=nb_lang)
59 | return queryset.filter(sum__lt=nb_lang)
60 |
--------------------------------------------------------------------------------
/baobab/translate/adminform.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | Re-define some default admin form
5 | """
6 | from django.forms import ModelForm
7 |
8 | from baobab.translate import models
9 |
10 |
11 | class EventDataForm(ModelForm):
12 |
13 | def save(self, commit=True):
14 | if not self.instance:
15 | self.instance.user = self.request.user
16 | return super(EventDataForm, self).save(commit)
17 |
18 | class Meta:
19 | model = models.EventData
20 |
21 |
22 | class EventLogDataForm(ModelForm):
23 |
24 | def save(self, commit=True):
25 | if self.instance:
26 | self.instance.user = self.request.user
27 | return super(EventLogDataForm, self).save(commit)
28 |
29 | class Meta:
30 | model = models.EventLogData
31 |
--------------------------------------------------------------------------------
/baobab/translate/admininline.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | all the inline class
5 | """
6 |
7 | from baobab.utils.admin import TabularInline
8 | from baobab.translate import models
9 | from baobab.translate.adminform import EventDataForm, EventLogDataForm
10 |
11 |
12 | class EventDataInline(TabularInline):
13 | form = EventDataForm
14 | model = models.EventData
15 | fields = ['lang', 'title', 'summary']
16 | extra = models.Lang.objects.count()
17 | max_num = extra
18 |
19 | # XXX for safety
20 | def has_delete_permission(self, request, obj=None):
21 | return False
22 |
23 |
24 | class EventLogDataInline(TabularInline):
25 | form = EventLogDataForm
26 | model = models.EventLogData
27 | fields = ['lang', 'comment']
28 | extra = models.Lang.objects.count()
29 | max_num = extra
30 |
31 | # XXX for safety
32 | def has_delete_permission(self, request, obj=None):
33 | return False
34 |
--------------------------------------------------------------------------------
/baobab/translate/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab/translate/migrations/__init__.py
--------------------------------------------------------------------------------
/baobab/translate/models.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """
3 | Define the database model to translate the comment (Event/EventLog)
4 | """
5 |
6 | from django.contrib.auth.models import User
7 |
8 | from django.db import models
9 |
10 | from baobab.backoffice.models import (Event as BackOfficeEvent,
11 | EventLog as BackOfficeEventLog)
12 |
13 |
14 | class Lang(models.Model):
15 |
16 | name = models.CharField(max_length=200, unique=True)
17 | iso = models.CharField(max_length=5, unique=True)
18 |
19 | def __unicode__(self):
20 | return self.name
21 |
22 |
23 | # XXX entris in this table are auto-genered by the admin
24 | # see: baobab.backoffice.adminform.EventForm.save
25 | # XXX this should probably be replace with a `django.dispatch.receiver`
26 | class EventData(models.Model):
27 |
28 | event = models.ForeignKey('backoffice.Event', related_name='eventdatas')
29 | lang = models.ForeignKey('Lang', related_name='eventdatas')
30 | title = models.CharField(max_length=255,
31 | help_text='A short description of the event')
32 | summary = models.TextField(null=True, blank=True, default=None)
33 | user = models.ForeignKey(User, related_name='eventdatas', null=True,
34 | default=None)
35 |
36 | class Meta:
37 | unique_together = ('event', 'lang')
38 |
39 |
40 | # XXX entris in this table are auto-genered by the admin
41 | # see: baobab.backoffice.adminform.EventLogForm.save
42 | # XXX this should probably be replace with a `django.dispatch.receiver`
43 | class EventLogData(models.Model):
44 |
45 | eventlog = models.ForeignKey('backoffice.EventLog',
46 | related_name='eventlogdatas')
47 | lang = models.ForeignKey('Lang', related_name='eventlogdatas')
48 | comment = models.TextField()
49 | user = models.ForeignKey(User, related_name='eventlogdatas', null=True,
50 | default=None)
51 |
52 | class Meta:
53 | unique_together = ('eventlog', 'lang')
54 |
55 |
56 | # XXX can't have twice the same model in the admin so the following
57 | # are just fake models classes to be able to have them twice
58 |
59 | class Event(BackOfficeEvent):
60 |
61 | class Meta:
62 | proxy = True
63 |
64 |
65 | class EventLog(BackOfficeEventLog):
66 |
67 | class Meta:
68 | proxy = True
69 |
--------------------------------------------------------------------------------
/baobab/urls.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from django.conf import settings
3 | from django.conf.urls import patterns, include, url
4 | from django.views.static import serve
5 |
6 | from django.contrib import admin
7 | admin.autodiscover()
8 |
9 | from baobab.apirest.urls import ApiUrls as ApiRestApiUrls
10 | from baobab.rss.feed import RssStatusFeed, AtomStatusFeed
11 |
12 |
13 | # XXX why it's not using the middleware GZipMiddleware ????
14 | def _serve_gzip(request):
15 | if not settings.SERVE_GZIP:
16 | return False
17 | if 'HTTP_ACCEPT_ENCODING' in request.META:
18 | encodings = request.META.get('HTTP_ACCEPT_ENCODING')
19 | encodings = [encoding.strip() for encoding in encodings.split(',')]
20 | return 'gzip' in encodings or 'deflate' in encodings
21 | return False
22 |
23 |
24 | def baobab_serve(request, path, document_root=None, show_indexes=False):
25 | if not settings.INFINITE_CACHE:
26 | return serve(request, path, document_root, show_indexes)
27 | else:
28 | if _serve_gzip(request):
29 | resp = serve(request, path + '.gz', document_root, show_indexes)
30 | resp['Content-Encoding'] = 'gzip'
31 | else:
32 | resp = serve(request, path, document_root, show_indexes)
33 | resp['Cache-Control'] = 'public, max-age=%d' % (3600 * 24 * 365)
34 | resp['Vary'] = 'Accept-Encoding'
35 | return resp
36 |
37 | # back-end URL
38 | urlpatterns = patterns(
39 | '',
40 | url(r'^admin/', include(admin.site.urls)),
41 | url(r'^admin', include(admin.site.urls)),
42 | url(r'', include(ApiRestApiUrls.get_urls())),
43 | )
44 |
45 | # static content URL
46 | urlpatterns += patterns(
47 | '',
48 | url(r'^static/(?P.*)$', baobab_serve,
49 | {'document_root': settings.MEDIA_ROOT}),
50 | url(r'^(favicon.ico)$', 'django.views.static.serve',
51 | {'document_root': settings.MEDIA_ROOT}),
52 | )
53 |
54 | # RSS site URL
55 |
56 | urlpatterns += patterns(
57 | '',
58 | url(r'^rss/$', RssStatusFeed(), name='rss'),
59 | url(r'^atom/$', AtomStatusFeed(), name='atom'),
60 | )
61 |
62 | # web site URL
63 | urlpatterns += patterns(
64 | '',
65 | url(r'^.*$', 'baobab.front.views.index'),
66 | )
67 |
--------------------------------------------------------------------------------
/baobab/utils/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Gandi/baobab/7d4671bda7c9eb3dff4702c784e9fc0f5fb59b63/baobab/utils/__init__.py
--------------------------------------------------------------------------------
/baobab/utils/admin.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """
3 | sub class the django Admin class:
4 | * to have dynamic columns
5 | * to set the request in the form, which contain the user
6 | * remove the delete action if you don't have the delete right
7 | """
8 |
9 | from django.contrib.admin import (ModelAdmin as DjangoModelAdmin,
10 | StackedInline as DjangoStackedInline,
11 | TabularInline as DjangoTabularInline)
12 |
13 |
14 | class ModelAdmin(DjangoModelAdmin):
15 |
16 | """
17 | sub classes need to define a dict `list_display_dynamic` to have dynamic
18 | columns with True/False value
19 | - val_name key is a list of tuple:
20 | - first elem will be used as the conditional value
21 | - second elem will be used as the columns name
22 | - filter: a string to define on which filed the obj should be filtered
23 | - sub_obj: a string to define a sub object
24 | """
25 |
26 | def __init__(self, *args, **kargs):
27 | cls = self.__class__
28 | if hasattr(cls, 'list_display_dynamic'):
29 | val_name = cls.list_display_dynamic['val_name']
30 | filter_ = cls.list_display_dynamic['filter']
31 | if cls.list_display_dynamic['sub_obj']:
32 | sub_objs = cls.list_display_dynamic['sub_obj'].split('.')
33 | else:
34 | sub_objs = []
35 | for val, name in val_name:
36 |
37 | def _columns(self, obj, val=val):
38 | for sub_obj in sub_objs:
39 | obj = getattr(obj, sub_obj)
40 | if obj.filter(**{filter_: val}).exists():
41 | return 'True'
42 | return 'False'
43 | _columns.short_description = name
44 | _columns.allow_tags = True
45 |
46 | setattr(cls, name, _columns)
47 | cls.list_display.append(name)
48 | super(ModelAdmin, self).__init__(*args, **kargs)
49 |
50 | def get_form(self, request, *args, **kwargs):
51 | form = super(ModelAdmin, self).get_form(request, *args, **kwargs)
52 | form.request = request
53 | return form
54 |
55 | def get_actions(self, request):
56 | actions = super(ModelAdmin, self).get_actions(request)
57 | if not self.has_delete_permission(request):
58 | if 'delete_selected' in actions:
59 | del actions['delete_selected']
60 | return actions
61 |
62 |
63 | class StackedInline(DjangoStackedInline):
64 |
65 | def get_formset(self, request, obj=None, **kwargs):
66 | formset = super(DjangoStackedInline, self).get_formset(request,
67 | obj=obj,
68 | **kwargs)
69 | formset.form.request = request
70 | return formset
71 |
72 |
73 | class TabularInline(DjangoTabularInline):
74 |
75 | def get_formset(self, request, obj=None, **kwargs):
76 | formset = super(DjangoTabularInline, self).get_formset(request,
77 | obj=obj,
78 | **kwargs)
79 | formset.form.request = request
80 | return formset
81 |
--------------------------------------------------------------------------------
/baobab/utils/authentication.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from oauth2 import Consumer, Client, Token
4 | from httplib2 import ProxyInfo
5 | from httplib2.socks import PROXY_TYPE_HTTP
6 |
7 | from django.conf import settings
8 |
9 |
10 | class Authentication(object):
11 |
12 | def __init__(self, consumer_key, consumer_secret, token_key, token_secret):
13 | consumer = Consumer(key=consumer_key, secret=consumer_secret)
14 | token = Token(key=token_key, secret=token_secret)
15 |
16 | proxy_info = None
17 | if hasattr(settings, 'PROXY_HOST') and \
18 | hasattr(settings, 'PROXY_PORT'):
19 | proxy_info = ProxyInfo(
20 | proxy_type=PROXY_TYPE_HTTP,
21 | proxy_host=settings.PROXY_HOST,
22 | proxy_port=settings.PROXY_PORT)
23 | self.client = Client(
24 | consumer=consumer,
25 | token=token,
26 | proxy_info=proxy_info)
27 |
28 | def __enter__(self):
29 | return self
30 |
31 | def __exit__(self, exc_type, exc_val, exc_tb):
32 | pass
33 |
--------------------------------------------------------------------------------
/baobab/utils/handle_south.py:
--------------------------------------------------------------------------------
1 | """
2 | to easily disable the south migration
3 |
4 | this is useful to create a local database
5 | and it's also use by the command:
6 | $ baobab migrate fixture
7 | """
8 |
9 | from django.conf import settings
10 | from django.utils.datastructures import SortedDict
11 |
12 |
13 | class HandleSouth(object):
14 |
15 | apps = None
16 |
17 | @classmethod
18 | def get_apps(cls):
19 | if not cls.apps:
20 | app = filter(lambda x: x.startswith('baobab.'),
21 | settings.INSTALLED_APPS)
22 | app = map(lambda x: x.rsplit('.', 1)[1], app)
23 | ignore = ['ignore'] * len(app)
24 | cls.apps = SortedDict(zip(app, ignore))
25 | return cls.apps
26 |
27 | @classmethod
28 | def disable(cls):
29 | settings.SOUTH_MIGRATION_MODULES = cls.get_apps()
30 |
31 | @classmethod
32 | def enable(cls):
33 | if getattr(settings, 'SOUTH_MIGRATION_MODULES'):
34 | del settings.SOUTH_MIGRATION_MODULES
35 |
--------------------------------------------------------------------------------
/baobab/utils/mock.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from baobab.socialnetwork.base import SocialNetworkBase
4 |
5 |
6 | class MockLOG(object):
7 |
8 | def __init__(self):
9 | self._info = []
10 | self._error = []
11 |
12 | def info(self, msg, *args):
13 | self._info.append(msg % args)
14 |
15 | def error(self, msg, *args):
16 | self._error.append(msg % args)
17 |
18 |
19 | class MockSN(SocialNetworkBase):
20 | name = 'MockSN'
21 |
22 | def __init__(self):
23 | self._msg = []
24 |
25 | @classmethod
26 | def is_configured(cls):
27 | True
28 |
29 | @classmethod
30 | def get_max_char(cls, default):
31 | return 42
32 |
33 | def publish(self, msg, url):
34 | self._msg.append((msg, url))
35 | return len(self._msg)
36 |
37 | def __enter__(self):
38 | return self
39 |
40 | def __exit__(self, exc_type, exc_val, exc_tb):
41 | pass
42 |
43 |
44 | def mock_get_field_by_name():
45 | class Field(object):
46 | max_length = 42
47 | return (Field(), )
48 |
--------------------------------------------------------------------------------
/baobab/utils/set_current_timezone.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | import pytz
4 |
5 | from django.conf import settings
6 | from django.utils import timezone
7 |
8 |
9 | class TimezoneMiddleware(object):
10 |
11 | def process_request(self, request):
12 | if request.user.is_authenticated():
13 | timezone.activate(pytz.timezone(str(request.user.timezone)))
14 | else:
15 | timezone.activate(settings.TIME_ZONE)
16 |
--------------------------------------------------------------------------------
/baobab/utils/test.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import absolute_import
3 |
4 | from mock import patch
5 |
6 | from django.test import TestCase as DjangoTestCase
7 | from tastypie.test import ResourceTestCase as TastypieResourceTestCase
8 |
9 | from baobab.utils.mock import MockSN, MockLOG
10 |
11 |
12 | class TestCase(DjangoTestCase):
13 |
14 | def setUp(self, *args, **kwargs):
15 | super(TestCase, self).setUp(*args, **kwargs)
16 | self._mock = []
17 |
18 | cls_path = 'baobab.socialnetwork.base.LOG'
19 | self._mock.append(patch(cls_path, new_callable=MockLOG))
20 | self.log = self._mock[0].start()
21 |
22 | cls_path = 'baobab.socialnetwork.base.SocialNetworkBase.__subclasses__'
23 | self._mock.append(patch(cls_path, return_value=[MockSN, ]))
24 | self._mock[1].start()
25 |
26 | def tearDown(self, *args, **kwargs):
27 | super(TestCase, self).tearDown(*args, **kwargs)
28 | for mock in self._mock:
29 | mock.stop()
30 |
31 |
32 | class ResourceTestCase(TastypieResourceTestCase):
33 |
34 | def setUp(self, *args, **kwargs):
35 | super(ResourceTestCase, self).setUp(*args, **kwargs)
36 | self._mock = []
37 |
38 | cls_path = 'baobab.socialnetwork.base.LOG'
39 | self._mock.append(patch(cls_path, new_callable=MockLOG))
40 | self.log = self._mock[0].start()
41 |
42 | cls_path = 'baobab.socialnetwork.base.SocialNetworkBase.__subclasses__'
43 | self._mock.append(patch(cls_path, return_value=[MockSN, ]))
44 | self._mock[1].start()
45 |
46 | def tearDown(self, *args, **kwargs):
47 | super(ResourceTestCase, self).tearDown(*args, **kwargs)
48 | for mock in self._mock:
49 | mock.stop()
50 |
--------------------------------------------------------------------------------
/baobab/wsgi.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """
3 | WSGI config for baobab project.
4 |
5 | This module contains the WSGI application used by Django's development server
6 | and any production WSGI deployments. It should expose a module-level variable
7 | named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
8 | this application via the ``WSGI_APPLICATION`` setting.
9 |
10 | Usually you will have the standard Django WSGI application here, but it also
11 | might make sense to replace the whole Django WSGI application with a custom one
12 | that later delegates to the Django one. For example, you could introduce WSGI
13 | middleware here, or combine a Django application with an application of another
14 | framework.
15 |
16 | """
17 | import os
18 |
19 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "baobab.settings")
20 |
21 | # This application object is used by any WSGI server configured to use this
22 | # file. This includes Django's development server, if the WSGI_APPLICATION
23 | # setting points here.
24 | from django.core.wsgi import get_wsgi_application
25 | application = get_wsgi_application()
26 |
27 | # Apply WSGI middleware here.
28 | # from helloworld.wsgi import HelloWorldApplication
29 | # application = HelloWorldApplication(application)
30 |
--------------------------------------------------------------------------------
/clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | rm -rf baobab.egg-info build baobab.ng/build node_modules baobab.ng/node_modules
4 | dh_clean
5 |
--------------------------------------------------------------------------------
/debian/README.Debian:
--------------------------------------------------------------------------------
1 | Packaging for baobab project used as base for
2 | https://status.gandi.net/
3 |
--------------------------------------------------------------------------------
/debian/compat:
--------------------------------------------------------------------------------
1 | 9
2 |
--------------------------------------------------------------------------------
/debian/control:
--------------------------------------------------------------------------------
1 | Source: baobab
2 | Priority: optional
3 | Section: python
4 | Maintainer: Gandi
5 | Build-Depends: debhelper (>= 9),
6 | python (>= 2.7),
7 | npm (>= 1.3.24),
8 | quilt (>= 0.60-2),
9 | nodejs-legacy (>= 0.10.20),
10 | nodejs (>= 0.10.20),
11 | nodejs (<< 4.0),
12 | git-core,
13 | dh-python,
14 | ca-certificates,
15 | build-essential,
16 | libpng-dev,
17 | automake, autoconf,
18 | nasm,
19 | realpath | coreutils (>= 8.23)
20 | Build-Depends-Indep: python-setuptools,
21 | make (>= 3.81) | dpkg-dev (>= 1.16),
22 | Standards-Version: 3.9.4
23 | X-Python-Version: >= 2.7
24 |
25 | Package: python-baobab
26 | Architecture: all
27 | Depends: ${misc:Depends},
28 | ${python:Depends},
29 | libjs-jquery,
30 | gunicorn (>= 0.14.5) | httpd-wsgi,
31 | nginx-light | libapache2-mpm-worker | httpd,
32 | python-all,
33 | python-pastedeploy,
34 | devscripts,
35 | libparse-debcontrol-perl
36 | Provides: ${python:Provides}
37 | Description: Gandi status website
38 | Status website about Gandi services and communication project.
39 |
--------------------------------------------------------------------------------
/debian/copyright:
--------------------------------------------------------------------------------
1 | Files: *
2 | Copyright: © 2013-2015 Gandi S.A.S.
3 | License: GPL-3
4 |
5 | License: GPL-3
6 | See /usr/share/common-licenses/GPL-3
7 |
8 |
--------------------------------------------------------------------------------
/debian/pydist-overrides:
--------------------------------------------------------------------------------
1 | Django python-django; PEP386
2 | South python-django-south; PEP386
3 | django-tastypie python-tastypie; PEP386
4 | pytz python-tz; PEP386
5 | oauth2 python-oauth2; PEP386
6 | irc python-irc; PEP386
7 |
--------------------------------------------------------------------------------
/debian/python-baobab.baobab-ircd.init:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | ### BEGIN INIT INFO
4 | # Provides: baobab-ircd
5 | # Required-Start: $network $local_fs $remote_fs $syslog
6 | # Required-Stop: $remote_fs
7 | # Should-Start:
8 | # Should-Stop:
9 | # Default-Start: 2 3 4 5
10 | # Default-Stop: 0 1 6
11 | # Short-Description: init-Script for baobab-ircd
12 | # Description: Start a client irc for baobab to send data to it.
13 | ### END INIT INFO
14 |
15 | NAME=baobab-ircd
16 | PATH=/sbin:/bin:/usr/sbin:/usr/bin
17 | CMD=/usr/bin/baobab
18 | RUNDIR=/run/$NAME
19 | PIDFILE="${RUNDIR}/${NAME}.pid"
20 | CONFFILE="/etc/gandi/baobab.py"
21 | OPTIONS="ircd"
22 | USER='www-data'
23 | GROUP='www-data'
24 | SOCKET=`grep '^IRC_SOCKET_PATH' /etc/gandi/baobab.py | sed -e "s,^IRC_SOCKET_PATH\s*=\s*,,g" -e "s,[\'\"],,g"`
25 |
26 | . /lib/lsb/init-functions
27 |
28 | if [ ! -e $CONFFILE ]; then
29 | log_failure_msg "$CONFFILE not found."
30 | exit 1
31 | fi
32 |
33 | [ ! -f $CMD ] || CMD=`which baobab`
34 |
35 | case "$1" in
36 | start)
37 | if [ ! -d "$RUNDIR" ]; then
38 | install -d -m 0750 -o "$USER" -g "$GROUP" "$RUNDIR"
39 | else
40 | chown $USER:$GROUP "$RUNDIR"
41 | fi
42 | log_begin_msg "Starting $NAME"
43 | export PYTHONPATH="/etc" DJANGO_SETTINGS_MODULE="gandi.baobab"
44 | start-stop-daemon --start --quiet \
45 | --chuid $USER:$GROUP \
46 | --make-pidfile --pidfile $PIDFILE \
47 | --background \
48 | --exec $CMD -- $OPTIONS
49 | ;;
50 | stop)
51 | start-stop-daemon --stop --quiet \
52 | --pidfile $PIDFILE \
53 | --user $USER
54 | rm -rf "$RUNDIR"
55 | ;;
56 | status|force-reload|restart|try-restart)
57 | # nothing
58 | ;;
59 | *)
60 | log_warning_msg "Usage: /etc/init.d/$NAME start|stop"
61 | exit 1
62 | ;;
63 | esac
64 |
65 | exit 0
66 |
67 | # vim:ts=4:sw=4:
68 |
--------------------------------------------------------------------------------
/debian/python-baobab.baobab-syncdb.init:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | ### BEGIN INIT INFO
4 | # Provides: baobab-syncdb
5 | # Required-Start: $network $local_fs $remote_fs $syslog
6 | # Required-Stop: $remote_fs
7 | # Should-Start:
8 | # Should-Stop:
9 | # Default-Start: 2 3 4 5
10 | # Default-Stop: 0 1 6
11 | # Short-Description: init-Script for baobab database sync
12 | # Description: Run when the VM start and sync the database of the baobab running.
13 | ### END INIT INFO
14 |
15 | NAME=baobab-syncdb
16 | PATH=/sbin:/bin:/usr/sbin:/usr/bin
17 | CMD=/usr/bin/baobab
18 | OPTIONS="syncdb"
19 | CONFFILE="/etc/gandi/baobab.py"
20 |
21 | . /lib/lsb/init-functions
22 |
23 | if [ ! -e $CONFFILE ]; then
24 | log_failure_msg "$CONFFILE not found."
25 | exit 1
26 | fi
27 |
28 | [ ! -f $CMD ] || CMD=`which baobab`
29 |
30 | case "$1" in
31 | start)
32 | log_begin_msg "Starting syncdb process:" "$NAME"
33 | export PYTHONPATH='/etc/'
34 | export DJANGO_SETTINGS_MODULE='gandi.baobab'
35 | if $CMD $OPTIONS | logger -t $NAME; then
36 | log_end_msg 0
37 | else
38 | log_end_msg 1
39 | exit 1
40 | fi
41 | ;;
42 | status|stop|force-reload|restart|try-restart)
43 | # nothing
44 | ;;
45 | *)
46 | log_warning_msg "Usage: /etc/init.d/$NAME start"
47 | exit 1
48 | ;;
49 | esac
50 |
51 | exit 0
52 |
53 | # vim:ts=4:sw=4:
54 |
--------------------------------------------------------------------------------
/debian/python-baobab.baobab.cron.d:
--------------------------------------------------------------------------------
1 | */5 * * * * www-data PYTHONPATH=/etc/ DJANGO_SETTINGS_MODULE=gandi.baobab /usr/bin/baobab social_network 2>&1| logger -t baobab
2 | */5 * * * * www-data PYTHONPATH=/etc/ DJANGO_SETTINGS_MODULE=gandi.baobab /usr/bin/baobab close_event 2>&1| logger -t baobab
3 |
--------------------------------------------------------------------------------
/debian/python-baobab.install:
--------------------------------------------------------------------------------
1 | nginx/sites-available/status.gandi.net etc/nginx/sites-available
2 | nginx/sites-available/status.gandi.net-ssl etc/nginx/sites-available
3 |
--------------------------------------------------------------------------------
/debian/rules:
--------------------------------------------------------------------------------
1 | #!/usr/bin/make -f
2 | # -*- makefile -*-
3 |
4 | # Uncomment this to turn on verbose mode.
5 | export DH_VERBOSE=0
6 | export NPM_CONFIG_STRICT_SSL=false
7 | export NODE_ENV=production
8 |
9 | # XXX TOFIX this is dirty
10 | export NPM_CONFIG_CACHE=$(shell mktemp -d --suffix=baobab)
11 | export HOME=$(NPM_CONFIG_CACHE)
12 |
13 | # default value for npm registry
14 |
15 |
16 | %:
17 | dh $@ --with=python2
18 |
19 | override_dh_builddeb:
20 | dh_builddeb
21 | if [ ! -z $$NPM_CONFIG_CACHE ] && [ -d $$NPM_CONFIG_CACHE ]; then \
22 | rm -rf $$NPM_CONFIG_CACHE; \
23 | fi
24 | if [ `expr match $$HOME /tmp` = 4 ] && [ -d $$HOME ]; then \
25 | rm -rf $$HOME; \
26 | fi
27 |
28 | override_dh_auto_install:
29 | install -d -m 0755 debian/python-baobab/usr/share/baobab/
30 | install -d -m 0755 $(NPM_CONFIG_CACHE)
31 |
32 | if [ ! -z $$NPM_CONFIG_REGISTRY ]; then \
33 | cp npm-shrinkwrap.json npm-shrinkwrap.json.backup; \
34 | sed -i -e "s,https://registry.npmjs.org,$$NPM_CONFIG_REGISTRY,g" \
35 | npm-shrinkwrap.json; \
36 | fi
37 |
38 | npm config set progress false
39 | npm install
40 | npm run release
41 | cp -rf baobab/static/* debian/python-baobab/usr/share/baobab/
42 | dh_auto_install
43 | find debian/python-baobab -type f -iname "*.js" -exec chmod 0644 {} \;
44 |
45 | if [ -e npm-shrinkwrap.json.backup ]; then \
46 | mv -f npm-shrinkwrap.json.backup npm-shrinkwrap.json ; \
47 | fi
48 |
49 | override_dh_clean:
50 | dh_clean
51 | rm -rf build
52 | rm -rf baobab.ng/build
53 | rm -rf baobab.egg-info build baobab/__init__.pyc
54 | if [ ! -z $$NPM_CONFIG_CACHE ] && [ -d $$NPM_CONFIG_CACHE ]; then \
55 | rm -rf $$NPM_CONFIG_CACHE; \
56 | fi
57 | if [ `expr match $$HOME /tmp` = 4 ] && [ -d $$HOME ]; then \
58 | rm -rf $$HOME; \
59 | fi
60 |
61 | override_dh_installcron:
62 | dh_installcron --name=baobab
63 |
64 | override_dh_installinit:
65 | dh_installinit --no-restart-on-upgrade --no-start --name=baobab-syncdb
66 | dh_installinit --no-restart-on-upgrade --no-start --name=baobab-ircd
67 |
68 | .PHONY: override_dh_auto_install, override_dh_clean, override_dh_installcron, override_dh_builddeb, override_dh_instalinit
69 |
--------------------------------------------------------------------------------
/debian/source/format:
--------------------------------------------------------------------------------
1 | 3.0 (native)
2 |
--------------------------------------------------------------------------------
/misc/hooks/README:
--------------------------------------------------------------------------------
1 | some git hooks can help you with south
2 | - https://gist.github.com/gurglet/1780139
3 | - https://github.com/agiliq/compass
4 | - https://github.com/MoiTux/compass (a fork of the previous one)
5 |
6 | or use the hooks file in this directory it will just just inform you
7 | that you have some new/old migrations
8 |
--------------------------------------------------------------------------------
/misc/hooks/post-merge:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #In most case the order of the south migration doesn't really maters
3 | #just add --merge to fix the warning
4 | #In case the same model has change it might be better to 're-do'
5 | #a new migration, also having a real order for the migration can
6 | #be better for the MEP
7 |
8 |
9 | ROOT=$(git rev-parse --show-toplevel)
10 |
11 | CMD="python ${ROOT}/baobab/bin/cmd_baobab.py"
12 |
13 | for dir in $(find "${ROOT}" -name migrations)
14 | do
15 | nb_file=$(ls ${dir}/*.py | wc -l)
16 | nb_file=$(expr $nb_file - 1) # need to remove 1 for __init__.py
17 | last_idx=$(ls -r ${dir}/*.py | head -2 | tail -1 | cut -d _ -f 1)
18 | last_idx=${last_idx##*/} # remove all path to just get the number
19 | if [ $nb_file -ne $last_idx ]
20 | then
21 | echo ''
22 | echo ' *** Might be great to re-order the migration ' \
23 | 'or redo them entirely ***'
24 | echo ''
25 | fi
26 | done
27 |
28 | has_migration=$(${CMD} migrate --list 2>&1 | grep '( )')
29 |
30 | if [ ! -z "${has_migration}" ]
31 | then
32 | echo 'New migration need to be apply !!!'
33 | fi
34 |
--------------------------------------------------------------------------------
/misc/hooks/post-rebase:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # might be call by git pull --rebase -> so call post-merge
3 | echo '--> post-rebase'
4 | ROOT=$(git rev-parse --show-toplevel)
5 | ${ROOT}/.git/hooks/post-merge
6 |
--------------------------------------------------------------------------------
/misc/hooks/post-rewrite:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # might be call by git pull --rebase -> so call post-merge
3 | echo '--> post-rewrite'
4 | ROOT=$(git rev-parse --show-toplevel)
5 | ${ROOT}/.git/hooks/post-merge
6 |
--------------------------------------------------------------------------------
/misc/hooks/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # in case of a fail merge (CONFLICT) post-merge isn't call
3 | # since a commit is done so force its call
4 |
5 | ROOT=$(git rev-parse --show-toplevel)
6 |
7 | if [ -e "${ROOT}/.git/MERGE_HEAD" ]
8 | then
9 | ${ROOT}/.git/hooks/post-merge
10 | fi
11 |
--------------------------------------------------------------------------------
/nginx/sites-available/status.gandi.net:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | listen [::]:80 default_server ipv6only=on;
4 | server_tokens off;
5 | return 301 https://$host$request_uri;
6 | }
7 |
--------------------------------------------------------------------------------
/nginx/sites-available/status.gandi.net-ssl:
--------------------------------------------------------------------------------
1 | server {
2 | listen 443;
3 | listen [::]:443 default_server ipv6only=on;
4 |
5 | ssl on;
6 | ssl_certificate /etc/ssl/certs/status.gandi.net.all.crt;
7 | ssl_certificate_key /etc/ssl/private/status.gandi.net.key;
8 | ssl_dhparam /etc/ssl/dh_params.pem;
9 |
10 | ssl_session_timeout 5m;
11 |
12 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
13 | ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK';
14 | ssl_prefer_server_ciphers on;
15 |
16 | index index.html index.htm;
17 |
18 | server_name status.gandi.net;
19 |
20 | access_log /var/log/nginx/status.gandi.net-access.log;
21 | error_log /var/log/nginx/status.gandi.net-error.log debug;
22 |
23 | gzip on;
24 |
25 | autoindex off;
26 |
27 | autoindex_exact_size off;
28 | autoindex_localtime on;
29 |
30 | location ~ ^/static/admin {
31 | root /usr/share/pyshared/django/contrib/admin/;
32 | }
33 |
34 | location ~ ^/static/(.*)$ {
35 | alias /usr/share/baobab/$1;
36 | }
37 |
38 | location = /nginx_status {
39 | stub_status on;
40 | access_log off;
41 | allow 127.0.0.1;
42 | deny all;
43 | }
44 |
45 | location / {
46 | proxy_pass_header Server;
47 | proxy_set_header Host $http_host;
48 | proxy_redirect off;
49 | proxy_set_header X-Real-IP $remote_addr;
50 | proxy_set_header X-Scheme $scheme;
51 | proxy_connect_timeout 300;
52 | proxy_read_timeout 200;
53 | proxy_pass http://localhost:8008/;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "Gandi",
3 | "name": "baobab",
4 | "version": "0.0.1",
5 | "description": "Status page for Gandi.net services",
6 | "homepage": "https://status.gandi.net",
7 | "licenses": "All Rights Reserved",
8 | "repository": {
9 | "type": "git",
10 | "url": "https://github.com/gandi/baobab.git"
11 | },
12 | "dependencies": {
13 | "director": "^1.2.3",
14 | "gulp": "^3.8.8",
15 | "gulp-browserify": "^0.5.0",
16 | "gulp-clean": "^0.3.1",
17 | "gulp-concat": "^2.4.1",
18 | "gulp-dotify": "^0.1.2",
19 | "gulp-gzip": "0.0.8",
20 | "gulp-header": "^1.1.1",
21 | "gulp-htmlmin": "^0.2.0",
22 | "gulp-imagemin": "^1.0.1",
23 | "gulp-inject": "^1.0.2",
24 | "gulp-less": "^1.3.6",
25 | "gulp-rev": "^1.1.0",
26 | "gulp-rev-css-url": "0.0.8",
27 | "gulp-uglify": "^1.0.1",
28 | "html5shiv": "^3.7.3",
29 | "imagemin-pngquant": "^4.0.0",
30 | "jquery-browserify": "^1.8.1",
31 | "marked": "^0.3.2",
32 | "moment": "^2.8.3",
33 | "polly-phil": "^0.1.0",
34 | "q": "^1.0.1",
35 | "qajax": "git+https://github.com/baloo/qajax.git#patch-1",
36 | "run-sequence": "^1.0.1"
37 | },
38 | "devDependencies": {
39 | "aliasify": "^1.4.0",
40 | "gulp-protractor": "0.0.11",
41 | "protractor": "^1.3.1"
42 | },
43 | "scripts": {
44 | "release": "node_modules/.bin/gulp release",
45 | "test": "node_modules/.bin/gulp test",
46 | "dev": "node_modules/.bin/gulp dev"
47 | },
48 | "aliasify": "./baobab.front/tests/aliasifyConfig.js"
49 | }
50 |
--------------------------------------------------------------------------------
/protractor.conf.js:
--------------------------------------------------------------------------------
1 | exports.config = {
2 | seleniumAddress: 'http://localhost:4444/wd/hub',
3 | specs: ['baobab.front/tests/integration/*.js']
4 | };
5 |
--------------------------------------------------------------------------------
/pytest.ini:
--------------------------------------------------------------------------------
1 | [pytest]
2 | DJANGO_SETTINGS_MODULE=baobab.settings
3 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # -*- coding: utf-8 -*-
3 |
4 | import os
5 | import sys
6 | import re
7 | from setuptools import setup, find_packages
8 |
9 | name = 'baobab'
10 |
11 | sys.path.append(os.path.abspath(os.path.dirname(__file__)))
12 |
13 | here = os.path.abspath(os.path.dirname(__file__))
14 | README = open(os.path.join(here, 'README.md')).read()
15 | CHANGES = open(os.path.join(here, 'CHANGELOG')).read()
16 |
17 | with open(os.path.join(here, name, '__init__.py')) as v_file:
18 | version = re.compile(r".*__version__ = '(.*?)'",
19 | re.S).match(v_file.read()).group(1)
20 |
21 | # django-tastypie < 0.10.0 if django < 1.5
22 | # Django 1.6:
23 | # - the way to do test has changed and might not be compatible
24 | # - BooleanField no longer default to False:
25 | # - need to add explicit default value in the models
26 | # - or always set a value for all the fields
27 | # Django 1.7: South is already integrated
28 | # Should be compatilbe util 'irc<10' but will also need 'jaraco.util<10.8'
29 | # WARNING: the db has to handle the COALESCE function
30 | requires = ['Django<1.6',
31 | 'South<=0.8.4',
32 | 'django-tastypie<0.10.0',
33 | 'pytz',
34 | 'oauth2',
35 | 'markdown',
36 | 'irc<8.9.1'
37 | ]
38 |
39 | extras_require = {
40 | 'test': ['mock' ],
41 | }
42 |
43 | tests_requires = requires + extras_require['test']
44 |
45 | setup(
46 | name=name,
47 | version=version,
48 | description="Gandi's status web site",
49 | long_description=README + '\n\n' + CHANGES,
50 | classifiers=[
51 | 'Development Status :: 5 - Production/Stable',
52 | 'Intended Audience :: Developers',
53 | 'Intended Audience :: System Administrators',
54 | 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
55 | 'Operating System :: Unix',
56 | 'Programming Language :: Python :: 2.7',
57 | 'Framework :: Django :: 1.4',
58 | 'Framework :: Django :: 1.5',
59 | ],
60 | author='Gandi',
61 | author_email='feedback@gandi.net',
62 | url='http://gandi.net/',
63 | license='GPL-3',
64 | include_package_data=True,
65 | install_requires=requires,
66 | extras_require=extras_require,
67 | tests_require=tests_requires,
68 | packages=find_packages(),
69 | entry_points={
70 | 'console_scripts': [
71 | 'baobab = baobab.bin.cmd_baobab:main',
72 | ],
73 | }
74 | )
75 |
--------------------------------------------------------------------------------
|