File tree 2 files changed +16
-2
lines changed 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,9 @@ async function exportTrainedPipeline(settings: Settings,
285
285
job . on ( 'exit' , async ( code ) => {
286
286
if ( code === 0 ) {
287
287
if ( fs . existsSync ( converterOutput ) ) {
288
+ if ( fs . existsSync ( path ) ) {
289
+ fs . unlinkSync ( path ) ;
290
+ }
288
291
// We move instead of copying because .onnx files can be huge
289
292
fs . moveSync ( converterOutput , path ) ;
290
293
} else {
Original file line number Diff line number Diff line change @@ -148,11 +148,22 @@ export default defineComponent({
148
148
});
149
149
if (! location .canceled && location .filePath ) {
150
150
await exportTrainedPipeline (location .filePath ! , item );
151
+ const goToJobsPage = ! await prompt ({
152
+ title: ' Export Started' ,
153
+ text: ' You can check the export status in the Jobs tab.' ,
154
+ negativeButton: ' View' ,
155
+ positiveButton: ' OK' ,
156
+ confirm: true ,
157
+ });
158
+ if (goToJobsPage ) {
159
+ router .push (' /jobs' );
160
+ }
151
161
}
152
162
} catch (err ) {
153
163
console .log (err );
154
- let text = ' Unable to export model' ;
155
- if (err .response ?.status === 403 ) text = ' You do not have permission to export the selected resource(s).' ;
164
+ const errorTemplate = ' Unable to export model' ;
165
+ let text = ` ${errorTemplate }: ${err } ` ;
166
+ if (err .response ?.status === 403 ) text = ` ${errorTemplate }: You do not have permission to export the selected resource(s). ` ;
156
167
prompt ({
157
168
title: ' Export Failed' ,
158
169
text ,
You can’t perform that action at this time.
0 commit comments