in src/main/resources/META-INF/resources/components/classic.js [79:108]
generate: function (event) {
this.showButton = false;
const project = this.$children.find(child => { return child.$options.name === "project"; });
const sel = this.$children.find(child => { return child.$options.name === "selected"; });
const selected = sel.selected.map((item) => item['name']).join(",");
const request = {
camelType: this.type,
camelVersion: this.camelVersion.name,
javaVersion: this.javaVersion,
groupId: project.group,
artifactId: project.artifact,
version: project.version,
components: selected
};
axios({
method: 'get',
url: '/generator',
params: request,
responseType: 'blob'
})
.then(response => {
this.forceFileDownload(response);
this.showButton = true;
})
.catch(error => {
console.log('error occured');
console.log(error);
this.showButton = true;
});
},