More info on calendar
New: Show more information of grabbed and failed downloads on calendar
This commit is contained in:
parent
75236118dd
commit
c3fee509f6
|
@ -60,15 +60,24 @@ define(
|
||||||
var progress = 100 - (event.downloading.get('sizeleft') / event.downloading.get('size') * 100);
|
var progress = 100 - (event.downloading.get('sizeleft') / event.downloading.get('size') * 100);
|
||||||
var releaseTitle = event.downloading.get('title');
|
var releaseTitle = event.downloading.get('title');
|
||||||
var estimatedCompletionTime = moment(event.downloading.get('estimatedCompletionTime')).fromNow();
|
var estimatedCompletionTime = moment(event.downloading.get('estimatedCompletionTime')).fromNow();
|
||||||
|
var status = event.downloading.get('status').toLocaleLowerCase();
|
||||||
|
var errorMessage = event.downloading.get('errorMessage');
|
||||||
|
|
||||||
if (event.downloading.get('status').toLocaleLowerCase() === 'pending') {
|
if (status === 'pending') {
|
||||||
this.$(element).find('.fc-event-time')
|
this._addStatusIcon(element, 'icon-time', 'Release will be processed {0}'.format(estimatedCompletionTime));
|
||||||
.after('<span class="pending pull-right"><i class="icon-time"></i></span>');
|
}
|
||||||
|
|
||||||
this.$(element).find('.pending').tooltip({
|
else if (errorMessage) {
|
||||||
title: 'Release will be processed {0}'.format(estimatedCompletionTime),
|
if (status === 'completed') {
|
||||||
container: 'body'
|
this._addStatusIcon(element, 'icon-nd-import-failed', 'Import failed: {0}'.format(errorMessage));
|
||||||
});
|
}
|
||||||
|
else {
|
||||||
|
this._addStatusIcon(element, 'icon-nd-download-failed', 'Download failed: {0}'.format(errorMessage));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (status === 'failed') {
|
||||||
|
this._addStatusIcon(element, 'icon-nd-download-failed', 'Download failed: check download client for more details');
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
@ -218,6 +227,16 @@ define(
|
||||||
};
|
};
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
|
},
|
||||||
|
|
||||||
|
_addStatusIcon: function (element, icon, tooltip) {
|
||||||
|
this.$(element).find('.fc-event-time')
|
||||||
|
.after('<span class="status pull-right"><i class="{0}"></i></span>'.format(icon));
|
||||||
|
|
||||||
|
this.$(element).find('.status').tooltip({
|
||||||
|
title: tooltip,
|
||||||
|
container: 'body'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
.fc-event {
|
.fc-event {
|
||||||
.clickable;
|
.clickable;
|
||||||
|
|
||||||
.pending {
|
.status {
|
||||||
margin-right : 4px;
|
margin-right : 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,8 +173,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ical
|
.ical {
|
||||||
{
|
|
||||||
color: @btn-link-disabled-color;
|
color: @btn-link-disabled-color;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,14 +37,19 @@ define(
|
||||||
title = 'Pending';
|
title = 'Pending';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (status === 'failed') {
|
||||||
|
icon = 'icon-nd-download-failed';
|
||||||
|
title = 'Download failed: check download client for more details';
|
||||||
|
}
|
||||||
|
|
||||||
if (errorMessage !== '') {
|
if (errorMessage !== '') {
|
||||||
if (status === 'completed') {
|
if (status === 'completed') {
|
||||||
icon = 'icon-nd-import-failed';
|
icon = 'icon-nd-import-failed';
|
||||||
title = "Import failed";
|
title = 'Import failed';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
icon = 'icon-nd-download-failed';
|
icon = 'icon-nd-download-failed';
|
||||||
title = "Download failed";
|
title = 'Download failed';
|
||||||
}
|
}
|
||||||
this.$el.html('<i class="{0}"></i>'.format(icon));
|
this.$el.html('<i class="{0}"></i>'.format(icon));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue