diff --git a/src/gql/generated/types.ts b/src/gql/generated/types.ts index 8cdae65f8e..720c9734ae 100644 --- a/src/gql/generated/types.ts +++ b/src/gql/generated/types.ts @@ -436,7 +436,7 @@ export type DistroInput = { arch: Arch; authorizedKeysFile: Scalars["String"]["input"]; bootstrapSettings: BootstrapSettingsInput; - cloneMethod: CloneMethod; + cloneMethod?: InputMaybe; containerPool: Scalars["String"]["input"]; disableShallowClone: Scalars["Boolean"]["input"]; disabled: Scalars["Boolean"]["input"]; @@ -2515,6 +2515,7 @@ export type Task = { generateTask?: Maybe; generatedBy?: Maybe; generatedByName?: Maybe; + hasCedarResults: Scalars["Boolean"]["output"]; hostId?: Maybe; id: Scalars["String"]["output"]; ingestTime?: Maybe; @@ -5733,7 +5734,6 @@ export type DistroQuery = { aliases: Array; arch: Arch; authorizedKeysFile: string; - cloneMethod: CloneMethod; containerPool: string; disabled: boolean; disableShallowClone: boolean; diff --git a/src/gql/queries/distro.graphql b/src/gql/queries/distro.graphql index a8aad83f0a..33cf357f7c 100644 --- a/src/gql/queries/distro.graphql +++ b/src/gql/queries/distro.graphql @@ -28,7 +28,6 @@ query Distro($distroId: String!) { serviceUser shellPath } - cloneMethod containerPool disabled disableShallowClone diff --git a/src/pages/distroSettings/tabs/ProjectTab/getFormSchema.ts b/src/pages/distroSettings/tabs/ProjectTab/getFormSchema.ts index ef5080e978..6afd98413f 100644 --- a/src/pages/distroSettings/tabs/ProjectTab/getFormSchema.ts +++ b/src/pages/distroSettings/tabs/ProjectTab/getFormSchema.ts @@ -3,29 +3,12 @@ import { CardFieldTemplate, FieldRow, } from "components/SpruceForm/FieldTemplates"; -import { CloneMethod } from "gql/generated/types"; export const getFormSchema = (): ReturnType => ({ fields: {}, schema: { type: "object" as "object", properties: { - cloneMethod: { - type: "string" as "string", - title: "Project Cloning Method", - oneOf: [ - { - type: "string" as "string", - title: "Legacy SSH", - enum: [CloneMethod.LegacySsh], - }, - { - type: "string" as "string", - title: "OAuth", - enum: [CloneMethod.Oauth], - }, - ], - }, expansions: { type: "array" as "array", title: "Expansions", @@ -61,10 +44,6 @@ export const getFormSchema = (): ReturnType => ({ }, uiSchema: { "ui:ObjectFieldTemplate": CardFieldTemplate, - cloneMethod: { - "ui:allowDeselect": false, - "ui:data-cy": "clone-method-select", - }, expansions: { "ui:addButtonText": "Add expansion", "ui:orderable": false, diff --git a/src/pages/distroSettings/tabs/ProjectTab/transformers.test.ts b/src/pages/distroSettings/tabs/ProjectTab/transformers.test.ts index 3cb409dd8e..8e31add89f 100644 --- a/src/pages/distroSettings/tabs/ProjectTab/transformers.test.ts +++ b/src/pages/distroSettings/tabs/ProjectTab/transformers.test.ts @@ -1,4 +1,4 @@ -import { CloneMethod, DistroInput } from "gql/generated/types"; +import { DistroInput } from "gql/generated/types"; import { distroData } from "../testData"; import { formToGql, gqlToForm } from "./transformers"; import { ProjectFormState } from "./types"; @@ -14,7 +14,6 @@ describe("project tab", () => { }); const form: ProjectFormState = { - cloneMethod: CloneMethod.LegacySsh, expansions: [ { key: "decompress", @@ -34,7 +33,6 @@ const form: ProjectFormState = { const gql: DistroInput = { ...distroData, - cloneMethod: CloneMethod.LegacySsh, expansions: [ { key: "decompress", diff --git a/src/pages/distroSettings/tabs/ProjectTab/transformers.ts b/src/pages/distroSettings/tabs/ProjectTab/transformers.ts index bf98a7d868..cd680a6626 100644 --- a/src/pages/distroSettings/tabs/ProjectTab/transformers.ts +++ b/src/pages/distroSettings/tabs/ProjectTab/transformers.ts @@ -6,21 +6,16 @@ type Tab = DistroSettingsTabRoutes.Project; export const gqlToForm = ((data) => { if (!data) return null; - const { cloneMethod, expansions, validProjects } = data; + const { expansions, validProjects } = data; return { - cloneMethod, expansions, validProjects, }; }) satisfies GqlToFormFunction; -export const formToGql = (( - { cloneMethod, expansions, validProjects }, - distro, -) => ({ +export const formToGql = (({ expansions, validProjects }, distro) => ({ ...distro, - cloneMethod, expansions, validProjects, })) satisfies FormToGqlFunction; diff --git a/src/pages/distroSettings/tabs/ProjectTab/types.ts b/src/pages/distroSettings/tabs/ProjectTab/types.ts index c283f5daf6..b260baf19a 100644 --- a/src/pages/distroSettings/tabs/ProjectTab/types.ts +++ b/src/pages/distroSettings/tabs/ProjectTab/types.ts @@ -1,7 +1,4 @@ -import { CloneMethod } from "gql/generated/types"; - export interface ProjectFormState { - cloneMethod: CloneMethod; expansions: Array<{ key: string; value: string; diff --git a/src/pages/distroSettings/tabs/testData.ts b/src/pages/distroSettings/tabs/testData.ts index 89482e86a3..15c2b2825e 100644 --- a/src/pages/distroSettings/tabs/testData.ts +++ b/src/pages/distroSettings/tabs/testData.ts @@ -1,7 +1,6 @@ import { Arch, BootstrapMethod, - CloneMethod, CommunicationMethod, DispatcherVersion, DistroQuery, @@ -43,7 +42,6 @@ const distroData: DistroQuery["distro"] = { serviceUser: "", shellPath: "/bin/bash", }, - cloneMethod: CloneMethod.LegacySsh, containerPool: "", disabled: false, disableShallowClone: true,