Fix plan export URL
* use getServiceUrl utility function to retrieve swift API URL instead of directly accessing appConfig * clean up export plan modal dialog to use <p> instead of nesting <div> and <br/> Closes-Bug: 1707055 Change-Id: I18a764d1ff5dca956880308f000bd58c1b8cce6a
This commit is contained in:
parent
24facd7a39
commit
da97d3009e
|
@ -0,0 +1,5 @@
|
|||
fixes:
|
||||
- |
|
||||
Fixes `bug 1707055 <https://launchpad.net/bugs/1707055>`__
|
||||
Fixes incorrectly generated exported plan URL for specific application
|
||||
configurations
|
|
@ -27,8 +27,8 @@ import { planFileSchema } from '../normalizrSchemas/plans';
|
|||
import StackActions from '../actions/StacksActions';
|
||||
import SwiftApiService from '../services/SwiftApiService';
|
||||
import MistralConstants from '../constants/MistralConstants';
|
||||
import { getAppConfig } from '../services/utils';
|
||||
import { PLAN_ENVIRONMENT } from '../constants/PlansConstants';
|
||||
import { getServiceUrl } from '../services/utils';
|
||||
|
||||
const messages = defineMessages({
|
||||
planCreatedNotificationTitle: {
|
||||
|
@ -499,7 +499,7 @@ export default {
|
|||
let urlParser = document.createElement('a');
|
||||
urlParser.href = payload.tempurl;
|
||||
let url = urlParser.hostname;
|
||||
urlParser.href = getAppConfig().swift;
|
||||
urlParser.href = getServiceUrl('swift');
|
||||
let swiftUrl = urlParser.hostname;
|
||||
dispatch(
|
||||
this.exportPlanSuccess(payload.tempurl.replace(url, swiftUrl))
|
||||
|
|
|
@ -89,10 +89,9 @@ class ExportPlan extends React.Component {
|
|||
>
|
||||
{this.props.planExportUrl
|
||||
? <div>
|
||||
<div>
|
||||
<p>
|
||||
<FormattedMessage {...messages.downloadPlanExportMessage} />
|
||||
</div>
|
||||
<br />
|
||||
</p>
|
||||
<a
|
||||
href={this.props.planExportUrl}
|
||||
className="btn btn-success"
|
||||
|
|
Loading…
Reference in New Issue