10 Commits

Author SHA1 Message Date
Tristan Cacqueray
8791d36b37 Rewrite the event logic in javascript
The current events extension is computing the statuses at build time,
which is getting incorrect when an event is outdated until there is
a rebuild. This change fix that by doing the event status computation
at load time in javascript.

Moreover this change removes an unused import in utils.

Change-Id: Ifd1b84ff0182cf9bb7950da3d59f36c83019ac30
2017-01-30 01:48:11 +00:00
Tristan Cacqueray
df232c3074 Refactor all parameters to configuration.yaml
This change moves parameter from utils.py and index.rst to the
configuration.yaml. Moreover this change does:

* Use ISO 8601 dateformat in configuration
* Change events extension to use datetime instead of calendar
* Add a configuration extension to render doc substitutions

Change-Id: Ie35cb9ae2c334814afaa36b3afd606c8bcf62616
2016-11-09 03:24:26 +00:00
Tristan Cacqueray
4d473dc0bd Refactor timeline structure
This change modifies the timeline structure to describe a
start and end date instead of two different events.

Moreover this change adds:
* the number of days remaining until the next event.
* a 'next' status when current event haven't started yet

Change-Id: Ib76b0315a7409a8442c1be6f8341b0596c1d56ae
2016-11-09 03:18:01 +00:00
Tristan Cacqueray
c97fdd8b65 Render rst file to doc/source
This change renders dynamic rst file to doc/source instead of candidate directory
so that they gets published by infra docs jobs. This is just to be able to access
the source rst file on docs-draft.openstack.org host.

Change-Id: I2435531d091ff051338c4ba9a495834d6653ab68
2016-11-09 03:12:51 +00:00
Tony Breeds
7da752110a Switch to hacking and fix errors
./doc/source/_exts/candidates.py:20:1: H306  imports not in alphabetical order (jinja2.filesystemloader, jinja2.environment.environment)
./doc/source/_exts/events.py:17:1: H306  imports not in alphabetical order (os, calendar)
./doc/source/_exts/events.py:21:1: H306  imports not in alphabetical order (jinja2.filesystemloader, jinja2.environment.environment)
./openstack_election/check_candidacy.py:62:29: E126 continuation line over-indented for hanging indent
./openstack_election/utils.py:27:1: H306  imports not in alphabetical order (yaml, re)
./openstack_election/cmds/close_election.py:90:9: H232  Python 3.x incompatible octal 755 should be written as 0o755
./openstack_election/tests/test_utils.py:25:21: E126 continuation line over-indented for hanging indent
./tools/new-election.py:18:31: H301  one import per line
./tools/new-election.py:27:5: H233  Python 3.x incompatible use of print operator
./tools/new-election.py:31:5: H233  Python 3.x incompatible use of print operator
./tools/new-election.py:41:5: H233  Python 3.x incompatible use of print operator

Co-Authored-By: Nguyen Hung Phuong <phuongnh@vn.fujitsu.com>
Change-Id: Idd9bc1f1f92da1658e6da2af588c575ee0ba2cb0
2016-10-07 13:35:46 +11:00
Tristan Cacqueray
257d3e3e08 Add configuration.yaml
This change refactor events.yaml into something more generic and
usable by openstack_election module

Change-Id: I26e25cb31c60645742baba1e73f8da9043029381
2016-09-14 11:25:07 +00:00
Jenkins
f526acec43 Merge "Add 'draft' banner and show events status in timeline" 2016-03-11 03:46:20 +00:00
Tony Breeds
154bedd5bd Fix PEP8 Errors
Change-Id: Ieb831fbb2c27e0b6428227845dfa9b7a7c7fa2bf
2016-03-11 13:45:16 +11:00
Tristan Cacqueray
e8a09b0b7d Add 'draft' banner and show events status in timeline
Change-Id: I383b5b67e09d84a64ef234727dae8b973c13599d
2016-03-10 20:49:20 -05:00
Tristan Cacqueray
e7f05ce2c4 Add events timeline and clock timer
This changes add a new 'events' extensions to manage
events timeline. Events are described in the events.yaml file.

The 'events' extensions will generate an rst document with:
* Timer clock for upcoming event
* Tabulated events list

Change-Id: Ib5c9d96663bd2197beea7aab226a3d46bc82067c
2016-02-24 10:47:54 +11:00