feat: sync userprefs.cfg for rollback compat

This commit is contained in:
Pujit Mehrotra
2025-11-11 13:47:21 -05:00
parent 2371d8e2e1
commit a5cd839993
13 changed files with 127 additions and 22 deletions

View File

@@ -3,7 +3,5 @@
"extraOrigins": [],
"sandbox": true,
"ssoSubIds": [],
"plugins": [
"unraid-api-plugin-connect"
]
"plugins": ["unraid-api-plugin-connect"]
}

View File

@@ -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!

View File

@@ -6,6 +6,7 @@ exports[`Returns paths 1`] = `
"unraid-api-base",
"unraid-data",
"docker-autostart",
"docker-userprefs",
"docker-socket",
"rclone-socket",
"parity-checks",

View File

@@ -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',

View File

@@ -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(

View File

@@ -792,6 +792,7 @@ export type DockerMutationsUnpauseArgs = {
export type DockerMutationsUpdateAutostartConfigurationArgs = {
entries: Array<DockerAutostartEntryInput>;
persistUserPreferences?: InputMaybe<Scalars['Boolean']['input']>;
};

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -108,6 +108,29 @@ export class DockerService {
return coerced;
}
private buildUserPreferenceLines(
entries: DockerAutostartEntryInput[],
containerById: Map<string, DockerContainer>
): string[] {
const seenNames = new Set<string>();
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<void> {
public async updateAutostartConfiguration(
entries: DockerAutostartEntryInput[],
options?: { persistUserPreferences?: boolean }
): Promise<void> {
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<string>();
@@ -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();
}

View File

@@ -71,6 +71,12 @@ function containersToEntries(containers: DockerContainer[]): AutostartEntry[] {
const entries = ref<AutostartEntry[]>([]);
const selectedIds = ref<string[]>([]);
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<string | null>(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) => {

View File

@@ -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)
}
}
`;

View File

@@ -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.
*/

View File

@@ -792,6 +792,7 @@ export type DockerMutationsUnpauseArgs = {
export type DockerMutationsUpdateAutostartConfigurationArgs = {
entries: Array<DockerAutostartEntryInput>;
persistUserPreferences?: InputMaybe<Scalars['Boolean']['input']>;
};
@@ -2897,6 +2898,7 @@ export type UnpauseDockerContainerMutation = { __typename?: 'Mutation', docker:
export type UpdateDockerAutostartConfigurationMutationVariables = Exact<{
entries: Array<DockerAutostartEntryInput> | DockerAutostartEntryInput;
persistUserPreferences?: InputMaybe<Scalars['Boolean']['input']>;
}>;
@@ -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<StartDockerContainerMutation, StartDockerContainerMutationVariables>;
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<StopDockerContainerMutation, StopDockerContainerMutationVariables>;
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<UnpauseDockerContainerMutation, UnpauseDockerContainerMutationVariables>;
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<UpdateDockerAutostartConfigurationMutation, UpdateDockerAutostartConfigurationMutationVariables>;
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<UpdateDockerAutostartConfigurationMutation, UpdateDockerAutostartConfigurationMutationVariables>;
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<UpdateDockerContainerMutation, UpdateDockerContainerMutationVariables>;
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<UpdateDockerContainersMutation, UpdateDockerContainersMutationVariables>;
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<UpdateDockerViewPreferencesMutation, UpdateDockerViewPreferencesMutationVariables>;