1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
Christopher Kolstad
c17a1980a2
Add service layer
This simplifies stores to just be storage interaction, they no longer react to events.

Controllers now call services and awaits the result from the call.

When the service calls are returned the database is updated.
This simplifies testing dramatically, cause you know that your state is
updated when returned from a call, rather than hoping the store has
picked up the event (which really was a command) and reacted to it.

Events are still emitted from eventStore, so other parts of the app can
react to events as they're being sent out.

As part of the move to services, we now also emit an application-created
event when we see a new client application.

Fixes: #685
Fixes: #595
2021-01-21 10:59:19 +01:00
Christopher Kolstad
43801f1f13
Add Tags and tag types
- First iteration of api for tags and tag-types
- Documentation in place
- Adds three new tables
   - tag_types
   - tags
   - feature_tag
- Tagging a feature is adding a row in the feature_tag
  join table

* #665

Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-01-14 13:09:05 +01:00
Ivar Conradi Østhus
cdfba8f7b1 feat: Adds last-seen dat on toggles
When an application updates metrics for a toggle we now
stores the timestamp on the toggle when it was last seen
used by an application. This will make it much easier to
detect toggles not in use anymore.

closes #642
2020-12-22 11:05:00 +01:00
Ivar Conradi Østhus
192c292ecf fix: should use stripped update data for featureToggle 2020-10-01 22:34:28 +02:00
Ivar Conradi Østhus
83dda55172
feat: add stale property on toggle (#619) 2020-08-07 10:46:35 +02:00
Ivar Conradi Østhus
d01c9d2dac
fix: use airbnb lint rules directly (#583)
This drops usage of finn-eslint rules as they are no
longer maintained.
2020-04-14 22:29:11 +02:00
Ivar Conradi Østhus
b532c86695 fix: Upgrade to @hapi/joi (#543) 2020-02-20 08:34:32 +01:00
ivaosthu
ccaab0c47b fix: LogProvider as option injected to unleash.
Instead of instructing users to do static calls
in to Unleash, she should instead be allwed to
specify the log provider as an option to Unleash.

This commit introduces the "getLogger" option,
a function responsible for creating a logger.
2020-02-20 08:34:24 +01:00
ivaosthu
1c1b1edd83 fix: Add explicit endpoints for toggle on/off
closes #394
2020-02-20 08:34:21 +01:00
Benjamin Ludewig
175208c105 Refactored controllers, moved checkPermission to permission-checker.js middleware 2020-02-20 08:34:19 +01:00
Benjamin Ludewig
df7509e381 feature: Add action specific user permissions 2020-02-20 08:34:19 +01:00
ivaosthu
d5db78d140 chore(modernize): Use joi for url-friendly name validation 2020-02-20 08:34:18 +01:00
ivaosthu
3c8e51118e chore(modernize): Admin cleanup error-handlers 2020-02-20 08:34:18 +01:00
ivaosthu
39bc265daf chore(modernize): Use joi schema-validation in FeatureController 2020-02-20 08:34:17 +01:00
ivaosthu
e285f39bcb chore(modernize): Admin FeatureController 2020-02-20 08:34:17 +01:00
ivaosthu
c544f81fba Bugfix: more informative name validation errors
Will know tell the user if the toggle name is already
in use by an active feature toggle or an archived toggle.

Also brings lates unleash-frontend fix, which prevents an
invalid form from submitting.

closes: #290, #291
2020-02-20 08:34:07 +01:00
ivaosthu
4999bb93cf Should not be allow creation of archived toggle
closes #284
2020-02-20 08:34:05 +01:00
ivaosthu
089268825f Fix typo in custom validator 2020-02-20 08:34:04 +01:00
Ivar
5e1fd4ae8e Simplofy name validator
closes #271
2020-02-20 08:34:03 +01:00
Ivar
e679d5d975 Fix formatting 2020-02-20 08:34:00 +01:00
Martin Lehmann
c957aeba94 Fix feature name validation regex 2020-02-20 08:33:47 +01:00
Clint Brown
3e7098578b Allow underscores in name validation 2020-02-20 08:33:47 +01:00
ivaosthu
f5e9ca3bbe Implement support for logger provider.
This allows the users of 'unleash-server' to programatically
change the logger implemnentation. #175
2020-02-20 08:33:33 +01:00
sveisvei
0ae24c68e6 Refactor routes setup, move test files, cleanup legacy 2020-02-20 08:30:51 +01:00