1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
Commit Graph

2750 Commits

Author SHA1 Message Date
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