) => {
+ e.stopPropagation();
+ setShowLaunchForm(true);
+ };
+
+ const renderRerunAction = () => {
+ if (!id) {
+ return <>>;
+ }
+
+ const initialParameters: TaskInitialLaunchParameters = {
+ values: literals && taskInputsTypes && literalsToLiteralValueMap(literals, taskInputsTypes),
+ taskId: id as Identifier | undefined,
+ };
+ return (
+ <>
+
+
+
+
+
+
+ >
+ );
+ };
+
+ return (
+
+
+
+
+
+
+ {renderRerunAction()}
+
+ );
+};
diff --git a/packages/zapp/console/src/components/Executions/Tables/nodeExecutionColumns.tsx b/packages/zapp/console/src/components/Executions/Tables/nodeExecutionColumns.tsx
index e03d00d47..5a9925b62 100644
--- a/packages/zapp/console/src/components/Executions/Tables/nodeExecutionColumns.tsx
+++ b/packages/zapp/console/src/components/Executions/Tables/nodeExecutionColumns.tsx
@@ -10,6 +10,7 @@ import { useNodeExecutionContext } from '../contextProvider/NodeExecutionDetails
import { ExecutionStatusBadge } from '../ExecutionStatusBadge';
import { NodeExecutionCacheStatus } from '../NodeExecutionCacheStatus';
import { getNodeExecutionTimingMS } from '../utils';
+import { NodeExecutionActions } from './NodeExecutionActions';
import { SelectNodeExecutionLink } from './SelectNodeExecutionLink';
import { useColumnStyles } from './styles';
import { NodeExecutionCellRendererData, NodeExecutionColumnDefinition } from './types';
@@ -201,11 +202,11 @@ export function generateColumns(
},
{
cellRenderer: ({ execution, state }) => (
-
+
),
className: styles.columnLogs,
- key: 'logs',
- label: 'logs',
+ key: 'actions',
+ label: '',
},
];
}
diff --git a/packages/zapp/console/src/components/Executions/Tables/strings.tsx b/packages/zapp/console/src/components/Executions/Tables/strings.tsx
new file mode 100644
index 000000000..402c312c7
--- /dev/null
+++ b/packages/zapp/console/src/components/Executions/Tables/strings.tsx
@@ -0,0 +1,9 @@
+import { createLocalizedString } from '@flyteconsole/locale';
+
+const str = {
+ inputsAndOutputsTooltip: 'View Inputs & Outpus',
+ rerunTooltip: 'Rerun',
+};
+
+export { patternKey } from '@flyteconsole/locale';
+export default createLocalizedString(str);
diff --git a/packages/zapp/console/src/components/Launch/LaunchForm/LaunchFormDialog.tsx b/packages/zapp/console/src/components/Launch/LaunchForm/LaunchFormDialog.tsx
new file mode 100644
index 000000000..1c3a25716
--- /dev/null
+++ b/packages/zapp/console/src/components/Launch/LaunchForm/LaunchFormDialog.tsx
@@ -0,0 +1,51 @@
+import { Dialog } from '@material-ui/core';
+import * as React from 'react';
+import { LaunchForm } from 'components/Launch/LaunchForm/LaunchForm';
+import { ResourceIdentifier, ResourceType } from 'models/Common/types';
+import {
+ TaskInitialLaunchParameters,
+ WorkflowInitialLaunchParameters,
+} from 'components/Launch/LaunchForm/types';
+
+interface LaunchFormDialogProps {
+ id: ResourceIdentifier;
+ initialParameters: TaskInitialLaunchParameters | WorkflowInitialLaunchParameters;
+ showLaunchForm: boolean;
+ setShowLaunchForm: React.Dispatch>;
+}
+
+function getLaunchProps(id: ResourceIdentifier) {
+ if (id.resourceType === ResourceType.TASK) {
+ return { taskId: id };
+ } else if (id.resourceType === ResourceType.WORKFLOW) {
+ return { workflowId: id };
+ }
+ throw new Error('Unknown Resource Type');
+}
+
+export const LaunchFormDialog = (props: LaunchFormDialogProps): JSX.Element => {
+ const { id, initialParameters, showLaunchForm, setShowLaunchForm } = props;
+
+ const onCancelLaunch = () => setShowLaunchForm(false);
+
+ // prevent child onclick event in the dialog triggers parent onclick event
+ const dialogOnClick = (e: React.MouseEvent) => {
+ e.stopPropagation();
+ };
+
+ return (
+
+ );
+};
diff --git a/packages/zapp/console/src/components/Launch/LaunchForm/utils.ts b/packages/zapp/console/src/components/Launch/LaunchForm/utils.ts
index 2b8befe5d..fa59ec600 100644
--- a/packages/zapp/console/src/components/Launch/LaunchForm/utils.ts
+++ b/packages/zapp/console/src/components/Launch/LaunchForm/utils.ts
@@ -6,6 +6,7 @@ import { LaunchPlan } from 'models/Launch/types';
import { Task } from 'models/Task/types';
import { Workflow } from 'models/Workflow/types';
import * as moment from 'moment';
+import { LiteralValueMap } from 'components/Launch/LaunchForm/types';
import { simpleTypeToInputType, typeLabels } from './constants';
import { inputToLiteral } from './inputHelpers/inputHelpers';
import { typeIsSupported } from './inputHelpers/utils';
@@ -190,3 +191,22 @@ export function isEnterInputsState(state: BaseInterpretedLaunchState): boolean {
LaunchState.SUBMIT_SUCCEEDED,
].some(state.matches);
}
+
+export function literalsToLiteralValueMap(
+ literals: {
+ [k: string]: Core.ILiteral;
+ },
+ nameToTypeMap: Record,
+): LiteralValueMap {
+ const literalValueMap: LiteralValueMap = new Map();
+
+ for (var i = 0; i < Object.keys(literals).length; i++) {
+ const name = Object.keys(literals)[i];
+ const type = nameToTypeMap[name].type;
+ const typeDefinition = getInputDefintionForLiteralType(type);
+ const inputKey = createInputCacheKey(name, typeDefinition);
+ literalValueMap.set(inputKey, literals[Object.keys(literals)[i]]);
+ }
+
+ return literalValueMap;
+}