Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Clutch
Commits
1e02664c
Unverified
Commit
1e02664c
authored
2 years ago
by
Angela Nguyen
Committed by
GitHub
2 years ago
Browse files
Options
Download
Email Patches
Plain Diff
dynamodb: add notes to table details page for scaling workflow (#2437)
parent
a3b7efc6
timeago-component
auditAPI
auditBE
auditFE
datetimevalid
docshousekeeping
dschaller-patch-3
dynamodb-status-chips
eslintdocs
get-logs
go-1.19-in-ci
housekeepingclutch
main
renovate/github.com-stretchr-testify-1.x
renovate/github.com-uber-go-tally-v4-4.x
renovate/k8s.io-utils-digest
renovate/major-10-definitelytyped
renovate/node-19.x
renovate/postgres-15.x
responsiveTable
sperry-resize-hpa-notes
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/workflows/dynamodb/src/index.tsx
+1
-0
frontend/workflows/dynamodb/src/index.tsx
frontend/workflows/dynamodb/src/update-capacity.tsx
+17
-7
frontend/workflows/dynamodb/src/update-capacity.tsx
with
18 additions
and
7 deletions
+18
-7
frontend/workflows/dynamodb/src/index.tsx
+
1
-
0
View file @
1e02664c
...
...
@@ -10,6 +10,7 @@ interface ResolverConfigProps {
interface
TableDetailsProps
{
enableOverride
?:
boolean
;
notes
?:
NoteConfig
[];
}
export
interface
WorkflowProps
extends
BaseWorkflowProps
,
ResolverConfigProps
,
TableDetailsProps
{}
...
...
This diff is collapsed.
Click to expand it.
frontend/workflows/dynamodb/src/update-capacity.tsx
+
17
-
7
View file @
1e02664c
...
...
@@ -8,6 +8,7 @@ import {
client
,
Confirmation
,
MetadataTable
,
NotePanel
,
Resolver
,
Table
,
TableRow
,
...
...
@@ -46,12 +47,15 @@ const TableIdentifier: React.FC<ResolverChild> = ({ resolverType, notes = [] })
);
};
const
TableDetails
:
React
.
FC
<
TableDetailsChild
>
=
({
enableOverride
})
=>
{
const
TableDetails
:
React
.
FC
<
TableDetailsChild
>
=
({
enableOverride
,
notes
=
[]
})
=>
{
const
{
onSubmit
,
onBack
}
=
useWizardContext
();
const
resourceData
=
useDataLayout
(
"
resourceData
"
);
const
capacityUpdates
=
useDataLayout
(
"
capacityUpdates
"
);
const
table
=
resourceData
.
displayValue
()
as
IClutch
.
aws
.
dynamodb
.
v1
.
Table
;
const
tableDetailsNotes
=
notes
.
filter
(
note
=>
note
.
location
===
"
table-details
"
);
const
limitsNotes
=
notes
.
filter
(
note
=>
note
.
location
===
"
scaling-limits
"
);
const
handleTableCapacityChange
=
(
key
:
string
,
value
:
number
)
=>
{
const
newTableThroughput
=
{
...
capacityUpdates
.
displayValue
().
table_throughput
,
[
key
]:
value
};
capacityUpdates
.
updateData
(
"
table_throughput
"
,
newTableThroughput
);
...
...
@@ -80,6 +84,7 @@ const TableDetails: React.FC<TableDetailsChild> = ({ enableOverride }) => {
return
(
<
WizardStep
error
=
{
resourceData
.
error
}
isLoading
=
{
resourceData
.
isLoading
}
>
<
NotePanel
notes
=
{
tableDetailsNotes
}
/>
<
Box
>
<
Table
columns
=
{
[
"
Name
"
,
"
Type
"
,
"
Status
"
,
"
Provisioned Capacities
"
]
}
>
<
TableRow
key
=
{
table
.
name
}
>
...
...
@@ -157,11 +162,16 @@ const TableDetails: React.FC<TableDetailsChild> = ({ enableOverride }) => {
{
enableOverride
&&
(
<
Box
>
<
Alert
severity
=
"warning"
>
Warning: to override the DynamoDB scaling limits, check the box below. This will bypass
the maximum limits placed on all throughput updates. Only override limits if safe to do
so.
</
Alert
>
{
limitsNotes
.
length
===
0
&&
(
<
Alert
severity
=
"warning"
>
Warning: to override the DynamoDB scaling limits, check the box below. This will
bypass the maximum limits placed on all throughput updates. Only override limits if
safe to do so.
</
Alert
>
)
}
{
limitsNotes
.
length
>
0
&&
<
NotePanel
notes
=
{
limitsNotes
}
/>
}
<
CheckboxPanel
onChange
=
{
state
=>
capacityUpdates
.
updateData
(
"
ignore_maximums
"
,
state
[
"
Override limits
"
])
...
...
@@ -260,7 +270,7 @@ const UpdateCapacity: React.FC<WorkflowProps> = ({
return
(
<
Wizard
dataLayout
=
{
dataLayout
}
heading
=
{
heading
}
>
<
TableIdentifier
name
=
"Lookup"
resolverType
=
{
resolverType
}
notes
=
{
notes
}
/>
<
TableDetails
name
=
"Modify"
enableOverride
=
{
enableOverride
}
/>
<
TableDetails
name
=
"Modify"
enableOverride
=
{
enableOverride
}
notes
=
{
notes
}
/>
<
Confirm
name
=
"Results"
/>
</
Wizard
>
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help