Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions ganttzk/src/main/resources/i18n/keys.pot
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ msgstr ""
msgid "Show/Hide labels"
msgstr ""

#: ganttzk/src/main/resources/web/ganttz/zul/plannerLayout.zul:81
msgid "Flatten/Unflatten tree"
#: org/zkoss/ganttz/resourceload/ResourcesLoadPanel.java:88
msgid "Generic allocation criteria"
msgstr ""

#: org/zkoss/ganttz/DependencyList.java:66
Expand All @@ -149,9 +149,8 @@ msgstr ""
msgid "Show money cost bar"
msgstr ""

#: org/zkoss/ganttz/LeftTasksTreeRow.java:273
#: org/zkoss/ganttz/LeftTasksTreeRow.java:280
msgid "and no later than"
#: org/zkoss/ganttz/timetracker/zoom/ZoomLevel.java:82
msgid "Day"
msgstr ""

#: org/zkoss/ganttz/LeftTasksTreeRow.java:272
Expand All @@ -163,8 +162,8 @@ msgstr ""
msgid "Show critical path"
msgstr ""

#: ganttzk/src/main/resources/web/ganttz/zul/resourcesLoadLayout.zul:50
msgid "Page"
#: org/zkoss/ganttz/timetracker/zoom/ZoomLevel.java:34
msgid "Year"
msgstr ""

#: org/zkoss/ganttz/TaskList.java:298
Expand Down Expand Up @@ -199,8 +198,8 @@ msgstr ""
msgid "Hide money cost bar"
msgstr ""

#: org/zkoss/ganttz/Planner.java:648
msgid "Hide critical path"
#: org/zkoss/ganttz/data/resourceload/TimeLineRole.java:57
msgid "Worker"
msgstr ""

#: ganttzk/src/main/resources/web/ganttz/zul/plannerLayout.zul:63
Expand All @@ -227,8 +226,8 @@ msgstr ""
msgid "showing criteria"
msgstr ""

#: org/zkoss/ganttz/resourceload/ResourcesLoadPanel.java:86
msgid "Resources"
#: ganttzk/src/main/resources/web/ganttz/zul/plannerLayout.zul:71
msgid "Show/Hide resources"
msgstr ""

#: ganttzk/src/main/resources/web/ganttz/zul/plannerLayout.zul:138
Expand Down
7 changes: 7 additions & 0 deletions libreplan-business/src/main/resources/db.changelog-1.6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,11 @@
columnDataType="BOOLEAN" />
</changeSet>

<changeSet id="set-allow_to_gather_usage_stats-to-true"
author="jeroen">
<update tableName="configuration">
<column name="allow_to_gather_usage_stats_enabled" value="TRUE" />
</update>
</changeSet>

</databaseChangeLog>
2 changes: 1 addition & 1 deletion libreplan-business/src/main/resources/libreplan.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
statsPage http://stats.libreplan.dev/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the protocol is http and not https

minimumYear 2009
yearLimit 20
yearLimit 50
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,22 @@ public void setCheckNewVersionEnabled(boolean checkNewVersionEnabled) {
configurationModel.setCheckNewVersionEnabled(checkNewVersionEnabled);
}

/**
* Used in configuration.zul
* Should be public!
*/
public boolean isAllowedToGatherUsageStatsEnabled() {
return configurationModel.isAllowedToGatherUsageStatsEnabled();
}

/**
* Used in configuration.zul
* Should be public!
*/
public void setAllowedToGatherUsageStatsEnabled(boolean allowedToGatherUsageStatsEnabled) {
configurationModel.setAllowedToGatherUsageStatsEnabled(allowedToGatherUsageStatsEnabled);
}

/**
* Used in configuration.zul
* Should be public!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,16 @@ public void setCheckNewVersionEnabled(boolean checkNewVersionEnabled) {
configuration.setCheckNewVersionEnabled(checkNewVersionEnabled);
}

@Override
public boolean isAllowedToGatherUsageStatsEnabled() {
return configuration.isAllowedToGatherUsageStatsEnabled();
}

@Override
public void setAllowedToGatherUsageStatsEnabled(boolean allowedToGatherUsageStatsEnabled) {
configuration.setAllowToGatherUsageStatsEnabled(allowedToGatherUsageStatsEnabled);
}

private static Map<String, String> getAllCurrencies() {
Map<String, String> currencies = new TreeMap<>();
for (Locale locale : Locale.getAvailableLocales()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
import org.zkoss.zk.ui.Executions;
import org.zkoss.zkplus.spring.SpringUtil;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
Expand All @@ -41,6 +44,8 @@

public class GatheredUsageStats {

private static final Log LOG = LogFactory.getLog(GatheredUsageStats.class);

private IUserDAO userDAO;

private IOrderModel orderModel;
Expand Down Expand Up @@ -263,8 +268,8 @@ public void sendGatheredUsageStatsToServer(){
connection.setDoInput(true);
connection.setDoOutput(true);

// If the connection lasts > 2 sec throw Exception
connection.setConnectTimeout(2000);
// If the connection lasts > 6 sec throw Exception
connection.setConnectTimeout(6000);

// Send request
DataOutputStream dataOutputStream = new DataOutputStream(connection.getOutputStream());
Expand All @@ -273,9 +278,11 @@ public void sendGatheredUsageStatsToServer(){
dataOutputStream.close();

// No needed code, but it is not working without it
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a leftover comment

Suggested change
// No needed code, but it is not working without it

connection.getInputStream();
int responseCode = connection.getResponseCode();
LOG.info("Usage stats sent to " + url + " — HTTP " + responseCode);

} catch (IOException ignored) {
} catch (IOException e) {
LOG.warn("Failed to send usage stats: " + e.getMessage());
} finally {
if ( connection != null ) {
connection.disconnect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ public interface IConfigurationModel {

void setCheckNewVersionEnabled(boolean checkNewVersionEnabled);

boolean isAllowedToGatherUsageStatsEnabled();

void setAllowedToGatherUsageStatsEnabled(boolean allowedToGatherUsageStatsEnabled);

Boolean getGenerateCodeForExpenseSheets();

void setGenerateCodeForExpenseSheets(Boolean generateCodeForExpenseSheets);
Expand Down
6 changes: 2 additions & 4 deletions libreplan-webapp/src/main/resources/i18n/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -5462,10 +5462,8 @@ msgid "LDAP Roles (separated by ;)"
msgstr "\"Roles\" LDAP (separats per ;)"

#: libreplan-webapp/src/main/webapp/common/configuration.zul:129
msgid ""
"Help the project developers to collect information about which LibrePlan "
"version you are using"
msgstr "Permetre als desenvolupadors a recollir informació sobre quina versió de LibrePlan està en ús"
msgid "Allow collection of anonymous statistics to help us improve LibrePlan"
msgstr "Permetre la recol·lecció d'estadístiques anònimes per ajudar-nos a millorar LibrePlan"

#: org/libreplan/web/resources/worker/WorkerCRUDController.java:190
msgid "Not bound"
Expand Down
6 changes: 2 additions & 4 deletions libreplan-webapp/src/main/resources/i18n/cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -5461,10 +5461,8 @@ msgid "LDAP Roles (separated by ;)"
msgstr "Role LDAP (oddělené ;)"

#: libreplan-webapp/src/main/webapp/common/configuration.zul:129
msgid ""
"Help the project developers to collect information about which LibrePlan "
"version you are using"
msgstr "Pomoci vývojářům projektu LibrePlan sběrem informací o verzi, kterou používáte"
msgid "Allow collection of anonymous statistics to help us improve LibrePlan"
msgstr "Umožnit shromažďování anonymních statistik, abychom mohli zlepšit LibrePlan"

#: org/libreplan/web/resources/worker/WorkerCRUDController.java:190
msgid "Not bound"
Expand Down
8 changes: 2 additions & 6 deletions libreplan-webapp/src/main/resources/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -5445,12 +5445,8 @@ msgid "Inherited exception"
msgstr "Geerbte Ausnahme"

#: libreplan-webapp/src/main/webapp/common/configuration.zul:150
msgid ""
"Help the project developers to collect information about which LibrePlan "
"version you are using"
msgstr ""
"Helfen Sie den Projektentwicklern, Informationen darüber zu sammeln, welche "
"LibrePlan-Version Sie verwenden"
msgid "Allow collection of anonymous statistics to help us improve LibrePlan"
msgstr "Anonyme Statistiken sammeln lassen, um uns bei der Verbesserung von LibrePlan zu helfen"

#: org/libreplan/web/orders/ManageOrderElementAdvancesController.java:1179
msgid ""
Expand Down
8 changes: 2 additions & 6 deletions libreplan-webapp/src/main/resources/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -5436,12 +5436,8 @@ msgid "Inherited exception"
msgstr "Excepción heredada"

#: libreplan-webapp/src/main/webapp/common/configuration.zul:150
msgid ""
"Help the project developers to collect information about which LibrePlan "
"version you are using"
msgstr ""
"Ayude a los desarrolladores del proyecto a recoger información sobre que "
"versión de LibrePlan está usando"
msgid "Allow collection of anonymous statistics to help us improve LibrePlan"
msgstr "Permitir la recopilación de estadísticas anónimas para ayudarnos a mejorar LibrePlan"

#: org/libreplan/web/orders/ManageOrderElementAdvancesController.java:1179
msgid ""
Expand Down
6 changes: 2 additions & 4 deletions libreplan-webapp/src/main/resources/i18n/fa_IR.po
Original file line number Diff line number Diff line change
Expand Up @@ -5462,10 +5462,8 @@ msgid "LDAP Roles (separated by ;)"
msgstr "نقش های LDAP (توسط ; جدا گردد)"

#: libreplan-webapp/src/main/webapp/common/configuration.zul:129
msgid ""
"Help the project developers to collect information about which LibrePlan "
"version you are using"
msgstr "کمک به توسعه دهندگان برای جمع آوری اطلاعات درباره نسخه LibrePlan ای که استفاده می نمایید"
msgid "Allow collection of anonymous statistics to help us improve LibrePlan"
msgstr "اجازه جمع‌آوری آمار ناشناس برای کمک به ما در بهبود LibrePlan"

#: org/libreplan/web/resources/worker/WorkerCRUDController.java:190
msgid "Not bound"
Expand Down
8 changes: 2 additions & 6 deletions libreplan-webapp/src/main/resources/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -5468,12 +5468,8 @@ msgid "Inherited exception"
msgstr "Exception héritée"

#: libreplan-webapp/src/main/webapp/common/configuration.zul:150
msgid ""
"Help the project developers to collect information about which LibrePlan "
"version you are using"
msgstr ""
"Aide les développeurs du projet pour collecter de l'information sur la "
"version de LibrePlan que vous utilisez"
msgid "Allow collection of anonymous statistics to help us improve LibrePlan"
msgstr "Autoriser la collecte de statistiques anonymes pour nous aider à améliorer LibrePlan"

#: org/libreplan/web/orders/ManageOrderElementAdvancesController.java:1179
msgid ""
Expand Down
6 changes: 2 additions & 4 deletions libreplan-webapp/src/main/resources/i18n/gl.po
Original file line number Diff line number Diff line change
Expand Up @@ -5465,10 +5465,8 @@ msgid "LDAP Roles (separated by ;)"
msgstr "Roles do LDAP (separados por ;)"

#: libreplan-webapp/src/main/webapp/common/configuration.zul:129
msgid ""
"Help the project developers to collect information about which LibrePlan "
"version you are using"
msgstr "Axude aos desenvolvedores do proxecto a recoller información sobre que versión de LibrePlan está usando"
msgid "Allow collection of anonymous statistics to help us improve LibrePlan"
msgstr "Permitir a recollida de estatísticas anónimas para axudarnos a mellorar LibrePlan"

#: org/libreplan/web/resources/worker/WorkerCRUDController.java:190
msgid "Not bound"
Expand Down
8 changes: 2 additions & 6 deletions libreplan-webapp/src/main/resources/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -5428,12 +5428,8 @@ msgid "Inherited exception"
msgstr "Eccezione ereditata"

#: libreplan-webapp/src/main/webapp/common/configuration.zul:150
msgid ""
"Help the project developers to collect information about which LibrePlan "
"version you are using"
msgstr ""
"Aiuta gli sviluppatori del progetto a collezionare informazioni circa la "
"versione di LibrePlan che stai utilizzando"
msgid "Allow collection of anonymous statistics to help us improve LibrePlan"
msgstr "Consenti la raccolta di statistiche anonime per aiutarci a migliorare LibrePlan"

#: org/libreplan/web/orders/ManageOrderElementAdvancesController.java:1179
msgid ""
Expand Down
6 changes: 2 additions & 4 deletions libreplan-webapp/src/main/resources/i18n/ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -5461,10 +5461,8 @@ msgid "LDAP Roles (separated by ;)"
msgstr "LDAPロール(;で区切り)"

#: libreplan-webapp/src/main/webapp/common/configuration.zul:129
msgid ""
"Help the project developers to collect information about which LibrePlan "
"version you are using"
msgstr "使用中のLibrePlanバージョンの情報を収集して,プロジェクト開発者を支援する"
msgid "Allow collection of anonymous statistics to help us improve LibrePlan"
msgstr "LibrePlan改善のための匿名統計収集を許可する"

#: org/libreplan/web/resources/worker/WorkerCRUDController.java:190
msgid "Not bound"
Expand Down
25 changes: 14 additions & 11 deletions libreplan-webapp/src/main/resources/i18n/keys.pot
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,9 @@ msgstr ""
msgid "Week {0}"
msgstr ""

#: org/libreplan/web/advance/AdvanceTypeCRUDController.java:75
msgid "Value is not valid, the precision value must not be empty"
#: libreplan-webapp/src/main/webapp/common/layout/_customMenu.zul:83
#: libreplan-webapp/src/main/webapp/common/layout/login.zul:66
msgid "Help"
msgstr ""

#: org/libreplan/web/resources/worker/CriterionsMachineController.java:238
Expand Down Expand Up @@ -2533,8 +2534,8 @@ msgstr ""
msgid "Access to the system"
msgstr ""

#: org/libreplan/web/planner/limiting/allocation/LimitingResourceAllocationModel.java:222
msgid "All resources must be queue-based"
#: org/libreplan/web/orders/TreeElementOperationsController.java:52
msgid "Please select a task"
msgstr ""

#: libreplan-webapp/src/main/webapp/resources/machine/_machineConfigurationUnits.zul:35
Expand Down Expand Up @@ -4647,8 +4648,10 @@ msgstr ""
msgid "Length"
msgstr ""

#: org/libreplan/web/common/CustomMenuController.java:329
msgid "Workers"
#: org/libreplan/web/common/CustomMenuController.java:468
#: libreplan-webapp/src/main/webapp/common/configuration.zul:335
#: libreplan-webapp/src/main/webapp/resources/machine/_editMachine.zul:33
msgid "Configuration"
msgstr ""

#: org/libreplan/web/planner/company/CompanyPlanningModel.java:388
Expand Down Expand Up @@ -5953,8 +5956,8 @@ msgstr ""
msgid "Task finished"
msgstr ""

#: org/libreplan/web/logs/IssueLogCRUDController.java:410
msgid "issuelog-number"
#: org/libreplan/web/planner/order/OrderPlanningController.java:311
msgid "filtering"
msgstr ""

#: org/libreplan/web/workreports/WorkReportCRUDController.java:1640
Expand Down Expand Up @@ -8135,9 +8138,9 @@ msgstr ""
msgid "Advanced search"
msgstr ""

#: org/libreplan/web/calendars/BaseCalendarCRUDController.java:344
#: org/libreplan/web/common/Util.java:687
msgid "Remove"
#: org/libreplan/web/orders/JiraSynchronizationController.java:175
#: org/libreplan/web/orders/JiraSynchronizationController.java:222
msgid "Failed: {0}"
msgstr ""

#: libreplan-webapp/src/main/webapp/common/accessForbidden.zul:20
Expand Down
6 changes: 2 additions & 4 deletions libreplan-webapp/src/main/resources/i18n/nb.po
Original file line number Diff line number Diff line change
Expand Up @@ -5460,10 +5460,8 @@ msgid "LDAP Roles (separated by ;)"
msgstr "LDAP Roller (atskilt med;)"

#: libreplan-webapp/src/main/webapp/common/configuration.zul:129
msgid ""
"Help the project developers to collect information about which LibrePlan "
"version you are using"
msgstr "Hjelp prosjektutviklere å samle inn informasjon om hvilke LibrePlan versjon du bruker"
msgid "Allow collection of anonymous statistics to help us improve LibrePlan"
msgstr "Tillat innsamling av anonym statistikk for å hjelpe oss med å forbedre LibrePlan"

#: org/libreplan/web/resources/worker/WorkerCRUDController.java:190
msgid "Not bound"
Expand Down
8 changes: 2 additions & 6 deletions libreplan-webapp/src/main/resources/i18n/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -5391,12 +5391,8 @@ msgid "Inherited exception"
msgstr "Georven uitzondering"

#: libreplan-webapp/src/main/webapp/common/configuration.zul:150
msgid ""
"Help the project developers to collect information about which LibrePlan "
"version you are using"
msgstr ""
"Help de ontwikkelaars van LibrePlan bij het verzamelen van informatie over "
"welke versie u gebruikt"
msgid "Allow collection of anonymous statistics to help us improve LibrePlan"
msgstr "Sta het verzamelen van anonieme statistieken toe om ons te helpen LibrePlan te verbeteren"

#: org/libreplan/web/orders/ManageOrderElementAdvancesController.java:1179
msgid ""
Expand Down
6 changes: 2 additions & 4 deletions libreplan-webapp/src/main/resources/i18n/pl.po
Original file line number Diff line number Diff line change
Expand Up @@ -5463,10 +5463,8 @@ msgid "LDAP Roles (separated by ;)"
msgstr "Role Ldap (podzielone przez ;)"

#: libreplan-webapp/src/main/webapp/common/configuration.zul:129
msgid ""
"Help the project developers to collect information about which LibrePlan "
"version you are using"
msgstr ""
msgid "Allow collection of anonymous statistics to help us improve LibrePlan"
msgstr "Zezwól na zbieranie anonimowych statystyk, aby pomóc nam ulepszyć LibrePlan"

#: org/libreplan/web/resources/worker/WorkerCRUDController.java:190
msgid "Not bound"
Expand Down
Loading
Loading