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

3179 Commits

Author SHA1 Message Date
Mateusz Kwasniewski
175b103b12
fix: remove playground results flip (#4076) 2023-06-23 09:28:49 +02:00
Nuno Góis
4163788bba
fix: update roles permission guard (#4070)
https://linear.app/unleash/issue/2-1162/read-roles-permissions-should-give-you-access-to-read-roles

This updates the roles page permission guard to be the `READ_ROLES`
permission instead of `ADMIN`, which better reflects on the UI the real
permissions of the user.

Our current `AdminAlert` component is pretty limited however, and I plan
to improve it in
https://linear.app/unleash/issue/2-1165/improve-adminalert-usage-to-be-more-generic-accept-non-admin
to better reflect the permission we're missing (instead of alerting that
you need to be an admin).
2023-06-22 14:43:26 +00:00
Nuno Góis
40a4451818
fix: add admin guard to groups (#4069)
Adds an admin guard to groups: It is an admin feature and should be
guarded on the UI the same way other admin features are.
2023-06-22 15:37:02 +01:00
Thomas Heartman
e824d83f93
feat: link to strategy edit screens from playground strategy results (#4063)
This PR adds links from the strategy evaluation results directly to the
strategy edit screen.

If the code doesn't find any links, nothing changes.

The link text will be the name of the strategy and the title (if it
exists).


![image](https://github.com/Unleash/unleash/assets/17786332/10ddbee2-2b19-46b8-a8be-994233f759ea)
2023-06-22 11:51:38 +00:00
Mateusz Kwasniewski
f0fe2368e1
feat: execution plan diff table (#4065) 2023-06-22 13:46:29 +02:00
renovate[bot]
44771a5f67
chore(deps): update dependency @types/react to v17.0.62 (#4038)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/react](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) |
[`17.0.60` ->
`17.0.62`](https://renovatebot.com/diffs/npm/@types%2freact/17.0.60/17.0.62)
|
[![age](https://badges.renovateapi.com/packages/npm/@types%2freact/17.0.62/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@types%2freact/17.0.62/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@types%2freact/17.0.62/compatibility-slim/17.0.60)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@types%2freact/17.0.62/confidence-slim/17.0.60)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

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

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates 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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-22 11:44:56 +00:00
andreas-unleash
fc35f227dc
fix: autocomplete bug when changing context field (#4064)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Fixes a bug with the Autocomplete tags not clearing when moving from on
context field with values to another
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-22 14:19:41 +03:00
Thomas Heartman
8cd89bb5a7
chore: update orval models (#4062)
Updates orval model based on the current enterprise changes.

Mostly doc/comment changes, but does introduce the new
strategySchemaLinks model.
2023-06-22 09:52:21 +00:00
Jaanus Sellin
e769cdd2ac
feat: plausible for new strategy flow (#4057) 2023-06-22 12:04:36 +03:00
andreas-unleash
559caee642
fix: multi env select should always have an environment selected (#4061)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-22 11:55:15 +03:00
Mateusz Kwasniewski
374d49f5bf
feat: ui tweaks for playground (#4058) 2023-06-22 10:13:17 +02:00
andreas-unleash
566b91e298
feat: advanced playground multi value context fields (#4053)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Makes the autocomplete component in the playground context field - when
selecting a custom context field that has legal values - able to
select/edit multiple values.

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #
[1-1006](https://linear.app/unleash/issue/1-1006/multi-value-context-field)

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-22 11:06:25 +03:00
Nuno Góis
7e9069e390
refactor: token permissions, drop admin-like permissions (#4050)
https://linear.app/unleash/issue/2-1155/refactor-permissions

- Our `rbac-middleware` now supports multiple OR permissions;
- Drops non-specific permissions (e.g. CRUD API token permissions
without specifying the token type);
- Makes our permission descriptions consistent;
- Drops our higher-level permissions that basically mean ADMIN (e.g.
ADMIN token permissions) in favor of `ADMIN` permission in order to
avoid privilege escalations;

This PR may help with
https://linear.app/unleash/issue/2-1144/discover-potential-privilege-escalations
as it may prevent privilege escalations altogether.

There's some UI permission logic around this, but in the future
https://linear.app/unleash/issue/2-1156/adapt-api-tokens-creation-ui-to-new-permissions
could take it a bit further by adapting the creation of tokens as well.

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2023-06-22 08:35:54 +01:00
renovate[bot]
7c5971a2b4
chore(deps): update dependency @uiw/codemirror-theme-duotone to v4.21.3 (#4046)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@uiw/codemirror-theme-duotone](https://uiwjs.github.io/react-codemirror/#/theme/data/duotone/light)
([source](https://togithub.com/uiwjs/react-codemirror)) | [`4.21.1` ->
`4.21.3`](https://renovatebot.com/diffs/npm/@uiw%2fcodemirror-theme-duotone/4.21.1/4.21.3)
|
[![age](https://badges.renovateapi.com/packages/npm/@uiw%2fcodemirror-theme-duotone/4.21.3/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@uiw%2fcodemirror-theme-duotone/4.21.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@uiw%2fcodemirror-theme-duotone/4.21.3/compatibility-slim/4.21.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@uiw%2fcodemirror-theme-duotone/4.21.3/confidence-slim/4.21.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>uiwjs/react-codemirror</summary>

###
[`v4.21.3`](https://togithub.com/uiwjs/react-codemirror/releases/tag/v4.21.3)

[Compare
Source](https://togithub.com/uiwjs/react-codemirror/compare/v4.21.2...v4.21.3)


[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@&#8203;uiw/react-codemirror@4.21.3/file/README.md)

Documentation v4.21.3:
https://raw.githack.com/uiwjs/react-codemirror/04175a5/index.html\
Comparing Changes:
https://github.com/uiwjs/react-codemirror/compare/v4.21.2...v4.21.3

```shell
npm i @&#8203;uiw/react-codemirror@4.21.3
```

- 💄 chore: update workflows config.
[`a1d6627`](https://togithub.com/uiwjs/react-codemirror/commit/a1d6627)
[@&#8203;jaywcjlove](https://togithub.com/jaywcjlove)
- 💄 chore(deps): update dependency lerna to v7
[#&#8203;48](https://togithub.com/uiwjs/react-codemirror/issues/48)
[`38e78b8`](https://togithub.com/uiwjs/react-codemirror/commit/38e78b8)
[@&#8203;jaywcjlove](https://togithub.com/jaywcjlove)
- 💄 chore: update lerna config.
[`043a23c`](https://togithub.com/uiwjs/react-codemirror/commit/043a23c)
[@&#8203;jaywcjlove](https://togithub.com/jaywcjlove)
- 🎨 style: fix scroller height style.
([#&#8203;519](https://togithub.com/uiwjs/react-codemirror/issues/519))
[`fa8b6f9`](https://togithub.com/uiwjs/react-codemirror/commit/fa8b6f9)
[@&#8203;jaywcjlove](https://togithub.com/jaywcjlove)

###
[`v4.21.2`](https://togithub.com/uiwjs/react-codemirror/releases/tag/v4.21.2)

[Compare
Source](https://togithub.com/uiwjs/react-codemirror/compare/v4.21.1...v4.21.2)


[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@&#8203;uiw/react-codemirror@4.21.2/file/README.md)

Documentation v4.21.2:
https://raw.githack.com/uiwjs/react-codemirror/a04cba4/index.html\
Comparing Changes:
https://github.com/uiwjs/react-codemirror/compare/v4.21.1...v4.21.2

```shell
npm i @&#8203;uiw/react-codemirror@4.21.2
```

- 🌍 website: update CodeMirror height style.
[`ec18778`](https://togithub.com/uiwjs/react-codemirror/commit/ec18778)
[@&#8203;jaywcjlove](https://togithub.com/jaywcjlove)
- 🐞 fix: fix view update bug.
([#&#8203;520](https://togithub.com/uiwjs/react-codemirror/issues/520))
[`a48c6b6`](https://togithub.com/uiwjs/react-codemirror/commit/a48c6b6)
[@&#8203;jaywcjlove](https://togithub.com/jaywcjlove)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-22 04:30:54 +00:00
Nuno Góis
5c9bf7b0e9
refactor: misc cleanups (#4022)
Misc cleanups of unused imports / variables.
2023-06-21 15:08:52 +01:00
andreas-unleash
57066cf129
Feat/multi env select (#4028)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-21 17:08:27 +03:00
Mateusz Kwasniewski
91f1072519
feat: initial scroll trigger (#4036) 2023-06-21 15:37:04 +02:00
Tymoteusz Czech
02ca60511f
Splitted strategy button (#4025)
## About the changes

![image](https://github.com/Unleash/unleash/assets/2625371/afaaaedf-4539-4a0b-a0fb-916d858ac6d3)


https://linear.app/unleash/issue/1-1038/strategy-creation-split-into-two-buttons
2023-06-21 15:26:07 +02:00
Jaanus Sellin
71d242a299
chore: remove variant metrics flag (#4042) 2023-06-21 15:55:21 +03:00
Jaanus Sellin
3763e1b24d
fix: default segments should only be selected when using default stra… (#4040) 2023-06-21 15:38:47 +03:00
renovate[bot]
624172d331
chore(deps): update dependency @emotion/react to v11.11.1 (#4014)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@emotion/react](https://togithub.com/emotion-js/emotion/tree/main#readme)
([source](https://togithub.com/emotion-js/emotion)) | [`11.11.0` ->
`11.11.1`](https://renovatebot.com/diffs/npm/@emotion%2freact/11.11.0/11.11.1)
|
[![age](https://badges.renovateapi.com/packages/npm/@emotion%2freact/11.11.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@emotion%2freact/11.11.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@emotion%2freact/11.11.1/compatibility-slim/11.11.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@emotion%2freact/11.11.1/confidence-slim/11.11.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>emotion-js/emotion</summary>

###
[`v11.11.1`](https://togithub.com/emotion-js/emotion/releases/tag/%40emotion/react%4011.11.1)

[Compare
Source](https://togithub.com/emotion-js/emotion/compare/@emotion/react@11.11.0...@emotion/react@11.11.1)

##### Patch Changes

- [#&#8203;3048](https://togithub.com/emotion-js/emotion/pull/3048)
[`9357f337`](9357f33720)
Thanks [@&#8203;naari3](https://togithub.com/naari3)! - Added
`ElementType` to the Emotion's `JSX` namespace. It's defined in the same
way as the one in `@types/react` and should make it possible to use
components that return `string`s, `Promise`s and other types that are
valid in React.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-21 11:39:25 +00:00
Mateusz Kwasniewski
50d4de86dd
fix: infinite playground rendering (#4031) 2023-06-21 11:52:53 +02:00
Nuno Góis
a9e9ae8c3e
feat: use new role components in project access (#4018)
https://linear.app/unleash/issue/2-1143/adapt-project-roles-to-use-the-new-role-selector-and-role-description

This PR further unifies roles, by having a single `IRole` interface to
cover both types, and re-using the same components for project roles.
2023-06-21 08:16:37 +01:00
Mateusz Kwasniewski
a5ee50cfc9
test: advanced playground error (#4023) 2023-06-21 08:17:53 +02:00
Mateusz Kwasniewski
a0862cfc10
feat: Query complexity validation (#4017) 2023-06-20 14:28:02 +02:00
Mateusz Kwasniewski
2e4f55707d
feat: store playground settings in local storage (#4012) 2023-06-20 11:34:27 +02:00
renovate[bot]
9aa175ce60
chore(deps): update dependency eslint to v8.42.0 (#3976)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [eslint](https://eslint.org)
([source](https://togithub.com/eslint/eslint)) | [`8.41.0` ->
`8.42.0`](https://renovatebot.com/diffs/npm/eslint/8.41.0/8.42.0) |
[![age](https://badges.renovateapi.com/packages/npm/eslint/8.42.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/eslint/8.42.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/eslint/8.42.0/compatibility-slim/8.41.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/eslint/8.42.0/confidence-slim/8.41.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>eslint/eslint</summary>

### [`v8.42.0`](https://togithub.com/eslint/eslint/releases/tag/v8.42.0)

[Compare
Source](https://togithub.com/eslint/eslint/compare/v8.41.0...v8.42.0)

#### Features

-
[`b8448ff`](b8448ff1ae)
feat: correct no-useless-return behaviour in try statements
([#&#8203;16996](https://togithub.com/eslint/eslint/issues/16996))
(Nitin Kumar)

#### Bug Fixes

-
[`a589636`](a5896360c3)
fix: Config with `ignores` and without `files` should not always apply
([#&#8203;17181](https://togithub.com/eslint/eslint/issues/17181))
(Milos Djermanovic)
-
[`c4fad17`](c4fad173c7)
fix: Correct ignore message for "node_modules" subfolders
([#&#8203;17217](https://togithub.com/eslint/eslint/issues/17217))
(Francesco Trotta)

#### Documentation

-
[`01d7142`](01d7142642)
docs: Update README (GitHub Actions Bot)
-
[`e5182b7`](e5182b723f)
docs: Update README (GitHub Actions Bot)

#### Chores

-
[`6ca5b7c`](6ca5b7ca3b)
chore: upgrade
[@&#8203;eslint/js](https://togithub.com/eslint/js)[@&#8203;8](https://togithub.com/8).42.0
([#&#8203;17236](https://togithub.com/eslint/eslint/issues/17236))
(Milos Djermanovic)
-
[`67fc5e7`](67fc5e730e)
chore: package.json update for
[@&#8203;eslint/js](https://togithub.com/eslint/js) release (ESLint
Jenkins)
-
[`0892412`](0892412556)
refactor: remove `Identifier` listener in no-irregular-whitespace
([#&#8203;17235](https://togithub.com/eslint/eslint/issues/17235))
(Milos Djermanovic)
-
[`f67d298`](f67d2984c3)
test: Add `FlatESLint` tests with missing config files
([#&#8203;17164](https://togithub.com/eslint/eslint/issues/17164))
(Milos Djermanovic)
-
[`5b68d51`](5b68d51e3e)
chore: Fix `fixedsize` attribute in code path analysis DOT debug output
([#&#8203;17202](https://togithub.com/eslint/eslint/issues/17202))
(Milos Djermanovic)
-
[`37432f2`](37432f27dc)
chore: update descriptions in key-spacing tests
([#&#8203;17195](https://togithub.com/eslint/eslint/issues/17195))
(Milos Djermanovic)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTUuMiIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-19 18:31:04 +00:00
andreas-unleash
7534ada672
Fix multiple env select (#4011)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Fixes a bug with the multiple env select breaking playground
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-19 17:25:10 +03:00
Mateusz Kwasniewski
11e6236c0f
feat: environment diff (#4007) 2023-06-19 14:32:39 +02:00
Mateusz Kwasniewski
15dc98b497
fix: playground link (#4008) 2023-06-19 14:02:30 +02:00
Nuno Góis
3a27f2a4bd
feat: implement better roles sub-tabs (#4009)
https://linear.app/unleash/issue/2-1145/improve-roles-sub-tabs

Improves UI/UX of the roles sub-tabs.

Some of the logic is a bit specific due to the feature flag, will be
nice to clean this up once we remove it.

Before:

![image](https://github.com/Unleash/unleash/assets/14320932/cc277920-557c-45a9-a560-6026167dab1d)

After:

![image](https://github.com/Unleash/unleash/assets/14320932/51d1b5b3-068a-4bf5-84ca-24fdf708f899)
2023-06-19 12:52:56 +01:00
Ivar Conradi Østhus
02600880d1
fix: specific actions for enterprise trial messages (#4001)
Co-authored-by: Nuno Góis <github@nunogois.com>
2023-06-19 13:48:26 +02:00
andreas-unleash
b97c6bdc7b
chore: Add advanced playground table test (#4005)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Adds a frontend test for AdvancedPlaygroundResultsTable
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-19 13:54:26 +03:00
Jaanus Sellin
54654c6368
feat: change CR strategy title and name behaviour (#4004) 2023-06-19 13:33:12 +03:00
Mateusz Kwasniewski
16a3f6069c
feat: Playground environment diff table (#4002) 2023-06-19 11:44:32 +02:00
Nuno Góis
eb8f16da8d
feat: roles unification (#3999)
https://linear.app/unleash/issue/2-1137/roles-unification-on-the-ui

Root and project roles should be managed in a similar manner, which
means using the same roles route and tab for both.

Additionally, this includes a big revamp to the project roles to align
them more closely with the modern and standardized custom root roles
that were recently developed. They mostly use the same components.

There are still more things we want to improve and unify, but we've left
some of that out of this PR due to PR size concerns.
2023-06-19 09:41:40 +01:00
Jaanus Sellin
60f4ce31f7
fix: usage of default strategy (#3995) 2023-06-19 11:31:08 +03:00
Jaanus Sellin
f7b0f0e410
fix: demo to use new query param (#4000) 2023-06-19 11:17:40 +03:00
Mateusz Kwasniewski
4035327d56
test: playground env table display (#3989) 2023-06-16 13:49:17 +02:00
Mateusz Kwasniewski
ce6ff2578a
fix: can review CR with skip change request (#3998) 2023-06-16 13:36:23 +02:00
Ivar Conradi Østhus
dcac61e4d9
fix: add trial expired warning for enterprise (#3997)
Adds the trial expired warning for enterprise as well.
2023-06-16 13:35:24 +02:00
Nuno Góis
58607f7f48
refactor: address custom root roles PR comments (#3994)
https://linear.app/unleash/issue/2-1135/address-3975-pr-comments-by-refactoring-some-of-the-new-custom-root

This pull request addresses the majority of the comments raised in issue
#3975 and lays the groundwork for unifying roles. The idea is for
project roles to also be managed in the "Roles" tab, and several
components, such as `RoleForm` and the `useRoleForm` can potentially be
reused.

I'll leave the further investigation and implementation of unifying
roles to be addressed in a separate task.

As a mostly unrelated UI fix, this also adds an arrow to the tooltip in
the `RoleBadge` component.
2023-06-15 14:03:47 +01:00
Mateusz Kwasniewski
c7ff3b472e
feat: Virtualized table with parent ref (#3993) 2023-06-15 14:11:04 +02:00
Tymoteusz Czech
221e3218df
fix: column initial state for project features (#3983) 2023-06-15 14:39:58 +03:00
Tymoteusz Czech
06f9e71f39
fix: show environment reorder handle (#3990)
## About the changes
Handle icon for reordering environments was not showing up.

**Before:**

![image](https://github.com/Unleash/unleash/assets/2625371/977cdda4-6cf2-4acf-affc-f812907bb543)

**After**

![image](https://github.com/Unleash/unleash/assets/2625371/ce495682-5366-4d31-8f5d-1601949d5089)
2023-06-15 13:39:22 +02:00
Jaanus Sellin
6e374be790
feat: strategy tooltip grouping and default (#3986) 2023-06-15 14:29:37 +03:00
Tymoteusz Czech
e0ed2fb830
fix: table imports (#3982)
## About the changes
Quick fix for build warnings on frontend - prevent circular
dependencies.
2023-06-15 13:02:14 +02:00
andreas-unleash
650f6cc857
feat: Advanced playground table (#3978)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Implements the Advanced Playground Table

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #
[1-1007](https://linear.app/unleash/issue/1-1007/env-aware-results-table)

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


![Screenshot 2023-06-14 at 15 04
08](https://github.com/Unleash/unleash/assets/104830839/2f76d6f5-f92b-4586-bb4b-265f26eeb836)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-15 09:29:31 +00:00
Mateusz Kwasniewski
9853aa0217
feat:playground environment table (#3985) 2023-06-15 09:56:13 +02:00
Nuno Góis
bb026c0ba1
feat: custom root roles (#3975)
## About the changes
Implements custom root roles, encompassing a lot of different areas of
the project, and slightly refactoring the current roles logic. It
includes quite a clean up.

This feature itself is behind a flag: `customRootRoles`

This feature covers root roles in:
 - Users;
 - Service Accounts;
 - Groups;

Apologies in advance. I may have gotten a bit carried away 🙈 

### Roles

We now have a new admin tab called "Roles" where we can see all root
roles and manage custom ones. We are not allowed to edit or remove
*predefined* roles.

![image](https://github.com/Unleash/unleash/assets/14320932/1ad8695c-8c3f-440d-ac32-39746720d588)
This meant slightly pushing away the existing roles to `project-roles`
instead. One idea we want to explore in the future is to unify both
types of roles in the UI instead of having 2 separate tabs. This
includes modernizing project roles to fit more into our current design
and decisions.

Hovering the permissions cell expands detailed information about the
role:

![image](https://github.com/Unleash/unleash/assets/14320932/81c4aae7-8b4d-4cb4-92d1-8f1bc3ef1f2a)

### Create and edit role

Here's how the role form looks like (create / edit):

![image](https://github.com/Unleash/unleash/assets/14320932/85baec29-bb10-48c5-a207-b3e9a8de838a)
Here I categorized permissions so it's easier to visualize and manage
from a UX perspective.

I'm using the same endpoint as before. I tried to unify the logic and
get rid of the `projectRole` specific hooks. What distinguishes custom
root roles from custom project roles is the extra `root-custom` type we
see on the payload. By default we assume `custom` (custom project role)
instead, which should help in terms of backwards compatibility.

### Delete role

When we delete a custom role we try to help the end user make an
informed decision by listing all the entities which currently use this
custom root role:

![image](https://github.com/Unleash/unleash/assets/14320932/352ed529-76be-47a8-88da-5e924fb191d4)
~~As mentioned in the screenshot, when deleting a custom role, we demote
all entities associated with it to the predefined `Viewer` role.~~
**EDIT**: Apparently we currently block this from the API
(access-service deleteRole) with a message:

![image](https://github.com/Unleash/unleash/assets/14320932/82a8e50f-8dc5-4c18-a2ba-54e2ae91b91c)
What should the correct behavior be?

### Role selector

I added a new easy-to-use role selector component that is present in:
 - Users 

![image](https://github.com/Unleash/unleash/assets/14320932/76953139-7fb6-437e-b3fa-ace1d9187674)
 - Service Accounts

![image](https://github.com/Unleash/unleash/assets/14320932/2b80bd55-9abb-4883-b715-15650ae752ea)
- Groups

![image](https://github.com/Unleash/unleash/assets/14320932/ab438f7c-2245-4779-b157-2da1689fe402)

### Role description

I also added a new role description component that you can see below the
dropdown in the selector component, but it's also used to better
describe each role in the respective tables:

![image](https://github.com/Unleash/unleash/assets/14320932/a3eecac1-2a34-4500-a68c-e3f62ebfa782)

I'm not listing all the permissions of predefined roles. Those simply
show the description in the tooltip:

![image](https://github.com/Unleash/unleash/assets/14320932/7e5b2948-45f0-4472-8311-bf533409ba6c)

### Role badge

Groups is a bit different, since it uses a list of cards, so I added yet
another component - Role badge:

![image](https://github.com/Unleash/unleash/assets/14320932/1d62c3db-072a-4c97-b86f-1d8ebdd3523e)

I'm using this same component on the profile tab:

![image](https://github.com/Unleash/unleash/assets/14320932/214272db-a828-444e-8846-4f39b9456bc6)

## Discussion points
- Are we being defensive enough with the use of the flag? Should we
cover more?
 - Are we breaking backwards compatibility in any way?
 - What should we do when removing a role? Block or demote?
- Maybe some existing permission-related issues will surface with this
change: Are we being specific enough with our permissions? A lot of
places are simply checking for `ADMIN`;
- We may want to get rid of the API roles coupling we have with the
users and SAs and instead use the new hooks (e.g. `useRoles`)
explicitly;
 - We should update the docs;
- Maybe we could allow the user to add a custom role directly from the
role selector component;

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2023-06-14 14:40:40 +01:00