web: fix [object Object] being shown for policy_execution

closes #449
This commit is contained in:
Jens Langhammer 2021-01-05 11:52:18 +01:00
parent 9fb5ce2a1a
commit cab2942c4e
1 changed files with 11 additions and 1 deletions

View File

@ -20,6 +20,12 @@ export class EventInfo extends LitElement {
display: block; display: block;
white-space: pre-wrap; white-space: pre-wrap;
} }
.pf-l-flex {
justify-content: space-between;
}
.pf-l-flex__item {
min-width: 25%;
}
` `
); );
} }
@ -96,10 +102,14 @@ export class EventInfo extends LitElement {
</div>`; </div>`;
case "policy_execution": case "policy_execution":
return html`<div class="pf-l-flex"> return html`<div class="pf-l-flex">
<div class="pf-l-flex__item">
<h3>${gettext("Binding")}</h3>
${this.getModelInfo(this.event.context.binding as EventContext)}
</div>
<div class="pf-l-flex__item"> <div class="pf-l-flex__item">
<h3>${gettext("Request")}</h3> <h3>${gettext("Request")}</h3>
<ul class="pf-c-list"> <ul class="pf-c-list">
<li>${gettext("Object")}: ${(this.event.context.request as EventContext).obj as string}</li> <li>${gettext("Object")}: ${this.getModelInfo((this.event.context.request as EventContext).obj as EventContext)}</li>
<li><span>${gettext("Context")}: <code>${JSON.stringify((this.event.context.request as EventContext).context)}</code></span></li> <li><span>${gettext("Context")}: <code>${JSON.stringify((this.event.context.request as EventContext).context)}</code></span></li>
</ul> </ul>
</div> </div>