Include QoS and retain in MQTT debug info (#5759)

This commit is contained in:
Erik Montnemery 2020-05-06 12:58:19 +02:00 committed by GitHub
parent c631554eb0
commit e5abb95f5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,16 +75,15 @@ class MQTTMessages extends LitElement {
private _renderSingleMessage(message): TemplateResult { private _renderSingleMessage(message): TemplateResult {
const topic = message.topic; const topic = message.topic;
return this._showTopic return html`
? html` <ul class="message-with-topic">
<ul class="message-with-topic"> ${this._showTopic ? html` <li>Topic: <code>${topic}</code></li> ` : ""}
<li>Topic: <code>${topic}</code></li> <li>QoS: ${message.qos}${message.retain ? ", Retained" : ""}</li>
<li> <li>
Payload: ${this._renderSinglePayload(message)} Payload: ${this._renderSinglePayload(message)}
</li> </li>
</ul> </ul>
` `;
: this._renderSinglePayload(message);
} }
private _renderSinglePayload(message): TemplateResult { private _renderSinglePayload(message): TemplateResult {