Merge "Fix plan export download URL"

This commit is contained in:
Jenkins 2017-04-11 12:51:01 +00:00 committed by Gerrit Code Review
commit 43e1b2c1f8
1 changed files with 7 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import StackActions from '../actions/StacksActions';
import SwiftApiErrorHandler from '../services/SwiftApiErrorHandler';
import SwiftApiService from '../services/SwiftApiService';
import MistralConstants from '../constants/MistralConstants';
import { getAppConfig } from '../services/utils';
const messages = defineMessages({
planCreatedNotificationTitle: {
@ -483,7 +484,12 @@ export default {
}));
}
else {
dispatch(this.exportPlanSuccess(payload.tempurl));
let urlParser = document.createElement('a');
urlParser.href = payload.tempurl;
let url = urlParser.hostname;
urlParser.href = getAppConfig().swift;
let swiftUrl = urlParser.hostname;
dispatch(this.exportPlanSuccess(payload.tempurl.replace(url, swiftUrl)));
}
};
},