|
2340 | 2340 | var $node = $tabPane.find('.alert.error-summary'); |
2341 | 2341 | if (!$node.length) { |
2342 | 2342 | $node = $('<div class="alert alert-error error-summary">' + |
2343 | | - '<h3><i class="fa fa-lg fa-times-circle"></i> Error(s)</h3>' + |
| 2343 | + '<h3><i class="fa fa-lg fa-times-circle"></i> Error(s) not consoled</h3>' + |
2344 | 2344 | '<ul class="list-unstyled">' + |
2345 | 2345 | '</ul>' + |
2346 | 2346 | '</div>'); |
2347 | 2347 | $tabPane.prepend($node); |
2348 | 2348 | } |
2349 | 2349 | $node = $node.find('ul'); |
2350 | | - $node.append($('<li></li>').text(logEntry.args[0])); |
| 2350 | + $node.append(buildEntryNode(logEntry)); |
2351 | 2351 | if (logEntry.meta.class === 'error') { |
2352 | 2352 | $container |
2353 | 2353 | .addClass('bg-danger') |
|
2884 | 2884 | $node.addClass(meta.attribs.class); |
2885 | 2885 | delete meta.attribs.class; |
2886 | 2886 | } |
| 2887 | + if (meta.attribs.id) { |
| 2888 | + meta.attribs.id = buildId(meta); |
| 2889 | + } |
2887 | 2890 | $node.attr(meta.attribs); |
2888 | 2891 | } |
2889 | 2892 | if (meta.icon) { |
|
2916 | 2919 | var $debug; |
2917 | 2920 | var $node; |
2918 | 2921 | var $tabPane; |
2919 | | - var channelNameRoot = $container.find('.debug').data('channelNameRoot') || 'general'; |
| 2922 | + var channelNameRoot = $container.find('.debug').data('channelNameRoot') || meta.channelNameRoot || 'general'; |
2920 | 2923 | var channelName = meta.channel || channelNameRoot; |
2921 | 2924 | var channelSplit = channelName.split('.'); |
2922 | 2925 | var info = { |
|
2931 | 2934 | if ($container.length) { |
2932 | 2935 | $tabPane = getTabPane(info, meta); |
2933 | 2936 | $node = $tabPane.data('nodes').slice(-1)[0] || $tabPane.find('> .debug-log'); |
| 2937 | + if (meta.appendGroup) { |
| 2938 | + $node = $tabPane.find('#' + buildId(meta, meta.appendGroup) + ' > .group-body'); |
| 2939 | + } |
2934 | 2940 | } else { |
2935 | 2941 | // create |
2936 | 2942 | // header and card are separate so we can sticky the header |
|
3220 | 3226 | return false |
3221 | 3227 | } |
3222 | 3228 |
|
| 3229 | + function buildId(meta, id) { |
| 3230 | + id = id || meta.attribs.id; |
| 3231 | + id = id.replace(/\W+/g, '-'); |
| 3232 | + if (id.indexOf(meta.requestId) !== 0) { |
| 3233 | + id = meta.requestId + '_' + id; |
| 3234 | + } |
| 3235 | + return id |
| 3236 | + } |
| 3237 | + |
3223 | 3238 | function Xdebug(pubSub) { |
3224 | 3239 | var self = this; |
3225 | 3240 | var $root = $('#debug-cards'); |
|
0 commit comments