Add workflow

Signed-off-by: Tadashi Nemoto <tadashi.nemoto@exwzd.com>
This commit is contained in:
Tadashi Nemoto
2021-03-08 16:00:15 +09:00
parent cf9a229a3e
commit 7216416d67
3 changed files with 12 additions and 0 deletions
@@ -209,6 +209,12 @@ export const WorkflowRunDetails = ({ entity }: { entity: Entity }) => {
</TableCell>
<TableCell>{details.value?.head_commit.id}</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Typography noWrap>Workflow</Typography>
</TableCell>
<TableCell>{details.value?.name}</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Typography noWrap>Status</Typography>
@@ -41,6 +41,7 @@ import { Entity } from '@backstage/catalog-model';
import { readGitHubIntegrationConfigs } from '@backstage/integration';
export type WorkflowRun = {
workflowName: string;
id: string;
message: string;
url?: string;
@@ -86,6 +87,10 @@ const generatedColumns: TableColumn[] = [
</Typography>
),
},
{
title: 'Workflow',
field: 'workflowName',
},
{
title: 'Status',
width: '150px',
@@ -58,6 +58,7 @@ export function useWorkflowRuns({
setTotal(workflowRunsData.total_count);
// Transformation here
return workflowRunsData.workflow_runs.map(run => ({
workflowName: run.name,
message: run.head_commit.message,
id: `${run.id}`,
onReRunClick: async () => {