Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(KFLUXUI-279): replace Workspace by Namespace only in the UI #94

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/ImportForm/SecretSection/SecretSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const SecretSection = () => {
label="Build time secret"
addLabel="Add secret"
placeholder="Secret"
helpText="Keep your data secure by defining a build time secret. Secrets are stored at a workspace level so applications within workspace will have access to these secrets."
helpText="Keep your data secure by defining a build time secret. Secrets are stored at a namespace level so applications within namespace will have access to these secrets."
noFooter
isReadOnly
onChange={(v) =>
Expand Down
2 changes: 1 addition & 1 deletion src/components/PageAccess/NoAccessState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const NoAccessState: React.FC<React.PropsWithChildren<NoAccessStateProps>> = ({
/>
<EmptyStateBody>
{body ||
`Ask the administrator or the owner of the ${workspace} workspace for access permissions.`}
`Ask the administrator or the owner of the ${workspace} namespace for access permissions.`}
</EmptyStateBody>
<EmptyStateFooter>
{children || (
Expand Down
2 changes: 1 addition & 1 deletion src/components/PageAccess/__tests__/NoAccessState.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('NoAccessState', () => {
screen.getByTestId('no-access-state');
screen.getByText(`Let's get you access`);
screen.getByText(
`Ask the administrator or the owner of the test-ws workspace for access permissions.`,
`Ask the administrator or the owner of the test-ws namespace for access permissions.`,
);
screen.getByText('Go to Overview page');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ export const TriggerReleaseForm: React.FC<Props> = ({
<Form style={{ maxWidth: '70%' }}>
<ReleasePlanDropdown
name="releasePlan"
helpText="The release you want to release to the environments in your target workspace."
helpText="The release you want to release to the environments in your target namespace."
releasePlans={releasePlans}
loaded={loaded}
required
/>
<SnapshotDropdown
name="snapshot"
helpText="The release you want to release to the environments in your target workspace."
helpText="The release you want to release to the environments in your target namespace."
required
applicationName={applicationName}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const ReleasePlanAdmissionListHeader = () => {
props: { className: releasesPlanAdmissionTableColumnClasses.application },
},
{
title: 'Source Workspace',
title: 'Source Namespace',
props: { className: releasesPlanAdmissionTableColumnClasses.source },
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReleaseService/ReleaseService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const ReleaseService: React.FC<React.PropsWithChildren<unknown>> = () =>
data-test="release-service-test-id"
title="Releases"
headTitle="Releases"
description="Manage all your releases in this workspace."
description="Manage all your releases in this namespace."
actions={[
{
key: 'create-release-plan',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Secrets/SecretsListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SecretsListPage: React.FC = () => {
description={
<>
Manage your secrets and their related configurations. You can add a secret at the
workspace level.
namespace level.
<br /> All secrets are stored using AWS Secrets Manager to keep your data private.{' '}
<ExternalLink href="https://konflux-ci.dev/docs/how-tos/configuring/creating-secrets/">
Learn more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const EditAccessPage: React.FC<React.PropsWithChildren<unknown>> = () => {
? [{ model: SpaceBindingRequestModel, verb: 'update' }]
: [{ model: SpaceBindingRequestModel, verb: 'create' }];

useDocumentTitle(`Edit access to workspace, ${workspace} | ${FULL_APPLICATION_TITLE}`);
useDocumentTitle(`Edit access to namespace, ${workspace} | ${FULL_APPLICATION_TITLE}`);

const [existingSBR, loaded, loadErr] = useSpaceBindingRequest(
binding.namespace,
Expand Down
4 changes: 2 additions & 2 deletions src/components/UserAccess/UserAccessForm/UserAccessForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ export const UserAccessForm: React.FC<React.PropsWithChildren<Props>> = ({
return (
<PageLayout
title={
edit ? `Edit access to workspace, ${workspace}` : `Grant access to workspace, ${workspace}`
edit ? `Edit access to namespace, ${workspace}` : `Grant access to namespace, ${workspace}`
}
description={
edit
? 'Change permissions for this user by adding a role or removing a current role.'
: 'Invite users to collaborate with you by granting them access to your workspace.'
: 'Invite users to collaborate with you by granting them access to your namespace.'
}
breadcrumbs={[
...breadcrumbs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const UsernameSection: React.FC<React.PropsWithChildren<Props>> = ({ disa
<HelpPopover
aria-label="Usernames in Konflux"
headerContent="Usernames in Konflux"
bodyContent="Your username is the name of your default workspace. To find a list of your workspaces, navigate to the Applications pane and select the options icon in the breadcrumb navigation."
bodyContent="Your username is the name of your default namespace. To find a list of your namespaces, navigate to the Applications pane and select the options icon in the breadcrumb navigation."
/>
}
isRequired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ describe('UserAccessForm', () => {
const values = { usernames: [], role: null };
const props = { values } as FormikProps<UserAccessFormValues>;
formikRenderer(<UserAccessForm {...props} />, values);
expect(screen.getByText('Grant access to workspace, test-ws')).toBeVisible();
expect(screen.getByText('Grant access to namespace, test-ws')).toBeVisible();
expect(
screen.getByText(
'Invite users to collaborate with you by granting them access to your workspace.',
'Invite users to collaborate with you by granting them access to your namespace.',
),
).toBeVisible();
expect(screen.getByRole('button', { name: 'Grant access' })).toBeVisible();
Expand All @@ -41,7 +41,7 @@ describe('UserAccessForm', () => {
const values = { usernames: [], role: null };
const props = { values } as FormikProps<UserAccessFormValues>;
formikRenderer(<UserAccessForm {...props} edit />, values);
expect(screen.getByText('Edit access to workspace, test-ws')).toBeVisible();
expect(screen.getByText('Edit access to namespace, test-ws')).toBeVisible();
expect(
screen.getByText(
'Change permissions for this user by adding a role or removing a current role.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('UserAccessFormPage', () => {
workspace: 'test-ws',
workspaceResource: {} as Workspace,
});
expect(screen.getByText('Grant access to workspace, test-ws')).toBeVisible();
expect(screen.getByText('Grant access to namespace, test-ws')).toBeVisible();
await act(() => fireEvent.input(screen.getByRole('searchbox'), { target: { value: 'user1' } }));
// act(() => jest.runAllTimers());
await act(() => fireEvent.click(screen.getByText('Select role')));
Expand All @@ -73,7 +73,7 @@ describe('UserAccessFormPage', () => {
workspace: 'test-ws',
workspaceResource: {} as Workspace,
});
expect(screen.getByText('Edit access to workspace, test-ws')).toBeVisible();
expect(screen.getByText('Edit access to namespace, test-ws')).toBeVisible();
expect(screen.getByRole('searchbox')).toBeDisabled();
await act(() => fireEvent.click(screen.getByText('Select role')));
await act(() => fireEvent.click(screen.getByText('maintainer')));
Expand Down
4 changes: 2 additions & 2 deletions src/components/UserAccess/UserAccessListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const UserAccessPage: React.FunctionComponent = () => {
return (
<PageLayout
title="User access"
description="Invite users to collaborate with you by granting them access to your workspace."
description="Invite users to collaborate with you by granting them access to your namespace."
breadcrumbs={[
...breadcrumbs,
{
Expand All @@ -33,7 +33,7 @@ const UserAccessPage: React.FunctionComponent = () => {
id: 'grant-access',
label: 'Grant access',
disabled: !canCreateSBR,
disabledTooltip: 'You cannot grant access in this workspace',
disabledTooltip: 'You cannot grant access in this namespace',
cta: {
href: `/workspaces/${workspace}/access/grant`,
},
Expand Down
6 changes: 3 additions & 3 deletions src/components/UserAccess/UserAccessListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ const UserAccessEmptyState: React.FC<
title="Grant user access"
>
<EmptyStateBody>
See a list of all the users that have access to your workspace.
See a list of all the users that have access to your namespace.
</EmptyStateBody>
<EmptyStateActions>
<ButtonWithAccessTooltip
variant="primary"
component={(props) => <Link {...props} to={`/workspaces/${workspace}/access/grant`} />}
isDisabled={!canCreateSBR}
tooltip="You cannot grant access in this workspace"
tooltip="You cannot grant access in this namespace"
analytics={{
link_name: 'grant-access',
workspace,
Expand Down Expand Up @@ -120,7 +120,7 @@ export const UserAccessListView: React.FC<React.PropsWithChildren<unknown>> = ()
<Link {...props} to={`/workspaces/${workspace}/access/grant`} />
)}
isDisabled={!canCreateSBR}
tooltip="You cannot grant access in this workspace"
tooltip="You cannot grant access in this namespace"
analytics={{
link_name: 'grant-access',
workspace,
Expand Down
Loading