Wykres commitów

442 Commity (0d37dd372a7f6dd2603b235db70a9414f92c1b6b)

Autor SHA1 Wiadomość Data
Maxime Petazzoni 0d37dd372a Fix .gitignore files
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-06-17 17:44:06 +02:00
Rodrigo Avila 2f3ed494b5 Portuguese translation update (pt_BR)
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-06-14 15:01:39 +02:00
Maxime Petazzoni b524a4fb68 Translations update
All languages (except French) need an i18n check.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-06-14 13:00:30 +02:00
Maxime Petazzoni 659c5e5f7c Fix results of a non-matching map search
When a map search that doesn't yield any results is performed, the
entire list of maps was displayed instead of an information message
because of a programming error.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-06-14 12:49:11 +02:00
Maxime Petazzoni cd4ad13b9e Skeleton for the State of the Map 2010 talk (July 2010)
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-06-10 17:56:40 +02:00
Maxime Petazzoni 80ba18598d Implement the "Recreate Map" feature
Each completed job now features a "Recreate map" button that reschedules
a similar map on the queue. The button only appears for completed maps
(status >= 2), and triggers a rendering_already_exists() check before
creating a new MapRenderingJob.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-05-14 12:02:00 +02:00
Maxime Petazzoni fc4f23c15b Extend the rendering_already_exists method
In preparation for the "Recreate Map" feature, extend the
rendering_already_exists method to work on bounding boxes as well,
making it possible to redirect to a recent rendering for the exact same
bounding box.

The original method was split in two distinct methods,
rendering_already_exists_by_osmid and rendering_already_exists_by_bbox,
each working in one of the map selection modes. A new
rendering_already_exists method replaces the old one, now working on on
MapRenderingJob object, and handling the dispatch between the two new
rendering_already_exists_by_{osmid,bbox} methods.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-05-14 12:02:00 +02:00
Rodrigo Avila 2a33323a11 Brasilian portuguese (pt_BR) translation update
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-05-14 12:01:17 +02:00
Łukasz Jernaś fd6f42b726 Updated Polish translation
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-05-11 16:43:24 +02:00
malenki 169277d303 Enhance english language strings, Update german translation
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-05-11 16:26:59 +02:00
Maxime Petazzoni b8cbc0e53f Fall back to the last 10 maps in the RSS feed
When no map has been rendered in the last 24 hours, the RSS feed can be
empty, which is not good. Fall back to the last 10 entries, regardless
of any time limit, when this happens.

If no map at all was ever rendered, well we don't have much choice but
to send back an empty feed.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-04-09 19:50:45 +02:00
Maxime Petazzoni 3750545b34 Fix MapOSMatic wiki URL in About page
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-04-09 00:16:11 +02:00
malenki 544411599f German translation update
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-04-06 19:00:47 +02:00
Maxime Petazzoni a5bae54904 Portuguese translation update
pt_BR translation update provided by Rodrigo Avila.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-04-06 18:58:18 +02:00
Thomas Petazzoni 8ee3c9490d Add arabic speaking countries
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-03-20 19:42:35 +01:00
Maxime Petazzoni 0d7bf5587e Small style fix
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-20 15:42:16 +01:00
Maxime Petazzoni 826e19b7d3 Add a warning banner when the rendering daemon is not running
It is useful to know first-hand when the rendering daemon is not running
anymore. When this is the case, this will display a warning banner below
the menu.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-20 15:38:29 +01:00
Maxime Petazzoni 23f17a1c2f Small tweaks to the DBCK utility
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-20 14:01:15 +01:00
Łukasz Jernaś d496ee018d Updated Polish translation
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-19 15:52:47 +01:00
Rodrigo Avila 5e88a32d4e MapOSMatic pt_BR translation update
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-18 21:23:51 +01:00
Maxime Petazzoni b7554583b4 Fix
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-16 17:09:35 +01:00
Maxime Petazzoni 67f5990324 Handle exception during data preparation
The renderer threads did not handle exceptions happening during the
data preparation phase. This commit fixes this, avoiding the daemon to
vanish when asking a rendering that fails (most common cause is GEOS
intersect errors).

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-16 16:45:58 +01:00
Maxime Petazzoni cbcc1dcb0a Fix bottom right lat/lon inversion
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-16 14:41:44 +01:00
Maxime Petazzoni 2a6252842e Usability improvements on the lat/lon inputs
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-16 11:07:58 +01:00
Maxime Petazzoni daea10068a Fix Spanish phrasing in introduction
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-15 19:41:32 +01:00
Maxime Petazzoni e47a7e6aca Improve slippy map area selection
Restore the bounding box input fields to directly enter the boundaries
of an area to render.

Re-implemented the Control+drag selection method to select an area to
render.

Added a small help-text about the special zoomIn/selectControl features
of the slippy map.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-15 18:44:17 +01:00
Maxime Petazzoni e1e4547445 Spanish translation
Integrate MapOSMatic Spanish translation, contributed by:

  * Jean-Guilhem Cailton <jgc@arkemie.com>
  * Sebastian Borgwardt <sebastian.borgwardt@aonikenk.com>
  * Julio Costa Zambelli <julio.costa@openstreetmap.cl>

The following countries where Spanish is either the official language or
a major secondary language have been added to the list of available map
localizations for Spanish: Argentina, Bolivia, Chile, Costa Rica,
Dominican Republic, Salvador, Guatemala, Honduras, Mexico, Nicaragua,
Panama, Paraguay, Peru, Puerto Rico, USA, Uruguay and Venezuela.

The Spanish translation of the website is also now available from the
language selection drop-down.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-13 16:55:49 +01:00
Łukasz Jernaś b3ff809cce Updated Polish translation
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-11 17:11:38 +01:00
David Decotigny 7cf186d290 Fixed unresolved symbol
I receive annoying django error emails about EmptyPage being
unresolved. This patch should fix this problem.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-03-04 09:21:07 +01:00
Maxime Petazzoni 87877adaaa Provide thread names
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-24 12:37:18 +01:00
Maxime Petazzoni 85d7afc55e Display the exception when a rendering fails
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-24 10:19:21 +01:00
Łukasz Jernaś 225806d737 Small update to the Polish translation
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-18 10:29:06 +01:00
Rodrigo Avila 5d60eba5df pt_BR translation update
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-18 10:18:58 +01:00
Maxime Petazzoni b128d5a7f4 Really kill worker threads on timeout
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-14 16:02:31 +01:00
Maxime Petazzoni 91609511d7 Remove job-error-obsolete
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-14 11:55:07 +01:00
Maxime Petazzoni e36e8a06f0 Handle the no-index case in the job information
When no information is available to create an index, only the maps are
generated. We must handle this case when presenting the job information
on the website.

French translation was updated, other languages need updates.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-14 10:06:01 +01:00
Maxime Petazzoni 90a5e6ba43 Database check/repair utility for MapOSMatic
This dbck utility, run through the environment wrapper, checks and
cleans the MapOSMatic job database. This first version provides the
following checks/repairs capabilities:

  * obsolete status
  * mutually exclusive admin/bbox data
  * missing map language

A --dry-run option is also available to only look at what operations
would be done.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-14 10:06:01 +01:00
Maxime Petazzoni a8c3ef934e Exclude thumbnails from the list of considered files for cleanup
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-14 10:06:01 +01:00
Maxime Petazzoni a05ba91777 Revamp the job renderer module with timeout support
The render module, originally a simple extract of the render_job
function from the old daemon, has been rewriten to expose a more
sensible API and to provide self-contained timeout support.

Two classes are now available, exposing the same public API for seamless
use of any of the two:

  * JobRenderer is a simple, blocking job renderer. It can be threaded
    if the caller decides to call start() instead of run().
  * TimingOutJobRenderer, as its name suggests, is a timing out job
    renderer that makes use of the threading capability of JobRenderer
    to handle a timeout on the rendering process and kill the rendering
    thread, whatever it is doing, if the given timeout is reached.

The render module also now exposes a few public RESULT_ constants that
can be used to identify the result of a job rendering. This is used in
the daemon to infer an appropriate resultmsg.

As a standalone process, the job renderer now takes an optional second
argument: the timeout, in seconds.

  .../scripts/wrapper.py scripts/render.py <jobid> [timeout]

As of now, the daemon is fully usable in production with the same level
of functionality as before.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-14 10:06:01 +01:00
Maxime Petazzoni 37ab334d9a Cornerstones for a new MapOSMatic daemon
This is the first step of the rewrite of the MapOSMatic rendering
daemon. The long-term objective is to get a more flexible rendering
daemon that would support the rendering of several jobs in parallel, and
with an overall more Python-y and maintainable code.

This first shot brings a completely new, simpler MapOSMatic daemon with
the same level of functionality as the previous daemon in terms of
serial rendering of the job queue. Three major changes happen here:

  1. the bash-based wrapper script has been removed, in favor of a more
     clever Python wrapper. Cleaner, and more importantly more portable.
     The wrapper still needs a bit of configuration, and after the
     config.py-template has been tweaked into a valid config.py file,
     the daemon can be started by:

       .../scripts/wrapper.py scripts/daemon.py

  2. the externalization of the rendering routine into a 'render'
     module. This module does not access the database - only the daemon
     does. The sole purpose of the render module is to encapsulate the
     rendering process and its errors+exceptions handling.

     It can also be used as a standalone, job-ID-based renderer:

       .../scripts/wrapper.py scripts/render.py <jobid>

  3. the cleanup mechanism now runs in a separate thread, in the
     background.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-14 10:05:54 +01:00
Maxime Petazzoni cf3ae043fe Improve the file cleanup mechanism
Previously, when the rendering directory was over the defined threshold,
files where removed progressively, oldest first, to make up some space.
No information was kept about jobs whose files were removed, making it
harder to keep track of valid jobs with files available.

This change introduces two new things:

  1. a new job status, 3, for jobs processed but now without files, or
     "obsolete" jobs.
  2. a new cleanup mechanism that considers jobs as the atomic unit of
     cleaning instead of files, as this would leave with jobs without
     all their renderings (which didn't make much sense).

The cleanup function underwent the following modifications:

  * files are now sorted by content modification time and not last
    metadata change (a simple chmod could mess up the order);
  * thumbnails are excluded from the list of considered files for
    removal (this is still is discussion, but for now let's keep them);
  * when a file needs to be removed, all files from its parent job are
    removed and the job's status is set to 3 (see
    MapRenderingJob#remove_all_files).
  * if no parent job can be found, it's an orphaned file and can be
    safely removed. Files starting with a '.' are of course preserved;
  * some logging improvements during the cleanup phase.

New 'job-done-obsolete' and 'job-error-obsolete' status icons are now
available, and the status icon filename is now inferred with a custom
template tag (this also led to some cleanup in extratags.py).

The file size of the renderings is also displayed next to each format in
the job information.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-10 21:27:37 +01:00
Maxime Petazzoni 0f34678056 Provide a map_areas_prefix to the OCitySMap constructors
Following the API change in OCitySMap to improve paralellization of
OCitySMap rendering processes, we now need to provide the prefix to the
map_areas table name. We use here 'maposmaticd_PID_'.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-10 21:13:03 +01:00
Łukasz Jernaś 6086de3b63 Initial Polish translation of the UI.
It is feature complet, but there hasn't been any outside QA/review on this,
so probably more changes will come in the future.
2010-02-10 20:52:53 +01:00
Maxime Petazzoni ed5bc7658a Add Poland to the list of localization modes available
To go with the Polish translation of OCitySMap by Łukasz Jernaś
<deejay1@srem.org>, offer Poland in the list of map languages available
when creating a map.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-10 15:36:43 +01:00
Maxime Petazzoni e3f5ef0d52 Simplify the feed item logic
The actual ways of getting the list of feed items to render was to
resource-consuming (two to three database queries). This change
simplifies it to list all successfull jobs from the last 24 hours.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-10 14:53:43 +01:00
Maxime Petazzoni efce93bac6 Add a rendered maps feed
This change introduces a RSS feeds for the successfully rendered maps
that still have their files available (status=2) from the last 24 hours
(or more to get at least 10 items when possible), using the Django
syndication framework.

It uses a custom map-feed.html template instead of the map.html in order
to include styling information directly in the HTML an accomodate for
the variable naming from the syndication framework.

This new MapOSMatic maps feed is now available from a traditional RSS
icon link on the maps page.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-10 13:37:04 +01:00
Maxime Petazzoni abe9b04ba3 Display the files' sizes in the job and map templates
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-10 12:23:18 +01:00
Maxime Petazzoni 7a59d6832b Revert "Add the file size information in the map template"
This reverts commit 7f8914efa8.
2010-02-10 12:15:23 +01:00
Maxime Petazzoni 7f8914efa8 Add the file size information in the map template
The rendered files sizes information was added to the job template, but
not to the map template for the maps page. This change fixes that, so we
have the info everywhere.

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
2010-02-10 12:05:27 +01:00
David MENTRE 8255775d6b Sort available countries in alphabetical order
When a map is made in bounding box mode, the list of available countries
is quite long and without any specific order. We now sort countries in
alphabetical order.
2010-02-10 10:23:11 +01:00