Skip to content

Commit

Permalink
Merge branch 'master' into RHCLOUD-36310
Browse files Browse the repository at this point in the history
  • Loading branch information
aferd authored Jan 29, 2025
2 parents ffbe402 + f3714e3 commit 50f1c09
Show file tree
Hide file tree
Showing 16 changed files with 924 additions and 32 deletions.
20 changes: 10 additions & 10 deletions .tekton/insights-rbac-ui-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ spec:
- name: name
value: init
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:90dda596d44b3f861889da2fba161dff34c6116fe76c3989e3f84262ea0f29cd
value: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:4c6712db9419461b8c8a39523c012cb0dc061fb58563bb9170b3777d74f54659
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -191,7 +191,7 @@ spec:
- name: name
value: prefetch-dependencies
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies:0.1@sha256:b7a6b67e97c6c03b552b9cd57d4a2868d63e279ee68ced2a53e713befca9e009
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies:0.1@sha256:20f76c14b756c745e315334dd0437cf4f6004763e2d23b27cf0f8e896fe2207c
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -373,7 +373,7 @@ spec:
- name: name
value: buildah
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-buildah:0.3@sha256:956d80ce7bb7feab9c15aaa6037b89d39317c7650732b13e4433e583bf47bd94
value: quay.io/konflux-ci/tekton-catalog/task-buildah:0.3@sha256:78aeb24909d89fe334e5cd2f27e3b367694f2e634671a0286e485f97cb97b66f
- name: kind
value: task
resolver: bundles
Expand All @@ -396,7 +396,7 @@ spec:
- name: name
value: source-build
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-source-build:0.1@sha256:bb8e48129d758f837e4c41e7fe40ed6d18f862b6f4d0ade3cc2d5c79adf9e556
value: quay.io/konflux-ci/tekton-catalog/task-source-build:0.1@sha256:9d8f146d0474440165db38a3efdf55da73856de332ebf8d598197f92156ee44e
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -442,7 +442,7 @@ spec:
- name: name
value: deprecated-image-check
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.4@sha256:650330fde0773f73f6bac77ae573031c44c79165d9503b0d5ec1db3e6ef981d7
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.4@sha256:241f87f75a6e4303fbd64b32ba1715d76fe3805c48a6c21829e6a564bcc3a576
- name: kind
value: task
resolver: bundles
Expand All @@ -464,7 +464,7 @@ spec:
- name: name
value: clair-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:907f11c67b0330480cbf85c23b1085acc5a049ab90af980169251860a3d97ef7
value: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:4584647138af3efe5f1c523d0f56103c3b9647325634d17f04e2198a2c3c0c26
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -506,7 +506,7 @@ spec:
- name: name
value: sast-snyk-check
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check:0.3@sha256:b89b936f680d18adf8d3e4d7682357e28d05da382b970741ccb0f6c05a894ee2
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check:0.3@sha256:166f40b52f28dc896d520f9a6c882a6ff59a8d0945fc7280984cf41293d03eac
- name: kind
value: task
resolver: bundles
Expand All @@ -531,7 +531,7 @@ spec:
- name: name
value: clamav-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.2@sha256:c12e7a774bb07ad2796c01071b0dc0f199111b0ee99c45b55fa599e23b200bae
value: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.2@sha256:525ad6081d7d38082db057482bd9ecc59c38954656b1a4e33a28de9c19e71006
- name: kind
value: task
resolver: bundles
Expand All @@ -551,7 +551,7 @@ spec:
- name: name
value: apply-tags
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:2c2d88c07623b2d25163994ded6e9f29205ea5bbab090f4c86379739940028b9
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:fa7aa88ffe01eeeaa07c8720b27e50e27f6f136ef33595efaa16a0eb4598ea02
- name: kind
value: task
resolver: bundles
Expand All @@ -572,7 +572,7 @@ spec:
- name: name
value: push-dockerfile
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile:0.1@sha256:e11a94301c6c89cda7765b64edcc559acdda8527c3aa8857a15f14485466ccae
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile:0.1@sha256:389dc0f7bb175b9ca04e79ee67352fedd62fff8b1d196029534cd5638c73a0fc
- name: kind
value: task
resolver: bundles
Expand Down
20 changes: 10 additions & 10 deletions .tekton/insights-rbac-ui-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ spec:
- name: name
value: init
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:90dda596d44b3f861889da2fba161dff34c6116fe76c3989e3f84262ea0f29cd
value: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:4c6712db9419461b8c8a39523c012cb0dc061fb58563bb9170b3777d74f54659
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -188,7 +188,7 @@ spec:
- name: name
value: prefetch-dependencies
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies:0.1@sha256:b7a6b67e97c6c03b552b9cd57d4a2868d63e279ee68ced2a53e713befca9e009
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies:0.1@sha256:20f76c14b756c745e315334dd0437cf4f6004763e2d23b27cf0f8e896fe2207c
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -370,7 +370,7 @@ spec:
- name: name
value: buildah
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-buildah:0.3@sha256:956d80ce7bb7feab9c15aaa6037b89d39317c7650732b13e4433e583bf47bd94
value: quay.io/konflux-ci/tekton-catalog/task-buildah:0.3@sha256:78aeb24909d89fe334e5cd2f27e3b367694f2e634671a0286e485f97cb97b66f
- name: kind
value: task
resolver: bundles
Expand All @@ -393,7 +393,7 @@ spec:
- name: name
value: source-build
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-source-build:0.1@sha256:bb8e48129d758f837e4c41e7fe40ed6d18f862b6f4d0ade3cc2d5c79adf9e556
value: quay.io/konflux-ci/tekton-catalog/task-source-build:0.1@sha256:9d8f146d0474440165db38a3efdf55da73856de332ebf8d598197f92156ee44e
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -439,7 +439,7 @@ spec:
- name: name
value: deprecated-image-check
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.4@sha256:650330fde0773f73f6bac77ae573031c44c79165d9503b0d5ec1db3e6ef981d7
value: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.4@sha256:241f87f75a6e4303fbd64b32ba1715d76fe3805c48a6c21829e6a564bcc3a576
- name: kind
value: task
resolver: bundles
Expand All @@ -461,7 +461,7 @@ spec:
- name: name
value: clair-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:907f11c67b0330480cbf85c23b1085acc5a049ab90af980169251860a3d97ef7
value: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:4584647138af3efe5f1c523d0f56103c3b9647325634d17f04e2198a2c3c0c26
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -503,7 +503,7 @@ spec:
- name: name
value: sast-snyk-check
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check:0.3@sha256:b89b936f680d18adf8d3e4d7682357e28d05da382b970741ccb0f6c05a894ee2
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check:0.3@sha256:166f40b52f28dc896d520f9a6c882a6ff59a8d0945fc7280984cf41293d03eac
- name: kind
value: task
resolver: bundles
Expand All @@ -528,7 +528,7 @@ spec:
- name: name
value: clamav-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.2@sha256:c12e7a774bb07ad2796c01071b0dc0f199111b0ee99c45b55fa599e23b200bae
value: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.2@sha256:525ad6081d7d38082db057482bd9ecc59c38954656b1a4e33a28de9c19e71006
- name: kind
value: task
resolver: bundles
Expand All @@ -548,7 +548,7 @@ spec:
- name: name
value: apply-tags
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:2c2d88c07623b2d25163994ded6e9f29205ea5bbab090f4c86379739940028b9
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:fa7aa88ffe01eeeaa07c8720b27e50e27f6f136ef33595efaa16a0eb4598ea02
- name: kind
value: task
resolver: bundles
Expand All @@ -569,7 +569,7 @@ spec:
- name: name
value: push-dockerfile
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile:0.1@sha256:e11a94301c6c89cda7765b64edcc559acdda8527c3aa8857a15f14485466ccae
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile:0.1@sha256:389dc0f7bb175b9ca04e79ee67352fedd62fff8b1d196029534cd5638c73a0fc
- name: kind
value: task
resolver: bundles
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# [1.18.0](https://github.com/RedHatInsights/insights-rbac-ui/compare/v1.17.0...v1.18.0) (2025-01-29)


### Features

* add empty and leading states for Roles table ([#1750](https://github.com/RedHatInsights/insights-rbac-ui/issues/1750)) ([c0d3ef4](https://github.com/RedHatInsights/insights-rbac-ui/commit/c0d3ef4d3227308860de2b6f97aa67972900fd2a))
* create edit user group page ([#1732](https://github.com/RedHatInsights/insights-rbac-ui/issues/1732)) ([6ee38d3](https://github.com/RedHatInsights/insights-rbac-ui/commit/6ee38d35da0edbc97ab34126de3349db2421e7fc))

# [1.17.0](https://github.com/RedHatInsights/insights-rbac-ui/compare/v1.16.2...v1.17.0) (2025-01-15)


Expand Down
80 changes: 80 additions & 0 deletions cypress/e2e/filter-workspaces.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
describe('Filter workspaces', () => {
const mockWorkspaces = {
meta: {
count: 3,
limit: 100,
offset: 0,
},
data: [
{
name: 'Root Workspace',
id: '01938960-94c7-79e3-aecb-549ad25003b8',
parent_id: null,
description: null,
created: '2024-12-02T21:57:08.423927Z',
modified: '2024-12-02T21:57:08.504809Z',
type: 'root',
},
{
name: 'AAA',
id: '01939c7c-e19a-7f60-a38a-1937cbd55f0c',
parent_id: '01938960-94c7-79e3-aecb-549ad25003b8',
description: null,
created: '2024-12-06T15:00:50.202053Z',
modified: '2024-12-06T15:00:50.213196Z',
type: 'standard',
},
{
name: 'xyc',
id: '0193d8ee-06d5-76a3-af0b-2b002431016d',
parent_id: '01939c7c-e19a-7f60-a38a-1937cbd55f0c',
description: null,
created: '2024-12-18T08:41:38.261872Z',
modified: '2024-12-18T08:41:38.271103Z',
type: 'standard',
},
],
};

beforeEach(() => {
cy.login();

// mock the workspaces
cy.intercept('GET', '**/api/rbac/v2/workspaces/?limit=100', {
statusCode: 200,
body: mockWorkspaces,
}).as('getWorkspaces');

cy.visit('/iam/access-management/workspaces');
cy.wait('@getWorkspaces', { timeout: 30000 });

// check if Workspaces heading exists on the page
cy.contains('Workspaces').should('exist');

// expand tree
cy.get('[aria-label="Expand row 0"]').click();
cy.get('[aria-label="Expand row 1"]').click();

// check if 'xyc' workspace is visible
cy.get('[data-ouia-component-id="workspaces-list-tr-2"]').should('exist');
});

afterEach(() => {
// clear filter and return tree to original state
cy.get('[data-ouia-component-id="DataViewToolbar-clear-all-filters"]').first().click();
cy.get('[data-ouia-component-id="workspaces-list-tr-2"]').should('exist');
});

it('should filter workspaces', () => {
// filter to hide entire tree and check if 'xyc' workspace is hidden
cy.get('[data-ouia-component-id="workspace-name-filter"]').type('asdf');
cy.get('[data-ouia-component-id="workspaces-list-tr-2"]').should('not.exist');
});

it('should not show children of filtered workspaces', () => {
// filter to show 'AAA' workspace and check if 'xyc' is hidden
cy.get('[data-ouia-component-id="workspace-name-filter"]').type('AAA');
cy.get('[data-ouia-component-id="workspaces-list-tr-1"]').should('exist');
cy.get('[data-ouia-component-id="workspaces-list-tr-2"]').should('not.exist');
});
});
8 changes: 8 additions & 0 deletions cypress/e2e/users-and-user-groups.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,12 @@ describe('Users and User Groups page', () => {
cy.get('[data-ouia-component-id="iam-user-groups-table-actions-dropdown-action-0"]').click();
cy.get('[data-ouia-component-id="add-group-wizard"]').should('exist');
});

it('should be able to open Edit User Group page from row actions', () => {
cy.get('[data-ouia-component-id="user-groups-tab-button"]').click();
cy.get('[data-ouia-component-id^="iam-user-groups-table-table-td-0-7"]').click();
cy.get('[data-ouia-component-id^="iam-user-groups-table-table-td-0-7"] button').contains('Edit user group').click();
cy.url().should('include', '/iam/access-management/users-and-user-groups/edit-group');
cy.get('[data-ouia-component-id="edit-user-group-form"]').should('be.visible');
});
});
15 changes: 15 additions & 0 deletions src/Messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -2466,6 +2466,16 @@ export default defineMessages({
description: 'Empty state subtitle role bindings',
defaultMessage: 'This filter criteria matches no role assignments.{br}Try changing your filter input.',
},
rolesEmptyStateTitle: {
id: 'rolesEmptyStateTitle',
description: 'Empty state title Roles',
defaultMessage: 'No roles found',
},
rolesEmptyStateSubtitle: {
id: 'rolesEmptyStateSubtitle',
description: 'Empty state subtitle Roles',
defaultMessage: 'This filter criteria matches no roles.{br}Try changing your filter input.',
},
userGroupsEmptyStateTitle: {
id: 'userGroupsEmptyStateTitle',
description: 'Empty state title User groups',
Expand Down Expand Up @@ -2563,4 +2573,9 @@ export default defineMessages({
description: 'create user group button label',
defaultMessage: 'Create user group',
},
selectUsersAndOrServiceAccounts: {
id: 'selectUsersAndOrServiceAccounts',
description: 'select users and/or service accounts label',
defaultMessage: 'Select users and/or service accounts',
},
});
5 changes: 5 additions & 0 deletions src/Routing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const QuickstartsTest = lazy(() => import('./smart-components/quickstarts/quicks
const UsersAndUserGroups = lazy(() => import('./smart-components/access-management/users-and-user-groups/users-and-user-groups'));
const UsersView = lazy(() => import('./smart-components/access-management/users-and-user-groups/users/UsersView'));
const UserGroupsView = lazy(() => import('./smart-components/access-management/users-and-user-groups/user-groups/UserGroupsView'));
const EditUserGroup = lazy(() => import('./smart-components/access-management/users-and-user-groups/user-groups/edit-user-group/EditUserGroup'));

const getRoutes = ({ enableServiceAccounts, isITLess, isWorkspacesFlag, isCommonAuthModel }: Record<string, boolean>) => [
{
Expand Down Expand Up @@ -75,6 +76,10 @@ const getRoutes = ({ enableServiceAccounts, isITLess, isWorkspacesFlag, isCommon
},
],
},
{
path: pathnames['users-and-user-groups-edit-group'].path,
element: EditUserGroup,
},
{
path: pathnames.overview.path,
element: isWorkspacesFlag ? WorkspacesOverview : Overview,
Expand Down
2 changes: 1 addition & 1 deletion src/redux/reducers/group-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface GroupStore {
filters: any;
pagination: { count: number };
};
selectedGroup: {
selectedGroup: Group & {
addRoles: any;
members: { meta: PaginationDefaultI; data?: any[] };
serviceAccounts: { meta: PaginationDefaultI; data?: any[] };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const UserGroupsTable: React.FunctionComponent<UserGroupsTableProps> = ({
items={[
{
title: intl.formatMessage(messages['usersAndUserGroupsEditUserGroup']),
onClick: () => console.log('EDIT USER GROUP'),
onClick: () => navigate(pathnames['users-and-user-groups-edit-group'].link.replace(':groupId', group.uuid)),
},
{
title: intl.formatMessage(messages['usersAndUserGroupsDeleteUserGroup']),
Expand Down
Loading

0 comments on commit 50f1c09

Please sign in to comment.