decidim-comparative_stats 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE-AGPLv3.txt +661 -0
- data/README.md +187 -0
- data/Rakefile +40 -0
- data/app/assets/config/admin/comparative_stats_manifest.css +4 -0
- data/app/assets/config/admin/comparative_stats_manifest.js +2 -0
- data/app/assets/config/comparative_stats_manifest.css +4 -0
- data/app/assets/config/comparative_stats_manifest.js +2 -0
- data/app/assets/images/bcn-logo.png +0 -0
- data/app/assets/images/decidim/comparative_stats/icon.svg +1 -0
- data/app/assets/images/platoniq-logo.png +0 -0
- data/app/assets/javascripts/decidim/comparative_stats/geocoded_events.js.es6 +94 -0
- data/app/assets/javascripts/decidim/comparative_stats/graphs.js.es6 +13 -0
- data/app/assets/stylesheets/decidim/comparative_stats/geocoded_events.scss +23 -0
- data/app/assets/stylesheets/decidim/comparative_stats/graphs.scss +6 -0
- data/app/assets/stylesheets/decidim/comparative_stats/widget.scss +8 -0
- data/app/cells/decidim/comparative_stats/metric_piecharts/show.erb +14 -0
- data/app/cells/decidim/comparative_stats/metric_piecharts_cell.rb +39 -0
- data/app/cells/decidim/comparative_stats/metric_timelines/show.erb +14 -0
- data/app/cells/decidim/comparative_stats/metric_timelines_cell.rb +23 -0
- data/app/cells/decidim/comparative_stats/participatory_processes_timeline/show.erb +55 -0
- data/app/cells/decidim/comparative_stats/participatory_processes_timeline_cell.rb +51 -0
- data/app/cells/decidim/comparative_stats/participatory_spaces_geocoded_events/show.erb +55 -0
- data/app/cells/decidim/comparative_stats/participatory_spaces_geocoded_events_cell.rb +108 -0
- data/app/commands/decidim/comparative_stats/admin/create_endpoint.rb +46 -0
- data/app/commands/decidim/comparative_stats/admin/destroy_endpoint.rb +43 -0
- data/app/commands/decidim/comparative_stats/admin/update_endpoint.rb +47 -0
- data/app/controllers/decidim/comparative_stats/admin/application_controller.rb +16 -0
- data/app/controllers/decidim/comparative_stats/admin/endpoints_controller.rb +83 -0
- data/app/controllers/decidim/comparative_stats/admin/graphs_controller.rb +16 -0
- data/app/controllers/decidim/comparative_stats/widgets_controller.rb +31 -0
- data/app/forms/decidim/comparative_stats/admin/endpoint_form.rb +26 -0
- data/app/helpers/decidim/comparative_stats/application_helper.rb +27 -0
- data/app/models/decidim/comparative_stats/application_record.rb +10 -0
- data/app/models/decidim/comparative_stats/endpoint.rb +22 -0
- data/app/permissions/decidim/comparative_stats/admin/permissions.rb +24 -0
- data/app/presenters/decidim/comparative_stats/admin_log/endpoint_presenter.rb +46 -0
- data/app/views/decidim/comparative_stats/admin/endpoints/_form.html.erb +7 -0
- data/app/views/decidim/comparative_stats/admin/endpoints/edit.html.erb +16 -0
- data/app/views/decidim/comparative_stats/admin/endpoints/index.html.erb +66 -0
- data/app/views/decidim/comparative_stats/admin/endpoints/new.html.erb +16 -0
- data/app/views/decidim/comparative_stats/admin/graphs/show.html.erb +15 -0
- data/app/views/decidim/comparative_stats/widgets/_all.html.erb +1 -0
- data/app/views/decidim/comparative_stats/widgets/_embed.html.erb +7 -0
- data/app/views/decidim/comparative_stats/widgets/_embed_modal.html.erb +27 -0
- data/app/views/decidim/comparative_stats/widgets/_global_stats.html.erb +4 -0
- data/app/views/decidim/comparative_stats/widgets/_global_stats_timeline.html.erb +4 -0
- data/app/views/decidim/comparative_stats/widgets/_processes_timeline.html.erb +4 -0
- data/app/views/decidim/comparative_stats/widgets/_spaces_geocoded_events.html.erb +5 -0
- data/app/views/decidim/comparative_stats/widgets/_tabs.html.erb +19 -0
- data/app/views/decidim/comparative_stats/widgets/show.html.erb +1 -0
- data/app/views/layouts/decidim/admin/comparative_stats.html.erb +28 -0
- data/app/views/layouts/decidim/comparative_stats/widget.html.erb +22 -0
- data/config/i18n-tasks.yml +10 -0
- data/config/locales/ca.yml +57 -0
- data/config/locales/cs.yml +57 -0
- data/config/locales/en.yml +64 -0
- data/config/locales/es.yml +57 -0
- data/db/migrate/20191219104548_create_decidim_comparative_stats_endpoints.rb +13 -0
- data/db/migrate/20200122072955_add_name_version_to_comparative_stats_endpoints.rb +8 -0
- data/db/migrate/20200130203914_rename_version_field_in_comparative_stats_endpoints.rb +7 -0
- data/db/seeds.rb +42 -0
- data/lib/decidim/comparative_stats.rb +22 -0
- data/lib/decidim/comparative_stats/admin.rb +10 -0
- data/lib/decidim/comparative_stats/admin_engine.rb +50 -0
- data/lib/decidim/comparative_stats/api_fetcher.rb +93 -0
- data/lib/decidim/comparative_stats/cached_http_adapter.rb +23 -0
- data/lib/decidim/comparative_stats/engine.rb +34 -0
- data/lib/decidim/comparative_stats/queries/global_events.graphql +84 -0
- data/lib/decidim/comparative_stats/queries/global_history_metrics.graphql +10 -0
- data/lib/decidim/comparative_stats/queries/global_metrics.graphql +6 -0
- data/lib/decidim/comparative_stats/queries/name_and_version.graphql +6 -0
- data/lib/decidim/comparative_stats/queries/participatory_processes.graphql +12 -0
- data/lib/decidim/comparative_stats/queries/v022/global_events.graphql +76 -0
- data/lib/decidim/comparative_stats/test/factories.rb +13 -0
- data/lib/decidim/comparative_stats/version.rb +10 -0
- data/vendor/assets/images/draw/layers-2x.png +0 -0
- data/vendor/assets/images/draw/layers.png +0 -0
- data/vendor/assets/images/draw/marker-icon-2x.png +0 -0
- data/vendor/assets/images/draw/marker-icon.png +0 -0
- data/vendor/assets/images/draw/marker-shadow.png +0 -0
- data/vendor/assets/images/draw/spritesheet-2x.png +0 -0
- data/vendor/assets/images/draw/spritesheet.png +0 -0
- data/vendor/assets/images/draw/spritesheet.svg +156 -0
- data/vendor/assets/images/images/layers-2x.png +0 -0
- data/vendor/assets/images/images/layers.png +0 -0
- data/vendor/assets/images/images/marker-icon-2x.png +0 -0
- data/vendor/assets/images/images/marker-icon.png +0 -0
- data/vendor/assets/images/images/marker-shadow.png +0 -0
- data/vendor/assets/javascripts/leaflet.js +5 -0
- metadata +234 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="grid-x">
|
2
|
+
<div class="cell small-3">
|
3
|
+
<button class="share-link link text-center" data-open="processEmbed">
|
4
|
+
<%= t("embed_link", scope: "decidim.shared.embed_modal") %>
|
5
|
+
<%= icon "code", class: "icon--after" %>
|
6
|
+
</button>
|
7
|
+
|
8
|
+
</div>
|
9
|
+
<div class="cell auto">
|
10
|
+
<%= link_to url, class: "share-link link", target: :_blank do %>
|
11
|
+
<%= t(".fullscreen") %>
|
12
|
+
<%= icon "eye", class: "icon--after" %>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="reveal reveal--embed" id="processEmbed" data-reveal>
|
18
|
+
<div class="reveal__header">
|
19
|
+
<h3 class="reveal__title"><%= t("embed", scope: "decidim.shared.embed_modal") %>:</h3>
|
20
|
+
<button class="close-button" data-close aria-label="<%= t("close_window", scope: "decidim.shared.embed_modal") %>" type="button">
|
21
|
+
<span aria-hidden="true">×</span>
|
22
|
+
</button>
|
23
|
+
</div>
|
24
|
+
<p class="embed__code">
|
25
|
+
<%= embed_code %>
|
26
|
+
</p>
|
27
|
+
</div>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<%= stylesheet_link_tag "decidim/map" %>
|
2
|
+
<%= stylesheet_link_tag "decidim/comparative_stats/geocoded_events" %>
|
3
|
+
<%= javascript_include_tag "decidim/comparative_stats/geocoded_events" %>
|
4
|
+
|
5
|
+
<%= cell("decidim/comparative_stats/participatory_spaces_geocoded_events", active_endpoints) %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%= stylesheet_link_tag "decidim/comparative_stats/graphs" %>
|
2
|
+
|
3
|
+
<ul class="tabs" id="charts-tabs">
|
4
|
+
<% available_graphs.each do |graph| %>
|
5
|
+
<li class="tabs-title"><%= link_to t(".#{graph}"), graphs_path(graph: graph), aria: { selected: is_active_link?(graphs_path(graph: graph)) } %></li>
|
6
|
+
<% end %>
|
7
|
+
</ul>
|
8
|
+
|
9
|
+
<div class="tabs-content" id="charts-tabs-content">
|
10
|
+
<div class="tabs-panel is-active">
|
11
|
+
<% if available_graphs.include? params[:graph].to_sym %>
|
12
|
+
<%= render partial: "decidim/comparative_stats/widgets/embed", object: params[:graph] %>
|
13
|
+
|
14
|
+
<%= render partial: "decidim/comparative_stats/widgets/#{params[:graph]}" %>
|
15
|
+
<% else %>
|
16
|
+
<p><%= t ".choose_valid_graph" %></p>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: "decidim/comparative_stats/widgets/#{params[:graph]}" %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<% content_for :secondary_nav do %>
|
2
|
+
<div class="secondary-nav secondary-nav--subnav">
|
3
|
+
<ul>
|
4
|
+
<% if allowed_to?(:index, :endpoint) %>
|
5
|
+
<li <% if is_active_link?(decidim_admin_comparative_stats.endpoints_path) %> class="is-active" <% end %>>
|
6
|
+
<%= aria_selected_link_to I18n.t("menu.endpoints", scope: "decidim.comparative_stats.admin"), decidim_admin_comparative_stats.endpoints_path %>
|
7
|
+
</li>
|
8
|
+
<% end %>
|
9
|
+
<% if allowed_to?(:index, :graph) %>
|
10
|
+
<li <% if is_active_link?(decidim_admin_comparative_stats.graphs_path) %> class="is-active" <% end %>>
|
11
|
+
<%= aria_selected_link_to I18n.t("menu.graphs", scope: "decidim.comparative_stats.admin"), decidim_admin_comparative_stats.graphs_path %>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
14
|
+
</ul>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<%= render "layouts/decidim/admin/application" do %>
|
19
|
+
<div class="process-title">
|
20
|
+
<div class="process-title-content">
|
21
|
+
<%= link_to t("decidim.admin.menu.comparative_stats"), decidim_admin_comparative_stats.endpoints_path, target: "_blank" %>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div class="process-content">
|
26
|
+
<%= yield %>
|
27
|
+
</div>
|
28
|
+
<% end %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html class="no-js">
|
3
|
+
<head>
|
4
|
+
<title><%= decidim_page_title %></title>
|
5
|
+
<%= csrf_meta_tags %>
|
6
|
+
<%= stylesheet_link_tag "application" %>
|
7
|
+
<%= stylesheet_link_tag "decidim/comparative_stats/widget" %>
|
8
|
+
<%= javascript_include_tag "application" %>
|
9
|
+
|
10
|
+
</head>
|
11
|
+
|
12
|
+
<body class="widget">
|
13
|
+
|
14
|
+
<%= yield %>
|
15
|
+
|
16
|
+
<div class="organization">
|
17
|
+
<%= render partial: "layouts/decidim/logo", locals: { organization: current_organization } %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<%= javascript_include_tag "decidim/widget" %>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
ca:
|
2
|
+
decidim:
|
3
|
+
admin:
|
4
|
+
menu:
|
5
|
+
comparative_stats: Estadístiques comparatives
|
6
|
+
comparative_stats:
|
7
|
+
admin:
|
8
|
+
endpoints:
|
9
|
+
create:
|
10
|
+
error: L'enllaç de l'API no s'ha afegit. Comproveu que sigui una URL vàlida de l'API Decidim
|
11
|
+
success: The API endpoint has been added successfully
|
12
|
+
edit:
|
13
|
+
title: Edita l'enllaç a l'API Decidim
|
14
|
+
update: Comprova i actualitza l'enllaç
|
15
|
+
index:
|
16
|
+
active: Actiu
|
17
|
+
endpoint: Destinació
|
18
|
+
name: Nom
|
19
|
+
no_endpoints: Sembla que encara no heu afegit cap enllaç de l'API Decidim!
|
20
|
+
title: Punts de l'API Decidim
|
21
|
+
version: Versió
|
22
|
+
new:
|
23
|
+
create: Comprova i afegeix l'enllaç
|
24
|
+
subtitle: Afegeix una URL de Decidim vàlida que apunti a la seva API. Per exemple, "https://www.decidim.barcelona/api"
|
25
|
+
title: Afegeix un nou punt de l'API Decidim
|
26
|
+
update:
|
27
|
+
error: L'enllaç de l'API no s'ha actualitzat. Comproveu que sigui una URL vàlida de l'API Decidim
|
28
|
+
success: The API endpoint has been updated successfully
|
29
|
+
graphs:
|
30
|
+
show:
|
31
|
+
no_endpoints: Sembla que no teniu cap enllaç a l'Api Decidim actiu. Afegeix-ne i activa'n alguns primer!
|
32
|
+
title: Gestiona gràfiques multi-instàncies
|
33
|
+
menu:
|
34
|
+
endpoints: Gestiona els enllaços de l'API
|
35
|
+
graphs: Gestiona les gràfiques
|
36
|
+
admin_log:
|
37
|
+
endpoint:
|
38
|
+
create: "%{user_name} ha creat el punt API %{resource_name}"
|
39
|
+
delete: "%{user_name} ha esborrat el membre %{resource_name} de l'enllaç API %{space_name}"
|
40
|
+
update: "%{user_name} ha actualitzat el punt API %{resource_name}"
|
41
|
+
endpoints:
|
42
|
+
add: Afegeix una URL de Decidim
|
43
|
+
metrics:
|
44
|
+
users:
|
45
|
+
title: Usuaris registrats
|
46
|
+
widgets:
|
47
|
+
embed_modal:
|
48
|
+
fullscreen: Mostrar en pantalla completa
|
49
|
+
tabs:
|
50
|
+
choose_valid_graph: No s'ha especificat cap gràfic vàlid. Trieu-ne un i torneu-ho a provar
|
51
|
+
global_stats: Estadístiques globals
|
52
|
+
global_stats_timeline: Línia de temps d'estadístiques globals
|
53
|
+
processes_timeline: Línia de temps dels processos
|
54
|
+
spaces_geocoded_events: Mapes agregats
|
55
|
+
components:
|
56
|
+
comparative_stats:
|
57
|
+
name: Estadístiques comparatives
|
@@ -0,0 +1,57 @@
|
|
1
|
+
cs:
|
2
|
+
decidim:
|
3
|
+
admin:
|
4
|
+
menu:
|
5
|
+
comparative_stats: Srovnávací statistiky
|
6
|
+
comparative_stats:
|
7
|
+
admin:
|
8
|
+
endpoints:
|
9
|
+
create:
|
10
|
+
error: Koncový bod API nebyl přidán. Ověřte, zda je platná URL pro Decidim API
|
11
|
+
success: The API endpoint has been added successfully
|
12
|
+
edit:
|
13
|
+
title: Upravit koncový bod API Decidim
|
14
|
+
update: Zkontrolovat a aktualizovat koncový bod
|
15
|
+
index:
|
16
|
+
active: Aktivní
|
17
|
+
endpoint: Koncový bod
|
18
|
+
name: Název
|
19
|
+
no_endpoints: Zdá se, že jste ještě nepřidali žádný koncový bod API Decidim!
|
20
|
+
title: API Decidim koncové body
|
21
|
+
version: Verze
|
22
|
+
new:
|
23
|
+
create: Zkontrolovat a přidat koncový bod
|
24
|
+
subtitle: Přidat platnou URL pro instalaci Decidim odkazující na její API. Například "https://www.decidim.barcelona/api"
|
25
|
+
title: Přidat koncový bod API Decidim
|
26
|
+
update:
|
27
|
+
error: Koncový bod API nebyl aktualizován. Ověřte, zda je platná URL pro Decidim API
|
28
|
+
success: The API endpoint has been updated successfully
|
29
|
+
graphs:
|
30
|
+
show:
|
31
|
+
no_endpoints: Vypadá to, že jste ještě neměli žádný aktivní koncový bod. Prosím, nejprve přidejte a aktivujte nějaké koncové body!
|
32
|
+
title: Spravovat grafy křížového nájemce
|
33
|
+
menu:
|
34
|
+
endpoints: Spravovat koncové body API
|
35
|
+
graphs: Spravovat grafy
|
36
|
+
admin_log:
|
37
|
+
endpoint:
|
38
|
+
create: "%{user_name} vytvořil koncový bod API %{resource_name}"
|
39
|
+
delete: "%{user_name} odstranil %{resource_name} člena z %{space_name} API koncového bodu"
|
40
|
+
update: "%{user_name} aktualizoval koncový bod API %{resource_name}"
|
41
|
+
endpoints:
|
42
|
+
add: Přidat URL Decidim
|
43
|
+
metrics:
|
44
|
+
users:
|
45
|
+
title: Registrovaní uživatelé
|
46
|
+
widgets:
|
47
|
+
embed_modal:
|
48
|
+
fullscreen: Zobrazit na celou obrazovku
|
49
|
+
tabs:
|
50
|
+
choose_valid_graph: Nebyl zadán žádný platný graf. Vyberte prosím jeden a zkuste to znovu
|
51
|
+
global_stats: Globální statistiky
|
52
|
+
global_stats_timeline: Časová osa globálních statistik
|
53
|
+
processes_timeline: Procesy časové osy
|
54
|
+
spaces_geocoded_events: Souhrnné mapy
|
55
|
+
components:
|
56
|
+
comparative_stats:
|
57
|
+
name: Srovnávací statistiky
|
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
en:
|
3
|
+
decidim:
|
4
|
+
admin:
|
5
|
+
menu:
|
6
|
+
comparative_stats: Comparative Stats
|
7
|
+
comparative_stats:
|
8
|
+
admin:
|
9
|
+
endpoints:
|
10
|
+
create:
|
11
|
+
error: The API endpoint has not been added. Please verify that is a valid
|
12
|
+
Decidim API url
|
13
|
+
success: The API endpoint has been added successfully
|
14
|
+
edit:
|
15
|
+
title: Edit a Decidim API endpoint
|
16
|
+
update: Check and update endpoint
|
17
|
+
index:
|
18
|
+
active: Active
|
19
|
+
endpoint: Endpoint
|
20
|
+
name: Name
|
21
|
+
no_endpoints: It seems that you haven't add any Decidim API endpoint yet!
|
22
|
+
title: API Decidim enpoints
|
23
|
+
version: Version
|
24
|
+
new:
|
25
|
+
create: Check and add endpoint
|
26
|
+
subtitle: Add a valid Decidim installation URL that points to its API.
|
27
|
+
For instance "https://www.decidim.barcelona/api"
|
28
|
+
title: Add a Decidim API endpoint
|
29
|
+
update:
|
30
|
+
error: The API endpoint has not been updated. Please verify that is a
|
31
|
+
valid Decidim API url
|
32
|
+
success: The API endpoint has been updated successfully
|
33
|
+
graphs:
|
34
|
+
show:
|
35
|
+
no_endpoints: It looks that you haven't any active endpoint yer. Please
|
36
|
+
add and activate some Endpoints first!
|
37
|
+
title: Manage cross-tenant graphs
|
38
|
+
menu:
|
39
|
+
endpoints: Manage API endpoints
|
40
|
+
graphs: Manage Graphs
|
41
|
+
admin_log:
|
42
|
+
endpoint:
|
43
|
+
create: "%{user_name} created the %{resource_name} API endpoint"
|
44
|
+
delete: "%{user_name} removed the %{resource_name} member from the %{space_name}
|
45
|
+
API endpoint"
|
46
|
+
update: "%{user_name} updated the %{resource_name} API endpoint"
|
47
|
+
endpoints:
|
48
|
+
add: Add a Decidim URL
|
49
|
+
metrics:
|
50
|
+
users:
|
51
|
+
title: Registered users
|
52
|
+
widgets:
|
53
|
+
embed_modal:
|
54
|
+
fullscreen: View in fullscreen
|
55
|
+
tabs:
|
56
|
+
choose_valid_graph: No valid graph specified. Please choose one and try
|
57
|
+
again
|
58
|
+
global_stats: Global stats
|
59
|
+
global_stats_timeline: Global stats timeline
|
60
|
+
processes_timeline: Processes timeline
|
61
|
+
spaces_geocoded_events: Aggregated maps
|
62
|
+
components:
|
63
|
+
comparative_stats:
|
64
|
+
name: ComparativeStats
|
@@ -0,0 +1,57 @@
|
|
1
|
+
es:
|
2
|
+
decidim:
|
3
|
+
admin:
|
4
|
+
menu:
|
5
|
+
comparative_stats: Estadísticas comparativas
|
6
|
+
comparative_stats:
|
7
|
+
admin:
|
8
|
+
endpoints:
|
9
|
+
create:
|
10
|
+
error: El endpoint de la API no ha sido añadido. Por favor verifique que es una url válida de la API de Decidim
|
11
|
+
success: The API endpoint has been added successfully
|
12
|
+
edit:
|
13
|
+
title: Editar un endpoint de la API de Decidim
|
14
|
+
update: Comprobar y actualizar endpoint
|
15
|
+
index:
|
16
|
+
active: Activo
|
17
|
+
endpoint: Endpoint
|
18
|
+
name: Nombre
|
19
|
+
no_endpoints: '¡Parece que aún no has añadido ningún endpoint de la API de Decidim!'
|
20
|
+
title: Endpoints de la API Decidim
|
21
|
+
version: Versión
|
22
|
+
new:
|
23
|
+
create: Comprobar y añadir endpoint
|
24
|
+
subtitle: Añade una URL de una instancia de Decidim válida que apunte a su API. Por ejemplo "https://www.decidim.barcelona/api"
|
25
|
+
title: Añadir un endpoint de la API de Decidim
|
26
|
+
update:
|
27
|
+
error: El endpoint de la API no ha sido añadido. Por favor verifique que es una url válida de la API de Decidim
|
28
|
+
success: The API endpoint has been updated successfully
|
29
|
+
graphs:
|
30
|
+
show:
|
31
|
+
no_endpoints: Parece que no tienes ningún endpoint activo. ¡Por favor, añade y activa algunos endpoints primero!
|
32
|
+
title: Administrar gráficos multi-instancia
|
33
|
+
menu:
|
34
|
+
endpoints: Administrar endpoints de la API
|
35
|
+
graphs: Administrar Gráficos
|
36
|
+
admin_log:
|
37
|
+
endpoint:
|
38
|
+
create: "%{user_name} ha creado el API endpoint %{resource_name}"
|
39
|
+
delete: "%{user_name} ha eliminado el miembro %{resource_name} del API endpoint %{space_name}"
|
40
|
+
update: "%{user_name} ha actualizado el API endpoint %{resource_name}"
|
41
|
+
endpoints:
|
42
|
+
add: Añadir una URL de Decidim
|
43
|
+
metrics:
|
44
|
+
users:
|
45
|
+
title: Usuarios registrados
|
46
|
+
widgets:
|
47
|
+
embed_modal:
|
48
|
+
fullscreen: Ver en pantalla completa
|
49
|
+
tabs:
|
50
|
+
choose_valid_graph: No se ha especificado un gráfico válido. Por favor, elija uno e inténtalo de nuevo
|
51
|
+
global_stats: Estadísticas Globales
|
52
|
+
global_stats_timeline: Línea de tiempo de estadísticas globales
|
53
|
+
processes_timeline: Línea de tiempo de procesos
|
54
|
+
spaces_geocoded_events: Mapas agregados
|
55
|
+
components:
|
56
|
+
comparative_stats:
|
57
|
+
name: Estadísticas comparativas
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimComparativeStatsEndpoints < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_comparative_stats_endpoints do |t|
|
6
|
+
t.string :endpoint
|
7
|
+
t.boolean :active
|
8
|
+
t.references :decidim_organization, null: false, foreign_key: true, index: { name: "decidim_comparative_stats_constraint_organization" }
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddNameVersionToComparativeStatsEndpoints < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
add_column :decidim_comparative_stats_endpoints, :name, :string
|
6
|
+
add_column :decidim_comparative_stats_endpoints, :version, :string
|
7
|
+
end
|
8
|
+
end
|
data/db/seeds.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
if !Rails.env.production? || ENV["SEED"]
|
4
|
+
print "Creating seeds for comparative_stats...\n" unless Rails.env.test?
|
5
|
+
|
6
|
+
organization = Decidim::Organization.first
|
7
|
+
|
8
|
+
# Set the htmleditor on to facilitate development
|
9
|
+
admin_user = Decidim::User.find_by(
|
10
|
+
organization: organization,
|
11
|
+
email: "admin@example.org"
|
12
|
+
)
|
13
|
+
|
14
|
+
# add enpoints bcn - helsinki
|
15
|
+
Decidim.traceability.create!(
|
16
|
+
Decidim::ComparativeStats::Endpoint,
|
17
|
+
admin_user,
|
18
|
+
endpoint: "http://localhost:3000/api",
|
19
|
+
name: organization.name,
|
20
|
+
api_version: Decidim.version,
|
21
|
+
organization: organization,
|
22
|
+
active: true
|
23
|
+
)
|
24
|
+
Decidim.traceability.create!(
|
25
|
+
Decidim::ComparativeStats::Endpoint,
|
26
|
+
admin_user,
|
27
|
+
endpoint: "https://www.decidim.barcelona/api",
|
28
|
+
name: "Decidim Barcelona",
|
29
|
+
api_version: "0.22.0",
|
30
|
+
organization: organization,
|
31
|
+
active: true
|
32
|
+
)
|
33
|
+
Decidim.traceability.create!(
|
34
|
+
Decidim::ComparativeStats::Endpoint,
|
35
|
+
admin_user,
|
36
|
+
endpoint: "https://omastadi.hel.fi/api",
|
37
|
+
name: "City of Helsinki participationary platform",
|
38
|
+
api_version: "0.23.1",
|
39
|
+
organization: organization,
|
40
|
+
active: false
|
41
|
+
)
|
42
|
+
end
|