From a5cd8399932cdf23da780fc4efe3f66c9bd88550 Mon Sep 17 00:00:00 2001 From: Pujit Mehrotra Date: Tue, 11 Nov 2025 13:47:21 -0500 Subject: [PATCH] feat: sync userprefs.cfg for rollback compat --- api/dev/configs/api.json | 4 +- api/generated-schema.graphql | 2 +- .../modules/__snapshots__/paths.test.ts.snap | 1 + api/src/__test__/store/modules/paths.test.ts | 1 + api/src/store/modules/paths.ts | 1 + api/src/unraid-api/cli/generated/graphql.ts | 1 + .../docker/docker.mutations.resolver.ts | 8 ++- .../resolvers/docker/docker.service.spec.ts | 60 ++++++++++++++++--- .../graph/resolvers/docker/docker.service.ts | 46 +++++++++++++- .../Docker/DockerAutostartSettings.vue | 8 +++ ...update-autostart-configuration.mutation.ts | 7 ++- web/src/composables/gql/gql.ts | 6 +- web/src/composables/gql/graphql.ts | 4 +- 13 files changed, 127 insertions(+), 22 deletions(-) diff --git a/api/dev/configs/api.json b/api/dev/configs/api.json index acaf5daa9..e66612727 100644 --- a/api/dev/configs/api.json +++ b/api/dev/configs/api.json @@ -3,7 +3,5 @@ "extraOrigins": [], "sandbox": true, "ssoSubIds": [], - "plugins": [ - "unraid-api-plugin-connect" - ] + "plugins": ["unraid-api-plugin-connect"] } \ No newline at end of file diff --git a/api/generated-schema.graphql b/api/generated-schema.graphql index 9a2f29a6d..94a7d70d6 100644 --- a/api/generated-schema.graphql +++ b/api/generated-schema.graphql @@ -870,7 +870,7 @@ type DockerMutations { unpause(id: PrefixedID!): DockerContainer! """Update auto-start configuration for Docker containers""" - updateAutostartConfiguration(entries: [DockerAutostartEntryInput!]!): Boolean! + updateAutostartConfiguration(entries: [DockerAutostartEntryInput!]!, persistUserPreferences: Boolean): Boolean! """Update a container to the latest image""" updateContainer(id: PrefixedID!): DockerContainer! diff --git a/api/src/__test__/store/modules/__snapshots__/paths.test.ts.snap b/api/src/__test__/store/modules/__snapshots__/paths.test.ts.snap index 2bd80788c..d131c4b49 100644 --- a/api/src/__test__/store/modules/__snapshots__/paths.test.ts.snap +++ b/api/src/__test__/store/modules/__snapshots__/paths.test.ts.snap @@ -6,6 +6,7 @@ exports[`Returns paths 1`] = ` "unraid-api-base", "unraid-data", "docker-autostart", + "docker-userprefs", "docker-socket", "rclone-socket", "parity-checks", diff --git a/api/src/__test__/store/modules/paths.test.ts b/api/src/__test__/store/modules/paths.test.ts index 0fae0dabc..2630c34b5 100644 --- a/api/src/__test__/store/modules/paths.test.ts +++ b/api/src/__test__/store/modules/paths.test.ts @@ -11,6 +11,7 @@ test('Returns paths', async () => { 'unraid-api-base': '/usr/local/unraid-api/', 'unraid-data': expect.stringContaining('api/dev/data'), 'docker-autostart': '/var/lib/docker/unraid-autostart', + 'docker-userprefs': '/boot/config/plugins/dockerMan/userprefs.cfg', 'docker-socket': '/var/run/docker.sock', 'parity-checks': expect.stringContaining('api/dev/states/parity-checks.log'), htpasswd: '/etc/nginx/htpasswd', diff --git a/api/src/store/modules/paths.ts b/api/src/store/modules/paths.ts index e42e4d83a..548dfb777 100644 --- a/api/src/store/modules/paths.ts +++ b/api/src/store/modules/paths.ts @@ -20,6 +20,7 @@ const initialState = { process.env.PATHS_UNRAID_DATA ?? ('/boot/config/plugins/dynamix.my.servers/data/' as const) ), 'docker-autostart': '/var/lib/docker/unraid-autostart' as const, + 'docker-userprefs': '/boot/config/plugins/dockerMan/userprefs.cfg' as const, 'docker-socket': '/var/run/docker.sock' as const, 'rclone-socket': resolvePath(process.env.PATHS_RCLONE_SOCKET ?? ('/var/run/rclone.socket' as const)), 'parity-checks': resolvePath( diff --git a/api/src/unraid-api/cli/generated/graphql.ts b/api/src/unraid-api/cli/generated/graphql.ts index e4ca49232..392687ad8 100644 --- a/api/src/unraid-api/cli/generated/graphql.ts +++ b/api/src/unraid-api/cli/generated/graphql.ts @@ -792,6 +792,7 @@ export type DockerMutationsUnpauseArgs = { export type DockerMutationsUpdateAutostartConfigurationArgs = { entries: Array; + persistUserPreferences?: InputMaybe; }; diff --git a/api/src/unraid-api/graph/resolvers/docker/docker.mutations.resolver.ts b/api/src/unraid-api/graph/resolvers/docker/docker.mutations.resolver.ts index 4b6e0eaf6..88901669e 100644 --- a/api/src/unraid-api/graph/resolvers/docker/docker.mutations.resolver.ts +++ b/api/src/unraid-api/graph/resolvers/docker/docker.mutations.resolver.ts @@ -63,9 +63,13 @@ export class DockerMutationsResolver { }) public async updateAutostartConfiguration( @Args('entries', { type: () => [DockerAutostartEntryInput] }) - entries: DockerAutostartEntryInput[] + entries: DockerAutostartEntryInput[], + @Args('persistUserPreferences', { type: () => Boolean, nullable: true }) + persistUserPreferences?: boolean ) { - await this.dockerService.updateAutostartConfiguration(entries); + await this.dockerService.updateAutostartConfiguration(entries, { + persistUserPreferences, + }); return true; } diff --git a/api/src/unraid-api/graph/resolvers/docker/docker.service.spec.ts b/api/src/unraid-api/graph/resolvers/docker/docker.service.spec.ts index fcfa606f7..d001f6be9 100644 --- a/api/src/unraid-api/graph/resolvers/docker/docker.service.spec.ts +++ b/api/src/unraid-api/graph/resolvers/docker/docker.service.spec.ts @@ -86,6 +86,7 @@ vi.mock('@app/store/index.js', () => ({ docker: vi.fn().mockReturnValue({ containers: [] }), paths: vi.fn().mockReturnValue({ 'docker-autostart': '/path/to/docker-autostart', + 'docker-userprefs': '/path/to/docker-userprefs', 'docker-socket': '/var/run/docker.sock', 'var-run': '/var/run', }), @@ -501,18 +502,58 @@ describe('DockerService', () => { }, ]); - await service.updateAutostartConfiguration([ - { id: 'abc123', autoStart: true, wait: 15 }, - { id: 'abc123', autoStart: true, wait: 5 }, // duplicate should be ignored - { id: 'def456', autoStart: false, wait: 0 }, - ]); + await service.updateAutostartConfiguration( + [ + { id: 'abc123', autoStart: true, wait: 15 }, + { id: 'abc123', autoStart: true, wait: 5 }, // duplicate should be ignored + { id: 'def456', autoStart: false, wait: 0 }, + ], + { persistUserPreferences: true } + ); - expect(writeFileMock).toHaveBeenCalledWith('/path/to/docker-autostart', 'alpha 15\n', 'utf8'); + expect(writeFileMock).toHaveBeenNthCalledWith( + 1, + '/path/to/docker-autostart', + 'alpha 15\n', + 'utf8' + ); + expect(writeFileMock).toHaveBeenNthCalledWith( + 2, + '/path/to/docker-userprefs', + '0="alpha"\n1="beta"\n', + 'utf8' + ); expect(unlinkMock).not.toHaveBeenCalled(); expect(mockCacheManager.del).toHaveBeenCalledWith(DockerService.CONTAINER_CACHE_KEY); expect(mockCacheManager.del).toHaveBeenCalledWith(DockerService.CONTAINER_WITH_SIZE_CACHE_KEY); }); + it('should skip updating user preferences when persist flag is false', async () => { + mockListContainers.mockResolvedValue([ + { + Id: 'abc123', + Names: ['/alpha'], + Image: 'alpha-image', + ImageID: 'alpha-image-id', + Command: 'run-alpha', + Created: 123, + State: 'running', + Status: 'Up 1 minute', + Ports: [], + Labels: {}, + HostConfig: { NetworkMode: 'bridge' }, + NetworkSettings: {}, + Mounts: [], + }, + ]); + + await service.updateAutostartConfiguration([{ id: 'abc123', autoStart: true, wait: 5 }]); + + expect(writeFileMock).toHaveBeenCalledTimes(1); + expect(writeFileMock).toHaveBeenCalledWith('/path/to/docker-autostart', 'alpha 5\n', 'utf8'); + expect(unlinkMock).not.toHaveBeenCalled(); + }); + it('should remove auto-start file when no containers are configured', async () => { mockListContainers.mockResolvedValue([ { @@ -532,9 +573,12 @@ describe('DockerService', () => { }, ]); - await service.updateAutostartConfiguration([{ id: 'abc123', autoStart: false, wait: 30 }]); + await service.updateAutostartConfiguration([{ id: 'abc123', autoStart: false, wait: 30 }], { + persistUserPreferences: true, + }); - expect(writeFileMock).not.toHaveBeenCalled(); + expect(writeFileMock).toHaveBeenCalledTimes(1); + expect(writeFileMock).toHaveBeenCalledWith('/path/to/docker-userprefs', '0="alpha"\n', 'utf8'); expect(unlinkMock).toHaveBeenCalledWith('/path/to/docker-autostart'); expect(mockCacheManager.del).toHaveBeenCalledWith(DockerService.CONTAINER_CACHE_KEY); expect(mockCacheManager.del).toHaveBeenCalledWith(DockerService.CONTAINER_WITH_SIZE_CACHE_KEY); diff --git a/api/src/unraid-api/graph/resolvers/docker/docker.service.ts b/api/src/unraid-api/graph/resolvers/docker/docker.service.ts index fdb282e38..0a8004c76 100644 --- a/api/src/unraid-api/graph/resolvers/docker/docker.service.ts +++ b/api/src/unraid-api/graph/resolvers/docker/docker.service.ts @@ -108,6 +108,29 @@ export class DockerService { return coerced; } + private buildUserPreferenceLines( + entries: DockerAutostartEntryInput[], + containerById: Map + ): string[] { + const seenNames = new Set(); + const lines: string[] = []; + + for (const entry of entries) { + const container = containerById.get(entry.id); + if (!container) { + continue; + } + const primaryName = this.getContainerPrimaryName(container); + if (!primaryName || seenNames.has(primaryName)) { + continue; + } + lines.push(`${lines.length}="${primaryName}"`); + seenNames.add(primaryName); + } + + return lines; + } + private getContainerPrimaryName(container: Docker.ContainerInfo | DockerContainer): string | null { const names = 'Names' in container ? container.Names : 'names' in container ? container.names : undefined; @@ -395,10 +418,16 @@ export class DockerService { return updatedContainer; } - public async updateAutostartConfiguration(entries: DockerAutostartEntryInput[]): Promise { + public async updateAutostartConfiguration( + entries: DockerAutostartEntryInput[], + options?: { persistUserPreferences?: boolean } + ): Promise { const containers = await this.getContainers({ skipCache: true }); const containerById = new Map(containers.map((container) => [container.id, container])); - const autoStartPath = getters.paths()['docker-autostart']; + const paths = getters.paths(); + const autoStartPath = paths['docker-autostart']; + const userPrefsPath = paths['docker-userprefs']; + const persistUserPreferences = Boolean(options?.persistUserPreferences); const lines: string[] = []; const seenNames = new Set(); @@ -430,6 +459,19 @@ export class DockerService { }); } + if (persistUserPreferences) { + const userPrefsLines = this.buildUserPreferenceLines(entries, containerById); + if (userPrefsLines.length) { + await writeFile(userPrefsPath, `${userPrefsLines.join('\n')}\n`, 'utf8'); + } else { + await unlink(userPrefsPath)?.catch((error: NodeJS.ErrnoException) => { + if (error.code !== 'ENOENT') { + throw error; + } + }); + } + } + await this.refreshAutoStartEntries(); await this.clearContainerCache(); } diff --git a/web/src/components/Docker/DockerAutostartSettings.vue b/web/src/components/Docker/DockerAutostartSettings.vue index 951236e17..f78291d4d 100644 --- a/web/src/components/Docker/DockerAutostartSettings.vue +++ b/web/src/components/Docker/DockerAutostartSettings.vue @@ -71,6 +71,12 @@ function containersToEntries(containers: DockerContainer[]): AutostartEntry[] { const entries = ref([]); const selectedIds = ref([]); +function hasOrderChanged(previous?: AutostartEntry[]) { + if (!previous) return false; + if (previous.length !== entries.value.length) return true; + return previous.some((entry, index) => entry.id !== entries.value[index]?.id); +} + watch( () => props.containers, (containers) => { @@ -119,12 +125,14 @@ const errorMessage = ref(null); async function persistConfiguration(previousSnapshot?: AutostartEntry[]) { try { errorMessage.value = null; + const persistUserPreferences = hasOrderChanged(previousSnapshot); await mutate({ entries: entries.value.map((entry) => ({ id: entry.id, autoStart: entry.autoStart, wait: entry.autoStart ? entry.wait : 0, })), + persistUserPreferences, }); if (props.refresh) { await props.refresh().catch((refreshError: unknown) => { diff --git a/web/src/components/Docker/docker-update-autostart-configuration.mutation.ts b/web/src/components/Docker/docker-update-autostart-configuration.mutation.ts index 6a5318632..e534e13b8 100644 --- a/web/src/components/Docker/docker-update-autostart-configuration.mutation.ts +++ b/web/src/components/Docker/docker-update-autostart-configuration.mutation.ts @@ -1,9 +1,12 @@ import { gql } from '@apollo/client'; export const UPDATE_DOCKER_AUTOSTART_CONFIGURATION = gql` - mutation UpdateDockerAutostartConfiguration($entries: [DockerAutostartEntryInput!]!) { + mutation UpdateDockerAutostartConfiguration( + $entries: [DockerAutostartEntryInput!]! + $persistUserPreferences: Boolean + ) { docker { - updateAutostartConfiguration(entries: $entries) + updateAutostartConfiguration(entries: $entries, persistUserPreferences: $persistUserPreferences) } } `; diff --git a/web/src/composables/gql/gql.ts b/web/src/composables/gql/gql.ts index 6241f7c11..fd0bbea6c 100644 --- a/web/src/composables/gql/gql.ts +++ b/web/src/composables/gql/gql.ts @@ -44,7 +44,7 @@ type Documents = { "\n mutation StartDockerContainer($id: PrefixedID!) {\n docker {\n start(id: $id) {\n id\n names\n state\n }\n }\n }\n": typeof types.StartDockerContainerDocument, "\n mutation StopDockerContainer($id: PrefixedID!) {\n docker {\n stop(id: $id) {\n id\n names\n state\n }\n }\n }\n": typeof types.StopDockerContainerDocument, "\n mutation UnpauseDockerContainer($id: PrefixedID!) {\n docker {\n unpause(id: $id) {\n id\n names\n state\n }\n }\n }\n": typeof types.UnpauseDockerContainerDocument, - "\n mutation UpdateDockerAutostartConfiguration($entries: [DockerAutostartEntryInput!]!) {\n docker {\n updateAutostartConfiguration(entries: $entries)\n }\n }\n": typeof types.UpdateDockerAutostartConfigurationDocument, + "\n mutation UpdateDockerAutostartConfiguration(\n $entries: [DockerAutostartEntryInput!]!\n $persistUserPreferences: Boolean\n ) {\n docker {\n updateAutostartConfiguration(\n entries: $entries\n persistUserPreferences: $persistUserPreferences\n )\n }\n }\n": typeof types.UpdateDockerAutostartConfigurationDocument, "\n mutation UpdateDockerContainer($id: PrefixedID!) {\n docker {\n updateContainer(id: $id) {\n id\n names\n state\n isUpdateAvailable\n isRebuildReady\n }\n }\n }\n": typeof types.UpdateDockerContainerDocument, "\n mutation UpdateDockerContainers($ids: [PrefixedID!]!) {\n docker {\n updateContainers(ids: $ids) {\n id\n names\n state\n isUpdateAvailable\n isRebuildReady\n }\n }\n }\n": typeof types.UpdateDockerContainersDocument, "\n mutation UpdateDockerViewPreferences($viewId: String, $prefs: JSON!) {\n updateDockerViewPreferences(viewId: $viewId, prefs: $prefs) {\n version\n views {\n id\n name\n rootId\n prefs\n flatEntries {\n id\n type\n name\n parentId\n depth\n position\n path\n hasChildren\n childrenIds\n meta {\n id\n names\n state\n status\n image\n ports {\n privatePort\n publicPort\n type\n }\n autoStart\n hostConfig {\n networkMode\n }\n created\n isUpdateAvailable\n isRebuildReady\n }\n }\n }\n }\n }\n": typeof types.UpdateDockerViewPreferencesDocument, @@ -112,7 +112,7 @@ const documents: Documents = { "\n mutation StartDockerContainer($id: PrefixedID!) {\n docker {\n start(id: $id) {\n id\n names\n state\n }\n }\n }\n": types.StartDockerContainerDocument, "\n mutation StopDockerContainer($id: PrefixedID!) {\n docker {\n stop(id: $id) {\n id\n names\n state\n }\n }\n }\n": types.StopDockerContainerDocument, "\n mutation UnpauseDockerContainer($id: PrefixedID!) {\n docker {\n unpause(id: $id) {\n id\n names\n state\n }\n }\n }\n": types.UnpauseDockerContainerDocument, - "\n mutation UpdateDockerAutostartConfiguration($entries: [DockerAutostartEntryInput!]!) {\n docker {\n updateAutostartConfiguration(entries: $entries)\n }\n }\n": types.UpdateDockerAutostartConfigurationDocument, + "\n mutation UpdateDockerAutostartConfiguration(\n $entries: [DockerAutostartEntryInput!]!\n $persistUserPreferences: Boolean\n ) {\n docker {\n updateAutostartConfiguration(\n entries: $entries\n persistUserPreferences: $persistUserPreferences\n )\n }\n }\n": types.UpdateDockerAutostartConfigurationDocument, "\n mutation UpdateDockerContainer($id: PrefixedID!) {\n docker {\n updateContainer(id: $id) {\n id\n names\n state\n isUpdateAvailable\n isRebuildReady\n }\n }\n }\n": types.UpdateDockerContainerDocument, "\n mutation UpdateDockerContainers($ids: [PrefixedID!]!) {\n docker {\n updateContainers(ids: $ids) {\n id\n names\n state\n isUpdateAvailable\n isRebuildReady\n }\n }\n }\n": types.UpdateDockerContainersDocument, "\n mutation UpdateDockerViewPreferences($viewId: String, $prefs: JSON!) {\n updateDockerViewPreferences(viewId: $viewId, prefs: $prefs) {\n version\n views {\n id\n name\n rootId\n prefs\n flatEntries {\n id\n type\n name\n parentId\n depth\n position\n path\n hasChildren\n childrenIds\n meta {\n id\n names\n state\n status\n image\n ports {\n privatePort\n publicPort\n type\n }\n autoStart\n hostConfig {\n networkMode\n }\n created\n isUpdateAvailable\n isRebuildReady\n }\n }\n }\n }\n }\n": types.UpdateDockerViewPreferencesDocument, @@ -287,7 +287,7 @@ export function graphql(source: "\n mutation UnpauseDockerContainer($id: Prefix /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n mutation UpdateDockerAutostartConfiguration($entries: [DockerAutostartEntryInput!]!) {\n docker {\n updateAutostartConfiguration(entries: $entries)\n }\n }\n"): (typeof documents)["\n mutation UpdateDockerAutostartConfiguration($entries: [DockerAutostartEntryInput!]!) {\n docker {\n updateAutostartConfiguration(entries: $entries)\n }\n }\n"]; +export function graphql(source: "\n mutation UpdateDockerAutostartConfiguration(\n $entries: [DockerAutostartEntryInput!]!\n $persistUserPreferences: Boolean\n ) {\n docker {\n updateAutostartConfiguration(\n entries: $entries\n persistUserPreferences: $persistUserPreferences\n )\n }\n }\n"): (typeof documents)["\n mutation UpdateDockerAutostartConfiguration(\n $entries: [DockerAutostartEntryInput!]!\n $persistUserPreferences: Boolean\n ) {\n docker {\n updateAutostartConfiguration(\n entries: $entries\n persistUserPreferences: $persistUserPreferences\n )\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/web/src/composables/gql/graphql.ts b/web/src/composables/gql/graphql.ts index ae418f337..a9c218622 100644 --- a/web/src/composables/gql/graphql.ts +++ b/web/src/composables/gql/graphql.ts @@ -792,6 +792,7 @@ export type DockerMutationsUnpauseArgs = { export type DockerMutationsUpdateAutostartConfigurationArgs = { entries: Array; + persistUserPreferences?: InputMaybe; }; @@ -2897,6 +2898,7 @@ export type UnpauseDockerContainerMutation = { __typename?: 'Mutation', docker: export type UpdateDockerAutostartConfigurationMutationVariables = Exact<{ entries: Array | DockerAutostartEntryInput; + persistUserPreferences?: InputMaybe; }>; @@ -3164,7 +3166,7 @@ export const SetDockerFolderChildrenDocument = {"kind":"Document","definitions": export const StartDockerContainerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"StartDockerContainer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PrefixedID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"docker"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"start"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"names"}},{"kind":"Field","name":{"kind":"Name","value":"state"}}]}}]}}]}}]} as unknown as DocumentNode; export const StopDockerContainerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"StopDockerContainer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PrefixedID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"docker"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stop"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"names"}},{"kind":"Field","name":{"kind":"Name","value":"state"}}]}}]}}]}}]} as unknown as DocumentNode; export const UnpauseDockerContainerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UnpauseDockerContainer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PrefixedID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"docker"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"unpause"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"names"}},{"kind":"Field","name":{"kind":"Name","value":"state"}}]}}]}}]}}]} as unknown as DocumentNode; -export const UpdateDockerAutostartConfigurationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateDockerAutostartConfiguration"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"entries"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DockerAutostartEntryInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"docker"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateAutostartConfiguration"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"entries"},"value":{"kind":"Variable","name":{"kind":"Name","value":"entries"}}}]}]}}]}}]} as unknown as DocumentNode; +export const UpdateDockerAutostartConfigurationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateDockerAutostartConfiguration"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"entries"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DockerAutostartEntryInput"}}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"persistUserPreferences"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"docker"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateAutostartConfiguration"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"entries"},"value":{"kind":"Variable","name":{"kind":"Name","value":"entries"}}},{"kind":"Argument","name":{"kind":"Name","value":"persistUserPreferences"},"value":{"kind":"Variable","name":{"kind":"Name","value":"persistUserPreferences"}}}]}]}}]}}]} as unknown as DocumentNode; export const UpdateDockerContainerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateDockerContainer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PrefixedID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"docker"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateContainer"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"names"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"isUpdateAvailable"}},{"kind":"Field","name":{"kind":"Name","value":"isRebuildReady"}}]}}]}}]}}]} as unknown as DocumentNode; export const UpdateDockerContainersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateDockerContainers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ids"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PrefixedID"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"docker"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateContainers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ids"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ids"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"names"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"isUpdateAvailable"}},{"kind":"Field","name":{"kind":"Name","value":"isRebuildReady"}}]}}]}}]}}]} as unknown as DocumentNode; export const UpdateDockerViewPreferencesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateDockerViewPreferences"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"prefs"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateDockerViewPreferences"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"viewId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}}},{"kind":"Argument","name":{"kind":"Name","value":"prefs"},"value":{"kind":"Variable","name":{"kind":"Name","value":"prefs"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"views"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"rootId"}},{"kind":"Field","name":{"kind":"Name","value":"prefs"}},{"kind":"Field","name":{"kind":"Name","value":"flatEntries"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"depth"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"path"}},{"kind":"Field","name":{"kind":"Name","value":"hasChildren"}},{"kind":"Field","name":{"kind":"Name","value":"childrenIds"}},{"kind":"Field","name":{"kind":"Name","value":"meta"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"names"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"image"}},{"kind":"Field","name":{"kind":"Name","value":"ports"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"privatePort"}},{"kind":"Field","name":{"kind":"Name","value":"publicPort"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"Field","name":{"kind":"Name","value":"autoStart"}},{"kind":"Field","name":{"kind":"Name","value":"hostConfig"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"networkMode"}}]}},{"kind":"Field","name":{"kind":"Name","value":"created"}},{"kind":"Field","name":{"kind":"Name","value":"isUpdateAvailable"}},{"kind":"Field","name":{"kind":"Name","value":"isRebuildReady"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode;