{
setEditModalProps({
@@ -28,6 +27,7 @@ export const PublicKeysTab: React.FC = () => {
initialPublicKey: null,
});
}}
+ size="small"
>
Add key
diff --git a/apps/spruce/src/pages/preferences/preferencesTabs/cliTab/AuthenticationCard.tsx b/apps/spruce/src/pages/preferences/preferencesTabs/cliTab/AuthenticationCard.tsx
index 2d68e0a5d..d10818ee7 100644
--- a/apps/spruce/src/pages/preferences/preferencesTabs/cliTab/AuthenticationCard.tsx
+++ b/apps/spruce/src/pages/preferences/preferencesTabs/cliTab/AuthenticationCard.tsx
@@ -60,7 +60,7 @@ ui_server_host: "${config?.ui_server_host}"
{authCode}
-
{
- table.setPageSize(Number(value));
- }}
numTotalItems={subscriptions.length}
- currentPage={table.getState().pagination.pageIndex + 1}
+ onBackArrowClick={() => table.previousPage()}
onCurrentPageOptionChange={(value: string) => {
table.setPageIndex(Number(value) - 1);
}}
- onBackArrowClick={() => table.previousPage()}
onForwardArrowClick={() => table.nextPage()}
+ onItemsPerPageOptionChange={(value: string) => {
+ table.setPageSize(Number(value));
+ }}
/>
diff --git a/apps/spruce/src/pages/preferences/preferencesTabs/publicKeysTab/EditModal.tsx b/apps/spruce/src/pages/preferences/preferencesTabs/publicKeysTab/EditModal.tsx
index 689e221dc..7fccd3d2c 100644
--- a/apps/spruce/src/pages/preferences/preferencesTabs/publicKeysTab/EditModal.tsx
+++ b/apps/spruce/src/pages/preferences/preferencesTabs/publicKeysTab/EditModal.tsx
@@ -123,32 +123,32 @@ export const EditModal: React.FC = ({
return (
0}
- buttonText="Save"
title={replaceKeyName ? "Update Public Key" : "Add Public Key"}
>
{
setKeyName(e.target.value);
}}
spellCheck={false}
+ value={keyName}
/>
);
diff --git a/apps/spruce/src/pages/projectSettings/DefaultSectionToRepoModal.tsx b/apps/spruce/src/pages/projectSettings/DefaultSectionToRepoModal.tsx
index 8f0ed03a4..22b240925 100644
--- a/apps/spruce/src/pages/projectSettings/DefaultSectionToRepoModal.tsx
+++ b/apps/spruce/src/pages/projectSettings/DefaultSectionToRepoModal.tsx
@@ -58,9 +58,9 @@ export const DefaultSectionToRepoModal = ({
handleClose();
}}
open={open}
- variant="danger"
requiredInputText="confirm"
title="Are you sure you want to default all settings in this section to the repo settings?"
+ variant="danger"
>
<>
diff --git a/apps/spruce/src/pages/projectSettings/HeaderButtons.tsx b/apps/spruce/src/pages/projectSettings/HeaderButtons.tsx
index 8299a7314..8594625de 100644
--- a/apps/spruce/src/pages/projectSettings/HeaderButtons.tsx
+++ b/apps/spruce/src/pages/projectSettings/HeaderButtons.tsx
@@ -141,17 +141,17 @@ export const HeaderButtons: React.FC = ({ id, projectType, tab }) => {
Save changes on page
{projectType === ProjectType.AttachedProject && canDefaultToRepo && (
<>
setDefaultModalOpen(true)}
data-cy="default-to-repo-button"
+ onClick={() => setDefaultModalOpen(true)}
title="Clicking this button will open a confirmation modal with more information."
>
Default to repo on page
diff --git a/apps/spruce/src/pages/projectSettings/Tabs.tsx b/apps/spruce/src/pages/projectSettings/Tabs.tsx
index e704cde2a..a5f87f3b8 100644
--- a/apps/spruce/src/pages/projectSettings/Tabs.tsx
+++ b/apps/spruce/src/pages/projectSettings/Tabs.tsx
@@ -91,20 +91,19 @@ export const ProjectSettingsTabs: React.FC = ({
/>
}
+ path={ProjectSettingsTabRoutes.General}
/>
= ({
repoData={tabData[ProjectSettingsTabRoutes.Access].repoData}
/>
}
+ path={ProjectSettingsTabRoutes.Access}
/>
= ({
repoData={tabData[ProjectSettingsTabRoutes.Variables].repoData}
/>
}
+ path={ProjectSettingsTabRoutes.Variables}
/>
= ({
}
/>
}
+ path={ProjectSettingsTabRoutes.GithubCommitQueue}
/>
= ({
repoData={tabData[ProjectSettingsTabRoutes.Plugins].repoData}
/>
}
+ path={ProjectSettingsTabRoutes.Plugins}
/>
= ({
}
/>
}
+ path={ProjectSettingsTabRoutes.Notifications}
/>
= ({
repoData={tabData[ProjectSettingsTabRoutes.PatchAliases].repoData}
/>
}
+ path={ProjectSettingsTabRoutes.PatchAliases}
/>
= ({
}
/>
}
+ path={ProjectSettingsTabRoutes.VirtualWorkstation}
/>
= ({
repoData={tabData[ProjectSettingsTabRoutes.Containers].repoData}
/>
}
+ path={ProjectSettingsTabRoutes.Containers}
/>
= ({
}
/>
}
+ path={ProjectSettingsTabRoutes.ViewsAndFilters}
/>
= ({
}
/>
}
+ path={ProjectSettingsTabRoutes.ProjectTriggers}
/>
= ({
}
/>
}
+ path={ProjectSettingsTabRoutes.PeriodicBuilds}
/>
}
+ path={ProjectSettingsTabRoutes.GithubAppSettings}
/>
= ({
}
/>
}
+ path={ProjectSettingsTabRoutes.GithubPermissionGroups}
/>
}
+ path={ProjectSettingsTabRoutes.EventLog}
/>
}
path="*"
- element={}
/>
diff --git a/apps/spruce/src/pages/projectSettings/createDuplicateModalSchema.tsx b/apps/spruce/src/pages/projectSettings/createDuplicateModalSchema.tsx
index 4259f1200..7cae37380 100644
--- a/apps/spruce/src/pages/projectSettings/createDuplicateModalSchema.tsx
+++ b/apps/spruce/src/pages/projectSettings/createDuplicateModalSchema.tsx
@@ -27,9 +27,9 @@ const enablePerformanceTooling = {
const PerformanceToolingBanner: Field = () => (
Please confirm these preferences before creating your project. You will not
be able to configure the project for performance tooling at a later date.
diff --git a/apps/spruce/src/pages/projectSettings/index.tsx b/apps/spruce/src/pages/projectSettings/index.tsx
index 6b5c0b553..b0243a6cc 100644
--- a/apps/spruce/src/pages/projectSettings/index.tsx
+++ b/apps/spruce/src/pages/projectSettings/index.tsx
@@ -176,21 +176,21 @@ const ProjectSettings: React.FC = () => {
{projectType === ProjectType.AttachedProject && repoId && (
Go to repo settings
@@ -277,12 +277,12 @@ const ProjectSettings: React.FC = () => {
{hasLoaded ? (
{title || getTabTitle(tab).title}
diff --git a/apps/spruce/src/pages/projectSettings/tabs/EventLogTab/EventLogTab.test.tsx b/apps/spruce/src/pages/projectSettings/tabs/EventLogTab/EventLogTab.test.tsx
index d83916b5e..e4ece8b23 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/EventLogTab/EventLogTab.test.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/EventLogTab/EventLogTab.test.tsx
@@ -42,7 +42,7 @@ describe("loading events", () => {
const { Component } = RenderFakeToastContext(
// @ts-expect-error: FIXME. This comment was added by an automated script.
-
+
,
);
render(, {
diff --git a/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/DeactivateStepbackTaskField.tsx b/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/DeactivateStepbackTaskField.tsx
index 88c3a59cb..b963caacd 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/DeactivateStepbackTaskField.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/DeactivateStepbackTaskField.tsx
@@ -55,12 +55,12 @@ const Modal: React.FC = ({ closeModal, open, projectId }) => {
return (
Specify a stepback task to deactivate. To deactivate stepback more
@@ -104,10 +104,10 @@ export const DeactivateStepbackTaskField: Field = ({ uiSchema }) => {
setOpen(true)}
size="small"
- data-cy={id}
>
Deactivate
diff --git a/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/DeleteProjectField.tsx b/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/DeleteProjectField.tsx
index 01aec2aa5..e0a912da3 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/DeleteProjectField.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/DeleteProjectField.tsx
@@ -50,13 +50,13 @@ const Modal: React.FC
= ({ closeModal, open, projectId }) => {
return (
This action cannot be undone. Please proceed with caution.
@@ -82,8 +82,8 @@ export const DeleteProjectField: Field = ({ uiSchema }) => {
after deletion.
setOpen(true)}
data-cy="delete-project-button"
+ onClick={() => setOpen(true)}
variant="danger"
>
Delete project
diff --git a/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/RepoConfigField.test.tsx b/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/RepoConfigField.test.tsx
index 555e575ad..1e6181a53 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/RepoConfigField.test.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/RepoConfigField.test.tsx
@@ -115,8 +115,8 @@ describe("repoConfigField", () => {
const user = userEvent.setup();
const { Component } = RenderFakeToastContext(
,
);
render();
@@ -141,8 +141,8 @@ describe("repoConfigField", () => {
const user = userEvent.setup();
const { Component } = RenderFakeToastContext(
,
);
render();
diff --git a/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/RepoConfigField.tsx b/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/RepoConfigField.tsx
index cbc654fac..b99ed85c1 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/RepoConfigField.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/RepoConfigField.tsx
@@ -55,9 +55,9 @@ export const RepoConfigField: Field = ({
{isAttachedProject && !!githubOrgs.length && (
<>
setMoveModalOpen(true)}
size="small"
- data-cy="move-repo-button"
>
Move to New Repo
@@ -77,19 +77,19 @@ export const RepoConfigField: Field = ({
enabled={ownerOrRepoHasChanges}
justify="middle"
popoverZIndex={zIndex.popover}
- triggerEvent="hover"
trigger={
setAttachModalOpen(true)}
data-cy="attach-repo-button"
disabled={ownerOrRepoHasChanges}
+ onClick={() => setAttachModalOpen(true)}
+ size="small"
>
{isAttachedProject
? "Detach from Current Repo"
: "Attach to Current Repo"}
}
+ triggerEvent="hover"
>
Project must be saved with new owner/repo before it can be
attached.
diff --git a/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/RepotrackerField.tsx b/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/RepotrackerField.tsx
index ea09df1d4..bdf597fb8 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/RepotrackerField.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/Fields/RepotrackerField.tsx
@@ -79,9 +79,9 @@ export const RepotrackerField: Field = ({ uiSchema }) => {
)}
setOpen(true)}
size="small"
- data-cy="force-repotracker-run-button"
>
Force Repotracker Run
diff --git a/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/GeneralTab.tsx b/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/GeneralTab.tsx
index ede740239..389260ac9 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/GeneralTab.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/GeneralTab/GeneralTab.tsx
@@ -60,9 +60,9 @@ export const GeneralTab: React.FC = ({
return (
diff --git a/apps/spruce/src/pages/projectSettings/tabs/GithubAppSettingsTab/AppSettingsTab.tsx b/apps/spruce/src/pages/projectSettings/tabs/GithubAppSettingsTab/AppSettingsTab.tsx
index 8406877fa..eb4137102 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/GithubAppSettingsTab/AppSettingsTab.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/GithubAppSettingsTab/AppSettingsTab.tsx
@@ -31,8 +31,8 @@ export const AppSettingsTab: React.FC = ({
return (
diff --git a/apps/spruce/src/pages/projectSettings/tabs/GithubCommitQueueTab/GithubTriggerAliasField.tsx b/apps/spruce/src/pages/projectSettings/tabs/GithubCommitQueueTab/GithubTriggerAliasField.tsx
index 236a282f6..daa0fbb9c 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/GithubCommitQueueTab/GithubTriggerAliasField.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/GithubCommitQueueTab/GithubTriggerAliasField.tsx
@@ -62,9 +62,9 @@ export const GithubTriggerAliasField: Field = ({ formData }) => {
return (
{alias}
diff --git a/apps/spruce/src/pages/projectSettings/tabs/GithubPermissionGroupsTab/FieldTemplates.tsx b/apps/spruce/src/pages/projectSettings/tabs/GithubPermissionGroupsTab/FieldTemplates.tsx
index e7c5e46d1..913aa4764 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/GithubPermissionGroupsTab/FieldTemplates.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/GithubPermissionGroupsTab/FieldTemplates.tsx
@@ -29,12 +29,12 @@ export const ArrayFieldTemplate: React.FC<
<>
No permission groups added yet.
}
+ table={table}
/>
[] = [
header: "Action",
cell: ({ row }) => (
}
data-cy="delete-permission-button"
+ leftGlyph={}
+ onClick={row.original.onDropIndexClick(row.index)}
size="small"
/>
),
diff --git a/apps/spruce/src/pages/projectSettings/tabs/GithubPermissionGroupsTab/PermissionGroupsTab.tsx b/apps/spruce/src/pages/projectSettings/tabs/GithubPermissionGroupsTab/PermissionGroupsTab.tsx
index ddd99f43e..345ff8e42 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/GithubPermissionGroupsTab/PermissionGroupsTab.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/GithubPermissionGroupsTab/PermissionGroupsTab.tsx
@@ -18,8 +18,8 @@ export const PermissionGroupsTab: React.FC = ({
return (
diff --git a/apps/spruce/src/pages/projectSettings/tabs/GithubPermissionGroupsTab/getFormSchema.tsx b/apps/spruce/src/pages/projectSettings/tabs/GithubPermissionGroupsTab/getFormSchema.tsx
index b7089fb74..0457effc4 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/GithubPermissionGroupsTab/getFormSchema.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/GithubPermissionGroupsTab/getFormSchema.tsx
@@ -103,8 +103,8 @@ export const getFormSchema = ({
have the permissions that are defined on this page.
Learn more about GitHub permissions
diff --git a/apps/spruce/src/pages/projectSettings/tabs/VariablesTab/PromoteVariablesModal.tsx b/apps/spruce/src/pages/projectSettings/tabs/VariablesTab/PromoteVariablesModal.tsx
index daec5deb6..d6976b4b5 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/VariablesTab/PromoteVariablesModal.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/VariablesTab/PromoteVariablesModal.tsx
@@ -117,15 +117,15 @@ export const PromoteVariablesModal: React.FC = ({
{variables.map(({ inRepo, name }) => (
{name}
{inRepo && }
>
}
- checked={selected.has(name)}
onClick={handleClickCheckbox(name)}
/>
))}
diff --git a/apps/spruce/src/pages/projectSettings/tabs/VariablesTab/VariablesTab.tsx b/apps/spruce/src/pages/projectSettings/tabs/VariablesTab/VariablesTab.tsx
index 9b208c472..e70a60aa7 100644
--- a/apps/spruce/src/pages/projectSettings/tabs/VariablesTab/VariablesTab.tsx
+++ b/apps/spruce/src/pages/projectSettings/tabs/VariablesTab/VariablesTab.tsx
@@ -64,9 +64,9 @@ export const VariablesTab: React.FC = ({
<>
{modalOpen && (
setModalOpen(false)}
+ open={modalOpen}
+ projectId={identifier}
variables={formData.vars.map(({ varName }) => ({
name: varName,
inRepo:
diff --git a/apps/spruce/src/pages/spawn/SpawnVolume.tsx b/apps/spruce/src/pages/spawn/SpawnVolume.tsx
index 46586a2bf..d6d6fe4bd 100644
--- a/apps/spruce/src/pages/spawn/SpawnVolume.tsx
+++ b/apps/spruce/src/pages/spawn/SpawnVolume.tsx
@@ -69,9 +69,9 @@ export const SpawnVolume = () => {
{volumes.length ? (
diff --git a/apps/spruce/src/pages/spawn/index.tsx b/apps/spruce/src/pages/spawn/index.tsx
index cc01a70b7..a702f6031 100644
--- a/apps/spruce/src/pages/spawn/index.tsx
+++ b/apps/spruce/src/pages/spawn/index.tsx
@@ -20,7 +20,6 @@ const Spawn: React.FC = () => {
@@ -29,12 +28,12 @@ const Spawn: React.FC = () => {
tab: SpawnTab.Host,
})
}
+ to={routes.spawnHost}
>
Hosts
@@ -43,6 +42,7 @@ const Spawn: React.FC = () => {
tab: SpawnTab.Volume,
})
}
+ to={routes.spawnVolume}
>
Volumes
@@ -50,13 +50,13 @@ const Spawn: React.FC = () => {
- } />
- } />
+ } path={SpawnTab.Host} />
+ } path={SpawnTab.Volume} />
+
}
+ path="*"
/>
diff --git a/apps/spruce/src/pages/spawn/spawnHost/EditSpawnHostButton.tsx b/apps/spruce/src/pages/spawn/spawnHost/EditSpawnHostButton.tsx
index 5591a5503..75c48a062 100644
--- a/apps/spruce/src/pages/spawn/spawnHost/EditSpawnHostButton.tsx
+++ b/apps/spruce/src/pages/spawn/spawnHost/EditSpawnHostButton.tsx
@@ -29,10 +29,8 @@ export const EditSpawnHostButton: React.FC = ({
align="top"
enabled={!canEditSpawnHost}
justify="middle"
- triggerEvent="hover"
trigger={
{
@@ -44,19 +42,21 @@ export const EditSpawnHostButton: React.FC = ({
"host.status": host.status,
});
}}
+ size={Size.XSmall}
>
Edit
}
+ triggerEvent="hover"
>
{`Can only edit a spawn host when the status is ${HostStatus.Stopped} or ${HostStatus.Running}`}
setOpenModal(false)}
visible={openModal}
- host={host}
/>
>
);
diff --git a/apps/spruce/src/pages/spawn/spawnHost/EditSpawnHostModal.test.tsx b/apps/spruce/src/pages/spawn/spawnHost/EditSpawnHostModal.test.tsx
index a620b68b8..3121a657a 100644
--- a/apps/spruce/src/pages/spawn/spawnHost/EditSpawnHostModal.test.tsx
+++ b/apps/spruce/src/pages/spawn/spawnHost/EditSpawnHostModal.test.tsx
@@ -34,7 +34,7 @@ describe("editSpawnHostModal", () => {
it("renders modal", () => {
const { Component } = RenderFakeToastContext(
- {}} />,
+ {}} visible />,
);
render(
@@ -46,7 +46,7 @@ describe("editSpawnHostModal", () => {
it("disables save button when no changes have been made", () => {
const { Component } = RenderFakeToastContext(
- {}} />,
+ {}} visible />,
);
render(
@@ -63,7 +63,7 @@ describe("editSpawnHostModal", () => {
describe("when default sleep schedule is enabled", () => {
it("has default sleep schedule checkbox checked", () => {
const { Component } = RenderFakeToastContext(
- {}} />,
+ {}} visible />,
);
render(
@@ -80,7 +80,7 @@ describe("editSpawnHostModal", () => {
it("has all daypicker elements disabled", () => {
const { Component } = RenderFakeToastContext(
- {}} />,
+ {}} visible />,
);
render(
@@ -97,7 +97,7 @@ describe("editSpawnHostModal", () => {
it("has default days selected", () => {
const { Component } = RenderFakeToastContext(
- {}} />,
+ {}} visible />,
);
render(
@@ -127,7 +127,7 @@ describe("editSpawnHostModal", () => {
it("has timepicker elements disabled", () => {
const { Component } = RenderFakeToastContext(
- {}} />,
+ {}} visible />,
);
render(
@@ -150,7 +150,7 @@ describe("editSpawnHostModal", () => {
it("shows the updated hour count when changing the schedule", async () => {
const user = userEvent.setup();
const { Component } = RenderFakeToastContext(
- {}} />,
+ {}} visible />,
);
render(
@@ -181,7 +181,7 @@ describe("editSpawnHostModal", () => {
it("shows a warning when user has configured a schedule over the recommended limit", async () => {
const user = userEvent.setup();
const { Component } = RenderFakeToastContext(
- {}} />,
+ {}} visible />,
);
render(
@@ -207,7 +207,7 @@ describe("editSpawnHostModal", () => {
it("shows an error and disables save when user has configured a schedule over the hard limit", async () => {
const user = userEvent.setup();
const { Component } = RenderFakeToastContext(
- {}} />,
+ {}} visible />,
);
render(
@@ -251,8 +251,8 @@ describe("editSpawnHostModal", () => {
const { Component } = RenderFakeToastContext(
{}}
+ visible
/>,
);
render(
diff --git a/apps/spruce/src/pages/spawn/spawnHost/EditSpawnHostModal.tsx b/apps/spruce/src/pages/spawn/spawnHost/EditSpawnHostModal.tsx
index ac792a131..4aa07d044 100644
--- a/apps/spruce/src/pages/spawn/spawnHost/EditSpawnHostModal.tsx
+++ b/apps/spruce/src/pages/spawn/spawnHost/EditSpawnHostModal.tsx
@@ -180,26 +180,26 @@ export const EditSpawnHostModal: React.FC = ({
return (
{
onCancel();
// @ts-expect-error: FIXME. This comment was added by an automated script.
setFormState(initialFormState);
}}
onConfirm={onSubmit}
- buttonText={loadingSpawnHost ? "Saving" : "Save"}
+ open={visible}
+ submitDisabled={!hasChanges || hasError || loadingSpawnHost}
+ title="Edit Host Details"
>
{
setFormState(formData);
setHasError(errors.length > 0);
}}
+ schema={schema}
+ uiSchema={uiSchema}
// @ts-expect-error rjsf v4 has insufficient typing for its validator
validate={validator(!!host?.sleepSchedule?.permanentlyExempt)}
/>
diff --git a/apps/spruce/src/pages/spawn/spawnHost/PauseSleepScheduleModal.tsx b/apps/spruce/src/pages/spawn/spawnHost/PauseSleepScheduleModal.tsx
index 5d7b1836e..0d4a824b6 100644
--- a/apps/spruce/src/pages/spawn/spawnHost/PauseSleepScheduleModal.tsx
+++ b/apps/spruce/src/pages/spawn/spawnHost/PauseSleepScheduleModal.tsx
@@ -31,12 +31,12 @@ export const PauseSleepScheduleModal: React.FC<{
setOpen(false)}
onConfirm={() => {
handleConfirm(shouldKeepOff);
setOpen(false);
}}
+ open={open}
setOpen={setOpen}
title="Configure Host Pause"
>
diff --git a/apps/spruce/src/pages/spawn/spawnHost/SpawnHostActionButton.tsx b/apps/spruce/src/pages/spawn/spawnHost/SpawnHostActionButton.tsx
index ed624d367..84b4389a9 100644
--- a/apps/spruce/src/pages/spawn/spawnHost/SpawnHostActionButton.tsx
+++ b/apps/spruce/src/pages/spawn/spawnHost/SpawnHostActionButton.tsx
@@ -117,8 +117,8 @@ export const SpawnHostActionButton: React.FC<{ host: MyHost }> = ({ host }) => {
data-cy="pause-unexpirable-host-button"
disabled={loading || host.status === HostStatus.Stopping}
leftGlyph={}
- size={Size.XSmall}
onClick={() => setSleepModalOpen((o) => !o)}
+ size={Size.XSmall}
/>
@@ -135,8 +135,8 @@ export const SpawnHostActionButton: React.FC<{ host: MyHost }> = ({ host }) => {
}
- size={Size.XSmall}
onClick={() => handleClick(action)}
+ size={Size.XSmall}
/>
)
)}
@@ -145,11 +145,11 @@ export const SpawnHostActionButton: React.FC<{ host: MyHost }> = ({ host }) => {
onConfirm={() => handleClick(SpawnHostStatusActions.Terminate)}
trigger={
{
e.stopPropagation();
}}
+ size={Size.XSmall}
>
@@ -158,12 +158,12 @@ export const SpawnHostActionButton: React.FC<{ host: MyHost }> = ({ host }) => {
Delete host “{host.displayName || host.id}”?
{checkboxLabel && (
{
e.nativeEvent.stopPropagation();
setCheckboxAcknowledged(!checkboxAcknowledged);
}}
- checked={checkboxAcknowledged}
/>
)}
diff --git a/apps/spruce/src/pages/spawn/spawnHost/SpawnHostButton.tsx b/apps/spruce/src/pages/spawn/spawnHost/SpawnHostButton.tsx
index c1e64d9a7..afd09b4ea 100644
--- a/apps/spruce/src/pages/spawn/spawnHost/SpawnHostButton.tsx
+++ b/apps/spruce/src/pages/spawn/spawnHost/SpawnHostButton.tsx
@@ -38,11 +38,12 @@ export const SpawnHostButton: React.FC = () => {
{
setOpenModal(true);
@@ -50,12 +51,11 @@ export const SpawnHostButton: React.FC = () => {
name: "Viewed spawn host modal",
});
}}
- data-cy="spawn-host-button"
>
Spawn a host
}
- enabled={reachedMaxNumHosts}
+ triggerEvent="hover"
>
{`You have reached the maximum number of hosts (${maxHosts}). Delete some hosts to spawn more.`}
diff --git a/apps/spruce/src/pages/spawn/spawnHost/SpawnHostTable.tsx b/apps/spruce/src/pages/spawn/spawnHost/SpawnHostTable.tsx
index f8577cb96..34eaabb2b 100644
--- a/apps/spruce/src/pages/spawn/spawnHost/SpawnHostTable.tsx
+++ b/apps/spruce/src/pages/spawn/spawnHost/SpawnHostTable.tsx
@@ -52,7 +52,7 @@ export const SpawnHostTable: React.FC = ({ hosts }) => {
},
});
- return ;
+ return ;
};
const columns = [
diff --git a/apps/spruce/src/pages/spawn/spawnHost/SpawnHostTableActions.test.tsx b/apps/spruce/src/pages/spawn/spawnHost/SpawnHostTableActions.test.tsx
index 3e80a7679..24b769725 100644
--- a/apps/spruce/src/pages/spawn/spawnHost/SpawnHostTableActions.test.tsx
+++ b/apps/spruce/src/pages/spawn/spawnHost/SpawnHostTableActions.test.tsx
@@ -47,9 +47,9 @@ describe("copySSHCommandButton", () => {
render(
,
);
@@ -88,9 +88,9 @@ describe("copySSHCommandButton", () => {
render(
,
);
@@ -112,9 +112,9 @@ describe("copySSHCommandButton", () => {
render(
,
);
diff --git a/apps/spruce/src/pages/spawn/spawnHost/SpawnHostTableActions.tsx b/apps/spruce/src/pages/spawn/spawnHost/SpawnHostTableActions.tsx
index 4493c6714..8dfdf2f29 100644
--- a/apps/spruce/src/pages/spawn/spawnHost/SpawnHostTableActions.tsx
+++ b/apps/spruce/src/pages/spawn/spawnHost/SpawnHostTableActions.tsx
@@ -18,10 +18,10 @@ export const SpawnHostTableActions: React.FC<{ host: MyHost }> = ({ host }) => (
@@ -52,8 +52,8 @@ export const CopySSHCommandButton: React.FC<{
>
= ({
return (
{
setOpen(false);
}}
onConfirm={spawnHost}
- buttonText={loadingSpawnHost ? "Spawning" : "Spawn a host"}
+ open={open}
+ submitDisabled={hasError || loadingSpawnHost}
+ title="Spawn New Host"
>
{
setFormState(formData);
setHasError(errors.length > 0);
}}
+ schema={schema}
+ uiSchema={uiSchema}
// @ts-expect-error rjsf v4 has insufficient typing for its validator
validate={validator(!!spawnHost?.sleepSchedule?.permanentlyExempt)}
/>
diff --git a/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeButton.tsx b/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeButton.tsx
index b63a93450..a36427ec7 100644
--- a/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeButton.tsx
+++ b/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeButton.tsx
@@ -26,8 +26,8 @@ export const SpawnVolumeButton: React.FC = ({
= ({
Spawn a volume
}
- enabled={reachedMaxVolumeSize}
+ triggerEvent="hover"
>
{`You have reached the max volume limit (${volumeLimit} GiB). Delete some volumes to spawn more.`}
Limit {volumeLimit} GiB per User
{openModal && (
setOpenModal(false)}
maxSpawnableLimit={maxSpawnableLimit}
+ onCancel={() => setOpenModal(false)}
+ visible={openModal}
/>
)}
diff --git a/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeModal.test.tsx b/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeModal.test.tsx
index bfa288bc9..de37426f0 100644
--- a/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeModal.test.tsx
+++ b/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeModal.test.tsx
@@ -32,9 +32,9 @@ describe("spawnVolumeModal", () => {
it("does not render the Spawn Volume Modal when the visible prop is false", () => {
const { Component } = RenderFakeToastContext(
{}}
maxSpawnableLimit={1000}
+ onCancel={() => {}}
+ visible={false}
/>,
);
render(
@@ -47,7 +47,7 @@ describe("spawnVolumeModal", () => {
it("form contains default values on initial render", async () => {
const { Component } = RenderFakeToastContext(
- {}} maxSpawnableLimit={1000} />,
+ {}} visible />,
);
render(
@@ -92,7 +92,7 @@ describe("spawnVolumeModal", () => {
result: { data: { spawnVolume: true } },
};
const { Component, dispatchToast } = RenderFakeToastContext(
- {}} maxSpawnableLimit={1000} />,
+ {}} visible />,
);
render(
@@ -135,7 +135,7 @@ describe("spawnVolumeModal", () => {
result: { data: { spawnVolume: true } },
};
const { Component, dispatchToast } = RenderFakeToastContext(
- {}} maxSpawnableLimit={1000} />,
+ {}} visible />,
);
render(
diff --git a/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeModal.tsx b/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeModal.tsx
index ce012209f..43a5231b2 100644
--- a/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeModal.tsx
+++ b/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeModal.tsx
@@ -101,22 +101,22 @@ export const SpawnVolumeModal: React.FC = ({
return (
{
setFormState(formData);
setCanSubmit(errors.length === 0);
}}
+ schema={schema}
+ uiSchema={uiSchema}
/>
);
diff --git a/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeTable.tsx b/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeTable.tsx
index 74a729a68..816cec33d 100644
--- a/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeTable.tsx
+++ b/apps/spruce/src/pages/spawn/spawnVolume/SpawnVolumeTable.tsx
@@ -56,7 +56,7 @@ export const SpawnVolumeTable: React.FC = ({
},
});
- return ;
+ return ;
};
const getHostDisplayName = (v: TableVolume) =>
diff --git a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/DeleteVolumeButton.tsx b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/DeleteVolumeButton.tsx
index 23012e091..4a784bee7 100644
--- a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/DeleteVolumeButton.tsx
+++ b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/DeleteVolumeButton.tsx
@@ -51,12 +51,12 @@ export const DeleteVolumeButton: React.FC = ({ volume }) => {
}}
trigger={
{
e.stopPropagation();
}}
+ size={Size.XSmall}
>
@@ -65,13 +65,13 @@ export const DeleteVolumeButton: React.FC = ({ volume }) => {
Delete volume “{volumeName}”?
{volume.hostID && (
{
e.nativeEvent.stopPropagation();
setCheckboxAcknowledged(!checkboxAcknowledged);
}}
- checked={checkboxAcknowledged}
/>
)}
diff --git a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/EditButton.tsx b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/EditButton.tsx
index 73ddfa2f2..da82f931f 100644
--- a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/EditButton.tsx
+++ b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/EditButton.tsx
@@ -13,20 +13,20 @@ export const EditButton: React.FC = ({ volume }) => {
return (
<>
{
e.stopPropagation();
setOpenModal(true);
}}
+ size={Size.XSmall}
>
Edit
{openModal && (
setOpenModal(false)}
+ visible={openModal}
volume={volume}
/>
)}
diff --git a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/EditVolumeModal.tsx b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/EditVolumeModal.tsx
index 587ce667d..b9d88ed2f 100644
--- a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/EditVolumeModal.tsx
+++ b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/EditVolumeModal.tsx
@@ -91,23 +91,23 @@ export const EditVolumeModal: React.FC = ({
return (
{
setFormState(formData);
// @ts-expect-error: FIXME. This comment was added by an automated script.
setFormErrors(errors);
}}
+ schema={schema}
+ uiSchema={uiSchema}
/>
);
diff --git a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MigrateButton.tsx b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MigrateButton.tsx
index a1c49bbcb..6a81adc63 100644
--- a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MigrateButton.tsx
+++ b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MigrateButton.tsx
@@ -14,13 +14,13 @@ export const MigrateButton: React.FC = ({ volume }) => {
<>
{
e.stopPropagation();
setOpenModal(true);
}}
+ size={Size.XSmall}
>
Migrate
diff --git a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MigrateVolumeModal.tsx b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MigrateVolumeModal.tsx
index 03c1d5910..c517586a5 100644
--- a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MigrateVolumeModal.tsx
+++ b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MigrateVolumeModal.tsx
@@ -159,13 +159,13 @@ export const MigrateVolumeModal: React.FC = ({
return (
Migrate this home volume to a new host. Upon successful migration, the
@@ -173,13 +173,13 @@ export const MigrateVolumeModal: React.FC = ({
{onPageOne && (
{
dispatch({ type: "setForm", payload: formData });
dispatch({ type: "setHasError", payload: errors.length > 0 });
}}
+ schema={schema}
+ uiSchema={uiSchema}
/>
)}
diff --git a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MountButton.tsx b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MountButton.tsx
index fec540562..1ec1095cf 100644
--- a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MountButton.tsx
+++ b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MountButton.tsx
@@ -13,19 +13,19 @@ export const MountButton: React.FC = ({ volume }) => {
return (
<>
{
e.stopPropagation();
setOpenModal(true);
}}
+ size={Size.XSmall}
>
Mount
setOpenModal(false)}
+ visible={openModal}
volume={volume}
/>
>
diff --git a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MountVolumeModal.tsx b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MountVolumeModal.tsx
index 1b7349998..7310fb17b 100644
--- a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MountVolumeModal.tsx
+++ b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/MountVolumeModal.tsx
@@ -42,8 +42,8 @@ export const MountVolumeModal: React.FC = ({
const [selectedHostId, setSelectedHostId] = useState("");
return (
{
spawnAnalytics.sendEvent({
@@ -61,16 +61,16 @@ export const MountVolumeModal: React.FC = ({
});
onCancel();
}}
+ open={visible}
submitDisabled={!selectedHostId || loadingAttachVolume}
- buttonText="Mount"
- data-cy="mount-volume-modal"
+ title="Attach Volume to Host"
>
{`Only shows running hosts in zone ${targetAvailabilityZone}.`}
diff --git a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/UnmountButton.tsx b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/UnmountButton.tsx
index 65cb08215..72249be02 100644
--- a/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/UnmountButton.tsx
+++ b/apps/spruce/src/pages/spawn/spawnVolume/spawnVolumeTableActions/UnmountButton.tsx
@@ -51,17 +51,6 @@ export const UnmountButton: React.FC = ({ volume }) => {
return (
(
-
- Cannot unmount home volume
-
- )}
altWrapper={(children) => (
= ({ volume }) => {
Detach this volume {volumeName} from host {hostName}?
)}
+ condition={isHomeVolume}
+ wrapper={(children) => (
+
+ Cannot unmount home volume
+
+ )}
>
{
e.stopPropagation();
}}
+ size={Size.XSmall}
>
Unmount
diff --git a/apps/spruce/src/pages/task/ActionButtons.tsx b/apps/spruce/src/pages/task/ActionButtons.tsx
index aa9e46478..a43da07cb 100644
--- a/apps/spruce/src/pages/task/ActionButtons.tsx
+++ b/apps/spruce/src/pages/task/ActionButtons.tsx
@@ -200,8 +200,8 @@ export const ActionButtons: React.FC = ({
const dropdownItems = [
{
unscheduleTask();
taskAnalytics.sendEvent({ name: "Clicked unschedule task button" });
@@ -241,9 +241,9 @@ export const ActionButtons: React.FC = ({
// @ts-expect-error: FIXME. This comment was added by an automated script.
,
= ({
<>
{
taskAnalytics.sendEvent({ name: "Clicked see history link" });
}}
- as={HistoryLink}
- disabled={displayName === mergeTaskName}
+ size="small"
>
See history
>
)}
{
scheduleTask();
taskAnalytics.sendEvent({ name: "Clicked schedule task button" });
}}
+ size="small"
>
Schedule
@@ -295,10 +295,10 @@ export const ActionButtons: React.FC = ({
) : (
{
@@ -346,19 +345,20 @@ export const ActionButtons: React.FC = ({
"task.is.display_task": false,
});
}}
+ size="small"
>
Restart
)}
{
taskAnalytics.sendEvent({ name: "Viewed notification modal" });
setIsVisibleModal(true);
}}
+ size="small"
>
Notify me
@@ -371,8 +371,8 @@ export const ActionButtons: React.FC = ({
/>
setIsVisibleModal(false)}
+ visible={isVisibleModal}
/>
>
);
diff --git a/apps/spruce/src/pages/task/TaskTabs.tsx b/apps/spruce/src/pages/task/TaskTabs.tsx
index c4e5e3f73..1478a2b60 100644
--- a/apps/spruce/src/pages/task/TaskTabs.tsx
+++ b/apps/spruce/src/pages/task/TaskTabs.tsx
@@ -61,38 +61,38 @@ export const TaskTabs: React.FC = ({ isDisplayTask, task }) => {
const tabMap = {
[TaskTab.Logs]: (
-
+
{/* @ts-expect-error: FIXME. This comment was added by an automated script. */}
-
+
),
[TaskTab.Tests]: (
{failedTestCount ? (
) : (
"Tests"
)}
}
- data-cy="task-tests-tab"
- key="task-tests-tab"
>
),
[TaskTab.ExecutionTasks]: (
= ({ isDisplayTask, task }) => {
),
[TaskTab.Files]: (
{fileCount !== undefined ? (
) : (
"Files"
)}
}
- data-cy="task-files-tab"
- key="task-files-tab"
>
{/* @ts-expect-error: FIXME. This comment was added by an automated script. */}
-
+
),
[TaskTab.Annotations]: (
),
[TaskTab.TrendCharts]: (
{/* @ts-expect-error: FIXME. This comment was added by an automated script. */}
@@ -223,9 +223,9 @@ export const TaskTabs: React.FC = ({ isDisplayTask, task }) => {
return (
{/* @ts-expect-error: FIXME. This comment was added by an automated script. */}
{activeTabs.map((tab: string) => tabMap[tab])}
diff --git a/apps/spruce/src/pages/task/executionDropdown/ExecutionSelector.tsx b/apps/spruce/src/pages/task/executionDropdown/ExecutionSelector.tsx
index f4b8798b7..74c63767c 100644
--- a/apps/spruce/src/pages/task/executionDropdown/ExecutionSelector.tsx
+++ b/apps/spruce/src/pages/task/executionDropdown/ExecutionSelector.tsx
@@ -37,10 +37,10 @@ export const ExecutionSelect: React.FC = ({
const getDateCopy = useDateFormat();
return (
{
// @ts-expect-error: FIXME. This comment was added by an automated script.
@@ -62,8 +62,8 @@ export const ExecutionSelect: React.FC = ({
return (