mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-15 21:05:48 -04:00
New: Health Check errors now have links to the wiki pages.
This commit is contained in:
@@ -5,8 +5,9 @@ define(
|
||||
'backgrid',
|
||||
'Health/HealthCollection',
|
||||
'System/Info/Health/HealthCell',
|
||||
'System/Info/Health/HealthWikiCell',
|
||||
'System/Info/Health/HealthOkView'
|
||||
], function (Marionette, Backgrid, HealthCollection, HealthCell, HealthOkView) {
|
||||
], function (Marionette, Backgrid, HealthCollection, HealthCell, HealthWikiCell, HealthOkView) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'System/Info/Health/HealthLayoutTemplate',
|
||||
|
||||
@@ -19,12 +20,20 @@ define(
|
||||
{
|
||||
name: 'type',
|
||||
label: '',
|
||||
cell: HealthCell
|
||||
cell: HealthCell,
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
name: 'message',
|
||||
label: 'Message',
|
||||
cell: 'string'
|
||||
cell: 'string',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
name: 'wikiUrl',
|
||||
label: '',
|
||||
cell: HealthWikiCell,
|
||||
sortable: false
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
29
src/UI/System/Info/Health/HealthWikiCell.js
Normal file
29
src/UI/System/Info/Health/HealthWikiCell.js
Normal file
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'jquery',
|
||||
'backgrid'
|
||||
], function ($, Backgrid) {
|
||||
return Backgrid.UriCell.extend({
|
||||
|
||||
className: 'wiki-link-cell',
|
||||
|
||||
title: 'Read the Wiki for more information',
|
||||
|
||||
text: 'Wiki',
|
||||
|
||||
render: function () {
|
||||
this.$el.empty();
|
||||
var rawValue = this.model.get(this.column.get("name"));
|
||||
var formattedValue = this.formatter.fromRaw(rawValue, this.model);
|
||||
this.$el.append($("<a>", {
|
||||
tabIndex: -1,
|
||||
href: rawValue,
|
||||
title: this.title || formattedValue,
|
||||
target: this.target
|
||||
}).text(this.text));
|
||||
this.delegateEvents();
|
||||
return this;
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -48,13 +48,15 @@ define(
|
||||
throw 'couldn\'t find route target';
|
||||
}
|
||||
|
||||
|
||||
if (!href.startsWith('http')) {
|
||||
var relativeHref = href.replace(StatusModel.get('urlBase'), '');
|
||||
|
||||
Backbone.history.navigate(relativeHref, { trigger: true });
|
||||
}
|
||||
|
||||
else if (href.contains('#')) {
|
||||
//Open in new tab without dereferer (since it doesn't support fragments)
|
||||
window.open(href, '_blank');
|
||||
}
|
||||
else {
|
||||
//Open in new tab
|
||||
window.open('http://www.dereferer.org/?' + encodeURI(href), '_blank');
|
||||
|
||||
Reference in New Issue
Block a user