kresus merge requestshttps://framagit.org/kresusapp/kresus/-/merge_requests2020-04-25T11:46:09Zhttps://framagit.org/kresusapp/kresus/-/merge_requests/1224[client] Fix assert in non testing environment2020-04-25T11:46:09ZNicolas Frandeboeufmail@nicofrand.eu[client] Fix assert in non testing environmentRegression from https://framagit.org/kresusapp/kresus/-/commit/be8e2c95273aab7d86dbcbe4e9924a64566d1c2e
`process` will only be defined when called from tests. In a browser there will just be an error.
`window` will not be defined when ...Regression from https://framagit.org/kresusapp/kresus/-/commit/be8e2c95273aab7d86dbcbe4e9924a64566d1c2e
`process` will only be defined when called from tests. In a browser there will just be an error.
`window` will not be defined when running tests.AntoineAntoinehttps://framagit.org/kresusapp/kresus/-/merge_requests/1213User defined type2020-04-14T17:44:36ZAntoineUser defined typeThis MR introduces the property `isUserDefinedType` for transactions and uses it to better discriminate real duplicates.This MR introduces the property `isUserDefinedType` for transactions and uses it to better discriminate real duplicates.Benjamin BouvierBenjamin Bouvierhttps://framagit.org/kresusapp/kresus/-/merge_requests/1192[server] Simplify update mechanism of access-fields. Fixes #957.2020-04-06T17:31:37ZAntoine[server] Simplify update mechanism of access-fields. Fixes #957.This MR aims at simplifying the update of the AccessFields when updating an access.
Several things had to be taken into account :
- it is necessary to use the `.save` method, and not `.update` method, because `.update` can only update a...This MR aims at simplifying the update of the AccessFields when updating an access.
Several things had to be taken into account :
- it is necessary to use the `.save` method, and not `.update` method, because `.update` can only update and access, and not the fields attached to it.
- the ORM does not delete an access_field from the database, if we omit it in the `fields` property of an access, it tries to set the `accessId` of the `access_field` to null, which is not allowed by the DB (this would anyway lead to orphans), so we need to manually delete the appropriate fields.
- the `AccessField` entity could be 'cleaned' a bit more (removing all the unused methods), but I chose not to, as I thought it could be useful to keep them, but in the mean time, the code is not used. I have no strong opinion, so tell me which option you prefer :)
- I changed the client so that we do not transmit a field which has value `null`or `''` to the server (meaning the field is empty, and is omitted by the user). This could be filtered server side (or both sides). This part is clearly to be discussed.https://framagit.org/kresusapp/kresus/-/merge_requests/1155Add alert notifications for multiple providers via Apprise2020-04-04T16:51:50ZAerionAdd alert notifications for multiple providers via Apprise# Goal
This adds a way to receive notifications on different providers, by adding an external service: [apprise](https://github.com/caronc/apprise).
I wanted to receive Kresus alerts on my phone, for every transaction.
But using a...# Goal
This adds a way to receive notifications on different providers, by adding an external service: [apprise](https://github.com/caronc/apprise).
I wanted to receive Kresus alerts on my phone, for every transaction.
But using a specific notification provider (not email) and receiving only the important information (transaction detail without greetings).
# Apprise
> Apprise allows you to send a notification to almost all of the most popular notification services available to us today such as: Telegram, Discord, Slack, Amazon SNS, Gotify, etc.
Apprise is:
* in Python (same as weboob)
* quite [light](https://pypi.org/project/apprise/#files)
* externalizing the effort of supporting multiple providers
* an external binary (same as weboob)
I've been using it for a couple of months, I receive all notifications without any problem.
# Changes
* reused the (unused) notifications code
* when a notification is received, apprise binary is called via its [cli usage](https://github.com/caronc/apprise/wiki/CLI_Usage) to forward the notification to the provider
* alerts settings has a new configuration parameter for the Apprise notifications url
* with or without smtp, the notifications page is accessible (as alerts can now be used without smtp)
# Demo
_Example is shown with kresus in dev, and a fresh gotify server ([5s to setup](https://github.com/caronc/apprise/wiki/Notify_gotify#docker)). Note that the test notification is received correctly._
![kresus_test_notif_video](/uploads/3966e9d5b5f844520bb904fb11b0d7df/kresus_test_notif_video.webm)
## Alert content
![alert_example](/uploads/41bf0bf24a6456a67a1d9cd9cabe1978/image.png)
# Current limitations
* no way to choose receive email for an alert and no notification for it. For the whole group of alerts, it's either email+notification, only email, or only notification.
* apprise notifications are only triggered on alerts, not reports
* ![image](/uploads/9415e3b7150fd4c32eeac22f393b1f23/image.png) The input box is quite small, I'm not comfortable enough to know the correct way to change the css in the codebase for this input (width 40% would be okay). _I'm guessing doing it in client/css/sections/settings/all.css._
* the explanation on what is this Apprise configuration url can be strange at first sight, is the explanation enough? ![apprise_url_explanation](/uploads/faf17e2a8779479d56855b5274c4a0f7/image.png)Benjamin BouvierBenjamin Bouvierhttps://framagit.org/kresusapp/kresus/-/merge_requests/1191Fix access fields update2020-03-31T18:09:57ZNicolas Frandeboeufmail@nicofrand.euFix access fields updateWhen editing custom fields we don't always have the id field.
This is the case when it comes from the client when editing an access at least.
**STR**:
1. Disable a fake bank access
1. Re-enable it and see the error below
```
[2020-03-...When editing custom fields we don't always have the id field.
This is the case when it comes from the client when editing an access at least.
**STR**:
1. Disable a fake bank access
1. Re-enable it and see the error below
```
[2020-03-31T16:32:27.427] [ERROR] helpers - Assertion error: Expected variable to be defined
Error
at panic (/home/user/app/build/server/helpers.js:30:46)
at Object.unwrap (/home/user/app/build/server/helpers.js:43:9)
at Function.batchUpdateOrCreate (/home/user/app/build/server/models/entities/access-fields.js:70:39)
at Function.update (/home/user/app/build/server/models/entities/accesses.js:86:39)
at updateAndFetchAccounts (/home/user/app/build/server/controllers/v1/accesses.js:209:56)
at Layer.handle [as handle_request] (/home/user/app/node_modules/express/lib/router/layer.js:95:5)
at next (/home/user/app/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/user/app/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/user/app/node_modules/express/lib/router/layer.js:95:5)
at /home/user/app/node_modules/express/lib/router/index.js:281:22
[2020-03-31T16:32:27.484] [ERROR] helpers - when updating and fetching bank access: Assertion error: Expected variable to be defined
Error
at panic (/home/user/app/build/server/helpers.js:30:46)
at Object.unwrap (/home/user/app/build/server/helpers.js:43:9)
at Function.batchUpdateOrCreate (/home/user/app/build/server/models/entities/access-fields.js:70:39)
at Function.update (/home/user/app/build/server/models/entities/accesses.js:86:39)
at updateAndFetchAccounts (/home/user/app/build/server/controllers/v1/accesses.js:209:56)
at Layer.handle [as handle_request] (/home/user/app/node_modules/express/lib/router/layer.js:95:5)
at next (/home/user/app/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/user/app/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/user/app/node_modules/express/lib/router/layer.js:95:5)
at /home/user/app/node_modules/express/lib/router/index.js:281:22
[2020-03-31T16:32:27.486] [INFO] helpers - Error: Assertion error: Expected variable to be defined
Error
at panic (/home/user/app/build/server/helpers.js:30:46)
at Object.unwrap (/home/user/app/build/server/helpers.js:43:9)
at Function.batchUpdateOrCreate (/home/user/app/build/server/models/entities/access-fields.js:70:39)
at Function.update (/home/user/app/build/server/models/entities/accesses.js:86:39)
at updateAndFetchAccounts (/home/user/app/build/server/controllers/v1/accesses.js:209:56)
at Layer.handle [as handle_request] (/home/user/app/node_modules/express/lib/router/layer.js:95:5)
at next (/home/user/app/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/user/app/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/user/app/node_modules/express/lib/router/layer.js:95:5)
at /home/user/app/node_modules/express/lib/router/index.js:281:22
at panic (/home/user/app/build/server/helpers.js:32:11)
at Object.unwrap (/home/user/app/build/server/helpers.js:43:9)
at Function.batchUpdateOrCreate (/home/user/app/build/server/models/entities/access-fields.js:70:39)
at Function.update (/home/user/app/build/server/models/entities/accesses.js:86:39)
at updateAndFetchAccounts (/home/user/app/build/server/controllers/v1/accesses.js:209:56)
at Layer.handle [as handle_request] (/home/user/app/node_modules/express/lib/router/layer.js:95:5)
at next (/home/user/app/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/user/app/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/user/app/node_modules/express/lib/router/layer.js:95:5)
at /home/user/app/node_modules/express/lib/router/index.js:281:22
```https://framagit.org/kresusapp/kresus/-/merge_requests/1169Optimize infinite list2020-03-28T19:14:42ZAntoineOptimize infinite listChange the infinite list so that we can rerender the elements without rerendering the `InfiniteList` component.This will be useful for !1135 Change the infinite list so that we can rerender the elements without rerendering the `InfiniteList` component.This will be useful for !1135 Nicolas Frandeboeufmail@nicofrand.euNicolas Frandeboeufmail@nicofrand.euhttps://framagit.org/kresusapp/kresus/-/merge_requests/1116WIP: [server] Migrate new files to TypeScript.2020-03-28T15:28:11ZAntoineWIP: [server] Migrate new files to TypeScript.Putting in WIP, I'll fix the TS errors in another MR, and then reopen.Putting in WIP, I'll fix the TS errors in another MR, and then reopen.https://framagit.org/kresusapp/kresus/-/merge_requests/1132WIP: [server] Use 'chunk' option to bulkInsert data, and use it in the Accoun...2020-03-21T17:07:25ZAntoineWIP: [server] Use 'chunk' option to bulkInsert data, and use it in the AccountManager. Fixes #938.AntoineAntoinehttps://framagit.org/kresusapp/kresus/-/merge_requests/1136WIP: Models properties type2020-03-06T18:54:41ZAntoineWIP: Models properties typeSetting as WIP, as the MR is huge. I'll adress first the TS errors in !1146.
This MR sets :
- the types for the Models properties
- the types for the Models (static) methods' attributes
Fixes `14` TS errorsSetting as WIP, as the MR is huge. I'll adress first the TS errors in !1146.
This MR sets :
- the types for the Models properties
- the types for the Models (static) methods' attributes
Fixes `14` TS errorsAntoineAntoinehttps://framagit.org/kresusapp/kresus/-/merge_requests/1152WIP: Cache python and apt packages2020-02-27T19:24:50ZAntoineWIP: Cache python and apt packagesThere still is a problem I'll work on it lateR.There still is a problem I'll work on it lateR.Nicolas Frandeboeufmail@nicofrand.euNicolas Frandeboeufmail@nicofrand.euhttps://framagit.org/kresusapp/kresus/-/merge_requests/1145CI: skip first commit in lint-history2020-02-21T19:39:49ZBenjamin BouvierCI: skip first commit in lint-historyThis should speed up testing!This should speed up testing!https://framagit.org/kresusapp/kresus/-/merge_requests/1055WIP: Removing $t for a more react way of doing things.2020-02-16T14:50:39ZAntoineWIP: Removing $t for a more react way of doing things.https://framagit.org/kresusapp/kresus/-/merge_requests/1129[server] Define a propoer formatCurrency method for type Account (fixes a TS ...2020-02-09T20:43:38ZAntoine[server] Define a propoer formatCurrency method for type Account (fixes a TS error).This MR fixes the following typescript error:
```
server/lib/report-manager.js:79:15 - error TS2339: Property 'formatCurrency' does not exist on type 'Account'.
79 a.formatCurrency = await a.getCurrencyFormatter();
```This MR fixes the following typescript error:
```
server/lib/report-manager.js:79:15 - error TS2339: Property 'formatCurrency' does not exist on type 'Account'.
79 a.formatCurrency = await a.getCurrencyFormatter();
```Benjamin BouvierBenjamin Bouvierhttps://framagit.org/kresusapp/kresus/-/merge_requests/1104Simplify themes: keep only light/dark and add a switch2020-01-24T08:07:27ZNicolas Frandeboeufmail@nicofrand.euSimplify themes: keep only light/dark and add a switchThis MR:
- removes the default theme
- replace the `theme` setting with a `dark-mode` boolean setting
- adds a switch to quickly allow to toggle the theme from the dropdown
![Screenshot_2020-01-08_Kresus](/uploads/bc49dc1bce45eb2625f23...This MR:
- removes the default theme
- replace the `theme` setting with a `dark-mode` boolean setting
- adds a switch to quickly allow to toggle the theme from the dropdown
![Screenshot_2020-01-08_Kresus](/uploads/bc49dc1bce45eb2625f237ac7a053f6e/Screenshot_2020-01-08_Kresus.png)https://framagit.org/kresusapp/kresus/-/merge_requests/1099Auth basic2020-01-07T20:44:55Zm4dzAuth basicThis merge request adds an Auth Basic process.
It relies on a `KRESUS_AUTH` environment variable (or config key), in the form of `username:passwd`. If the key isn't provided (aka falsy), the auth-basic middleware isn't enabled, and you ...This merge request adds an Auth Basic process.
It relies on a `KRESUS_AUTH` environment variable (or config key), in the form of `username:passwd`. If the key isn't provided (aka falsy), the auth-basic middleware isn't enabled, and you get a full access to Kresus without auth. If the key is provided with a username and a password separated by a semicolon, the auth-basic middleware is enabled with a challenge mode activated, allowing the browser to ask for credentials before giving access to the app.
The merge request is based on the 0.15.2 tag, let me know if you need me to rebase it on the master (but it seems that the master is currently in WIP for multi-users supports, so I'm not sure).
Thanks!https://framagit.org/kresusapp/kresus/-/merge_requests/1074Throttle input events in search (fix #535)2019-12-26T16:27:42ZNicolas Frandeboeufmail@nicofrand.euThrottle input events in search (fix #535)I used the same threshold than the scrolling threshold in the infinite list: it should remain acceptable by the user & improve the responsiveness.I used the same threshold than the scrolling threshold in the infinite list: it should remain acceptable by the user & improve the responsiveness.https://framagit.org/kresusapp/kresus/-/merge_requests/1032Balance synthesis (per currencies)2019-12-08T20:15:52ZsinopsysHKBalance synthesis (per currencies)New proposal.
Add a new collapsible ribbon bellow header providing a synthesis of all not excluded accounts with an aggregated balance per currencies.
In case of outstanding balance extra details is displayed with current vs outstanding...New proposal.
Add a new collapsible ribbon bellow header providing a synthesis of all not excluded accounts with an aggregated balance per currencies.
In case of outstanding balance extra details is displayed with current vs outstanding breakdown.
Extra details not displayed on small screen not to flood the device.
(referring to issue #884)https://framagit.org/kresusapp/kresus/-/merge_requests/1063WIP: Display overall balance summed across all accesses in menu2019-12-08T17:34:21ZAerionWIP: Display overall balance summed across all accesses in menuFixes #747 and a bit related to a feature present in !1032
This adds the total balance of all the accesses at the top of the menu.
![overall_balance](/uploads/e86a2ef02b569fadf174a6a5afb6de38/screen.png)Fixes #747 and a bit related to a feature present in !1032
This adds the total balance of all the accesses at the top of the menu.
![overall_balance](/uploads/e86a2ef02b569fadf174a6a5afb6de38/screen.png)AerionAerionhttps://framagit.org/kresusapp/kresus/-/merge_requests/1059💄 New look for the spinner2019-11-28T10:53:39ZLuc Didry💄 New look for the spinnerThe current spinner isn’t really dynamic. This one better gives the message "I’m loading, please wait".
I think @nicofrand already tried it.The current spinner isn’t really dynamic. This one better gives the message "I’m loading, please wait".
I think @nicofrand already tried it.https://framagit.org/kresusapp/kresus/-/merge_requests/1005[deps] Upgrade pouchdb to allow Kresus to be started with node 12.2019-10-23T06:45:31ZAntoine[deps] Upgrade pouchdb to allow Kresus to be started with node 12.:warning: This does not ensure full node 12 support, but at least the sarver starts, automatic poll is done and emails can be sent.:warning: This does not ensure full node 12 support, but at least the sarver starts, automatic poll is done and emails can be sent.