Skip to content

Commit b80e91f

Browse files
committed
Merge branch 'main' into spike/css-modules
2 parents abca916 + 41594f4 commit b80e91f

32 files changed

+1282
-183
lines changed

cypress/support/component.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { mount } from 'cypress/react';
2222
import './commands';
2323
import { FrontendConfigContext } from '../../src/context/FrontendConfigContext';
2424
import { mockedFrontendConfig } from '../../src/utils/testing';
25-
25+
import { ToastProvider } from '../../src/context/ToastContext.tsx';
2626
// Augment the Cypress namespace to include type definitions for
2727
// your custom command.
2828
// Alternatively, can be defined in cypress/support/component.d.ts
@@ -36,12 +36,15 @@ declare global {
3636
}
3737
}
3838

39-
4039
Cypress.Commands.add('mount', (component, options) => {
41-
return mount(<ThemeProvider>
42-
<FrontendConfigContext value={mockedFrontendConfig}>
43-
{component}
44-
</FrontendConfigContext>
45-
</ThemeProvider>, options);
40+
return mount(
41+
<ThemeProvider>
42+
<ToastProvider>
43+
<FrontendConfigContext value={mockedFrontendConfig}>
44+
{component}
45+
</FrontendConfigContext>
46+
</ToastProvider>
47+
</ThemeProvider>,
48+
options,
49+
);
4650
});
47-

package-lock.json

Lines changed: 32 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/locales/en.json

Lines changed: 83 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727
"tableHeaderSynced": "Synced",
2828
"tableHeaderReady": "Ready"
2929
},
30+
"ProvidersConfig": {
31+
"headerProviderConfigs": "Provider Configs",
32+
"tableHeaderProvider": "Provider",
33+
"tableHeaderName": "Name",
34+
"tableHeaderCreated": "Created",
35+
"tableHeaderUsage": "Usage"
36+
},
3037
"ControlPlaneListToolbar": {
3138
"buttonText": "Workspace"
3239
},
@@ -49,9 +56,9 @@
4956
"messageHeader": "Message",
5057
"reasonHeader": "Reason",
5158
"transitionHeader": "Last transition time"
52-
},
59+
},
5360
"CopyKubeconfigButton": {
54-
"copiedMessage": "Copied to Clipboard",
61+
"copiedMessage": "Copied to Clipboard",
5562
"failedMessage": "Failed to copy, Error:",
5663
"menuDownload": "Download",
5764
"menuCopy": "Copy to clipboard"
@@ -106,7 +113,6 @@
106113
"errorMessage": "useCopyButton must be used within a CopyButtonProvider"
107114
},
108115
"CreateProjectWorkspaceDialog": {
109-
"learnButton": "Learn how to do this in code",
110116
"createButton": "Create",
111117
"cancelButton": "Cancel",
112118
"chargingTargetLabel": "Charging Target",
@@ -139,6 +145,79 @@
139145
"copiedMessage": "Copied To Clipboard",
140146
"failedMessage": "Failed to copy"
141147
},
148+
"DeleteWorkspaceDialog": {
149+
"title": "Delete a Workspace",
150+
"introSection1": "The below instructions will help you delete the workspace \"{{workspaceName}}\" from project namespace \"{{projectNamespace}}\" using kubectl.",
151+
"introSection2": "Remember that this action is <bold1>irreversible</bold1> and all resources within the workspace will be <bold2>permanently deleted</bold2>.",
152+
"mainCommandDescription": "Run this command to delete the workspace:",
153+
"verificationCommandDescription": "To verify the workspace has been deleted, run:"
154+
},
155+
"KubectlDeleteMcpDialog": {
156+
"title": "Delete a Managed Control Plane",
157+
"introSection1": "The below will help you delete the Managed Control Plane \"{{mcpName}}\" from workspace \"{{workspaceNamespace}}\" using kubectl.",
158+
"introSection2": "Remember that this action is <bold1>irreversible</bold1> and all resources managed by this control plane will be <bold2>permanently deleted</bold2>.",
159+
"annotateCommand": "First, annotate the ManagedControlPlane to confirm deletion:",
160+
"deleteCommand": "Run this command to delete the Managed Control Plane:",
161+
"verificationCommandDescription": "To verify the MCP has been deleted, run:"
162+
},
163+
"KubectlCreateProjectDialog": {
164+
"title": "Create a Project",
165+
"introSection": "A Project is the starting point to our ManagedControlPlane offering. Projects are usually created for each Organization/Team or similar root setups.",
166+
"formFields": {
167+
"projectName": {
168+
"label": "Project Name",
169+
"placeholder": "Enter project name"
170+
},
171+
"chargingTargetId": {
172+
"label": "BTP Global Account ID",
173+
"placeholder": "Enter your Global Account ID",
174+
"defaultValue": "<your-ga-id>"
175+
},
176+
"userEmail": {
177+
"label": "User Email",
178+
"placeholder": "Enter your email address",
179+
"defaultValue": "<[email protected]>"
180+
}
181+
},
182+
"mainCommandDescription": "Run this command to create a new project:",
183+
"resultCommandDescription": "To see the result of the project creation, run the below command:",
184+
"namespaceCommandDescription": "A namespace is automatically generated for your project:"
185+
},
186+
"KubectlCreateWorkspaceDialog": {
187+
"title": "Create a Workspace",
188+
"introSection": "Let's add a Workspace to our Project. We use workspaces to separate productive and non-productive ManagedControlPlanes.",
189+
"formFields": {
190+
"workspaceName": {
191+
"label": "Workspace Name",
192+
"placeholder": "Enter workspace name"
193+
},
194+
"chargingTargetId": {
195+
"label": "BTP Global Account ID",
196+
"placeholder": "Enter your Global Account ID",
197+
"defaultValue": "<your-ga-id>"
198+
},
199+
"userEmail": {
200+
"label": "User Email",
201+
"placeholder": "Enter your email address",
202+
"defaultValue": "<[email protected]>"
203+
}
204+
},
205+
"mainCommandDescription": "Run this command to create a new workspace in your project:",
206+
"resultCommandDescription": "To see the result of the workspace creation, run the below command:"
207+
},
208+
"KubectlBaseDialog": {
209+
"prerequisites": "Prerequisites",
210+
"prerequisitesText": "Make sure you have installed <bold1>kubectl</bold1> and the <bold2>kubelogin</bold2> plugin. We recommend using <bold3>krew</bold3> which is a plugin manager for kubectl.",
211+
"formFieldsNote": "<bold1>Important</bold1>: Before executing, modify the commands below:",
212+
"onboardingGuide": "You can also use our <link1>Onboarding Guide</link1> for more information."
213+
},
214+
"CommonKubectl": {
215+
"emphasis": {
216+
"irreversible": "irreversible",
217+
"permanentlyDeleted": "permanently deleted"
218+
},
219+
"learnButton": "Learn how to do this in code"
220+
},
142221
"App": {
143222
"loading": "Loading..."
144223
},
@@ -150,14 +229,11 @@
150229
"tableHeaderInstalled": "Installed",
151230
"tableHeaderHealthy": "Healthy"
152231
},
153-
"ProvidersConfig": {
154-
"header": "Provider Configs"
155-
},
156232
"validationErrors": {
157233
"required": "This field is required!",
158234
"properFormatting": "Use A-Z, a-z, 0-9, hyphen (-), and period (.), but note that whitespace (spaces, tabs, etc.) is not allowed for proper compatibility.",
159235
"max25chars": "Max length is 25 characters.",
160236
"userExists": "User with this email already exists!",
161237
"atLeastOneUser": "You need to have at least one member assigned."
162238
}
163-
}
239+
}

src/components/ControlPlane/ComponentList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default function ComponentList({ mcp }: { mcp: ControlPlaneType }) {
4949
columns={componentTableColumns}
5050
minRows={0}
5151
data={data}
52-
style={{marginLeft: "12px", marginRight: "12px"}}
52+
style={{ marginLeft: '12px', marginRight: '12px' }}
5353
/>
5454
</div>
5555
);

src/components/ControlPlane/ManagedResources.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
AnalyticalTable,
44
AnalyticalTableColumnDefinition,
55
AnalyticalTableScaleWidthMode,
6-
Icon,
76
Title,
87
} from '@ui5/webcomponents-react';
98
import useResource from '../../lib/api/useApiResource';
@@ -13,7 +12,7 @@ import IllustratedError from '../Shared/IllustratedError';
1312
import '@ui5/webcomponents-icons/dist/sys-enter-2';
1413
import '@ui5/webcomponents-icons/dist/sys-cancel-2';
1514
import { resourcesInterval } from '../../lib/shared/constants';
16-
import { StatusCellProps } from '../../lib/shared/interfaces';
15+
import { ResourceStatusCell } from '../Shared/ResourceStatusCell';
1716

1817
interface CellData<T> {
1918
cell: {
@@ -140,14 +139,3 @@ export function ManagedResources() {
140139
</>
141140
);
142141
}
143-
144-
function ResourceStatusCell({ value, transitionTime }: StatusCellProps) {
145-
return (
146-
<Icon
147-
design={value ? 'Positive' : 'Negative'}
148-
name={value ? 'sys-enter-2' : 'sys-cancel-2'}
149-
showTooltip={true}
150-
accessibleName={timeAgo.format(new Date(transitionTime))}
151-
/>
152-
);
153-
}

0 commit comments

Comments
 (0)