Fix workflow file URL generation

For a single graph level file URL should have a suffix according
to the level.

Change-Id: Ia5c72834d4e306a098ff0075cf52707f1efa40b4
Closes-Bug: #1619341
This commit is contained in:
Vitaly Kramskikh 2017-01-10 20:53:06 +07:00
parent dd0f448f22
commit 46d7910b1d
1 changed files with 4 additions and 1 deletions

View File

@ -300,7 +300,10 @@ var WorkflowsTab = React.createClass({
<DownloadFileButton
label={i18n(ns + 'download_graph_yaml')}
fileName={graphType + '-' + level + '.yaml'}
url={_.result(graphLevelModel, 'url') + '/deployment_tasks/'}
url={
'/api/clusters/' + cluster.id + '/deployment_tasks/' +
{cluster: 'own', release: 'release', plugin: 'plugins'}[level]
}
headers={{Accept: 'application/x-yaml'}}
fetchOptions={{graph_type: graphType}}
className='btn btn-link btn-download-graph-yaml'