1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-03-21 12:29:03 +01:00

Merge branch 'dev' for release 2.8.1

This commit is contained in:
Sylvain 2019-01-02 15:54:14 +01:00
commit 1103804e5f
7 changed files with 39 additions and 22 deletions

View File

@ -1,5 +1,11 @@
# Changelog Fab Manager
## v2.8.1 2019 January 02
- Fix ES upgrade: when docker-compose file is using ${PWD}, the ES config volume is attached to the wrong container
- Fixed environment documentation references for external locales
- Fix a bug: unable to fetch projects from OpenProjects (#126)
## v2.8.0 2018 December 27
- Refactored subscriptions to keep track of the previous ones

View File

@ -468,7 +468,7 @@ If you want to try it, you can visit [this fab-manager](https://fablab.lacasemat
To start using this awesome feature, there are a few steps:
- send a mail to **contact@fab-manager.com** asking for your Open Projects client's credentials and giving them the name of your fab-manager, they will give you an `OPENLAB_APP_ID` and an `OPENLAB_APP_SECRET`
- fill in the value of the keys in your `application.yml`
- fill in the value of the keys in your environment file
- start your fab-manager app
- export your projects to open-projects (if you already have projects created on your fab-manager, unless you can skip that part) executing this command: `bundle exec rake fablab:openlab:bulk_export`

View File

@ -401,7 +401,7 @@ Application.Controllers.controller('ProjectsController', ['$scope', '$state', 'P
};
var normalizeProjectsAttrs = function (projects) {
projects.map(function (project) {
return projects.map(function (project) {
project.project_image = project.image_url;
return project;
});

View File

@ -10,7 +10,18 @@ Rails.application.config.assets.version = '1.0'
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js )
Rails.application.config.assets.precompile += %w( fontawesome-webfont.eot fontawesome-webfont.woff fontawesome-webfont.svg fontawesome-webfont.ttf )
Rails.application.config.assets.precompile += %w( app.printer.css )
Rails.application.config.assets.precompile += %w[
fontawesome-webfont.eot
fontawesome-webfont.woff
fontawesome-webfont.svg
fontawesome-webfont.ttf
]
Rails.application.config.assets.precompile += %w[app.printer.css]
Rails.application.config.assets.precompile += %w( angular-i18n/angular-locale_*.js moment/locale/*.js summernote/lang/*.js messageformat/locale/*.js fullcalendar/dist/lang/*.js )
Rails.application.config.assets.precompile += %w[
angular-i18n/angular-locale_*.js
moment/locale/*.js
summernote/lang/*.js
messageformat/locale/*.js
fullcalendar/dist/lang/*.js
]

View File

@ -165,7 +165,7 @@ Please, be aware that **the configured locale will imply the CURRENCY symbol use
_Eg.: configuring **es-ES** will set the currency symbol to **€** but **es-MX** will set **$** as currency symbol, so setting the `RAILS_LOCALE` to simple **es** (without country indication) will probably not do what you expect._
See `config/locales/rails.*.yml` for a list of available locales. Default is **en**.
See [config/locales/rails.*.yml](../config/locales) for a list of available locales. Default is **en**.
If your locale is not present in that list or any locale doesn't have your exact expectations, please open a pull request to share your modifications with the community and obtain a rebuilt docker image.
You can find templates of these files at https://github.com/svenfuchs/rails-i18n/tree/rails-4-x/rails/locale.
@ -174,14 +174,14 @@ You can find templates of these files at https://github.com/svenfuchs/rails-i18n
Configure the moment.js library for l10n.
See `vendor/assets/components/moment/locale/*.js` for a list of available locales.
See [github.com/moment/momentlocale/*.js](https://github.com/moment/moment/tree/2.22.2/locale) for a list of available locales.
Default is **en** (even if it's not listed).
SUMMERNOTE_LOCALE
Configure the javascript summernote editor for l10n.
See `vendor/assets/components/summernote/lang/summernote-*.js` for a list of available locales.
See [github.com/summernote/summernote/lang/summernote-*.js](https://github.com/summernote/summernote/tree/v0.7.3/lang) for a list of available locales.
Default is **en-US** (even if it's not listed).
ANGULAR_LOCALE
@ -192,24 +192,24 @@ Please, be aware that **the configured locale will imply the CURRENCY displayed
_Eg.: configuring **fr-fr** will set the currency symbol to **€** but **fr-ca** will set **$** as currency symbol, so setting the `ANGULAR_LOCALE` to simple **fr** (without country indication) will probably not do what you expect._
See `vendor/assets/components/angular-i18n/angular-locale_*.js` for a list of available locales. Default is **en**.
See [code.angularjs.org/i18n/angular-locale_*.js](https://code.angularjs.org/1.6.10/i18n/) for a list of available locales. Default is **en**.
MESSAGEFORMAT_LOCALE
Configure the messageformat.js library, used by angular-translate.
See vendor/assets/components/messageformat/locale/*.js for a list of available locales.
See [github.com/messageformat/messageformat/locale/*.js](https://github.com/messageformat/messageformat/tree/v0.1.8/locale) for a list of available locales.
FULLCALENDAR_LOCALE
Configure the fullCalendar JS agenda library.
See `vendor/assets/components/fullcalendar/dist/lang/*.js` for a list of available locales. Default is **en** (even if it's not listed).
See [github.com/fullcalendar/fullcalendar/lang/*.js](https://github.com/fullcalendar/fullcalendar/tree/v2.3.1/lang) for a list of available locales. Default is **en-us**.
ELASTICSEARCH_LANGUAGE_ANALYZER
This configure the language analyzer for indexing and searching in projects with ElasticSearch.
See https://www.elastic.co/guide/en/elasticsearch/reference/5.6/analysis-lang-analyzer.html for a list of available analyzers.
See [ElasticSearch guide](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/analysis-lang-analyzer.html) for a list of available analyzers.
TIME_ZONE
@ -223,19 +223,19 @@ Configure the first day of the week in your locale zone (generally monday or sun
D3_DATE_FORMAT
Date format for dates displayed in statistics charts.
See https://github.com/mbostock/d3/wiki/Time-Formatting#format for available formats.
See [D3 Wiki](https://github.com/mbostock/d3/wiki/Time-Formatting#format) for available formats.
UIB_DATE_FORMAT
Date format for dates displayed and parsed in date pickers.
See https://angular-ui.github.io/bootstrap/#uibdateparser-s-format-codes for a list available formats.
See [AngularUI documentation](https://angular-ui.github.io/bootstrap/#uibdateparser-s-format-codes) for a list available formats.
**BEWARE**: years format with less than 4 digits will result in problems because the system won't be able to distinct dates with the same less significant digits, eg. 50 could mean 1950 or 2050.
EXCEL_DATE_FORMAT
Date format for dates shown in exported Excel files (eg. statistics)
See https://support.microsoft.com/en-us/kb/264372 for a list a available formats.
See [Microsoft support](https://support.microsoft.com/en-us/kb/264372) for a list a available formats.
<a name="open-projects-settings"></a>
## Open projects settings

View File

@ -1,6 +1,6 @@
{
"name": "fab-manager",
"version": "2.8.0",
"version": "2.8.1",
"description": "FabManager is the FabLab management solution. It is web-based, open-source and totally free.",
"keywords": [
"fablab",

View File

@ -319,14 +319,14 @@ upgrade_compose()
# get current data directory
dir=$(awk 'BEGIN { FS="\n"; RS="";} { match($0, /image: elasticsearch:2\.4(\n|.)+volumes:(\n|.)+(-.*elasticsearch\/data)/, lines); FS="[ :]+"; RS="\r\n"; split(lines[3], line); print line[2] }' "$FM_PATH/docker-compose.yml")
# set the configuration directory
dir=$(echo "$dir" | sed "s^\${PWD}^$FM_PATH^")
dir=$(echo "${dir//[$'\t\r\n ']}/config")
# insert configuration directory into docker-compose bindings
awk "BEGIN { FS=\"\n\"; RS=\"\";} { print gensub(/(image: elasticsearch:2\.4(\n|.)+)volumes:\n/, \"\\\\1volumes:\n - ${dir}:/usr/share/elasticsearch/config\n\", \"g\") }" "$FM_PATH/docker-compose.yml" > "$FM_PATH/.awktmpfile" && mv "$FM_PATH/.awktmpfile" "$FM_PATH/docker-compose.yml"
echo -e "\nCopying ElasticSearch 2.4 configuration files from GitHub to $dir..."
mkdir -p "$dir"
curl -sSL https://raw.githubusercontent.com/LaCasemate/fab-manager/master/docker/elasticsearch.yml > "$dir/elasticsearch.yml"
curl -sSL https://raw.githubusercontent.com/LaCasemate/fab-manager/master/docker/log4j2.properties > "$dir/log4j2.properties"
awk "BEGIN { FS=\"\n\"; RS=\"\";} { print gensub(/(image: elasticsearch:2\.4(\n|.)+volumes:(\n|.)+(-.*elasticsearch\/data))/, \"\\\\1\n - ${dir}:/usr/share/elasticsearch/config\", \"g\") }" "$FM_PATH/docker-compose.yml" > "$FM_PATH/.awktmpfile" && mv "$FM_PATH/.awktmpfile" "$FM_PATH/docker-compose.yml"
abs_dir=$(echo "$dir" | sed "s^\${PWD}^$FM_PATH^")
echo -e "\nCopying ElasticSearch 2.4 configuration files from GitHub to $abs_dir..."
mkdir -p "$abs_dir"
curl -sSL https://raw.githubusercontent.com/LaCasemate/fab-manager/master/docker/elasticsearch.yml > "$abs_dir/elasticsearch.yml"
curl -sSL https://raw.githubusercontent.com/LaCasemate/fab-manager/master/docker/log4j2.properties > "$abs_dir/log4j2.properties"
fi
docker-compose pull
docker-compose up -d