-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bindings): display bindings on channel, operation and message level
Close #25
- Loading branch information
Showing
5 changed files
with
72 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{% macro displayProtocol(protocol, protocolVersion) %} | ||
{% if protocolVersion %} | ||
<span class="bg-teal-500 font-bold no-underline text-white uppercase rounded ml-2" | ||
style="height: 20px;font-size: 11px;padding: 3px;">{{ protocol }} | ||
{{ protocolVersion }}</span> | ||
{% else %} | ||
<span class="bg-teal-500 font-sans font-bold no-underline text-white uppercase rounded ml-2" | ||
style="height: 20px;font-size: 11px;padding: 3px;">{{ protocol }}</span> | ||
{% endif %} | ||
{% endmacro %} | ||
|
||
|
||
{% macro bindings(eltName, elt, odd=false) %} | ||
|
||
{% if elt.hasBindings() %} | ||
{% for protocol in elt.bindingProtocols() %} | ||
<div class=" mt-4 text-sm"> | ||
<span class="string-chunk">{{eltName}} specific information:</span> | ||
{{ displayProtocol(protocol) }} | ||
</div> | ||
{% for bindingName, bindingValue in elt.binding(protocol) %} | ||
<div class="{% if odd %}bg-gray-100{% else %}bg-gray-200{% endif %} pl-6"> | ||
{% if bindingValue | isObject %} | ||
<div class="{% if open %}is-open{% endif %}"> | ||
<div class="js-prop cursor-pointer py-2 property"> | ||
<div class="pr-4" style="margin-top: -2px; min-width: 25%"> | ||
<span class="text-sm" style="word-break: break-word" | ||
>{{ bindingName }}</span | ||
> | ||
<svg | ||
class="expand inline align-baseline" | ||
version="1.1" | ||
viewBox="0 0 24 24" | ||
x="0" | ||
xmlns="http://www.w3.org/2000/svg" | ||
y="0" | ||
> | ||
<polygon | ||
points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 " | ||
></polygon> | ||
</svg> | ||
</div> | ||
</div> | ||
<div class="children"> | ||
<div | ||
class="{% if odd %}bg-gray-200{% else %}bg-gray-100{% endif %} {% if not root %}pl-8 pr-8{% endif %} rounded" | ||
> | ||
<pre class="text-sm">{{ bindingValue | dump(2) }}</pre> | ||
</div> | ||
</div> | ||
</div> | ||
{% else %} | ||
<div class="text-sm">{{ bindingName }}: {{ bindingValue }}</div> | ||
{% endif %} | ||
</div> | ||
{% endfor %} | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters