{% extends "base.html" %} {% block content %}
{% if job.name %}

{{ job.name }}

{% else %}

Job Details

{% endif %} {% if job.status.value == 'pending' %} Pending {% elif job.status.value == 'running' %} Running {% elif job.status.value == 'completed' %} Completed {% elif job.status.value == 'failed' %} Failed {% endif %}
{{ job.id }}
{{ job.created_at.strftime('%Y-%m-%d %H:%M:%S') }}
{% if job.status.value == 'completed' %} {% endif %} {% if job.status.value in ['completed', 'failed'] %}
{% endif %} New

Hosts ({{ hosts|length }})

{% for h in hosts %}

{{ h.label }} {% if h.replica_status and h.replica_status.is_replica %} {% if h.replica_status.seconds_behind_master is none %} NULL {% elif h.replica_status.seconds_behind_master == 0 %} 0s lag {% else %} {{ h.replica_status.seconds_behind_master }}s lag {% endif %} {% endif %} {% if h.job_host.mysql_version %} {{ h.job_host.mysql_version }} {% endif %}

{{ h.host }}:{{ h.port }}

{{ h.host }}:{{ h.port }}
{% if h.job_host.status.value == 'pending' %} Pending {% elif h.job_host.status.value == 'running' %} Running {% elif h.job_host.status.value == 'completed' %} Completed {% elif h.job_host.status.value == 'failed' %} Failed {% endif %}
{% if h.job_host.error_message %}
{{ h.job_host.error_message[:200] }}{% if h.job_host.error_message|length > 200 %}...{% endif %}
{% endif %} {% if h.job_host.started_at %}
Started: {{ h.job_host.started_at.strftime('%Y-%m-%d %H:%M:%S') }}
{% if h.job_host.completed_at %}
Completed: {{ h.job_host.completed_at.strftime('%Y-%m-%d %H:%M:%S') }} ({{ ((h.job_host.completed_at - h.job_host.started_at).total_seconds())|round(1) }}s)
{% endif %}
{% endif %} {% if h.job_host.status.value == 'completed' %} View Output {% elif h.job_host.status.value == 'failed' %} View Error {% else %}
{% endif %}
{% endfor %}
{% set completed_hosts = hosts | selectattr('job_host.status.value', 'equalto', 'completed') | list %} {% if completed_hosts and completed_hosts[0].buffer_pool and completed_hosts[0].buffer_pool.pool_size_gb %}

Buffer Pool Summary

{% for h in hosts %} {% if h.job_host.status.value == 'completed' and h.buffer_pool and h.buffer_pool.pool_size_gb %} {% endif %} {% endfor %}
Host Pool Size Used Free Hit Ratio Health
{{ h.label }} {{ h.buffer_pool.pool_size_gb }} GB {{ h.buffer_pool.used_gb or 0 }} GB ({{ h.buffer_pool.used_percent or 0 }}%) {{ h.buffer_pool.free_gb or 0 }} GB ({{ h.buffer_pool.free_percent or 0 }}%) {% if h.buffer_pool.hit_ratio is not none %} {{ h.buffer_pool.hit_ratio }}% {% else %} {% endif %} {% if h.buffer_pool.health == 'healthy' %} Good {% elif h.buffer_pool.health == 'warning' %} Warning {% elif h.buffer_pool.health == 'critical' %} Critical {% else %} {% endif %}
{% endif %}
{% endblock %}