refs #14523 hide sharing for private workflow
[arvados.git] / src / views-components / details-panel / process-details.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
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";
13
14 export class ProcessDetails extends DetailsData<ProcessResource> {
15
16     getIcon(className?: string){
17         return <ProcessIcon className={className} />;
18     }
19
20     getDetails() {
21         return <div>
22             <DetailsAttribute label='Type' value={resourceLabel(ResourceKind.PROCESS)} />
23             <DetailsAttribute label='Size' value='---' />
24             <DetailsAttribute label='Owner' value={this.item.ownerUuid} lowercaseValue={true} />
25
26             {/* Missing attr */}
27             <DetailsAttribute label='Status' value={this.item.state} />
28             <DetailsAttribute label='Last modified' value={formatDate(this.item.modifiedAt)} />
29
30             {/* Missing attrs */}
31             <DetailsAttribute label='Started at' value={formatDate(this.item.createdAt)} />
32             <DetailsAttribute label='Finished at' value={formatDate(this.item.expiresAt)} />
33
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} />
38
39             <DetailsAttribute label='Priority' value={this.item.priority} />
40             <DetailsAttribute label='Runtime Constraints' value={JSON.stringify(this.item.runtimeConstraints)} />
41             {/* Link but we dont have view */}
42             <DetailsAttribute label='Docker Image locator' link={this.item.containerImage} value={this.item.containerImage} />
43         </div>;
44     }
45 }