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' value={this.item.ownerUuid} lowercaseValue={true} />
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 {/* Links but we dont have view */}
35 <DetailsAttribute label='Outputs' link={this.item.outputPath} value={this.item.outputPath} />
36 <DetailsAttribute label='UUID' link={this.item.uuid} value={this.item.uuid} />
37 <DetailsAttribute label='Container UUID' link={this.item.containerUuid} value={this.item.containerUuid} />
39 <DetailsAttribute label='Priority' value={this.item.priority} />
40 <DetailsAttribute label='Runtime Constraints' value={this.item.runtimeConstraints} />
41 {/* Link but we dont have view */}
42 <DetailsAttribute label='Docker Image locator' link={this.item.containerImage} value={this.item.containerImage} />