d6e0e04a896631780cd75367a026c3a76e334c92
[arvados-workbench2.git] / src / models / container.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { Resource, ResourceKind } from "./resource";
6 import { MountType } from 'models/mount-types';
7 import { RuntimeConstraints } from "models/runtime-constraints";
8 import { SchedulingParameters } from './scheduling-parameters';
9 import { RuntimeStatus } from "./runtime-status";
10
11 export enum ContainerState {
12     QUEUED = 'Queued',
13     LOCKED = 'Locked',
14     RUNNING = 'Running',
15     COMPLETE = 'Complete',
16     CANCELLED = 'Cancelled',
17 }
18
19 export interface ContainerResource extends Resource {
20     kind: ResourceKind.CONTAINER;
21     state: string;
22     startedAt: string | null;
23     finishedAt: string | null;
24     log: string | null;
25     environment: {};
26     cwd: string;
27     command: string[];
28     outputPath: string;
29     mounts: MountType[];
30     runtimeConstraints: RuntimeConstraints;
31     runtimeStatus: RuntimeStatus;
32     runtimeUserUuid: string;
33     schedulingParameters: SchedulingParameters;
34     output: string | null;
35     containerImage: string;
36     progress: number;
37     priority: number;
38     exitCode: number | null;
39     authUuid: string | null;
40     lockedByUuid: string | null;
41 }