1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
Commit Graph

2930 Commits

Author SHA1 Message Date
andreas-unleash
74c760bf4c
chore: remove changeRequestConflictHandling flag (#6364)
What it says on the tin

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-02-28 10:16:35 +02:00
Tymoteusz Czech
96c86b221b
feat: improved health chart tooltip (#6359) 2024-02-28 08:58:27 +01:00
Mateusz Kwasniewski
b82a650dab
feat: connected instances support query param for env (#6362) 2024-02-28 08:57:34 +01:00
Mateusz Kwasniewski
b738a2a1bc
fix: application list padding (#6365) 2024-02-27 15:05:37 +01:00
Nuno Góis
477a9c6cfa
chore: action events UI (#6358)
https://linear.app/unleash/issue/2-1936/action-events-ui

Implements the UI for action events.


![image](https://github.com/Unleash/unleash/assets/14320932/d2f82ddd-6292-4f61-bfdd-05037f746f52)


![image](https://github.com/Unleash/unleash/assets/14320932/673816b8-7dee-4b36-adda-d13d419dc5ac)
2024-02-27 13:52:09 +00:00
andreas-unleash
9101c39eb7
chore: remove scheduledConfigurationChanges flag (#6360)
What is says on the box

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-02-27 14:57:34 +02:00
Tymoteusz Czech
6cefe71534
feat: insights feedback (#6345) 2024-02-27 13:12:18 +01:00
Mateusz Kwasniewski
20a9e1d725
refactor: remove unused components and rename new (#6357) 2024-02-27 12:22:47 +01:00
Jaanus Sellin
9cd324bd7c
feat: projects using this application (#6355)
![image](https://github.com/Unleash/unleash/assets/964450/bcb5a612-3202-46ae-be20-bd23cbd8d6e4)
2024-02-27 12:24:44 +02:00
Mateusz Kwasniewski
c049374a25
chore: remove new strategy configuration flag (#6335) 2024-02-27 11:23:49 +01:00
Mateusz Kwasniewski
e9603f866b
refactor: connected instances extract hook refactoring (#6353) 2024-02-27 10:49:57 +01:00
Mateusz Kwasniewski
d6e0bea2f0
feat: use connected instances api with orval type (#6352) 2024-02-27 09:49:25 +01:00
Tymoteusz Czech
ed44de6c94
feat: simplified insights data fetching (#6342)
Simplify insights data fetching - let charts pick data instead of
preparing labels in hook.
2024-02-27 09:20:45 +01:00
Jaanus Sellin
7cebf7b8fe
feat: application issues (#6347)
![image](https://github.com/Unleash/unleash/assets/964450/90153533-322c-46fd-8a1b-5853cbe0c35c)
2024-02-27 09:57:50 +02:00
Mateusz Kwasniewski
ae257d5957
feat: connected instance ui api integration (#6343) 2024-02-27 08:30:31 +01:00
Tymoteusz Czech
fd87fd4e7d
Insights UI (#6341)
- style for headers in Insights dashboard and project selector
- fixed React element key issue in gauge chart
- fixed React attribute issue in Health stats
- active/inactive user stats from backend
2024-02-26 15:51:14 +01:00
Mateusz Kwasniewski
2c5d4ba0ce
feat: set default env columns in project overview to 3 (#6338) 2024-02-26 13:10:45 +01:00
andreas-unleash
4c340a5224
fix: track conflicts in new strategy screen (#6337)
Fixes a bug where the conflict tracking was only in the old feature
strategy edit screen.
- Ports the conflict tracking to the NewFeatureStrategyEdit screen

Closes #
[1-2093](https://linear.app/unleash/issue/1-2093/cr-conflict-detection-in-new-strategy-edit-screen)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-02-26 13:59:47 +02:00
Jaanus Sellin
12a085f5a0
chore: generate orval types (#6336) 2024-02-26 13:28:36 +02:00
Mateusz Kwasniewski
d1e93228a3
refactor: paginated data hook (#6333) 2024-02-26 11:24:41 +01:00
Nuno Góis
aa97cc4637
fix: better arrow design in network overview (#6331)
Improves the arrow design in the "Network overview" after aligning with
@nicolaesocaciu
2024-02-23 13:38:54 +00:00
andreas-unleash
bae195add9
feat: show the metrics summary chart (#6297)
Creates the impressions summary chart 
<img width="1358" alt="Screenshot 2024-02-21 at 13 25 05"
src="https://github.com/Unleash/unleash/assets/104830839/ddf15637-34de-4883-9ef7-517e37eab331">

Closes #
[1-2060](https://linear.app/unleash/issue/1-2060/impressions-summary-widget-frontend)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2024-02-23 15:17:58 +02:00
Tymoteusz Czech
153c60d335
Dashboard custom tooltips (#6327)
Initial refactoring for custom tooltips
2024-02-23 11:02:26 +00:00
Jaanus Sellin
822851814a
feat: application overview issues schema (#6329) 2024-02-23 13:01:49 +02:00
Nuno Góis
12ff4abe6a
chore: incoming webhook events UI (#6317)
https://linear.app/unleash/issue/2-1937/incoming-webhook-events-ui

This PR implements the UI for incoming webhook events.

We're also introducing a new `SidePanelList` component that we'll be
able to reuse when we tackle action set events. This PR also promotes
`ReactJSONEditor` to a common component and adapts it slightly for this
use case.


![image](https://github.com/Unleash/unleash/assets/14320932/b1abc2e0-3971-4882-b6f6-0ae48d1523d5)


![image](https://github.com/Unleash/unleash/assets/14320932/ce5c31e4-650a-4df5-a966-2ce06fd6baa8)

We're refreshing the events view every 5s, so if you're monitoring
events for a specific incoming webhook you can see the latest ones
coming in.
We load 20 (configurable through the hook) events by default. Everytime
you reach the end of the list you can load 20 more events until you
reach the end of the event list.


![image](https://github.com/Unleash/unleash/assets/14320932/94f187a1-8b0f-4138-8dbc-d3ebc9914bfd)
2024-02-23 11:01:27 +00:00
Nuno Góis
a54ef27adc
chore: remove mermaid in favor of react archer (#6320)
https://linear.app/unleash/issue/2-1968/use-react-archer-instead-of-mermaid-in-the-network-overview

This PR removes [mermaid](https://github.com/mermaid-js/mermaid) in
favor of [react-archer](https://github.com/pierpo/react-archer), which
meant adapting `NetworkOverview` to use `react-archer` instead, since
that was the only remaining feature using `mermaid`.

Opted not to use RPS labels in the lines since it was very noisy
visually. Took the liberty to make some visual changes, but we can align
afterwards with @nicolaesocaciu if needed.

### Example with 1 app


![image](https://github.com/Unleash/unleash/assets/14320932/83bf3d52-8bb7-49cc-8fef-1d8f758090b7)

### Example with 3 apps


![image](https://github.com/Unleash/unleash/assets/14320932/c01b820e-92e1-495a-a360-0f8ff5fafe50)

### Example with 30 apps


![image](https://github.com/Unleash/unleash/assets/14320932/49314ee0-ad30-4c67-873e-7b91ca39d009)

### Example in light theme


![image](https://github.com/Unleash/unleash/assets/14320932/1ce7055f-df8f-4b4e-b731-bf0f951bbb0c)
2024-02-23 08:31:14 +00:00
Nuno Góis
ad864049da
fix: only show visible environments for that project in actions (#6318)
https://linear.app/unleash/issue/2-1969/actions-form-only-show-environments-scoped-to-the-current-project

Filters the environment options in actions to only show environments
that are currently visible for that project, safeguarding users from
configuring actions for invalid environments.


![image](https://github.com/Unleash/unleash/assets/14320932/115cc9cd-99a2-4863-aec0-8264459ef18a)
2024-02-23 08:24:32 +00:00
Tymoteusz Czech
7682429839
Dashboard health stats widget (#6262) 2024-02-23 09:05:59 +01:00
Mateusz Kwasniewski
474e53460a
fix: show total applications (#6326) 2024-02-23 07:18:11 +01:00
Mateusz Kwasniewski
42f6843029
refactor: application overview dom improvements and tests (#6325) 2024-02-23 06:56:46 +01:00
Mateusz Kwasniewski
0de0313563
feat: connect application envs to backend (#6324) 2024-02-22 21:58:19 +01:00
Mateusz Kwasniewski
ef021a9464
feat: capped at limit strategy in application usage (#6323) 2024-02-22 20:35:39 +01:00
Mateusz Kwasniewski
24d6d24e24
fix: minimum pagination size (#6322) 2024-02-22 20:30:59 +01:00
Mateusz Kwasniewski
8b0218df6a
test: project applications table (#6321) 2024-02-22 19:03:54 +01:00
Mateusz Kwasniewski
ade7a88d65
test: applications list ui (#6319) 2024-02-22 19:03:11 +01:00
Mateusz Kwasniewski
3dda4a1f0e
feat: switching to paginated applications list (#6316) 2024-02-22 15:15:50 +01:00
Mateusz Kwasniewski
edbd71ac15
feat: paginated hook for applications list (#6315) 2024-02-22 14:37:08 +01:00
Jaanus Sellin
fb63f21d8a
feat: project applications paging backend (#6312) 2024-02-22 15:35:16 +02:00
Mateusz Kwasniewski
dc214d376a
chore: generate orval types (#6310) 2024-02-22 12:50:17 +01:00
Mateusz Kwasniewski
ff70a92956
feat: paginated applications view (#6308) 2024-02-22 11:28:36 +01:00
Mateusz Kwasniewski
c64a780a13
feat: warning mode app env styling (#6305) 2024-02-22 08:41:50 +01:00
Fredrik Strand Oseberg
0ccfc29e26
fix: generalize multi action button (#6294)
This PR moves the CR specific logic out of the MultiActionButton and
generalises so that we can re-use it across the application. The CR
specific logic is moved into:

* ApplyButton.tsx
* ReviewButton.tsx

This fixes a bug where multi action button would be disabled if you
tried to apply an approved change request that you had created yourself.
2024-02-21 14:37:35 +01:00
Mateusz Kwasniewski
ac183e76f8
feat: Application elements lines (#6301) 2024-02-21 14:34:57 +01:00
Mateusz Kwasniewski
56cbe1485e
feat: styled application environment boxes (#6296) 2024-02-21 12:15:54 +01:00
Jaanus Sellin
7baed29c07
feat: application overview schema (#6295) 2024-02-21 12:59:55 +02:00
andreas-unleash
60754b9fca
chore: generate new orval types (#6292)
what it says on the box

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-02-21 11:31:06 +02:00
Thomas Heartman
c7182d8faf
fix: adjust padding of problem detected icon (#6293)
This PR adjusts the vertical position of the problem detected icon in
the environment selector.

<img width="1137" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/ef961bba-6380-4849-a81a-0468fc467b5c">
2024-02-21 10:58:14 +02:00
Mateusz Kwasniewski
e5c07f00cb
feat: rate limit password reset attempts (#6257) 2024-02-21 08:49:54 +01:00
Jaanus Sellin
f3c01545f2
feat: application graph (#6279)
Basic graph, that works with mock data.
Next steps, work on backend and try to put more content and **styling to
nodes**.

![image](https://github.com/Unleash/unleash/assets/964450/545d6527-ecd8-4010-a0fe-8001bc8c1456)
2024-02-21 09:13:18 +02:00
Thomas Heartman
f46d420b10
feat: add warning icons to environments in selector (#6290)
This PR adds warning icons to the environment selector for environments
that have problems detected. However, because we don't have any way
detect problems yet, this PR only adds the icons and the infrastructure
to display them. They're always set to "not displayed" for now.

The icons have "problems detected" as accessible text.

It looks like this when you add them in (for every environment):

<img width="1137" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/c29bfa52-ddee-4b16-b3ac-5c1f8fcc326e">
2024-02-21 13:28:37 +08:00
Thomas Heartman
ddae97080d
feat: wrap buttons in a fieldset and add an explanatory legend. (#6289)
This makes it more obvious to everyone what the buttons do.
2024-02-21 12:15:02 +08:00
Christopher Kolstad
7350c91a1e
fix: display all roles if we can't get project roles 2024-02-20 16:23:25 +01:00
Christopher Kolstad
e9d9db17fe
feat: Adding Project access requires same role (#6270)
In order to prevent users from being able to assign roles/permissions
they don't have, this PR adds a check that the user performing the
action either is Admin, Project owner or has the same role they are
trying to grant/add.

This addAccess method is only used from Enterprise, so there will be a
separate PR there, updating how we return the roles list for a user, so
that our frontend can only present the roles a user is actually allowed
to grant.

This adds the validation to the backend to ensure that even if the
frontend thinks we're allowed to add any role to any user here, the
backend can be smart enough to stop it.

We should still update frontend as well, so that it doesn't look like we
can add roles we won't be allowed to.
2024-02-20 15:56:53 +01:00
Thomas Heartman
a468c55fc7
feat: add environment selection to connected instances screen (#6277)
This PR adds an environment selector to the connected instances table,
using query parameters to store the environment selection.

I'm still using the old data to populate this, so it'll show you all
data when nothing is selected and only filtered data when you select an
env. There is no way to unselect an env at the moment: I'm not sure
that's something we'll need to do, so we'll handle that when we know.

I imagine in the future, we might update the component to make separate
calls per environments and a call to determine which envs are available,
but for now, this will do just fine.

<img width="848" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/ef7562d5-c0ab-48c6-ba43-7c0007719ab4">
2024-02-20 12:14:44 +02:00
Thomas Heartman
d967d4adb0
feat: add tabs (#6267)
This PR adds a new file "Application.tsx", which is analogous to the
existing Project.tsx file in that it contains the base layout for the
application page, as well as tabs pointing to sub pages. Currently, the
overview tab uses a paragraph with some fallback text, while the
connected instances table displays the instances table.

I have mostly copied the existing ApplicationEdit component and used
that as a base, assuming that we'll delete that component when we're
done with this.

<img width="1449" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/ac574a83-3cf4-4de5-a4de-188575074ecb">
2024-02-20 17:32:33 +08:00
Nuno Góis
7e6a3c7e69
fix: clickable names in inc wh and action tables (#6275)
https://linear.app/unleash/issue/2-1954/make-names-clickable-in-actions-and-incoming-webhooks

Makes names clickable in the incoming webhook and action tables. When
clicked, they open the edit form for that resource.


![image](https://github.com/Unleash/unleash/assets/14320932/973f38c0-2603-4cbf-9352-90ddfe0b6e3f)


![image](https://github.com/Unleash/unleash/assets/14320932/ff733899-b86a-494a-8d2c-65d53e19a356)
2024-02-20 09:28:00 +00:00
andreas-unleash
f71badd255
feat: dashboard project filtering (#6259)
Adds the same project selector Autocomplete as we use in the playground.
Implements the filtering 

Closes: #
[1-2036](https://linear.app/unleash/issue/1-2036/api-project-filtering)

<img width="1508" alt="Screenshot 2024-02-16 at 15 57 24"
src="https://github.com/Unleash/unleash/assets/104830839/4490e43c-17db-41b6-ba75-e7b0f2df0522">

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-02-19 16:28:03 +02:00
Nuno Góis
9b980bb212
fix: small ui/ux adjustments to the actions form (#6269)
Small UI/UX adjustments to the actions form after aligning.


![image](https://github.com/Unleash/unleash/assets/14320932/5ededf9c-af54-4628-8fb3-0fcc6afc87dc)
2024-02-19 13:22:18 +00:00
Jaanus Sellin
03929e3031
feat: project applications UI (#6260)
![image](https://github.com/Unleash/unleash/assets/964450/a1129857-820c-4e93-ac59-ef5f4743d774)
2024-02-19 09:50:53 +02:00
Thomas Heartman
bd907244c4
chore: don't hide columns in connected instances table (#6264)
Don't hide anything yet, so remove related code. Plus other code we
don't need has been removed.
2024-02-19 14:37:13 +08:00
Thomas Heartman
0e9102fb22
feat: add connected instances table (#6263)
This PR adds a first iteration of the connected instances table on a new
connected instances tab of the application page (hidden behind a flag).

As a first version, it only uses data that we currently return for each
application (so no "connected through" or "last synchronized").

It also uses the existing version of the application data and just
filters it for the "production" environment right now.

Adding query parameters (and potentially a new URL?) to the applications
page (to save state and fetch data) will be done in a follow-up. This
should lay the groundwork for adding a new API too.

<img width="1485" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/4fb68456-d0f5-4f82-9246-5333a273df9c">
2024-02-19 14:12:12 +08:00
Gastón Fournier
7a48fb57a6
feat: permission matrix (PoC) (#6223)
## About the changes
This is a rough initial version as a PoC for a permission matrix. 

This is only available after enabling the flag `userAccessUIEnabled`
that is set to true by default in local development.

The access was added to the users' admin page but could be embedded in
different contexts (e.g. when assigning a role to a user):

![image](https://github.com/Unleash/unleash/assets/455064/3f541f46-99bb-409b-a0fe-13f5d3f9572a)


This is how the matrix looks like

![screencapture-localhost-3000-admin-users-3-access-2024-02-13-12_15_44](https://github.com/Unleash/unleash/assets/455064/183deeb6-a0dc-470f-924c-f435c6196407)

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2024-02-16 14:31:33 +01:00
Thomas Heartman
e5fe4a7766
chore: add sdkReporting flag to front end (#6253)
It's already in the back end, but wasn't declared in the front end
flags.
2024-02-16 15:43:27 +08:00
Thomas Heartman
a8fa1ae347
fix: hide warnings that you'll overwrite changes on CRs that are already applied (#6214)
The current approach uses adds an extra parameter to the components and
passes it through from the parent components. It's never a lot of
levels, so it feels alright, but it's feels like a bit of a code smell.
I wonder if it would make sense to use a context for each change
request? 🤔

Supersedes: https://github.com/Unleash/unleash/pull/6181
2024-02-16 12:41:14 +08:00
Thomas Heartman
64a6af2858
feat: show info on what would be deleted (#6235)
This PR updates the way we show deleted strategies in the CR UI. Instead
of showing just the strategy name and a diff on hover, we show the same
strategy config as we do for new and updated strategies.

This makes it easier to see what you have deleted.

In doing so, it also fixes two issues:
1. inconsistent border radius for segment changes listed. Due to an
override in `frontend/src/themes/theme.ts`, these would get a border
radius of `theme.shape.borderRadiusLarge` instead of
`theme.shape.borderRadiusMedium`. It does this by adding a class and
making the selector more specific.
2. The background was unset for the strategy rollout box and constraint
item boxes.

It looks like this:

<img width="728" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/7cba28ac-0454-444d-8cfa-f46543ccf2dc">

<img width="728" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/832be653-3def-4afc-b72f-36fcd76ad83d">

Or with more kinds of strategies:
<img width="454" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/f18e5482-7d2e-4cbd-8177-9de6dfb10307">


Note: I'm happy to isolate the color changes to a separate PR if that's
preferable.
2024-02-16 04:13:40 +00:00
Mateusz Kwasniewski
c2b1fd20e5
fix: long descriptions should have tooltips (#6202) 2024-02-15 14:17:55 +01:00
Jaanus Sellin
8dc27204d1
feat: add gen:api:clean for clean orval schemas (#6244)
Created a build script that generates orval schemas with automatic
cleanup. Also generating new ones.

1. yarn gen:api **(generates schemas)**
2. rm -rf src/openapi/apis **(remove apis)**
3.  sed -i '1q' src/openapi/index.ts **(remove all rows except first)**
2024-02-15 11:45:35 +02:00
Nuno Góis
7a699cf68c
fix: refine project actions form (#6242)
https://linear.app/unleash/issue/2-1934/refine-the-actions-form-uiux

First effort in refining the project actions form to look slightly more
like the design, including some refactors.


![image](https://github.com/Unleash/unleash/assets/14320932/ab6e11b4-b3b4-4c58-8bd1-9fcc9cb7014b)
2024-02-15 08:28:20 +00:00
Nuno Góis
6a9f80c554
fix: misc UI/UX fixes (#6241)
https://linear.app/unleash/issue/UNL-338/adjustments-incoming-webhooks-actions

Includes misc UI/UX fixes, including a typo, the vertical alignment of
the Enterprise badge in project settings and the way incoming webhooks
are displayed in non-Enterprise plans.
2024-02-15 08:17:11 +00:00
Thomas Heartman
011008a361
fix: add missing key to list of application projects (#6243)
This is in the applications table. To achieve it, we also wrap the text in a span.
2024-02-15 07:56:26 +00:00
Tymoteusz Czech
0d51bad67b
feat: dashboard lead time gauge (#6225) 2024-02-14 13:32:12 +01:00
Jaanus Sellin
624524819a
chore: update orval types (#6238) 2024-02-14 13:13:34 +02:00
Jaanus Sellin
3d77825493
feat: project applications server side paging and sorting and filtering (#6236)
Uses exactly same pattern as search-store. Nothing too crazy here.
Most code is in tests.
2024-02-14 13:03:44 +02:00
Thomas Heartman
2ab99624d2
feat: show env var conflicts in change requests (#6182)
This PR adds showing of env variant conflicts in change requests.

This is a simple solution that only compares the total state of
variants. We *could* potentially do a modified version where we show
each and every variant as its own property. Because variants have to be
unique by name and because their names can't be changed after their
creation, we could create a map of variant name to their data.

<img width="1105" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/0c67f958-6c4e-453a-9791-0e132fb1f23e">
2024-02-14 10:12:19 +09:00
Jaanus Sellin
e50574dbef
chore: generate orval types (#6224) 2024-02-13 15:22:08 +02:00
Jaanus Sellin
eb5d7a3788
feat: sdk reporting flag and e2e test (#6216)
1. Add flag
2. Add e2e test with more complete example
3. Some bug fixes
2024-02-13 14:13:21 +02:00
andreas-unleash
1ad5b5062a
feat: Make storing to local storage robust (#6139)
Handles non serializable objects like Map and Set and makes the
serialisation/deserialisation process more robust generally.

Closes #
[UNL-322](https://linear.app/unleash/issue/UNL-322/add-types-to-local-storage-and-force-simple-types)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-02-13 09:36:15 +02:00
Nuno Góis
9511e64027
refactor: project actions (#6203)
https://linear.app/unleash/issue/2-1938/refactor-project-actions

Refactors project actions to not include the project in the payload.

Includes other misc scouting.
2024-02-12 17:10:33 +00:00
Tymoteusz Czech
c224d7dc4c
Feat: chart 'no-data' placeholder (#6172) 2024-02-12 16:10:46 +01:00
Tymoteusz Czech
3e7c2bb30e
Dashboard chart fill (#6167) 2024-02-12 15:30:17 +01:00
Mateusz Kwasniewski
b48d25a226
feat: default stickiness explanation (#6201) 2024-02-12 13:16:51 +01:00
andreas-unleash
3e4f31b588
Chore: add zendesk btn to error dialog (#6187)
Adds the option for a 3rd button in the Dialogue component
Adds a button to open our zendesk support page

Closes #
[1-2024](https://linear.app/unleash/issue/1-2024/review-the-ui-error-dialog)
<img width="1677" alt="Screenshot 2024-02-09 at 11 18 20"
src="https://github.com/Unleash/unleash/assets/104830839/bf69c9c2-456f-4b83-b80e-d72f0d678331">

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-02-12 10:26:45 +02:00
Gastón Fournier
6d26c79fa7
chore: Move actions inside projects (#6191)
## About the changes
Action should be relative to a project (in general).
2024-02-12 09:26:05 +01:00
Gastón Fournier
924ea39ea2
feat: project actions UI form (#6115)
## About the changes
Add, delete, and update actions is already working. The UI still needs
some love, but it's functional

![image](https://github.com/Unleash/unleash/assets/455064/f990bc8c-902b-4e00-8a1a-3761c32780a3)

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2024-02-09 12:13:44 +00:00
Fredrik Strand Oseberg
260ef70309
Feat/UI error observability (#6169)
This PR adds an endpoint to Unleash that accepts an error message and
option error stack and logs it as an error. This allows us to leverage
errors in logs observability to catch UI errors consistently.

Considered a test, but this endpoint only accepts and logs input, so I'm
not sure how useful it would be.
2024-02-09 13:07:44 +01:00
Nuno Góis
4c1dfbefa7
chore: clean up customRootRolesKillSwitch (#6173)
https://linear.app/unleash/issue/2-1308/remove-customrootroleskillswitch-flag

Cleans up the `customRootRolesKillSwitch` flag.
2024-02-09 08:41:40 +00:00
Nuno Góis
13df715bfd
fix: prevent infinite rerenders in useIncomingWebhooks (#6176)
React can sometimes be non-intuitive and behave erratically due to the
way it detects changes in hook dependencies.

This prevents infinite re-renders from `useIncomingWebhooks` by using a
static `DEFAULT_DATA` constant, so that its reference is always the
same, so no changes are detected when there are none.

Unrelated scouting, but this PR also removes an unneeded dependency in
the memoized columns in `ProjectActionsTable`.
2024-02-09 08:17:15 +00:00
Thomas Heartman
b77f3129f2
feat: show segment conflicts in crs (#6138)
This PR updates the diff calculation to work with both strategy changes
and segment changes. It also adds the corresponding segment change
conflict overview to segment updates.

<img width="1225" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/688a57a5-5cd7-4b0a-bd1e-df63189594d8">
2024-02-09 16:25:01 +09:00
Mateusz Kwasniewski
7e66a79f9f
feat: add disabled state handling on slow network (#6165) 2024-02-08 10:27:51 +01:00
Nuno Góis
cc2ccb1134
fix: network tab active state (#6154)
https://linear.app/unleash/issue/UNL-335/network-active-tab-state

Fixes the tab active state in Network by using the new `TabLink`
component.


![image](https://github.com/Unleash/unleash/assets/14320932/d8d4cc1e-9554-4b20-9991-b66e49663ae5)
2024-02-07 15:03:44 +00:00
Mateusz Kwasniewski
11bfcd605a
fix: overflowing description (#6150) 2024-02-07 12:51:10 +01:00
Mateusz Kwasniewski
3d1e0a6312
chore: upgrade to msw 2.x with new response declaration (#6148) 2024-02-07 11:33:55 +01:00
Mateusz Kwasniewski
d060427603
chore: update msw (#6147) 2024-02-07 10:58:29 +01:00
Christopher Kolstad
ea38877b0c
feat: List and delete inactive users
Adds a new Inactive Users list component to admin/users for easier cleanup of users that are counted as inactive: No sign of activity (logins or api token usage) in the last 180 days.

---------

Co-authored-by: David Leek <david@getunleash.io>
2024-02-05 14:07:38 +01:00
Mateusz Kwasniewski
2d7464f517
feat: make edge explicit in UI (#6132) 2024-02-05 13:34:22 +01:00
Fredrik Strand Oseberg
6a70ba0cd0
fix: add new steps to demo guide (#6112)
This PR adds the necessary steps for the demo guidance to work properly
with the new form
2024-02-05 11:36:15 +01:00
Thomas Heartman
73c4c62ea3
chore: track metrics for how many CRs are moved into next state with conflicts (#6109)
Use React's context to track how many CRs are moved into their next
state with conflicts present.

This PR wraps environment change requests and change request overviews
in a change request plausible context that contains a
`willOverwriteStrategyChanges` property. This property is updated by the
diff calculation if there are any conflicts and then read by the
`changeState` function in the `useChangeRequestApi` hook.

As long as at least one of the strategies in the CR contain conflicts,
it will be marked as overwriting changes.
2024-02-05 18:27:11 +09:00
Jaanus Sellin
0cf8396ec2
feat: add posted feedback table (#6113)
The page can only be navigated if you know direct url `/feedback`


![image](https://github.com/Unleash/unleash/assets/964450/6018a6c0-9fee-4fb2-9b68-2d3e87674441)
2024-02-02 15:39:29 +02:00
Mateusz Kwasniewski
1834f9f8bc
fix: show all selected application names (#6110) 2024-02-02 11:35:00 +01:00
Mateusz Kwasniewski
28fc36a1de
fix: exclude columns with commas (#6102) 2024-02-01 14:10:57 +01:00
Mateusz Kwasniewski
4e3ab7186c
feat: time to production chart (#6100) 2024-02-01 12:22:27 +01:00
Thomas Heartman
99b8fa2943
refactor: take chatgpt's suggestions for diff calc algorithm (#6086)
We had to make some updates to let the compiler know about the types and
fix an issue with nested objects not being compared as objects (instead
as strings), but this saves us a few lines and is hopefully more
readable.
2024-02-01 19:57:09 +09:00
Fredrik Strand Oseberg
de0bebd7ad
fix: set correct lables for project charts (#6099) 2024-02-01 10:31:11 +01:00
Jaanus Sellin
bb02ffd8c4
feat: A/B test search feedback variants (#6085)
Search was not getting any feedback. We introduced 3 different variants
to compare conversion rate.


![image](https://github.com/Unleash/unleash/assets/964450/9c4fbcd6-c6d9-4570-9a08-9321087f609a)

![image](https://github.com/Unleash/unleash/assets/964450/6d643d48-1dcb-4a67-9951-7f0c6865f31d)

![image](https://github.com/Unleash/unleash/assets/964450/423dbd54-5dd1-409c-9cd5-295edb9453d9)
2024-01-31 14:32:23 +02:00
Fredrik Strand Oseberg
79e86e1aca
feat: project health widget (#6092)
Adds the project health widget to the edb:

<img width="1243" alt="Skjermbilde 2024-01-31 kl 12 16 23"
src="https://github.com/Unleash/unleash/assets/16081982/7df1e4dc-3245-4c30-bb9e-f21e90697392">
2024-01-31 13:19:28 +01:00
Jaanus Sellin
0f901bbe12
fix: fix skeleton not appearing on feature toggle list (#6093)
The `FeatureToggleListTable` is nested directly within `PageContent`.
`PageContent` was cause for removing the skeleton from the table.
However, this is unnecessary because the table has its own loader that
manages the skeletons. Therefore, `PageContent` does not require a
loader.
2024-01-31 13:26:39 +02:00
Thomas Heartman
5417662f5a
chore: add metrics for conflict creation detection (#6022)
This PR adds a 'change-request-conflict-created' event whenever someone
save a strategy update for a strategy that's used in either pending or
scheduled change requests.

Data for pending change requests will only be sent if change requests
are enabled. Data for scheduled change requests will be sent regardless.

Getting this data is somewhat involved, so I've extracted as much of the
logic into a separate file as possible.

The event re-uses the existing `change_request` metric and sends the
following data for each change request that we discover conflicts on:

```ts 
{
  state: ChangeRequestState,
  changeRequest: string, // <unleash identifier>#<change request id>
  action: 'edit-strategy',
  eventType: 'conflict-created'
}
```

There's only one action for this for now, but we could expand this event
to things such as strategy deletion, feature archival, in the future.
That said, I'd be happy to take it out.

## Discussion points

### Has the strategy actually been updated?

This does not check whether a strategy has actually changed before
emitting the event, only that you save your strategy changes.

This assumes that most people will simply close the modal by
clicking/tapping outside it or using the escape key instead of pressing
save.

However, it will likely lead to some false positives. If we think that
is an issue, I would suggest adding a check that something in the
strategy has actually changed in a follow-up PR.
2024-01-31 18:56:56 +09:00
Tymoteusz Czech
d77e5391ed
refactor: FlagsChart and FlagsProjectChart components (#6087)
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2024-01-31 09:50:50 +00:00
Tymoteusz Czech
e6ccd83739
refactor: LineChart component (#6072)
Initial version of a reusable trend chart, with a tooltip and vertical highlight
2024-01-31 10:07:29 +01:00
Jaanus Sellin
d7eb950f3a
chore: remove featureSearchAPI flag (#6081) 2024-01-31 10:01:31 +02:00
Fredrik Strand Oseberg
aae1d0576f
feat: add project flags component (#6070)
This PR adds project flags line chart component
2024-01-31 08:48:10 +01:00
Jaanus Sellin
c6a2303026
chore: remove featureSearchFrontend flag (#6066) 2024-01-31 09:22:26 +02:00
Tymoteusz Czech
c9ac4916e8
feat: executive dashboard responsive grid (#6069)
- unified "Widget" component
- column order dependent on screen width
2024-01-30 17:02:13 +01:00
Ivar Conradi Østhus
38df2e1831
fix: add instanceName to license display (#6065)
## About the changes
- Shows the instanceName from the license
- add new feature flag `enableLicenseChecker` used to enforce a valid
license.
2024-01-30 11:05:27 +01:00
Fredrik Strand Oseberg
7d6d4064a8
feat: connect dashboard static widgets to data (#6062)
This PR connects the static widgets to actual data
2024-01-30 10:07:16 +01:00
Jaanus Sellin
2643ac1356
feat: add CR id to plausible events (#6035)
Added conflict count to CR metrics and CR id.

Something to think about:
There was idea that we can aggregate this data based on CR id, but CR id
is just a number from 0 to x. So it will not be unique across instances.

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-01-30 10:38:39 +02:00
Tymoteusz Czech
46fb40ca08
fix: dashboard layout (#6063)
Align widgets properly on main screen. Responsive view in next PRs
2024-01-30 09:00:06 +01:00
Mateusz Kwasniewski
8a7e65eaa6
refactor: cleanup fix for persistent set (#6060) 2024-01-29 12:33:01 +01:00
Nuno Góis
c1046079dd
chore: actions modal form (#6057)
https://linear.app/unleash/issue/2-1882/ui-add-actions-modal-and-form

Adds actions modal and form, allowing users to create and edit actions.

The main thing that is missing is adding the remaining fields, which
will be included in a later PR.
2024-01-29 11:15:29 +00:00
Nuno Góis
7da9232516
refactor: add temporary ts-expect-error to setGlobalStore in setHiddenEnvironments 2024-01-29 10:26:00 +00:00
Mateusz Kwasniewski
ce219f1b74
fix: hidden envs (#6050) 2024-01-26 17:03:10 +01:00
Tymoteusz Czech
61c6583e24
Feat/dashboard chart tooltip (#6038)
Initial version of new chart tooltip
2024-01-26 14:33:11 +01:00
Fredrik Strand Oseberg
4a025a4b4b
feat: flag widget (#6047)
This PR adds the flag widget:

<img width="333" alt="Skjermbilde 2024-01-26 kl 14 16 19"
src="https://github.com/Unleash/unleash/assets/16081982/57b8c312-fcd5-4a3f-85f7-76514c671912">
2024-01-26 14:22:16 +01:00
Nuno Góis
6ee4d2724e
fix: actions table UI improvements (#6042)
Includes some small fixes and improvements to the actions table UI:
 - Fix webhook icon not properly loading
 - Make actions execution param names bold in the tooltip
 - Make filters param names bold in the tooltip
2024-01-26 09:52:19 +00:00
Nuno Góis
32484460ef
chore: project actions table (#6039)
https://linear.app/unleash/issue/2-1877/ui-add-actions-table

Implements the new project actions table.


![image](https://github.com/Unleash/unleash/assets/14320932/2ce96669-4b8f-46cd-9a87-8b14f0682694)


![image](https://github.com/Unleash/unleash/assets/14320932/d73327f2-1e1a-4d57-8ef8-1f4518c4b5d9)


![image](https://github.com/Unleash/unleash/assets/14320932/27b9ffab-4fff-4fdf-808f-b778987fa198)
2024-01-26 08:20:30 +00:00
Tymoteusz Czech
00b3cbaa8b
Dashboard API hook (#5990)
Data fetching for dashboard

https://linear.app/unleash/issue/1-1969/dashboard-users-chart-api-hook
2024-01-26 09:03:12 +01:00
Fredrik Strand Oseberg
9ac1c88bd4
feat: new user widget (#6037)
Preliminary code for executive dashboard user widget
2024-01-25 14:43:59 +01:00
Jaanus Sellin
b0ecfd4d34
feat: add plausible change-requests-conflicts (#6024) 2024-01-24 21:46:08 +02:00
Christopher Kolstad
17d826ddf4
task: Add banner encouraging edge upgrade (#6018)
Only triggers if there is any rows in client instances that have

    sdk_version: unleash-edge with version < 17.0.0

The function that checks this memoizes the check for 10 minutes to avoid
scanning the client instances table too often.
2024-01-24 14:22:48 +00:00
Jaanus Sellin
e4ca8a3e6c
feat: track search bar events (#6021)
Adding tracking for 2 views, when users use the new search. 

For features view and project view.
2024-01-24 14:23:23 +02:00
Nuno Góis
5d1d428746
chore: project actions tab (#6009)
https://linear.app/unleash/issue/2-1858/add-new-actions-tab-to-project-settings

Adds the new actions tab to project settings, hidden behind the
`automatedActions` feature flag.


![image](https://github.com/Unleash/unleash/assets/14320932/594ed7e0-6e1a-464e-b649-bee368e14aea)
2024-01-24 10:05:04 +00:00
Thomas Heartman
01318b11ea
fix: show the updated value instead of the snapshot value (#5989)
This PR fixes a bug in the displayed value of the conflict list so that
it shows the value it would update to instead of the snapshot value.

In doing so, it updates the logic of the algorithm to:

1. if the snapshot value and the current value are the same, it's not a
conflict (it's an intended change)
2. If the snapshot value differs from the current value, it is a
conflict if and only if the value in the change differs from the current
value. Otherwise, it's not a conflict.

The new test cases are:
- it shows a diff for a property if the snapshot and live version differ
for that property and the changed value is different from the live
version
- it does not show a diff for a property if the live version and the
change have the same value, even if the snapshot differs from the live
version
- it does not show a diff for a property if the snapshot and the live
version are the same
2024-01-24 12:39:41 +04:00
Nuno Góis
13a9b1bc13
fix: project settings title (#6011)
Small fix to the project settings title, correcting it and making it
consistent.
2024-01-24 08:38:13 +00:00
Nuno Góis
7413a1ee1a
chore: add support for project and environment in PermissionGuard (#6008)
I noticed some manual `hasAccess` usages in permission guards due to the
fact that `PermissionGuard` does not accept `project` and `environment`.
This PR adds this support to `PermissionGuard` so we can adapt these
`hasAccess` checks to use it instead, adding consistency and cleaning
things up.

This PR does not include these adaptations however, it only adds the
optional properties to the component. We can address these at a later
point.
2024-01-24 08:20:38 +00:00
Tymoteusz Czech
68eb3dec07
fix: upgrade unleash-client to v5.3.0 (#5800) 2024-01-24 09:12:07 +01:00
Mateusz Kwasniewski
156ba39b42
fix: strategy screen re-rendering table bug (#6006) 2024-01-23 15:49:13 +01:00
Mateusz Kwasniewski
48ef88b4fa
test: variant edit corner cases (#5998) 2024-01-23 10:38:31 +01:00
Mateusz Kwasniewski
3fd735ac7e
fix: move useEffect before renders (#5995) 2024-01-23 09:32:48 +01:00
Mateusz Kwasniewski
5305c868e5
fix: update stickiness between tabs (#5991)
Fixes a bug where stickiness update to the main strategy would not propagate to strategy variants
2024-01-23 08:58:06 +01:00
Nuno Góis
0847c2e52c
chore: add new action hooks (#5992)
https://linear.app/unleash/issue/2-1857/create-new-action-hooks-on-the-frontend

Adds action hooks to help us with CRUD operations on the frontend,
similar to https://github.com/Unleash/unleash/pull/5788 and
https://github.com/Unleash/unleash/pull/5790
2024-01-22 17:31:04 +00:00
Christopher Kolstad
8256c2eaf2
task: Use fine-grained project permissions in frontend (#5974)
Connected to [#5932](https://github.com/Unleash/unleash/pull/5932) -
This starts using the new permissions in addition to the old
UPDATE_PROJECT permission. That way, if you're happy with
UPDATE_PROJECT, you don't need to change.

However, you can now add more fine grained permissions for both READ and
WRITE operations.
2024-01-22 15:34:10 +01:00
Tymoteusz Czech
b7483e8989
chore: generate frontend openapi types (#5988)
Update for dashboard types
2024-01-22 14:16:07 +01:00
Thomas Heartman
fd91cd1771
fix: don't use kebab-case for properties (#5979)
These are apparently unsupported in css objects and using the camelCased (or PascalCased) versions was the suggested fix.
2024-01-22 12:26:25 +00:00
Fredrik Strand Oseberg
60d2176efa
feat: add option to use variants with feedback (#5986)
This PR will allow us to use a feature flag with variants to control
whether or not we should show the comments field of the feedback form.
This will allow us to see whether we can increase feedback collection if
we reduce the load on the customer.
2024-01-22 13:14:27 +01:00
Mateusz Kwasniewski
055bab8e7c
feat: include number of flags chart (#5987) 2024-01-22 12:15:49 +01:00
Mateusz Kwasniewski
c9b99f41cf
feat: number of flags component (#5984) 2024-01-22 11:47:15 +01:00
Thomas Heartman
312a40ce1c
refactor: prefer 'span' to 'div' in the badge element (#5981)
This changes the badge element to prefer spans instead of divs. The
primary difference between spans and divs is that spans are inline and
divs are block. Styling-wise, we override the display property anyway.
Semantically, most all of the badges are used inline instead of on
their own block level, so this change seems sensible. You can still
provide `div` as the `as` prop if you need to.
2024-01-22 14:44:26 +04:00
Tymoteusz Czech
ec1439e171
Feat: dashboard users chart frontend (#5980)
Users chart with tooltip and legend
2024-01-22 11:07:38 +01:00
Thomas Heartman
edf3cad092
fix: add keys to the features cell component (#5978)
This PR adds the `key` property to the features cell component where it
renders lists of flags. This fixes a few rendering errors we've been
getting in the console.
2024-01-22 07:57:38 +00:00
Thomas Heartman
f7c8180145
Chore: omit snapshot property from event payload (#5972)
This PR hides the "snapshot" data from the diff overview we show in the
UI in a change request.
2024-01-22 11:13:49 +04:00
Thomas Heartman
0bb709a718
feat: show changes that would be overwritten in change request overview UI (#5964)
This PR adds a first, rough iteration of what it could look like to show
changes that would be overwritten by applying a PR.

The changes are listed in a table (semantically; looks more like a list
visually) and show the property, the current live value and the version
that you have in your changes. The changes are hidden by default, but
can be shown by expanding a details element.

@nicolaesocaciu Suggested that we merge this version for now and iterate
on the design later.

Here's what it looks like closed:

![image](https://github.com/Unleash/unleash/assets/17786332/3a641642-0537-4e7a-aeca-b3d3df6b8e31)

Here's what it looks like with a typical change load:

![image](https://github.com/Unleash/unleash/assets/17786332/b7aa7265-d1c7-4b6b-a9a2-f58cb966f25c)


Here's what it looks like if you change more or less every property
changed:

![image](https://github.com/Unleash/unleash/assets/17786332/4d94ab69-86ed-4c3e-be6a-6890c654e37e)
2024-01-22 11:13:38 +04:00
Thomas Heartman
01a38becb3
fix: handle title diffing correctly in strategy change diffs (#5971)
A strategy title can be either an empty string or undefined on the
type we use in the frontend. In the snapshot it can be an empty
string, null (presumably), and undefined.

This change updates the diffing logic to handle the various title diff
cases correctly. It also updates the type used for the snapshot to
reflect this.
2024-01-19 18:56:46 +04:00
Nuno Góis
77fcc9e840
fix: incoming webhooks form UI adjustments (#5973)
Small UI improvements in the new incoming webhooks form after aligning
with @nicolaesocaciu.


![image](https://github.com/Unleash/unleash/assets/14320932/6f829863-ab94-4d35-a1d7-d8722e8ec159)
2024-01-19 14:50:54 +00:00
andreas-unleash
dda0fd3fd4
Fix: losing redirect on provider login (#5970)
Fixes the initial redirect to take into account the value from session
storage

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-01-19 14:31:42 +02:00
Mateusz Kwasniewski
84e341bbb7
feat: show select all button when more than 1 item (#5965) 2024-01-19 11:26:03 +01:00
andreas-unleash
a096b2a485
fix: store redirect to localStorage to avoid loss of redirect (#5929)
Stores `redirect` param in localStorage in the Authentication component.
Retrieves the `redirect` param from localStorage at the Login screen if
it is not there in the url.

This will solve losing the redirect information all provider logins

Closes #
[1-1890](https://linear.app/unleash/issue/1-1890/capture-path-before-logging-in-and-redirect-to-it-if-there-and-custom)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-01-19 11:32:26 +02:00
Fredrik Strand Oseberg
4ee2acb3aa
fix: add more comprehensive metrics for feedback (#5967)
Add more comprehensive tracking of feedback
2024-01-19 10:23:40 +01:00
Thomas Heartman
c69137a1ee
feat: add algorithm to detect what strategy changes would be overwritten by applying a CR (#5963)
This change adds an algorithm with tests for detecting what changes
would be overwritten by applying a CR.

Test cases:
- It compares strategies regardless of order of keys in the objects.
This ensures that two strategies with the same content but different
order of keys are compared correctly.
- It treats `undefined` or missing segments in old config as equal to
`[]` in change
- It treats `undefined` or missing strategy variants in old config and
change as equal to `[]`
- It lists changes in a sorted list with the correct values
- It ignores object order on nested objects. Similar to the first
point, this does order-insensitive comparison for nested objects (such
as params and constraints).
2024-01-19 13:08:08 +04:00
Mateusz Kwasniewski
b00909db3f
test: show array param decoder (#5955) 2024-01-19 09:27:47 +01:00
Mateusz Kwasniewski
22037cb0f2
fix: normalize hours back to prevent freezing UI (#5953) 2024-01-19 09:27:31 +01:00
Mateusz Kwasniewski
1fd7749ae7
fix: prevent jumping columns in search view (#5950) 2024-01-18 14:37:57 +01:00
Mateusz Kwasniewski
105747293e
fix: show pagination when enough items (#5948) 2024-01-18 14:36:05 +01:00
Nuno Góis
3dd188e77c
refactor: shared url_safe_basic constant (#5952)
Uses a new `URL_SAFE_BASIC` regex constant that checks for characters
that are commonly used in URL path sections: alphanumeric lowercase
characters, dashes and underscores.

This will allow us to re-use this constant in our server-side
validation.
2024-01-18 12:33:33 +00:00
Nuno Góis
5b56fac66f
Chore inc webhooks modal form (#5938)
https://linear.app/unleash/issue/2-1818/ui-create-incoming-webhook-newedit-modal

Adds the incoming webhooks modal form, which allows users to create and
edit incoming webhooks, along with their respective tokens.

Follows a logic similar to service accounts and their tokens, and tries
to use the newest form validation flow that we implemented in the roles
form.


![image](https://github.com/Unleash/unleash/assets/14320932/5d37a72e-2777-4c8b-b71b-3c0610959a52)
2024-01-18 11:38:05 +00:00
Tymoteusz Czech
4b02d6aa9c
Executive Dashboard page setup (#5949) 2024-01-18 12:32:25 +01:00
Mateusz Kwasniewski
d3215335c9
feat: metrics periods expressed in days (#5928) 2024-01-18 11:54:20 +01:00
Mateusz Kwasniewski
f5cf118b12
fix: precise selected all chips check (#5945) 2024-01-18 11:53:56 +01:00
Mateusz Kwasniewski
567099a15b
fix: table loader (#5937) 2024-01-18 11:26:42 +01:00
andreas-unleash
60813acb09
fix: make the conflcit email template button conditionally render (#5931)
Makes the schedule conflict email button conditional to having the link
present.

Closes #
[1-1950](https://linear.app/unleash/issue/1-1950/modify-the-template-to-make-the-new-button-conditional)

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-01-17 13:26:07 +00:00
Fredrik Strand Oseberg
1deee10317
Feat/disabled strategies (#5930)
This PR makes disabled strategies more prominent in the UI:

<img width="1031" alt="Skjermbilde 2024-01-17 kl 11 26 11"
src="https://github.com/Unleash/unleash/assets/16081982/4a07c0aa-8f86-4854-829e-1088abecfb4e">
2024-01-17 13:20:39 +01:00
Mateusz Kwasniewski
5fb2ac8054
fix: select default application based on timespan (#5927) 2024-01-17 12:15:03 +01:00
Christopher Kolstad
2b1111044f
feat: added killswitch for admin tokens (#5905)
Since we've now added PAT's we really do recommend switching to those,
or for enterprises, we recommend using service accounts.

Admin tokens have an obvious disadvantage in that they're not connected
to any user, so actions performed by them are harder to audit.

This PR adds a killswitch for turning it off, in preparation for
deprecating them and ultimately removing them in the future.
2024-01-17 10:27:36 +01:00
Mateusz Kwasniewski
6a55964ce8
fix: metrics apps should be selected from the longest time span (#5923) 2024-01-17 09:51:59 +01:00
renovate[bot]
f61750a755
chore(deps): update dependency debounce to v2 (#5901)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [debounce](https://togithub.com/sindresorhus/debounce) | [`1.2.1` ->
`2.0.0`](https://renovatebot.com/diffs/npm/debounce/1.2.1/2.0.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/debounce/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/debounce/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/debounce/1.2.1/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/debounce/1.2.1/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>sindresorhus/debounce (debounce)</summary>

###
[`v2.0.0`](https://togithub.com/sindresorhus/debounce/releases/tag/v2.0.0)

[Compare
Source](https://togithub.com/sindresorhus/debounce/compare/1.2.1...v2.0.0)

##### Breaking

- Require Node.js 18 and modern browsers
[`2872fb8`](https://togithub.com/sindresorhus/debounce/commit/2872fb8)
- Removed support for
[component](https://togithub.com/componentjs/component) (now defunct
project)

##### Improvements

- Add TypeScript types
[`2872fb8`](https://togithub.com/sindresorhus/debounce/commit/2872fb8)
- Protect against improper use in classes
[`95eef87`](https://togithub.com/sindresorhus/debounce/commit/95eef87)

##### Fixes

- Fix recursive callback args
([#&#8203;32](https://togithub.com/sindresorhus/debounce/issues/32))
[`c997759`](https://togithub.com/sindresorhus/debounce/commit/c997759)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 7pm every weekday,before 5am
every weekday" in timezone Europe/Madrid, Automerge - At any time (no
schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjcuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: sjaanus <sellinjaanus@gmail.com>
2024-01-17 10:29:17 +02:00
Fredrik Strand Oseberg
9d32bf53eb
fix: refactor autosave to use the id to resolve the constraint (#5917)
Use id to resolve autosave constraints now that we have consistent id
references
2024-01-17 08:51:54 +01:00
Nuno Góis
d2366a8aa1
fix: improve SSO default role resolution (#5916)
This improves the role resolution in the value of the default root role,
preventing a bug where settings saved
pre-https://github.com/Unleash/unleash/pull/5887 would show an empty
default root role in the dropdown.

Also makes the role update more robust.
2024-01-16 16:08:46 +00:00
Mateusz Kwasniewski
3bebc11fb2
feat: adjust height on applications list in metrics (#5918) 2024-01-16 16:21:55 +01:00
Fredrik Strand Oseberg
967ee13e62
fix: add symbols as constraint ids (#5913)
This PR adds uuids as ids using a symbol in order to make sure we only
use this to keep internal order in the viritual DOM. This makes us able
to have predictable mutable lists on the frontend, and makes it easy to
not pass this property along to the backend.
2024-01-16 13:47:04 +01:00
Mateusz Kwasniewski
dfeaea8ee9
feat: hours back feature metrics tracking (#5904) 2024-01-16 10:30:06 +01:00
Nuno Góis
3b5b1ec020
chore: add tokens column to incoming webhooks table (#5903)
https://linear.app/unleash/issue/2-1827/add-remaining-columns-to-the-incoming-webhooks-table

Adds the "tokens" column to the incoming webhooks table.

Also includes some slight adjustments to the table, including a fix to
center the actions button.


![image](https://github.com/Unleash/unleash/assets/14320932/2ca63b17-c20e-41d0-9065-db8bcad33c24)
2024-01-16 08:43:14 +00:00
Fredrik Strand Oseberg
9d370ad85d
Fix/autosave on delete (#5899)
This PR will make FeatureStrategyConstraints use the value coming from
the setState function instead of closing over a stale value.
2024-01-16 09:23:35 +01:00
Mateusz Kwasniewski
6cfb7b4fb8
feat: feature metrics table timezone (#5880) 2024-01-15 15:31:10 +01:00
Mateusz Kwasniewski
9ac8a466ab
feat: select all applications (#5897) 2024-01-15 15:30:35 +01:00
Nuno Góis
0ba37e8622
feat: list all root roles in SSO config (#5887)
Lists all root roles in SSO config, including custom root roles.


![image](https://github.com/Unleash/unleash/assets/14320932/30114169-4184-4a22-9671-c7041b750d1c)
2024-01-15 13:13:29 +00:00
Nuno Góis
22acadf4cc
fix: role form sluggishness (#5888)
This seems to improve the performance in the role form while still
maintaining the same validation logic.

A big factor was the memoization of the categories calculation and
respective elements, which is especially impactful when there are many
environments.
2024-01-15 08:37:53 +00:00
Fredrik Strand Oseberg
ebd673e9fc
fix: use the new method (#5894)
This PR adds the new setValuesWithRecord method to the deletion of
values. In addition, we'll auto save when using the undo button aswell.
2024-01-15 09:28:19 +01:00
Fredrik Strand Oseberg
f7b285d340
feat: add undo (#5879)
This PR adds undo functionality so you can restore the state of your
constraint if you make a mistake. We also amend the autosave
functionality to only apply when values are changed and you have a valid
value. See demo:

https://www.loom.com/share/da704da8aee94ac18d4caae697426802
2024-01-15 08:47:59 +01:00
Thomas Heartman
a4c1161285
chore: fix lints on main (#5877)
These were introduced by prs created before the new biome update.
2024-01-12 11:38:08 +00:00
Thomas Heartman
8ae267ea25
feat: show suspended schedules in timeline (#5873)
This PR updates the timeline to show suspended schedules. It also adds
"schedule failed" when the schedule has failed.

<img width="465" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/aabbee02-b407-4653-959b-92bec8a1fa66">

<img width="465" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/7242c34a-1b1e-4efc-a778-a360e3bc4428">
2024-01-12 16:50:08 +05:30
Mateusz Kwasniewski
c816ffd49d
feat: aggregate metrics for the same timestamp (#5876) 2024-01-12 12:19:30 +01:00
Thomas Heartman
a88763283a
feat: show suspended schedule states in review status (#5872)
Updates the change request review status box to handle suspended
schedules.

<img width="852" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/2af52b6d-d821-4d30-9166-e8e76ead120d">
2024-01-12 16:48:58 +05:30
Thomas Heartman
aecc0b54a1
feat: show suspended states in change request badge (#5871)
This updates the CR badge to show suspended states correctly.

<img width="370" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/f678059b-f72a-46ef-9111-0fc90f228fc8">
2024-01-12 16:48:34 +05:30
Christopher Kolstad
5a3bb1ffc3
Biome1.5.1 (#5867)
Lots of work here, mostly because I didn't want to turn off the
`noImplicitAnyLet` lint. This PR tries its best to type all the untyped
lets biome complained about (Don't ask me how many hours that took or
how many lints that was >200...), which in the future will force test
authors to actually type their global variables setup in `beforeAll`.

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2024-01-12 09:25:59 +00:00
Mateusz Kwasniewski
e27a578fab
feat: separate UI flag and backend flag for extended metrics (#5875) 2024-01-12 10:20:03 +01:00
Thomas Heartman
39145e2617
refactor: use union types for change request types (#5870)
This changes the two interfaces IChangeRequest and
IChangeRequestSchedule to be union types instead of interfaces. It also
extracts the constituents of those union types into proper types
themselves (so that they can be used in function type signatures etc).
It also updates the type names.

This turned out to be more work than I had imagined, but I think the end
result pays off, giving us more type safety and control.

I wanted to use just `ChangeRequest` for the IChangeRequest type, but
that caused issues due to naming collisions with the `ChangeRequest`
component that we have, causing tests to fail. I've named it
`ChangeRequestType` as a potential solution, but suggestions are
welcome.

The relevant changes are in
`frontend/src/component/changeRequest/changeRequest.types.ts`.
Everything else is updated references and some necessary refactoring to
respect the new types.
2024-01-12 13:15:43 +05:30
Mateusz Kwasniewski
6ba4591c7f
feat: select multiple apps (#5860) 2024-01-12 08:33:52 +01:00
Thomas Heartman
be579ba63b
chore: update orval schemas (#5858)
This PR updates Orval schemas. The motivation is to get the new schemas
for schedule suspension, but as always, we get everything else too.
2024-01-11 18:18:44 +05:30
Nuno Góis
b496990f79
chore: add no unused imports biome rule (#5855)
Adds a Biome rule for "no unused imports", which is something we
sometimes have trouble catching.

We're adding this as a warning for now. It is safely and easily fixable
with `yarn lint:fix`.


![image](https://github.com/Unleash/unleash/assets/14320932/fd84dea8-6b20-4ba5-bfd8-047b9dcf2bff)

![image](https://github.com/Unleash/unleash/assets/14320932/990bb0b0-760a-4c5e-8136-d957e902bf0b)
2024-01-11 12:44:05 +00:00
Nuno Góis
7af91c7e9d
chore: incoming webhooks table (#5837)
https://linear.app/unleash/issue/2-1817/ui-create-an-incoming-webhooks-configuration-page

This adds an incoming webhooks page with the respective table. We plan
on possibly extending the table with a couple more columns in a future
PR.

This allows us:
 - View all configured incoming webhooks;
 - Copy their URL to the clipboard;
 - Remove them;

For "new" and "edit" operations we still need the incoming webhooks
form/dialog, coming in a future PR.

**Note**: Even though we are showing the full URL in the table for now,
we may end up truncating its start in the future (e.g.
`.../api/incoming-webhook/<webhook-name>` - This decision depends on how
it will look like after the rest of the columns are added.


![image](https://github.com/Unleash/unleash/assets/14320932/1cac3286-818f-4967-8686-43f78aa6bd33)
2024-01-11 12:05:14 +00:00
Fredrik Strand Oseberg
2a723ea9e8
fix: remove empty variants when changing tabs (#5850)
This PR makes a change to how variants work in the new setup. Variants
will now:

* Be removed if you change tab or unmount the component and it has no
name
* Moved StrategyVariants into a separate component to isolate this
change
* Add error handling around onSubmit and only trigger feedback if it's
successful
2024-01-11 10:43:29 +01:00