8495 workflow display relevant columns in workflow related tables (#8502)

## After
### Workflows

![image](https://github.com/user-attachments/assets/535e0ff5-1276-41b9-aa52-d66150cd85ae)
### WorkflowRuns

![image](https://github.com/user-attachments/assets/8a7e076b-53ec-4b72-97d8-41bd77ed59ac)
### WorkflowVersions

![image](https://github.com/user-attachments/assets/7d2566b2-e6ea-4a3a-8e88-0f6850203219)

## Change Created By into Executed By in workflowRuns

![image](https://github.com/user-attachments/assets/b90b7a07-a4bc-4bd2-b7f5-ab7d2ae6ee45)
This commit is contained in:
martmull
2024-11-15 11:13:36 +01:00
committed by GitHub
parent a2a272fed4
commit 4f99b8eea1
10 changed files with 104 additions and 15 deletions

View File

@@ -42,7 +42,7 @@ export const RecordTableCellsVisible = () => {
<RecordTableTd
isSelected={isSelected}
isDragging={isDragging}
width={tableCellWidths[columnIndex + 3] - 1}
width={tableCellWidths[columnIndex + 3]}
>
<RecordTableCell />
</RecordTableTd>

View File

@@ -27,6 +27,7 @@ export const RightDrawerWorkflowSelectActionContent = ({
<StyledActionListContainer>
{ACTIONS.map((action) => (
<MenuItem
key={action.type}
LeftIcon={action.icon}
text={action.label}
onClick={() => {

View File

@@ -37,6 +37,7 @@ export const RightDrawerWorkflowSelectTriggerTypeContent = ({
<StyledActionListContainer>
{TRIGGER_TYPES.map((action) => (
<MenuItem
key={action.type}
LeftIcon={action.icon}
text={action.label}
onClick={async () => {

View File

@@ -32,7 +32,7 @@ export const Default: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
await canvas.findByText('People', undefined, { timeout: 10000 });
await canvas.findByText('Companies', undefined, { timeout: 3000 });
await canvas.findByText('Linkedin');
},
};

View File

@@ -22,12 +22,12 @@ export const workflowRunsAllView = (
],
position: 0,
isVisible: true,
size: 210,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowRun].fields[
WORKFLOW_RUN_STANDARD_FIELD_IDS.status
WORKFLOW_RUN_STANDARD_FIELD_IDS.workflow
],
position: 1,
isVisible: true,
@@ -36,7 +36,7 @@ export const workflowRunsAllView = (
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowRun].fields[
WORKFLOW_RUN_STANDARD_FIELD_IDS.startedAt
WORKFLOW_RUN_STANDARD_FIELD_IDS.status
],
position: 2,
isVisible: true,
@@ -45,12 +45,30 @@ export const workflowRunsAllView = (
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowRun].fields[
WORKFLOW_RUN_STANDARD_FIELD_IDS.endedAt
WORKFLOW_RUN_STANDARD_FIELD_IDS.startedAt
],
position: 3,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowRun].fields[
WORKFLOW_RUN_STANDARD_FIELD_IDS.createdBy
],
position: 4,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowRun].fields[
WORKFLOW_RUN_STANDARD_FIELD_IDS.workflowVersion
],
position: 5,
isVisible: true,
size: 150,
},
],
};
};

View File

@@ -1,5 +1,8 @@
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
import { WORKFLOW_VERSION_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import {
BASE_OBJECT_STANDARD_FIELD_IDS,
WORKFLOW_VERSION_STANDARD_FIELD_IDS,
} from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
export const workflowVersionsAllView = (
@@ -27,7 +30,7 @@ export const workflowVersionsAllView = (
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowVersion].fields[
WORKFLOW_VERSION_STANDARD_FIELD_IDS.status
WORKFLOW_VERSION_STANDARD_FIELD_IDS.workflow
],
position: 1,
isVisible: true,
@@ -36,7 +39,7 @@ export const workflowVersionsAllView = (
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowVersion].fields[
WORKFLOW_VERSION_STANDARD_FIELD_IDS.trigger
WORKFLOW_VERSION_STANDARD_FIELD_IDS.status
],
position: 2,
isVisible: true,
@@ -45,12 +48,21 @@ export const workflowVersionsAllView = (
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowVersion].fields[
WORKFLOW_VERSION_STANDARD_FIELD_IDS.steps
BASE_OBJECT_STANDARD_FIELD_IDS.updatedAt
],
position: 3,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflowVersion].fields[
WORKFLOW_VERSION_STANDARD_FIELD_IDS.runs
],
position: 4,
isVisible: true,
size: 150,
},
],
};
};

View File

@@ -1,5 +1,8 @@
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
import { WORKFLOW_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import {
BASE_OBJECT_STANDARD_FIELD_IDS,
WORKFLOW_STANDARD_FIELD_IDS,
} from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
export const workflowsAllView = (
@@ -22,17 +25,53 @@ export const workflowsAllView = (
],
position: 0,
isVisible: true,
size: 210,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflow].fields[
WORKFLOW_STANDARD_FIELD_IDS.lastPublishedVersionId
WORKFLOW_STANDARD_FIELD_IDS.statuses
],
position: 1,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflow].fields[
BASE_OBJECT_STANDARD_FIELD_IDS.updatedAt
],
position: 2,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflow].fields[
WORKFLOW_STANDARD_FIELD_IDS.createdBy
],
position: 3,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflow].fields[
WORKFLOW_STANDARD_FIELD_IDS.versions
],
position: 4,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap[STANDARD_OBJECT_IDS.workflow].fields[
WORKFLOW_STANDARD_FIELD_IDS.runs
],
position: 5,
isVisible: true,
size: 150,
},
],
};
};

View File

@@ -445,6 +445,7 @@ export const WORKFLOW_STANDARD_FIELD_IDS = {
eventListeners: '20202020-0229-4c66-832e-035c67579a38',
favorites: '20202020-c554-4c41-be7a-cf9cd4b0d512',
timelineActivities: '20202020-906e-486a-a798-131a5f081faf',
createdBy: '20202020-6007-401a-8aa5-e6f48581a6f3',
};
export const WORKFLOW_RUN_STANDARD_FIELD_IDS = {

View File

@@ -129,9 +129,9 @@ export class WorkflowRunWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
standardId: WORKFLOW_RUN_STANDARD_FIELD_IDS.createdBy,
type: FieldMetadataType.ACTOR,
label: 'Created by',
label: 'Executed by',
icon: 'IconCreativeCommonsSa',
description: 'The creator of the record',
description: 'The executor of the workflow',
defaultValue: {
source: `'${FieldActorSource.MANUAL}'`,
name: "''",

View File

@@ -21,6 +21,10 @@ import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-o
import { WorkflowEventListenerWorkspaceEntity } from 'src/modules/workflow/common/standard-objects/workflow-event-listener.workspace-entity';
import { WorkflowRunWorkspaceEntity } from 'src/modules/workflow/common/standard-objects/workflow-run.workspace-entity';
import { WorkflowVersionWorkspaceEntity } from 'src/modules/workflow/common/standard-objects/workflow-version.workspace-entity';
import {
ActorMetadata,
FieldActorSource,
} from 'src/engine/metadata-modules/field-metadata/composite-types/actor.composite-type';
export enum WorkflowStatus {
DRAFT = 'DRAFT',
@@ -160,4 +164,17 @@ export class WorkflowWorkspaceEntity extends BaseWorkspaceEntity {
})
@WorkspaceIsSystem()
timelineActivities: Relation<TimelineActivityWorkspaceEntity[]>;
@WorkspaceField({
standardId: WORKFLOW_STANDARD_FIELD_IDS.createdBy,
type: FieldMetadataType.ACTOR,
label: 'Created by',
icon: 'IconCreativeCommonsSa',
description: 'The creator of the record',
defaultValue: {
source: `'${FieldActorSource.MANUAL}'`,
name: "''",
},
})
createdBy: ActorMetadata;
}