Skip to content

Instantly share code, notes, and snippets.

@scale-tone
Last active December 19, 2020 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scale-tone/13956ec804a70f5f66200c6ec97db673 to your computer and use it in GitHub Desktop.
Save scale-tone/13956ec804a70f5f66200c6ec97db673 to your computer and use it in GitHub Desktop.
Liquid custom tab template for Durable Functions Monitor. Shows the progress of activity functions in https://github.com/Azure-Samples/durablefunctions-mapreduce-dotnet
{% assign completedTasks = History | where: "EventType", "TaskCompleted" | where: "FunctionName", "MapperAsync" %}
{% assign runningTasks = History | where: "EventType", "TaskScheduled" | where: "Name", "MapperAsync" %}
<table style="width:100%; padding-top: 30px">
<tr style="height: 10px;">
{% for task in completedTasks %}
<td style="background-color:coral;"></td>
{% endfor %}
{% for task in runningTasks %}
<td></td>
{% endfor %}
</tr>
</table>
{% assign totalCount = runningTasks.size | plus: completedTasks.size %}
<h4 style="padding-left: 20px; padding-top: 20px">
{% if totalCount == 0 %}
No mappers started yet
{% else %}
{{completedTasks.size}} of {{totalCount}} mappers completed
{% endif %}
<h4>
@scale-tone
Copy link
Author

The result then looks like this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment