File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1421,11 +1421,12 @@ <h2 class="is-size-7 has-text-weight-normal mb-5 mt-0">Decisions</h2>
1421
1421
} ,
1422
1422
1423
1423
downloadInfo ( formatType ) {
1424
- apiV2 ( 'POST' , `${ this . ENDPOINT } /${ this . selectedOperationID } /report` , { enable_agent_output : this . isAgentOutputSelected } )
1425
- . then ( ( res ) => {
1426
- this . createDownloadReport ( res , `${ this . selectedOperation . name } _${ formatType } ` ) ;
1427
- } )
1428
- . catch ( ( ) => toast ( 'Error generating operation report.' ) ) ;
1424
+ const endpoint = formatType === 'full-report' ? 'report' : formatType ;
1425
+ apiV2 ( 'POST' , `${ this . ENDPOINT } /${ this . selectedOperationID } /${ endpoint } ` , { enable_agent_output : this . isAgentOutputSelected } )
1426
+ . then ( ( res ) => {
1427
+ this . createDownloadReport ( res , `${ this . selectedOperation . name } _${ formatType } ` ) ;
1428
+ } )
1429
+ . catch ( ( ) => toast ( `Error generating operation ${ formatType . replace ( '-' , ' ' ) } ` ) ) ;
1429
1430
} ,
1430
1431
1431
1432
downloadCSV ( ) {
@@ -1473,6 +1474,7 @@ <h2 class="is-size-7 has-text-weight-normal mb-5 mt-0">Decisions</h2>
1473
1474
fileName += '.json' ;
1474
1475
} else {
1475
1476
dataURL = window . URL . createObjectURL ( data ) ;
1477
+ fileName += '.csv' ;
1476
1478
}
1477
1479
1478
1480
const elem = document . createElement ( 'a' ) ;
You can’t perform that action at this time.
0 commit comments