},
// Build custom images
// See https://github.com/aparcar/sasu
- //asu_url: '/api/build'
+ // asu_url: 'http://localhost:5000'
};
console.log('disable request button / show loading spinner')
- fetch(config.asu_url, {
+ fetch(config.asu_url + '/api/build', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(request_data)
response.json()
.then(mobj => {
console.log(mobj)
+ var download_url = config.asu_url + '/store/' + mobj.bin_dir
updateImages(
mobj.version_number,
mobj.version_code,
get_model_titles(mobj.titles),
- mobj.url, mobj, true
+ download_url, mobj, true
);
});
break;
console.log('error (' + response.status + ')');
response.json()
.then(mobj => {
+ if (mobj.buildlog == true) {
+ $('buildlog').href = config.asu_url + '/store/' + mobj.bin_dir + '/buildlog.txt';
+ show('buildlog')
+ }
alert(mobj.message)
});
break;
}
function updateImages(version, code, model, url, mobj, is_custom) {
+ hide('buildlog')
// add download button for image
function addLink(type, file) {
var a = document.createElement('A');