New: The History->Queue UI now show some elementary error information for failed imports.

This commit is contained in:
Taloth Saldono
2014-07-17 21:02:27 +02:00
parent 981ffb09fc
commit 47089d360d
16 changed files with 167 additions and 49 deletions

View File

@@ -163,6 +163,11 @@
color : purple;
}
.icon-nd-import-failed:before {
.icon(@download-alt);
color: @brand-danger;
}
.icon-nd-download-failed:before {
.icon(@cloud-download);
color: @brand-danger;

View File

@@ -13,6 +13,7 @@ define(
if (this.cellValue) {
var status = this.cellValue.get('status').toLowerCase();
var errorMessage = (this.cellValue.get('errorMessage') || '');
var icon = 'icon-nd-downloading';
var title = 'Downloading';
@@ -31,7 +32,29 @@ define(
title = 'Downloaded';
}
this.$el.html('<i class="{0}" title="{1}"></i>'.format(icon, title));
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;

View File

@@ -22,9 +22,8 @@ define(
this.$el.html("-");
}
else {
this.$el.html(timeleft);
this.$el.html('<span title="{1} / {2}">{0}</span>'.format(timeleft, remainingSize, totalSize));
}
this.$el.attr('title', '{0} / {1}'.format(remainingSize, totalSize));
}
return this;

View File

@@ -0,0 +1,4 @@
.queue-status-cell .popover {
max-width: 800px;
}

View File

@@ -11,8 +11,7 @@ define(
render: function () {
var date = Moment(this._getValue());
this.$el.html(date.format('LT'));
this.$el.attr('title', date.format('LLLL'));
this.$el.html('<span title="{1}">{0}</span>'.format(date.format('LT'), date.format('LLLL')));
return this;
}

View File

@@ -12,6 +12,7 @@
<link href="/Content/theme.css" rel='stylesheet' type='text/css'/>
<link href="/Cells/cells.css" rel='stylesheet' type='text/css'>
<link href="/Series/series.css" rel='stylesheet' type='text/css'/>
<link href="/History/history.css" rel='stylesheet' type='text/css'/>
<link href="/System/Logs/logs.css" rel='stylesheet' type='text/css'/>
<link href="/Settings/settings.css" rel='stylesheet' type='text/css'/>
<link href="/AddSeries/addSeries.css" rel='stylesheet' type='text/css'/>