Skip to content

Commit f1da810

Browse files
committed
Support ElasticSearch archive log
1 parent f514715 commit f1da810

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lhc_web/design/defaulttheme/tpl/lhgenericbot/message/content/html_admin.tpl.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?php if (is_array($metaMessage)) : ?>
2-
32
<?php if (isset($metaMessage['debug']) && $metaMessage['debug']) : ?>
43
<div class="msg-body msg-body-media">
4+
[<?php print (is_object($msg) ? $msg->id : $msg['id'])?>]
5+
<?php if (!empty($metaMessage['content'])) : ?>
56
<?php $debugData = json_decode($metaMessage['content'],true);?>
67
<?php if (isset($debugData['params_request'])) : ?>
78
<button class="btn btn-xs btn-outline-secondary" onclick="lhc.revealModal({'url':'<?php echo erLhcoreClassDesign::baseurl('audit/copycurl')?>/<?php print (is_object($msg) ? $msg->id : $msg['id'])?>'});" type="button">Copy as CURL</button>
@@ -24,7 +25,9 @@
2425
} else {
2526
echo htmlspecialchars($metaMessage['content']);
2627
}?></pre>
27-
28+
<?php elseif (!empty($metaMessage['ex']) && preg_match('/^[a-z0-9-]+/i', $metaMessage['ex']) && ($pathDynamic = erLhcoreClassDesign::designtpldynamic('lhchat/part/debug_' . $metaMessage['ex'] . '.tpl.php')) && $pathDynamic !== null) : ?>
29+
<?php include $pathDynamic;?>
30+
<?php endif; ?>
2831
</div>
2932
<?php else : ?>
3033
<?php $msgBody = '[html]'.str_replace(["\r","\n"],["",""],$metaMessage['content']).'[/html]'; $paramsMessageRender = array('msg_body_class' => (isset($type) && $type === 'debug' ? 'bg-transparent text-muted' : ''), 'sender' => (is_object($msg) ? $msg->user_id : $msg['user_id']));?>

0 commit comments

Comments
 (0)