Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for custom export file name #2999

Merged
merged 2 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/pipeline-editor/src/PipelineEditorWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ const PipelineWrapper: React.FC<IProps> = ({
runtimeData={runtimeData}
runtimeTypeInfo={runtimeTypes}
pipelineType={type}
exportName={pipelineName}
/>
),
buttons: [Dialog.cancelButton(), Dialog.okButton()],
Expand Down Expand Up @@ -766,7 +767,8 @@ const PipelineWrapper: React.FC<IProps> = ({
const pipeline_dir = PathExt.dirname(contextRef.current.path);
const basePath = pipeline_dir ? `${pipeline_dir}/` : '';
const exportType = dialogResult.value.pipeline_filetype;
const exportPath = `${basePath}${pipelineName}.${exportType}`;
const exportName = dialogResult.value.export_name;
const exportPath = `${basePath}${exportName}.${exportType}`;

switch (actionType) {
case 'run':
Expand Down
15 changes: 14 additions & 1 deletion packages/pipeline-editor/src/PipelineExportDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ interface IProps {
runtimeData: IRuntimeData;
runtimeTypeInfo: IRuntimeType[];
pipelineType?: string;
exportName: string;
}

export const PipelineExportDialog: React.FC<IProps> = ({
runtimeData,
runtimeTypeInfo,
pipelineType
pipelineType,
exportName
}) => {
return (
<form className="elyra-dialog-form">
Expand All @@ -67,6 +69,17 @@ export const PipelineExportDialog: React.FC<IProps> = ({
return <FileTypeSelect fileTypes={info?.export_file_types ?? []} />;
}}
</RuntimeConfigSelect>
<label htmlFor="export_name">Export Filename:</label>
<br />
<input
type="text"
id="export_name"
name="export_name"
defaultValue={exportName}
data-form-required
/>
<br />
<br />
<input
type="checkbox"
className="elyra-Dialog-checkbox"
Expand Down