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

8706 Commits

Author SHA1 Message Date
Jaanus Sellin
3763e1b24d
fix: default segments should only be selected when using default stra… (#4040) 2023-06-21 15:38:47 +03:00
Nuno Góis
197df96ff4
fix: consider ADMIN in API tokens fetch permissions (#4032)
https://github.com/Unleash/unleash/pull/4019 introduced a bug where API
token filtering was not taking into account ADMIN permissions, which
means the API tokens were not being displayed on the UI.
2023-06-21 12:12:21 +00:00
renovate[bot]
35d323aea7
chore(deps): update dependency @swc/core to v1.3.64 (#4034)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@swc/core](https://swc.rs)
([source](https://togithub.com/swc-project/swc)) | [`1.3.62` ->
`1.3.64`](https://renovatebot.com/diffs/npm/@swc%2fcore/1.3.62/1.3.64) |
[![age](https://badges.renovateapi.com/packages/npm/@swc%2fcore/1.3.64/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@swc%2fcore/1.3.64/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@swc%2fcore/1.3.64/compatibility-slim/1.3.62)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@swc%2fcore/1.3.64/confidence-slim/1.3.62)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>swc-project/swc</summary>

###
[`v1.3.64`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#&#8203;1364---2023-06-14)

[Compare
Source](https://togithub.com/swc-project/swc/compare/v1.3.63...v1.3.64)

##### Bug Fixes

- **(es/codegen)** Emit type arguments of jsx element names
([#&#8203;7522](https://togithub.com/swc-project/swc/issues/7522))
([a0da02d](a0da02d0ff))

- **(es/codegen)** Fix regression of source maps
([#&#8203;7523](https://togithub.com/swc-project/swc/issues/7523))
([f27838d](f27838dedc))

- **(es/compat)** Fix handling of `this` of optional chaining pass
([#&#8203;7527](https://togithub.com/swc-project/swc/issues/7527))
([4644d00](4644d005d2))

###
[`v1.3.63`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#&#8203;1363---2023-06-13)

[Compare
Source](https://togithub.com/swc-project/swc/compare/v1.3.62...v1.3.63)

##### Bug Fixes

- **(es/codegen)** Remove extra spaces in `AssignPatProp` and
`KeyValuePatProp`
([#&#8203;7488](https://togithub.com/swc-project/swc/issues/7488))
([064bcf4](064bcf4854))

- **(es/compat)** Make stage 3 decorator pass use correct state for
inner classes
([#&#8203;7508](https://togithub.com/swc-project/swc/issues/7508))
([cc4146c](cc4146c9d3))

- **(es/minifier)** Infect mutation when assigning a property
([#&#8203;7503](https://togithub.com/swc-project/swc/issues/7503))
([7f9f0b8](7f9f0b8bce))

- **(es/react)** Default to empty string when emitting refresh signature
([#&#8203;7514](https://togithub.com/swc-project/swc/issues/7514))
([8e933c8](8e933c8a9f))

##### Features

- **(es/codegen)** Add ability to set indentation string via rust api
([#&#8203;7494](https://togithub.com/swc-project/swc/issues/7494))
([a343e7c](a343e7ccae))

- **(es/minifier)** Remove unused labels
([#&#8203;7478](https://togithub.com/swc-project/swc/issues/7478))
([62075fa](62075faeaa))

- **(es/parser)** Disallow tagged tpl in optional chaining
([#&#8203;7515](https://togithub.com/swc-project/swc/issues/7515))
([6c00a24](6c00a2422a))

- **(plugin/runner)** Support shared wasix runtime
([#&#8203;7504](https://togithub.com/swc-project/swc/issues/7504))
([73929fc](73929fc43c))

##### Performance

- **(css/prefixer)** Convert macro to a function call to reduce binary
size ([#&#8203;7507](https://togithub.com/swc-project/swc/issues/7507))
([d545df6](d545df6dd9))

- **(es)** Use `&dyn Comments` to reduce binary size
([#&#8203;7489](https://togithub.com/swc-project/swc/issues/7489))
([2c3ac68](2c3ac682e2))

- **(es)** Use `&dyn Comments` for jsx and TypeScript
([#&#8203;7490](https://togithub.com/swc-project/swc/issues/7490))
([abd62bc](abd62bc797))

##### Refactor

- **(es/ast)** Reimplement optional chaining
([#&#8203;7441](https://togithub.com/swc-project/swc/issues/7441))
([aa83584](aa83584634))

- **(es/ast)** Remove unused fields
([#&#8203;7518](https://togithub.com/swc-project/swc/issues/7518))
([3958f17](3958f1792c))

</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 12:05:27 +00:00
Jaanus Sellin
6442a8a386
fix: creating groups should work without users (#4033) 2023-06-21 14:44:43 +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
Simon Hornby
8a8116d13b
docs: document how and why we collect data when using Unleash (#4020) 2023-06-21 09:17:35 +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
5b34ceff4c
feat: enable oas by default (#4021) 2023-06-20 15:39:15 +02:00
Thomas Heartman
80a2e1b93f
fix: reject API admin tokens when importing features (#4016)
This PR fixes an issue where trying to use an admin token to import
features via the API resulted in a 500 (due to missing properties).

The solution is to catch when the user is using and admin token in the
controller, throw a 400, and tell them to use personal access tokens or
service accounts.

The PR includes a new test file for this specific use case. We don't
really test these cases many other places, so it seemed the logical
choice.
2023-06-20 12:57:59 +00:00
Mateusz Kwasniewski
a0862cfc10
feat: Query complexity validation (#4017) 2023-06-20 14:28:02 +02:00
Christopher Kolstad
3acb116ab2
feat: Separate api token roles (#4019)
## What
As part of the move to enable custom-root-roles, our permissions model
was found to not be granular enough to allow service accounts to only be
allowed to create read-only tokens (client, frontend), but not be
allowed to create admin tokens to avoid opening up a path for privilege
escalation.

## How
This PR adds 12 new roles, a CRUD set for each of the three token types
(admin, client, frontend). To access the `/api/admin/api-tokens`
endpoints you will still need the existing permission (CREATE_API_TOKEN,
DELETE_API_TOKEN, READ_API_TOKEN, UPDATE_API_TOKEN). Once this PR has
been merged the token type you're modifying will also be checked, so if
you're trying to create a CLIENT api-token, you will need
`CREATE_API_TOKEN` and `CREATE_CLIENT_API_TOKEN` permissions. If the
user performing the create call does not have these two permissions or
the `ADMIN` permission, the creation will be rejected with a `403 -
FORBIDDEN` status.


### Discussion points
The test suite tests all operations using a token with
operation_CLIENT_API_TOKEN permission and verifies that it fails trying
to do any of the operations against FRONTEND and ADMIN tokens. During
development the operation_FRONTEND_API_TOKEN and
operation_ADMIN_API_TOKEN permission has also been tested in the same
way. I wonder if it's worth it to re-add these tests in order to verify
that the permission checker works for all operations, or if this is
enough. Since we're running them using e2e tests, I've removed them for
now, to avoid hogging too much processing time.
2023-06-20 14:21:14 +02:00
Christopher Kolstad
fa081e9014
task: Make keepalive configurable via an environment variable (#4015)
As requested in
[Linear](https://linear.app/unleash/issue/2-1147/unleash-cloud-make-keepalive-configurable)
this PR makes the serverKeepAliveTimeout configurable via the
SERVER_KEEPALIVE_TIMEOUT environment variable. This was already
configurable when starting Unleash programmatically, but it's nice to
have as an env variable as well
2023-06-20 12:10:05 +02:00
Mateusz Kwasniewski
2e4f55707d
feat: store playground settings in local storage (#4012) 2023-06-20 11:34:27 +02:00
renovate[bot]
211d445c4d
chore(deps): update dependency @babel/core to v7.22.5 (#4013)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@babel/core](https://babel.dev/docs/en/next/babel-core)
([source](https://togithub.com/babel/babel)) | [`7.22.1` ->
`7.22.5`](https://renovatebot.com/diffs/npm/@babel%2fcore/7.22.1/7.22.5)
|
[![age](https://badges.renovateapi.com/packages/npm/@babel%2fcore/7.22.5/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@babel%2fcore/7.22.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@babel%2fcore/7.22.5/compatibility-slim/7.22.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@babel%2fcore/7.22.5/confidence-slim/7.22.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>babel/babel</summary>

###
[`v7.22.5`](https://togithub.com/babel/babel/blob/HEAD/CHANGELOG.md#v7225-2023-06-08)

[Compare
Source](https://togithub.com/babel/babel/compare/v7.22.1...v7.22.5)

##### 🐛 Bug Fix

-   `babel-preset-env`, `babel-standalone`
- [#&#8203;15675](https://togithub.com/babel/babel/pull/15675) Fix using
`syntax-unicode-sets-regex` in standalone
([@&#8203;nicolo-ribaudo](https://togithub.com/nicolo-ribaudo))

##### 💅 Polish

-   `babel-core`
- [#&#8203;15683](https://togithub.com/babel/babel/pull/15683) Suggest
`-transform-` when resolving missing plugins
([@&#8203;nicolo-ribaudo](https://togithub.com/nicolo-ribaudo))

</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-19 22:30:36 +00: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
2356b5774b
docs: encourage feedback for sync (#4003) 2023-06-19 14:32:57 +02: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
9c8651879f
fix: filter out usage for export (#4006) 2023-06-19 13:42:55 +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
yuri-karelics
331f0f27fa
docs: angular unleash proxy client (#3897)
List of community unleash proxy clients extended with new Angular
library

## About the changes
Relates to
[discussion](https://github.com/orgs/Unleash/discussions/3621)
2023-06-16 17:54:37 +00: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
David Leek
4cc1505308
feat: add support for turning telemetry off with environment variable (#3987)
<!-- 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. -->

Adds an environment variable for switching off feature telemetry in
version check
2023-06-15 15:11:58 +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
Jaanus Sellin
6986534ed8
fix: fix sort order for environments (#3992) 2023-06-15 13:27:15 +03: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
Jaanus Sellin
a066d7888d
feat: add max order to environments (#3988)
Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2023-06-15 12:21:35 +03:00
Mateusz Kwasniewski
9853aa0217
feat:playground environment table (#3985) 2023-06-15 09:56:13 +02:00
Thomas Heartman
2be143a64e
docs: mark 'yes' and no as required, add more details to variants (#3984)
This change adds a little more detail to the client metrics schema. The
description for variants felt a
little unclear.

---------

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2023-06-15 07:14:17 +00: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
Mateusz Kwasniewski
1bd182d02a
chore: upgrade orval types (#3981) 2023-06-14 14:40:24 +02:00
Christopher Kolstad
b8da1ce2a9
docs: OpenAPI Client tag (#3979)
### What
Adds documentation for open api endpoints tagged with `Client`.

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-06-14 12:19:00 +00:00
Mateusz Kwasniewski
6ae4fe2085
test: meta schema rules should not check description on ref (#3980) 2023-06-14 12:29:09 +02:00