mirror of
https://github.com/Radarr/Radarr
synced 2026-01-14 19:43:09 +01:00
Indexes are created with the same uniqueness when copying a table New: Non-English episode support New: Renamed Quality Profiles to Profiles and made them more powerful New: Configurable wait time before grabbing a release to wait for a better quality
68 lines
2.3 KiB
JavaScript
68 lines
2.3 KiB
JavaScript
'use strict';
|
|
|
|
define(
|
|
[
|
|
'Cells/NzbDroneCell'
|
|
], function (NzbDroneCell) {
|
|
return NzbDroneCell.extend({
|
|
|
|
className: 'queue-status-cell',
|
|
|
|
render: function () {
|
|
this.$el.empty();
|
|
|
|
if (this.cellValue) {
|
|
var status = this.cellValue.get('status').toLowerCase();
|
|
var errorMessage = (this.cellValue.get('errorMessage') || '');
|
|
var icon = 'icon-nd-downloading';
|
|
var title = 'Downloading';
|
|
|
|
if (status === 'paused') {
|
|
icon = 'icon-pause';
|
|
title = 'Paused';
|
|
}
|
|
|
|
if (status === 'queued') {
|
|
icon = 'icon-cloud';
|
|
title = 'Queued';
|
|
}
|
|
|
|
if (status === 'completed') {
|
|
icon = 'icon-inbox';
|
|
title = 'Downloaded';
|
|
}
|
|
|
|
if (status === 'pending') {
|
|
icon = 'icon-time';
|
|
title = 'Pending';
|
|
}
|
|
|
|
if (errorMessage !== '') {
|
|
if (status === 'completed') {
|
|
icon = 'icon-nd-import-failed';
|
|
title = "Import failed";
|
|
}
|
|
else {
|
|
icon = 'icon-nd-download-failed';
|
|
title = "Download failed";
|
|
}
|
|
this.$el.html('<i class="{0}"></i>'.format(icon));
|
|
|
|
this.$el.popover({
|
|
content : errorMessage.replace(new RegExp('\r\n', 'g'), '<br/>'),
|
|
html : true,
|
|
trigger : 'hover',
|
|
title : title,
|
|
placement: 'right',
|
|
container: this.$el
|
|
});
|
|
}
|
|
else {
|
|
this.$el.html('<i class="{0}" title="{1}"></i>'.format(icon, title));
|
|
}
|
|
}
|
|
|
|
return this;
|
|
}
|
|
});
|
|
});
|