Browse Source

Decode html tags in log. fix #386

pull/460/merge
Ruud 13 years ago
parent
commit
4bd2ba2b8d
  1. 6
      couchpotato/core/plugins/log/static/log.js

6
couchpotato/core/plugins/log/static/log.js

@ -45,7 +45,7 @@ Page.Log = new Class({
new Fx.Scroll(window, {'duration': 0}).toBottom();
var nav = new Element('ul.nav').inject(self.log, 'top');
for (var i = 0; i < json.total; i++) {
for (var i = 0; i <= json.total; i++) {
new Element('li', {
'text': i+1,
'class': nr == i ? 'active': '',
@ -78,6 +78,10 @@ Page.Log = new Class({
addColors: function(text){
var self = this;
var text = new Element('div', {
'html': text
}).get('text')
text = text.replace(/\u001b\[31m/gi, '</span><span class="error">')
text = text.replace(/\u001b\[36m/gi, '</span><span class="debug">')
text = text.replace(/\u001b\[33m/gi, '</span><span class="debug">')

Loading…
Cancel
Save