1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import { ProcessIcon } from '~/components/icon/icon';
7 import { ProcessResource } from '~/models/process';
8 import { formatDate } from '~/common/formatters';
9 import { ResourceKind } from '~/models/resource';
10 import { resourceLabel } from '~/common/labels';
11 import { DetailsData } from "./details-data";
12 import { DetailsAttribute } from "~/components/details-attribute/details-attribute";
14 export class ProcessDetails extends DetailsData<ProcessResource> {
16 getIcon(className?: string) {
17 return <ProcessIcon className={className} />;
22 <DetailsAttribute label='Type' value={resourceLabel(ResourceKind.PROCESS)} />
23 <DetailsAttribute label='Size' value='---' />
24 <DetailsAttribute label='Owner' linkToUuid={this.item.ownerUuid} value={this.item.ownerUuid} />
27 <DetailsAttribute label='Status' value={this.item.state} />
28 <DetailsAttribute label='Last modified' value={formatDate(this.item.modifiedAt)} />
31 <DetailsAttribute label='Started at' value={formatDate(this.item.createdAt)} />
32 <DetailsAttribute label='Finished at' value={formatDate(this.item.expiresAt)} />
34 <DetailsAttribute label='Outputs' value={this.item.outputPath} />
35 <DetailsAttribute label='UUID' linkToUuid={this.item.uuid} value={this.item.uuid} />
36 <DetailsAttribute label='Container UUID' value={this.item.containerUuid} />
38 <DetailsAttribute label='Priority' value={this.item.priority} />
39 <DetailsAttribute label='Runtime Constraints' value={JSON.stringify(this.item.runtimeConstraints)} />
41 <DetailsAttribute label='Docker Image locator' linkToUuid={this.item.containerImage} value={this.item.containerImage} />