Skip to content

Commit

Permalink
chore: replace Workspace by Namespace only in the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoPedroPP committed Feb 5, 2025
1 parent 39c0ff7 commit c6c4a9f
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
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
2 changes: 1 addition & 1 deletion src/utils/breadcrumb-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const useWorkspaceBreadcrumbs = () => {

return [
<BreadcrumbItem key="workspace-label" component="div">
<span>Workspaces</span>
<span>Namespaces</span>
</BreadcrumbItem>,
<BreadcrumbItem key="workspace-link" to="#" component="div" showDivider>
<Link className="pf-v5-c-breadcrumb__link" to={`/workspaces/${workspace}/applications`}>
Expand Down
4 changes: 2 additions & 2 deletions src/utils/pipeline-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export const COMPONENT_DESC =
'A component is an image built from code in a source repository. Applications are sets of components that run together on environments.';
export const BUILD_DESC = `Every component requires a build to release. We’ll automatically trigger a single build. Subsequent builds will need to be manually requested.`;
export const TESTS_DESC = `Catch functional regressions from code changes by adding integration tests. Integration tests run in parallel, validating each new component build with the latest version of all other application components.`;
export const STATIC_ENV_DESC = `A static environment is a set of compute resources bundled together. Use static environments for developing, testing, and staging before releasing your application. You can share static environments across all applications within the workspace.`;
export const STATIC_ENV_DESC = `A static environment is a set of compute resources bundled together. Use static environments for developing, testing, and staging before releasing your application. You can share static environments across all applications within the namespace.`;
export const RELEASE_DESC = `After pushing your application to release, your application goes through a series of tests through the release pipeline to ensure the application complies with the release policy set on the release target, also known as the "managed environment".`;
export const MANAGED_ENV_DESC = `A managed environment is your application release target. This release target is an external environment, set up in an external workspace, and managed by another team. It is set for each application and not automatically shared among applications within the workspace.`;
export const MANAGED_ENV_DESC = `A managed environment is your application release target. This release target is an external environment, set up in an external namespace, and managed by another team. It is set for each application and not automatically shared among applications within the namespace.`;

export enum runStatus {
Succeeded = 'Succeeded',
Expand Down

0 comments on commit c6c4a9f

Please sign in to comment.