mirror of
https://github.com/unraid/api.git
synced 2026-01-15 05:00:16 -06:00
feat: container start & stop order
This commit is contained in:
@@ -869,10 +869,24 @@ type DockerMutations {
|
||||
"""Unpause (Resume) a container"""
|
||||
unpause(id: PrefixedID!): DockerContainer!
|
||||
|
||||
"""Update auto-start configuration for Docker containers"""
|
||||
updateAutostartConfiguration(entries: [DockerAutostartEntryInput!]!): Boolean!
|
||||
|
||||
"""Update a container to the latest image"""
|
||||
updateContainer(id: PrefixedID!): DockerContainer!
|
||||
}
|
||||
|
||||
input DockerAutostartEntryInput {
|
||||
"""Docker container identifier"""
|
||||
id: PrefixedID!
|
||||
|
||||
"""Whether the container should auto-start"""
|
||||
autoStart: Boolean!
|
||||
|
||||
"""Number of seconds to wait after starting the container"""
|
||||
wait: Int
|
||||
}
|
||||
|
||||
type VmMutations {
|
||||
"""Start a virtual machine"""
|
||||
start(id: PrefixedID!): Boolean!
|
||||
@@ -1111,6 +1125,12 @@ type DockerContainer implements Node {
|
||||
networkSettings: JSON
|
||||
mounts: [JSON!]
|
||||
autoStart: Boolean!
|
||||
|
||||
"""Zero-based order in the auto-start list"""
|
||||
autoStartOrder: Int
|
||||
|
||||
"""Wait time in seconds applied after start"""
|
||||
autoStartWait: Int
|
||||
templatePath: String
|
||||
isUpdateAvailable: Boolean
|
||||
isRebuildReady: Boolean
|
||||
|
||||
@@ -701,9 +701,22 @@ export type DockerOrganizerArgs = {
|
||||
skipCache?: Scalars['Boolean']['input'];
|
||||
};
|
||||
|
||||
export type DockerAutostartEntryInput = {
|
||||
/** Whether the container should auto-start */
|
||||
autoStart: Scalars['Boolean']['input'];
|
||||
/** Docker container identifier */
|
||||
id: Scalars['PrefixedID']['input'];
|
||||
/** Number of seconds to wait after starting the container */
|
||||
wait?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
export type DockerContainer = Node & {
|
||||
__typename?: 'DockerContainer';
|
||||
autoStart: Scalars['Boolean']['output'];
|
||||
/** Zero-based order in the auto-start list */
|
||||
autoStartOrder?: Maybe<Scalars['Int']['output']>;
|
||||
/** Wait time in seconds applied after start */
|
||||
autoStartWait?: Maybe<Scalars['Int']['output']>;
|
||||
command: Scalars['String']['output'];
|
||||
created: Scalars['Int']['output'];
|
||||
hostConfig?: Maybe<ContainerHostConfig>;
|
||||
@@ -742,6 +755,8 @@ export type DockerMutations = {
|
||||
stop: DockerContainer;
|
||||
/** Unpause (Resume) a container */
|
||||
unpause: DockerContainer;
|
||||
/** Update auto-start configuration for Docker containers */
|
||||
updateAutostartConfiguration: Scalars['Boolean']['output'];
|
||||
/** Update a container to the latest image */
|
||||
updateContainer: DockerContainer;
|
||||
};
|
||||
@@ -767,6 +782,11 @@ export type DockerMutationsUnpauseArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type DockerMutationsUpdateAutostartConfigurationArgs = {
|
||||
entries: Array<DockerAutostartEntryInput>;
|
||||
};
|
||||
|
||||
|
||||
export type DockerMutationsUpdateContainerArgs = {
|
||||
id: Scalars['PrefixedID']['input'];
|
||||
};
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { Field, ID, Int, ObjectType, registerEnumType } from '@nestjs/graphql';
|
||||
import { Field, ID, InputType, Int, ObjectType, registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
import { type Layout } from '@jsonforms/core';
|
||||
import { Node } from '@unraid/shared/graphql.model.js';
|
||||
import { PrefixedID } from '@unraid/shared/prefixed-id-scalar.js';
|
||||
import { GraphQLBigInt, GraphQLJSON, GraphQLPort } from 'graphql-scalars';
|
||||
|
||||
import { DataSlice } from '@app/unraid-api/types/json-forms.js';
|
||||
@@ -120,6 +121,12 @@ export class DockerContainer extends Node {
|
||||
@Field(() => Boolean)
|
||||
autoStart!: boolean;
|
||||
|
||||
@Field(() => Int, { nullable: true, description: 'Zero-based order in the auto-start list' })
|
||||
autoStartOrder?: number;
|
||||
|
||||
@Field(() => Int, { nullable: true, description: 'Wait time in seconds applied after start' })
|
||||
autoStartWait?: number;
|
||||
|
||||
@Field(() => String, { nullable: true })
|
||||
templatePath?: string;
|
||||
}
|
||||
@@ -194,3 +201,18 @@ export class DockerContainerOverviewForm {
|
||||
@Field(() => GraphQLJSON)
|
||||
data!: Record<string, any>;
|
||||
}
|
||||
|
||||
@InputType()
|
||||
export class DockerAutostartEntryInput {
|
||||
@Field(() => PrefixedID, { description: 'Docker container identifier' })
|
||||
id!: string;
|
||||
|
||||
@Field(() => Boolean, { description: 'Whether the container should auto-start' })
|
||||
autoStart!: boolean;
|
||||
|
||||
@Field(() => Int, {
|
||||
nullable: true,
|
||||
description: 'Number of seconds to wait after starting the container',
|
||||
})
|
||||
wait?: number | null;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,11 @@ import { AuthAction, Resource } from '@unraid/shared/graphql.model.js';
|
||||
import { PrefixedID } from '@unraid/shared/prefixed-id-scalar.js';
|
||||
import { UsePermissions } from '@unraid/shared/use-permissions.directive.js';
|
||||
|
||||
import { DockerContainer } from '@app/unraid-api/graph/resolvers/docker/docker.model.js';
|
||||
import { UseFeatureFlag } from '@app/unraid-api/decorators/use-feature-flag.decorator.js';
|
||||
import {
|
||||
DockerAutostartEntryInput,
|
||||
DockerContainer,
|
||||
} from '@app/unraid-api/graph/resolvers/docker/docker.model.js';
|
||||
import { DockerService } from '@app/unraid-api/graph/resolvers/docker/docker.service.js';
|
||||
import { DockerMutations } from '@app/unraid-api/graph/resolvers/mutation/mutation.model.js';
|
||||
|
||||
@@ -49,6 +53,22 @@ export class DockerMutationsResolver {
|
||||
return this.dockerService.unpause(id);
|
||||
}
|
||||
|
||||
@ResolveField(() => Boolean, {
|
||||
description: 'Update auto-start configuration for Docker containers',
|
||||
})
|
||||
@UseFeatureFlag('ENABLE_NEXT_DOCKER_RELEASE')
|
||||
@UsePermissions({
|
||||
action: AuthAction.UPDATE_ANY,
|
||||
resource: Resource.DOCKER,
|
||||
})
|
||||
public async updateAutostartConfiguration(
|
||||
@Args('entries', { type: () => [DockerAutostartEntryInput] })
|
||||
entries: DockerAutostartEntryInput[]
|
||||
) {
|
||||
await this.dockerService.updateAutostartConfiguration(entries);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ResolveField(() => DockerContainer, { description: 'Update a container to the latest image' })
|
||||
@UsePermissions({
|
||||
action: AuthAction.UPDATE_ANY,
|
||||
|
||||
@@ -71,8 +71,16 @@ vi.mock('@app/store/index.js', () => ({
|
||||
}));
|
||||
|
||||
// Mock fs/promises
|
||||
const { readFileMock, writeFileMock, unlinkMock } = vi.hoisted(() => ({
|
||||
readFileMock: vi.fn().mockResolvedValue(''),
|
||||
writeFileMock: vi.fn().mockResolvedValue(undefined),
|
||||
unlinkMock: vi.fn().mockResolvedValue(undefined),
|
||||
}));
|
||||
|
||||
vi.mock('fs/promises', () => ({
|
||||
readFile: vi.fn().mockResolvedValue(''),
|
||||
readFile: readFileMock,
|
||||
writeFile: writeFileMock,
|
||||
unlink: unlinkMock,
|
||||
}));
|
||||
|
||||
// Mock Cache Manager
|
||||
@@ -122,6 +130,10 @@ describe('DockerService', () => {
|
||||
mockCacheManager.get.mockReset();
|
||||
mockCacheManager.set.mockReset();
|
||||
mockCacheManager.del.mockReset();
|
||||
readFileMock.mockReset();
|
||||
readFileMock.mockResolvedValue('');
|
||||
writeFileMock.mockReset();
|
||||
unlinkMock.mockReset();
|
||||
mockDockerConfigService.getConfig.mockReturnValue({
|
||||
updateCheckCronSchedule: '0 6 * * *',
|
||||
templateMappings: {},
|
||||
@@ -248,6 +260,8 @@ describe('DockerService', () => {
|
||||
{
|
||||
id: 'abc123def456',
|
||||
autoStart: false,
|
||||
autoStartOrder: undefined,
|
||||
autoStartWait: undefined,
|
||||
command: 'test',
|
||||
created: 1234567890,
|
||||
image: 'test-image',
|
||||
@@ -303,6 +317,8 @@ describe('DockerService', () => {
|
||||
expect(result).toEqual({
|
||||
id: 'abc123def456',
|
||||
autoStart: false,
|
||||
autoStartOrder: undefined,
|
||||
autoStartWait: undefined,
|
||||
command: 'test',
|
||||
created: 1234567890,
|
||||
image: 'test-image',
|
||||
@@ -361,6 +377,8 @@ describe('DockerService', () => {
|
||||
expect(result).toEqual({
|
||||
id: 'abc123def456',
|
||||
autoStart: false,
|
||||
autoStartOrder: undefined,
|
||||
autoStartWait: undefined,
|
||||
command: 'test',
|
||||
created: 1234567890,
|
||||
image: 'test-image',
|
||||
@@ -411,6 +429,79 @@ describe('DockerService', () => {
|
||||
expect(mockCacheManager.del).toHaveBeenCalledWith(DockerService.CONTAINER_CACHE_KEY);
|
||||
});
|
||||
|
||||
it('should update auto-start configuration and persist waits', 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: [],
|
||||
},
|
||||
{
|
||||
Id: 'def456',
|
||||
Names: ['/beta'],
|
||||
Image: 'beta-image',
|
||||
ImageID: 'beta-image-id',
|
||||
Command: 'run-beta',
|
||||
Created: 456,
|
||||
State: 'running',
|
||||
Status: 'Up 1 minute',
|
||||
Ports: [],
|
||||
Labels: {},
|
||||
HostConfig: { NetworkMode: 'bridge' },
|
||||
NetworkSettings: {},
|
||||
Mounts: [],
|
||||
},
|
||||
]);
|
||||
|
||||
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 },
|
||||
]);
|
||||
|
||||
expect(writeFileMock).toHaveBeenCalledWith('/path/to/docker-autostart', 'alpha 15\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 remove auto-start file when no containers are configured', 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: false, wait: 30 }]);
|
||||
|
||||
expect(writeFileMock).not.toHaveBeenCalled();
|
||||
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);
|
||||
});
|
||||
|
||||
it('should get networks', async () => {
|
||||
const mockNetworks = [
|
||||
{
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { CACHE_MANAGER } from '@nestjs/cache-manager';
|
||||
import { Inject, Injectable, Logger } from '@nestjs/common';
|
||||
import { readFile } from 'fs/promises';
|
||||
import { readFile, unlink, writeFile } from 'fs/promises';
|
||||
|
||||
import { type Cache } from 'cache-manager';
|
||||
import Docker from 'dockerode';
|
||||
import { execa } from 'execa';
|
||||
|
||||
import type { DockerAutostartEntryInput } from '@app/unraid-api/graph/resolvers/docker/docker.model.js';
|
||||
import { pubsub, PUBSUB_CHANNEL } from '@app/core/pubsub.js';
|
||||
import { catchHandlers } from '@app/core/utils/misc/catch-handlers.js';
|
||||
import { sleep } from '@app/core/utils/misc/sleep.js';
|
||||
@@ -28,10 +29,17 @@ interface NetworkListingOptions {
|
||||
skipCache: boolean;
|
||||
}
|
||||
|
||||
interface AutoStartEntry {
|
||||
name: string;
|
||||
wait: number;
|
||||
order: number;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class DockerService {
|
||||
private client: Docker;
|
||||
private autoStarts: string[] = [];
|
||||
private autoStartEntries: AutoStartEntry[] = [];
|
||||
private autoStartEntryByName = new Map<string, AutoStartEntry>();
|
||||
private readonly logger = new Logger(DockerService.name);
|
||||
|
||||
public static readonly CONTAINER_CACHE_KEY = 'docker_containers';
|
||||
@@ -47,6 +55,63 @@ export class DockerService {
|
||||
this.client = this.getDockerClient();
|
||||
}
|
||||
|
||||
private setAutoStartEntries(entries: AutoStartEntry[]) {
|
||||
this.autoStartEntries = entries;
|
||||
this.autoStartEntryByName = new Map(entries.map((entry) => [entry.name, entry]));
|
||||
}
|
||||
|
||||
private parseAutoStartEntries(rawContent: string): AutoStartEntry[] {
|
||||
const lines = rawContent
|
||||
.split('\n')
|
||||
.map((line) => line.trim())
|
||||
.filter((line) => line.length > 0);
|
||||
|
||||
const seen = new Set<string>();
|
||||
const entries: AutoStartEntry[] = [];
|
||||
|
||||
lines.forEach((line, index) => {
|
||||
const [name, waitRaw] = line.split(/\s+/);
|
||||
if (!name || seen.has(name)) {
|
||||
return;
|
||||
}
|
||||
const parsedWait = Number.parseInt(waitRaw ?? '', 10);
|
||||
const wait = Number.isFinite(parsedWait) && parsedWait > 0 ? parsedWait : 0;
|
||||
entries.push({
|
||||
name,
|
||||
wait,
|
||||
order: index,
|
||||
});
|
||||
seen.add(name);
|
||||
});
|
||||
|
||||
return entries;
|
||||
}
|
||||
|
||||
private async refreshAutoStartEntries(): Promise<void> {
|
||||
const autoStartPath = getters.paths()['docker-autostart'];
|
||||
const raw = await readFile(autoStartPath, 'utf8')
|
||||
.then((file) => file.toString())
|
||||
.catch(() => '');
|
||||
const entries = this.parseAutoStartEntries(raw);
|
||||
this.setAutoStartEntries(entries);
|
||||
}
|
||||
|
||||
private sanitizeAutoStartWait(wait?: number | null): number {
|
||||
if (wait === null || wait === undefined) return 0;
|
||||
const coerced = Number.isInteger(wait) ? wait : Number.parseInt(String(wait), 10);
|
||||
if (!Number.isFinite(coerced) || coerced < 0) {
|
||||
return 0;
|
||||
}
|
||||
return coerced;
|
||||
}
|
||||
|
||||
private getContainerPrimaryName(container: Docker.ContainerInfo | DockerContainer): string | null {
|
||||
const names =
|
||||
'Names' in container ? container.Names : 'names' in container ? container.names : undefined;
|
||||
const firstName = names?.[0] ?? '';
|
||||
return firstName ? firstName.replace(/^\//, '') : null;
|
||||
}
|
||||
|
||||
public getDockerClient() {
|
||||
return new Docker({
|
||||
socketPath: '/var/run/docker.sock',
|
||||
@@ -73,14 +138,14 @@ export class DockerService {
|
||||
* @see https://github.com/limetech/webgui/issues/502#issue-480992547
|
||||
*/
|
||||
public async getAutoStarts(): Promise<string[]> {
|
||||
const autoStartFile = await readFile(getters.paths()['docker-autostart'], 'utf8')
|
||||
.then((file) => file.toString())
|
||||
.catch(() => '');
|
||||
return autoStartFile.split('\n');
|
||||
await this.refreshAutoStartEntries();
|
||||
return this.autoStartEntries.map((entry) => entry.name);
|
||||
}
|
||||
|
||||
public transformContainer(container: Docker.ContainerInfo): DockerContainer {
|
||||
const sizeValue = (container as Docker.ContainerInfo & { SizeRootFs?: number }).SizeRootFs;
|
||||
const primaryName = this.getContainerPrimaryName(container) ?? '';
|
||||
const autoStartEntry = primaryName ? this.autoStartEntryByName.get(primaryName) : undefined;
|
||||
|
||||
const transformed: DockerContainer = {
|
||||
id: container.Id,
|
||||
@@ -110,7 +175,9 @@ export class DockerService {
|
||||
},
|
||||
networkSettings: container.NetworkSettings,
|
||||
mounts: container.Mounts,
|
||||
autoStart: this.autoStarts.includes(container.Names[0].split('/')[1]),
|
||||
autoStart: Boolean(autoStartEntry),
|
||||
autoStartOrder: autoStartEntry?.order,
|
||||
autoStartWait: autoStartEntry?.wait,
|
||||
};
|
||||
|
||||
return transformed;
|
||||
@@ -148,7 +215,7 @@ export class DockerService {
|
||||
await this.handleDockerListError(error);
|
||||
}
|
||||
|
||||
this.autoStarts = await this.getAutoStarts();
|
||||
await this.refreshAutoStartEntries();
|
||||
const containers = rawContainers.map((container) => this.transformContainer(container));
|
||||
|
||||
const config = this.dockerConfigService.getConfig();
|
||||
@@ -237,6 +304,45 @@ export class DockerService {
|
||||
return updatedContainer;
|
||||
}
|
||||
|
||||
public async updateAutostartConfiguration(entries: DockerAutostartEntryInput[]): 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 lines: string[] = [];
|
||||
const seenNames = new Set<string>();
|
||||
|
||||
for (const entry of entries) {
|
||||
if (!entry.autoStart) {
|
||||
continue;
|
||||
}
|
||||
const container = containerById.get(entry.id);
|
||||
if (!container) {
|
||||
continue;
|
||||
}
|
||||
const primaryName = this.getContainerPrimaryName(container);
|
||||
if (!primaryName || seenNames.has(primaryName)) {
|
||||
continue;
|
||||
}
|
||||
const wait = this.sanitizeAutoStartWait(entry.wait);
|
||||
lines.push(wait > 0 ? `${primaryName} ${wait}` : primaryName);
|
||||
seenNames.add(primaryName);
|
||||
}
|
||||
|
||||
if (lines.length) {
|
||||
await writeFile(autoStartPath, `${lines.join('\n')}\n`, 'utf8');
|
||||
} else {
|
||||
await unlink(autoStartPath)?.catch((error: NodeJS.ErrnoException) => {
|
||||
if (error.code !== 'ENOENT') {
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
await this.refreshAutoStartEntries();
|
||||
await this.clearContainerCache();
|
||||
}
|
||||
|
||||
public async stop(id: string): Promise<DockerContainer> {
|
||||
const container = this.client.getContainer(id);
|
||||
await container.stop({ t: 10 });
|
||||
|
||||
311
web/src/components/Docker/DockerAutostartSettings.vue
Normal file
311
web/src/components/Docker/DockerAutostartSettings.vue
Normal file
@@ -0,0 +1,311 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, h, ref, resolveComponent, watch } from 'vue';
|
||||
import { useMutation } from '@vue/apollo-composable';
|
||||
|
||||
import BaseTreeTable from '@/components/Common/BaseTreeTable.vue';
|
||||
import { UPDATE_DOCKER_AUTOSTART_CONFIGURATION } from '@/components/Docker/docker-update-autostart-configuration.mutation';
|
||||
import { useTreeData } from '@/composables/useTreeData';
|
||||
|
||||
import type { DockerContainer } from '@/composables/gql/graphql';
|
||||
import type { DropEvent } from '@/composables/useDragDrop';
|
||||
import type { TreeRow } from '@/composables/useTreeData';
|
||||
import type { TableColumn } from '@nuxt/ui';
|
||||
import type { Component } from 'vue';
|
||||
|
||||
interface Props {
|
||||
containers: DockerContainer[];
|
||||
loading?: boolean;
|
||||
refresh?: () => Promise<unknown>;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
loading: false,
|
||||
refresh: undefined,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'close'): void;
|
||||
}>();
|
||||
|
||||
interface AutostartEntry {
|
||||
id: string;
|
||||
container: DockerContainer;
|
||||
autoStart: boolean;
|
||||
wait: number;
|
||||
}
|
||||
|
||||
function sanitizeWait(value: unknown): number {
|
||||
const parsed = Number.parseInt(String(value ?? ''), 10);
|
||||
if (Number.isFinite(parsed) && parsed > 0) {
|
||||
return parsed;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function sortContainers(containers: DockerContainer[]): DockerContainer[] {
|
||||
return [...containers].sort((a, b) => {
|
||||
const aEnabled = Boolean(a.autoStart);
|
||||
const bEnabled = Boolean(b.autoStart);
|
||||
if (aEnabled && bEnabled) {
|
||||
return (
|
||||
(a.autoStartOrder ?? Number.MAX_SAFE_INTEGER) - (b.autoStartOrder ?? Number.MAX_SAFE_INTEGER)
|
||||
);
|
||||
}
|
||||
if (aEnabled) return -1;
|
||||
if (bEnabled) return 1;
|
||||
const aName = a.names?.[0]?.replace(/^\//, '') || '';
|
||||
const bName = b.names?.[0]?.replace(/^\//, '') || '';
|
||||
return aName.localeCompare(bName);
|
||||
});
|
||||
}
|
||||
|
||||
function containersToEntries(containers: DockerContainer[]): AutostartEntry[] {
|
||||
return sortContainers(containers).map((container) => ({
|
||||
id: container.id,
|
||||
container,
|
||||
autoStart: Boolean(container.autoStart),
|
||||
wait: sanitizeWait(container.autoStartWait),
|
||||
}));
|
||||
}
|
||||
|
||||
const entries = ref<AutostartEntry[]>([]);
|
||||
|
||||
watch(
|
||||
() => props.containers,
|
||||
(containers) => {
|
||||
const normalized = containersToEntries(containers);
|
||||
const current = entries.value;
|
||||
const isDifferent =
|
||||
normalized.length !== current.length ||
|
||||
normalized.some((entry, index) => {
|
||||
const existing = current[index];
|
||||
if (!existing) return true;
|
||||
return (
|
||||
entry.id !== existing.id ||
|
||||
entry.autoStart !== existing.autoStart ||
|
||||
entry.wait !== existing.wait
|
||||
);
|
||||
});
|
||||
if (isDifferent) {
|
||||
entries.value = normalized;
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
const { treeData } = useTreeData<AutostartEntry>({
|
||||
flatData: entries,
|
||||
buildFlatRow(entry) {
|
||||
const name = entry.container.names?.[0]?.replace(/^\//, '') || 'Unknown';
|
||||
return {
|
||||
id: entry.id,
|
||||
type: 'container',
|
||||
name,
|
||||
state: entry.container.state ?? '',
|
||||
meta: entry,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
function getRowIndex(id: string) {
|
||||
return entries.value.findIndex((entry) => entry.id === id);
|
||||
}
|
||||
|
||||
const { mutate, loading: mutationLoading } = useMutation(UPDATE_DOCKER_AUTOSTART_CONFIGURATION);
|
||||
|
||||
const errorMessage = ref<string | null>(null);
|
||||
|
||||
async function persistConfiguration(previousSnapshot?: AutostartEntry[]) {
|
||||
try {
|
||||
errorMessage.value = null;
|
||||
await mutate({
|
||||
entries: entries.value.map((entry) => ({
|
||||
id: entry.id,
|
||||
autoStart: entry.autoStart,
|
||||
wait: entry.autoStart ? entry.wait : 0,
|
||||
})),
|
||||
});
|
||||
if (props.refresh) {
|
||||
await props.refresh().catch((refreshError: unknown) => {
|
||||
if (refreshError instanceof Error) {
|
||||
errorMessage.value = refreshError.message;
|
||||
} else {
|
||||
errorMessage.value = 'Auto-start updated but failed to refresh data.';
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
if (previousSnapshot) {
|
||||
entries.value = previousSnapshot.map((entry) => ({ ...entry }));
|
||||
}
|
||||
if (error instanceof Error) {
|
||||
errorMessage.value = error.message;
|
||||
} else {
|
||||
errorMessage.value = 'Failed to update auto-start configuration.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function handleToggle(entry: AutostartEntry, value: boolean) {
|
||||
if (mutationLoading.value || entry.autoStart === value) return;
|
||||
const snapshot = entries.value.map((item) => ({ ...item }));
|
||||
entry.autoStart = value;
|
||||
if (!value) {
|
||||
entry.wait = 0;
|
||||
}
|
||||
await persistConfiguration(snapshot);
|
||||
}
|
||||
|
||||
async function handleWaitChange(entry: AutostartEntry, value: string | number) {
|
||||
if (mutationLoading.value) return;
|
||||
const normalized = sanitizeWait(value);
|
||||
if (normalized === entry.wait) return;
|
||||
const snapshot = entries.value.map((item) => ({ ...item }));
|
||||
entry.wait = normalized;
|
||||
await persistConfiguration(snapshot);
|
||||
}
|
||||
|
||||
async function handleDrop(event: DropEvent<AutostartEntry>) {
|
||||
if (mutationLoading.value) return;
|
||||
const { target, area, sourceIds } = event;
|
||||
const targetIndex = getRowIndex(target.id);
|
||||
if (targetIndex === -1) return;
|
||||
|
||||
const snapshot = entries.value.map((entry) => ({ ...entry }));
|
||||
const movingEntries = entries.value.filter((entry) => sourceIds.includes(entry.id));
|
||||
let remainingEntries = entries.value.filter((entry) => !sourceIds.includes(entry.id));
|
||||
|
||||
let insertionIndex = targetIndex;
|
||||
if (area === 'after' || area === 'inside') {
|
||||
insertionIndex += 1;
|
||||
}
|
||||
|
||||
remainingEntries.splice(insertionIndex, 0, ...movingEntries);
|
||||
entries.value = remainingEntries;
|
||||
|
||||
await persistConfiguration(snapshot);
|
||||
}
|
||||
|
||||
function handleClose() {
|
||||
if (mutationLoading.value) return;
|
||||
emit('close');
|
||||
}
|
||||
|
||||
const busyRowIds = computed(() => {
|
||||
if (!mutationLoading.value) return new Set<string>();
|
||||
return new Set(entries.value.map((entry) => entry.id));
|
||||
});
|
||||
|
||||
const saving = computed(() => props.loading || mutationLoading.value);
|
||||
|
||||
const UBadge = resolveComponent('UBadge') as Component;
|
||||
const USwitch = resolveComponent('USwitch') as Component;
|
||||
const UInput = resolveComponent('UInput') as Component;
|
||||
const UButton = resolveComponent('UButton') as Component;
|
||||
|
||||
const columns = computed<TableColumn<TreeRow<AutostartEntry>>[]>(() => {
|
||||
const cols: TableColumn<TreeRow<AutostartEntry>>[] = [
|
||||
{
|
||||
id: 'order',
|
||||
header: '#',
|
||||
cell: ({ row }) =>
|
||||
h(
|
||||
'span',
|
||||
{ class: 'text-xs font-medium text-gray-500 dark:text-gray-400' },
|
||||
String(getRowIndex(row.original.id) + 1)
|
||||
),
|
||||
meta: { class: { td: 'w-10', th: 'w-10' } },
|
||||
},
|
||||
{
|
||||
id: 'name',
|
||||
header: 'Container',
|
||||
cell: ({ row }) => {
|
||||
const entry = row.original.meta;
|
||||
if (!entry) return row.original.name;
|
||||
const badge = entry.container.state
|
||||
? h(UBadge, {
|
||||
label: entry.container.state,
|
||||
variant: 'subtle',
|
||||
size: 'xs',
|
||||
})
|
||||
: null;
|
||||
return h('div', { class: 'flex items-center justify-between gap-3 pr-2' }, [
|
||||
h('span', { class: 'font-medium' }, row.original.name),
|
||||
badge,
|
||||
]);
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'autoStart',
|
||||
header: 'Auto Start',
|
||||
cell: ({ row }) => {
|
||||
const entry = row.original.meta;
|
||||
if (!entry) return '';
|
||||
return h(USwitch, {
|
||||
modelValue: entry.autoStart,
|
||||
'onUpdate:modelValue': (value: boolean) => handleToggle(entry, value),
|
||||
disabled: saving.value,
|
||||
});
|
||||
},
|
||||
meta: { class: { td: 'w-32', th: 'w-32' } },
|
||||
},
|
||||
{
|
||||
id: 'wait',
|
||||
header: 'Start Delay (s)',
|
||||
cell: ({ row }) => {
|
||||
const entry = row.original.meta;
|
||||
if (!entry) return '';
|
||||
return h(UInput, {
|
||||
type: 'number',
|
||||
min: 0,
|
||||
disabled: saving.value || !entry.autoStart,
|
||||
modelValue: entry.wait,
|
||||
class: 'w-24',
|
||||
'onUpdate:modelValue': (value: string | number) => handleWaitChange(entry, value),
|
||||
});
|
||||
},
|
||||
meta: { class: { td: 'w-48', th: 'w-48' } },
|
||||
},
|
||||
];
|
||||
return cols;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="space-y-4">
|
||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
||||
<div>
|
||||
<h2 class="text-lg font-semibold">Docker Auto-Start Order</h2>
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">
|
||||
Drag containers to adjust the auto-start sequence. Changes are saved automatically.
|
||||
</p>
|
||||
</div>
|
||||
<UButton
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
icon="i-lucide-arrow-left"
|
||||
:disabled="saving"
|
||||
@click="handleClose"
|
||||
>
|
||||
Back to Overview
|
||||
</UButton>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="errorMessage"
|
||||
class="rounded-md border border-red-200 bg-red-50 px-4 py-2 text-sm text-red-700 dark:border-red-800 dark:bg-red-900/40 dark:text-red-200"
|
||||
>
|
||||
{{ errorMessage }}
|
||||
</div>
|
||||
|
||||
<BaseTreeTable
|
||||
:data="treeData"
|
||||
:columns="columns"
|
||||
:loading="saving"
|
||||
:enable-drag-drop="true"
|
||||
:busy-row-ids="busyRowIds"
|
||||
selectable-type="container"
|
||||
@row:drop="handleDrop"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -4,6 +4,7 @@ import { useRoute, useRouter } from 'vue-router';
|
||||
import { useQuery } from '@vue/apollo-composable';
|
||||
|
||||
import { GET_DOCKER_CONTAINERS } from '@/components/Docker/docker-containers.query';
|
||||
import DockerAutostartSettings from '@/components/Docker/DockerAutostartSettings.vue';
|
||||
import DockerContainersTable from '@/components/Docker/DockerContainersTable.vue';
|
||||
import DockerSidebarTree from '@/components/Docker/DockerSidebarTree.vue';
|
||||
import DockerEdit from '@/components/Docker/Edit.vue';
|
||||
@@ -48,6 +49,7 @@ const hasRouter = Boolean(route && router);
|
||||
const selectedIds = ref<string[]>([]);
|
||||
const activeId = ref<string | null>(null);
|
||||
const isSwitching = ref(false);
|
||||
const viewMode = ref<'overview' | 'autostart'>('overview');
|
||||
|
||||
const ROUTE_QUERY_KEY = 'container';
|
||||
const SWITCH_DELAY_MS = 150;
|
||||
@@ -181,6 +183,25 @@ const containers = computed<DockerContainer[]>(() => result.value?.docker?.conta
|
||||
|
||||
const { navigateToEditPage } = useDockerEditNavigation();
|
||||
|
||||
watch(activeId, (id) => {
|
||||
if (id && viewMode.value === 'autostart') {
|
||||
viewMode.value = 'overview';
|
||||
}
|
||||
});
|
||||
|
||||
function openAutostartSettings() {
|
||||
if (props.disabled) return;
|
||||
viewMode.value = 'autostart';
|
||||
}
|
||||
|
||||
function closeAutostartSettings() {
|
||||
viewMode.value = 'overview';
|
||||
}
|
||||
|
||||
async function refreshContainers() {
|
||||
await refetch({ skipCache: true });
|
||||
}
|
||||
|
||||
function handleTableRowClick(payload: {
|
||||
id: string;
|
||||
type: 'container' | 'folder';
|
||||
@@ -258,27 +279,47 @@ const isDetailsDisabled = computed(() => props.disabled || isSwitching.value);
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="!activeId">
|
||||
<div class="mb-4 flex items-center justify-between">
|
||||
<div class="text-base font-medium">Docker Containers</div>
|
||||
<UButton
|
||||
size="xs"
|
||||
variant="ghost"
|
||||
icon="i-lucide-refresh-cw"
|
||||
<template v-if="viewMode === 'overview'">
|
||||
<div class="mb-4 flex flex-wrap items-center justify-between gap-3">
|
||||
<div class="text-base font-medium">Docker Containers</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<UButton
|
||||
size="xs"
|
||||
variant="ghost"
|
||||
icon="i-lucide-refresh-cw"
|
||||
:loading="loading"
|
||||
@click="refreshContainers"
|
||||
/>
|
||||
<UButton
|
||||
size="xs"
|
||||
variant="outline"
|
||||
icon="i-lucide-list-checks"
|
||||
:disabled="loading"
|
||||
@click="openAutostartSettings"
|
||||
>
|
||||
Customize Start Order
|
||||
</UButton>
|
||||
</div>
|
||||
</div>
|
||||
<DockerContainersTable
|
||||
:containers="containers"
|
||||
:flat-entries="flatEntries"
|
||||
:root-folder-id="rootFolderId"
|
||||
:view-prefs="viewPrefs"
|
||||
:loading="loading"
|
||||
@click="refetch({ skipCache: true })"
|
||||
:active-id="activeId"
|
||||
:selected-ids="selectedIds"
|
||||
@created-folder="refreshContainers"
|
||||
@row:click="handleTableRowClick"
|
||||
@update:selectedIds="handleUpdateSelectedIds"
|
||||
/>
|
||||
</div>
|
||||
<DockerContainersTable
|
||||
</template>
|
||||
<DockerAutostartSettings
|
||||
v-else
|
||||
:containers="containers"
|
||||
:flat-entries="flatEntries"
|
||||
:root-folder-id="rootFolderId"
|
||||
:view-prefs="viewPrefs"
|
||||
:loading="loading"
|
||||
:active-id="activeId"
|
||||
:selected-ids="selectedIds"
|
||||
@created-folder="() => refetch({ skipCache: true })"
|
||||
@row:click="handleTableRowClick"
|
||||
@update:selectedIds="handleUpdateSelectedIds"
|
||||
:refresh="refreshContainers"
|
||||
@close="closeAutostartSettings"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -292,7 +333,7 @@ const isDetailsDisabled = computed(() => props.disabled || isSwitching.value);
|
||||
variant="ghost"
|
||||
icon="i-lucide-refresh-cw"
|
||||
:loading="loading"
|
||||
@click="refetch({ skipCache: true })"
|
||||
@click="refreshContainers"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -4,6 +4,27 @@ export const GET_DOCKER_CONTAINERS = gql`
|
||||
query GetDockerContainers($skipCache: Boolean = false) {
|
||||
docker {
|
||||
id
|
||||
containers(skipCache: $skipCache) {
|
||||
id
|
||||
names
|
||||
state
|
||||
status
|
||||
image
|
||||
created
|
||||
autoStart
|
||||
autoStartOrder
|
||||
autoStartWait
|
||||
ports {
|
||||
privatePort
|
||||
publicPort
|
||||
type
|
||||
}
|
||||
hostConfig {
|
||||
networkMode
|
||||
}
|
||||
networkSettings
|
||||
mounts
|
||||
}
|
||||
organizer(skipCache: $skipCache) {
|
||||
version
|
||||
views {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_DOCKER_AUTOSTART_CONFIGURATION = gql`
|
||||
mutation UpdateDockerAutostartConfiguration($entries: [DockerAutostartEntryInput!]!) {
|
||||
docker {
|
||||
updateAutostartConfiguration(entries: $entries)
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -29,7 +29,7 @@ type Documents = {
|
||||
"\n query Unified {\n settings {\n unified {\n id\n dataSchema\n uiSchema\n values\n }\n }\n }\n": typeof types.UnifiedDocument,
|
||||
"\n mutation UpdateConnectSettings($input: JSON!) {\n updateSettings(input: $input) {\n restartRequired\n values\n }\n }\n": typeof types.UpdateConnectSettingsDocument,
|
||||
"\n query GetDockerActiveContainer($id: PrefixedID!) {\n docker {\n id\n containers {\n id\n names\n image\n created\n state\n status\n autoStart\n ports {\n privatePort\n publicPort\n type\n }\n hostConfig {\n networkMode\n }\n networkSettings\n labels\n }\n }\n }\n": typeof types.GetDockerActiveContainerDocument,
|
||||
"\n query GetDockerContainers($skipCache: Boolean = false) {\n docker {\n id\n organizer(skipCache: $skipCache) {\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 icon\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 networkSettings\n mounts\n created\n isUpdateAvailable\n isRebuildReady\n templatePath\n }\n }\n }\n }\n }\n }\n": typeof types.GetDockerContainersDocument,
|
||||
"\n query GetDockerContainers($skipCache: Boolean = false) {\n docker {\n id\n containers(skipCache: $skipCache) {\n id\n names\n state\n status\n image\n created\n autoStart\n autoStartOrder\n autoStartWait\n ports {\n privatePort\n publicPort\n type\n }\n hostConfig {\n networkMode\n }\n networkSettings\n mounts\n }\n organizer(skipCache: $skipCache) {\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 icon\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 networkSettings\n mounts\n created\n isUpdateAvailable\n isRebuildReady\n templatePath\n }\n }\n }\n }\n }\n }\n": typeof types.GetDockerContainersDocument,
|
||||
"\n mutation CreateDockerFolderWithItems(\n $name: String!\n $parentId: String\n $sourceEntryIds: [String!]\n $position: Float\n ) {\n createDockerFolderWithItems(\n name: $name\n parentId: $parentId\n sourceEntryIds: $sourceEntryIds\n position: $position\n ) {\n version\n views {\n id\n name\n rootId\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.CreateDockerFolderWithItemsDocument,
|
||||
"\n mutation CreateDockerFolder($name: String!, $parentId: String, $childrenIds: [String!]) {\n createDockerFolder(name: $name, parentId: $parentId, childrenIds: $childrenIds) {\n version\n views {\n id\n name\n rootId\n flatEntries {\n id\n type\n name\n parentId\n depth\n position\n path\n hasChildren\n childrenIds\n }\n }\n }\n }\n": typeof types.CreateDockerFolderDocument,
|
||||
"\n mutation DeleteDockerEntries($entryIds: [String!]!) {\n deleteDockerEntries(entryIds: $entryIds) {\n version\n views {\n id\n name\n rootId\n flatEntries {\n id\n type\n name\n parentId\n depth\n position\n path\n hasChildren\n childrenIds\n }\n }\n }\n }\n": typeof types.DeleteDockerEntriesDocument,
|
||||
@@ -42,6 +42,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 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 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,
|
||||
"\n query LogFiles {\n logFiles {\n name\n path\n size\n modifiedAt\n }\n }\n": typeof types.LogFilesDocument,
|
||||
@@ -93,7 +94,7 @@ const documents: Documents = {
|
||||
"\n query Unified {\n settings {\n unified {\n id\n dataSchema\n uiSchema\n values\n }\n }\n }\n": types.UnifiedDocument,
|
||||
"\n mutation UpdateConnectSettings($input: JSON!) {\n updateSettings(input: $input) {\n restartRequired\n values\n }\n }\n": types.UpdateConnectSettingsDocument,
|
||||
"\n query GetDockerActiveContainer($id: PrefixedID!) {\n docker {\n id\n containers {\n id\n names\n image\n created\n state\n status\n autoStart\n ports {\n privatePort\n publicPort\n type\n }\n hostConfig {\n networkMode\n }\n networkSettings\n labels\n }\n }\n }\n": types.GetDockerActiveContainerDocument,
|
||||
"\n query GetDockerContainers($skipCache: Boolean = false) {\n docker {\n id\n organizer(skipCache: $skipCache) {\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 icon\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 networkSettings\n mounts\n created\n isUpdateAvailable\n isRebuildReady\n templatePath\n }\n }\n }\n }\n }\n }\n": types.GetDockerContainersDocument,
|
||||
"\n query GetDockerContainers($skipCache: Boolean = false) {\n docker {\n id\n containers(skipCache: $skipCache) {\n id\n names\n state\n status\n image\n created\n autoStart\n autoStartOrder\n autoStartWait\n ports {\n privatePort\n publicPort\n type\n }\n hostConfig {\n networkMode\n }\n networkSettings\n mounts\n }\n organizer(skipCache: $skipCache) {\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 icon\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 networkSettings\n mounts\n created\n isUpdateAvailable\n isRebuildReady\n templatePath\n }\n }\n }\n }\n }\n }\n": types.GetDockerContainersDocument,
|
||||
"\n mutation CreateDockerFolderWithItems(\n $name: String!\n $parentId: String\n $sourceEntryIds: [String!]\n $position: Float\n ) {\n createDockerFolderWithItems(\n name: $name\n parentId: $parentId\n sourceEntryIds: $sourceEntryIds\n position: $position\n ) {\n version\n views {\n id\n name\n rootId\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.CreateDockerFolderWithItemsDocument,
|
||||
"\n mutation CreateDockerFolder($name: String!, $parentId: String, $childrenIds: [String!]) {\n createDockerFolder(name: $name, parentId: $parentId, childrenIds: $childrenIds) {\n version\n views {\n id\n name\n rootId\n flatEntries {\n id\n type\n name\n parentId\n depth\n position\n path\n hasChildren\n childrenIds\n }\n }\n }\n }\n": types.CreateDockerFolderDocument,
|
||||
"\n mutation DeleteDockerEntries($entryIds: [String!]!) {\n deleteDockerEntries(entryIds: $entryIds) {\n version\n views {\n id\n name\n rootId\n flatEntries {\n id\n type\n name\n parentId\n depth\n position\n path\n hasChildren\n childrenIds\n }\n }\n }\n }\n": types.DeleteDockerEntriesDocument,
|
||||
@@ -106,6 +107,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 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 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,
|
||||
"\n query LogFiles {\n logFiles {\n name\n path\n size\n modifiedAt\n }\n }\n": types.LogFilesDocument,
|
||||
@@ -219,7 +221,7 @@ export function graphql(source: "\n query GetDockerActiveContainer($id: Prefixe
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n query GetDockerContainers($skipCache: Boolean = false) {\n docker {\n id\n organizer(skipCache: $skipCache) {\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 icon\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 networkSettings\n mounts\n created\n isUpdateAvailable\n isRebuildReady\n templatePath\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query GetDockerContainers($skipCache: Boolean = false) {\n docker {\n id\n organizer(skipCache: $skipCache) {\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 icon\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 networkSettings\n mounts\n created\n isUpdateAvailable\n isRebuildReady\n templatePath\n }\n }\n }\n }\n }\n }\n"];
|
||||
export function graphql(source: "\n query GetDockerContainers($skipCache: Boolean = false) {\n docker {\n id\n containers(skipCache: $skipCache) {\n id\n names\n state\n status\n image\n created\n autoStart\n autoStartOrder\n autoStartWait\n ports {\n privatePort\n publicPort\n type\n }\n hostConfig {\n networkMode\n }\n networkSettings\n mounts\n }\n organizer(skipCache: $skipCache) {\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 icon\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 networkSettings\n mounts\n created\n isUpdateAvailable\n isRebuildReady\n templatePath\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query GetDockerContainers($skipCache: Boolean = false) {\n docker {\n id\n containers(skipCache: $skipCache) {\n id\n names\n state\n status\n image\n created\n autoStart\n autoStartOrder\n autoStartWait\n ports {\n privatePort\n publicPort\n type\n }\n hostConfig {\n networkMode\n }\n networkSettings\n mounts\n }\n organizer(skipCache: $skipCache) {\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 icon\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 networkSettings\n mounts\n created\n isUpdateAvailable\n isRebuildReady\n templatePath\n }\n }\n }\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
@@ -268,6 +270,10 @@ export function graphql(source: "\n mutation StopDockerContainer($id: PrefixedI
|
||||
* 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 UnpauseDockerContainer($id: PrefixedID!) {\n docker {\n unpause(id: $id) {\n id\n names\n state\n }\n }\n }\n"): (typeof documents)["\n mutation UnpauseDockerContainer($id: PrefixedID!) {\n docker {\n unpause(id: $id) {\n id\n names\n state\n }\n }\n }\n"];
|
||||
/**
|
||||
* 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"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
|
||||
@@ -701,9 +701,22 @@ export type DockerOrganizerArgs = {
|
||||
skipCache?: Scalars['Boolean']['input'];
|
||||
};
|
||||
|
||||
export type DockerAutostartEntryInput = {
|
||||
/** Whether the container should auto-start */
|
||||
autoStart: Scalars['Boolean']['input'];
|
||||
/** Docker container identifier */
|
||||
id: Scalars['PrefixedID']['input'];
|
||||
/** Number of seconds to wait after starting the container */
|
||||
wait?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
export type DockerContainer = Node & {
|
||||
__typename?: 'DockerContainer';
|
||||
autoStart: Scalars['Boolean']['output'];
|
||||
/** Zero-based order in the auto-start list */
|
||||
autoStartOrder?: Maybe<Scalars['Int']['output']>;
|
||||
/** Wait time in seconds applied after start */
|
||||
autoStartWait?: Maybe<Scalars['Int']['output']>;
|
||||
command: Scalars['String']['output'];
|
||||
created: Scalars['Int']['output'];
|
||||
hostConfig?: Maybe<ContainerHostConfig>;
|
||||
@@ -742,6 +755,8 @@ export type DockerMutations = {
|
||||
stop: DockerContainer;
|
||||
/** Unpause (Resume) a container */
|
||||
unpause: DockerContainer;
|
||||
/** Update auto-start configuration for Docker containers */
|
||||
updateAutostartConfiguration: Scalars['Boolean']['output'];
|
||||
/** Update a container to the latest image */
|
||||
updateContainer: DockerContainer;
|
||||
};
|
||||
@@ -767,6 +782,11 @@ export type DockerMutationsUnpauseArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type DockerMutationsUpdateAutostartConfigurationArgs = {
|
||||
entries: Array<DockerAutostartEntryInput>;
|
||||
};
|
||||
|
||||
|
||||
export type DockerMutationsUpdateContainerArgs = {
|
||||
id: Scalars['PrefixedID']['input'];
|
||||
};
|
||||
@@ -2756,7 +2776,7 @@ export type GetDockerContainersQueryVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type GetDockerContainersQuery = { __typename?: 'Query', docker: { __typename?: 'Docker', id: string, organizer: { __typename?: 'ResolvedOrganizerV1', version: number, views: Array<{ __typename?: 'ResolvedOrganizerView', id: string, name: string, rootId: string, prefs?: any | null, flatEntries: Array<{ __typename?: 'FlatOrganizerEntry', id: string, type: string, name: string, parentId?: string | null, depth: number, position: number, path: Array<string>, hasChildren: boolean, childrenIds: Array<string>, icon?: string | null, meta?: { __typename?: 'DockerContainer', id: string, names: Array<string>, state: ContainerState, status: string, image: string, autoStart: boolean, networkSettings?: any | null, mounts?: Array<any> | null, created: number, isUpdateAvailable?: boolean | null, isRebuildReady?: boolean | null, templatePath?: string | null, ports: Array<{ __typename?: 'ContainerPort', privatePort?: number | null, publicPort?: number | null, type: ContainerPortType }>, hostConfig?: { __typename?: 'ContainerHostConfig', networkMode: string } | null } | null }> }> } } };
|
||||
export type GetDockerContainersQuery = { __typename?: 'Query', docker: { __typename?: 'Docker', id: string, containers: Array<{ __typename?: 'DockerContainer', id: string, names: Array<string>, state: ContainerState, status: string, image: string, created: number, autoStart: boolean, autoStartOrder?: number | null, autoStartWait?: number | null, networkSettings?: any | null, mounts?: Array<any> | null, ports: Array<{ __typename?: 'ContainerPort', privatePort?: number | null, publicPort?: number | null, type: ContainerPortType }>, hostConfig?: { __typename?: 'ContainerHostConfig', networkMode: string } | null }>, organizer: { __typename?: 'ResolvedOrganizerV1', version: number, views: Array<{ __typename?: 'ResolvedOrganizerView', id: string, name: string, rootId: string, prefs?: any | null, flatEntries: Array<{ __typename?: 'FlatOrganizerEntry', id: string, type: string, name: string, parentId?: string | null, depth: number, position: number, path: Array<string>, hasChildren: boolean, childrenIds: Array<string>, icon?: string | null, meta?: { __typename?: 'DockerContainer', id: string, names: Array<string>, state: ContainerState, status: string, image: string, autoStart: boolean, networkSettings?: any | null, mounts?: Array<any> | null, created: number, isUpdateAvailable?: boolean | null, isRebuildReady?: boolean | null, templatePath?: string | null, ports: Array<{ __typename?: 'ContainerPort', privatePort?: number | null, publicPort?: number | null, type: ContainerPortType }>, hostConfig?: { __typename?: 'ContainerHostConfig', networkMode: string } | null } | null }> }> } } };
|
||||
|
||||
export type CreateDockerFolderWithItemsMutationVariables = Exact<{
|
||||
name: Scalars['String']['input'];
|
||||
@@ -2852,6 +2872,13 @@ export type UnpauseDockerContainerMutationVariables = Exact<{
|
||||
|
||||
export type UnpauseDockerContainerMutation = { __typename?: 'Mutation', docker: { __typename?: 'DockerMutations', unpause: { __typename?: 'DockerContainer', id: string, names: Array<string>, state: ContainerState } } };
|
||||
|
||||
export type UpdateDockerAutostartConfigurationMutationVariables = Exact<{
|
||||
entries: Array<DockerAutostartEntryInput> | DockerAutostartEntryInput;
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateDockerAutostartConfigurationMutation = { __typename?: 'Mutation', docker: { __typename?: 'DockerMutations', updateAutostartConfiguration: boolean } };
|
||||
|
||||
export type UpdateDockerContainerMutationVariables = Exact<{
|
||||
id: Scalars['PrefixedID']['input'];
|
||||
}>;
|
||||
@@ -3092,7 +3119,7 @@ export const GetPermissionsForRolesDocument = {"kind":"Document","definitions":[
|
||||
export const UnifiedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Unified"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"settings"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"unified"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSchema"}},{"kind":"Field","name":{"kind":"Name","value":"uiSchema"}},{"kind":"Field","name":{"kind":"Name","value":"values"}}]}}]}}]}}]} as unknown as DocumentNode<UnifiedQuery, UnifiedQueryVariables>;
|
||||
export const UpdateConnectSettingsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateConnectSettings"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateSettings"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"restartRequired"}},{"kind":"Field","name":{"kind":"Name","value":"values"}}]}}]}}]} as unknown as DocumentNode<UpdateConnectSettingsMutation, UpdateConnectSettingsMutationVariables>;
|
||||
export const GetDockerActiveContainerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDockerActiveContainer"},"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":"id"}},{"kind":"Field","name":{"kind":"Name","value":"containers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"names"}},{"kind":"Field","name":{"kind":"Name","value":"image"}},{"kind":"Field","name":{"kind":"Name","value":"created"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"autoStart"}},{"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":"hostConfig"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"networkMode"}}]}},{"kind":"Field","name":{"kind":"Name","value":"networkSettings"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}}]}}]}}]}}]} as unknown as DocumentNode<GetDockerActiveContainerQuery, GetDockerActiveContainerQueryVariables>;
|
||||
export const GetDockerContainersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDockerContainers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skipCache"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}},"defaultValue":{"kind":"BooleanValue","value":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"docker"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"organizer"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"skipCache"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skipCache"}}}],"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":"icon"}},{"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":"networkSettings"}},{"kind":"Field","name":{"kind":"Name","value":"mounts"}},{"kind":"Field","name":{"kind":"Name","value":"created"}},{"kind":"Field","name":{"kind":"Name","value":"isUpdateAvailable"}},{"kind":"Field","name":{"kind":"Name","value":"isRebuildReady"}},{"kind":"Field","name":{"kind":"Name","value":"templatePath"}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetDockerContainersQuery, GetDockerContainersQueryVariables>;
|
||||
export const GetDockerContainersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDockerContainers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skipCache"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}},"defaultValue":{"kind":"BooleanValue","value":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"docker"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"containers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"skipCache"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skipCache"}}}],"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":"created"}},{"kind":"Field","name":{"kind":"Name","value":"autoStart"}},{"kind":"Field","name":{"kind":"Name","value":"autoStartOrder"}},{"kind":"Field","name":{"kind":"Name","value":"autoStartWait"}},{"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":"hostConfig"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"networkMode"}}]}},{"kind":"Field","name":{"kind":"Name","value":"networkSettings"}},{"kind":"Field","name":{"kind":"Name","value":"mounts"}}]}},{"kind":"Field","name":{"kind":"Name","value":"organizer"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"skipCache"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skipCache"}}}],"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":"icon"}},{"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":"networkSettings"}},{"kind":"Field","name":{"kind":"Name","value":"mounts"}},{"kind":"Field","name":{"kind":"Name","value":"created"}},{"kind":"Field","name":{"kind":"Name","value":"isUpdateAvailable"}},{"kind":"Field","name":{"kind":"Name","value":"isRebuildReady"}},{"kind":"Field","name":{"kind":"Name","value":"templatePath"}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetDockerContainersQuery, GetDockerContainersQueryVariables>;
|
||||
export const CreateDockerFolderWithItemsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateDockerFolderWithItems"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"name"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"parentId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"sourceEntryIds"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"position"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createDockerFolderWithItems"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"name"}}},{"kind":"Argument","name":{"kind":"Name","value":"parentId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"parentId"}}},{"kind":"Argument","name":{"kind":"Name","value":"sourceEntryIds"},"value":{"kind":"Variable","name":{"kind":"Name","value":"sourceEntryIds"}}},{"kind":"Argument","name":{"kind":"Name","value":"position"},"value":{"kind":"Variable","name":{"kind":"Name","value":"position"}}}],"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":"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<CreateDockerFolderWithItemsMutation, CreateDockerFolderWithItemsMutationVariables>;
|
||||
export const CreateDockerFolderDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateDockerFolder"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"name"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"parentId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"childrenIds"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createDockerFolder"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"name"}}},{"kind":"Argument","name":{"kind":"Name","value":"parentId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"parentId"}}},{"kind":"Argument","name":{"kind":"Name","value":"childrenIds"},"value":{"kind":"Variable","name":{"kind":"Name","value":"childrenIds"}}}],"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":"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"}}]}}]}}]}}]}}]} as unknown as DocumentNode<CreateDockerFolderMutation, CreateDockerFolderMutationVariables>;
|
||||
export const DeleteDockerEntriesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteDockerEntries"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"entryIds"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteDockerEntries"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"entryIds"},"value":{"kind":"Variable","name":{"kind":"Name","value":"entryIds"}}}],"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":"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"}}]}}]}}]}}]}}]} as unknown as DocumentNode<DeleteDockerEntriesMutation, DeleteDockerEntriesMutationVariables>;
|
||||
@@ -3105,6 +3132,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 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 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>;
|
||||
export const LogFilesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"LogFiles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"logFiles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"path"}},{"kind":"Field","name":{"kind":"Name","value":"size"}},{"kind":"Field","name":{"kind":"Name","value":"modifiedAt"}}]}}]}}]} as unknown as DocumentNode<LogFilesQuery, LogFilesQueryVariables>;
|
||||
|
||||
Reference in New Issue
Block a user