{% extends "base.html" %} {% autoescape None %} {% block title %}Task {{ task['task_index'] }}, Dataset {{ dataset['dataset'] }} - IceProd{% end %} {% block page_title %}Task Details{% end %} {% block body %}
{% for k in task %}
{{ escape(k) }}
{% if k == 'dataset_id' %} {{ escape(task[k]) }} {% elif k == 'job_id' %} {{ escape(task[k]) }} {% elif k == 'depends' %} {% for t in task[k] %} {{ escape(t) }}   {% end %} {% else %} {{ task[k] }} {% end %}
{% end %} {% if (current_user) %} {% set action_url = f"/dataset/{url_escape(task['dataset_id'])}/task/actions" %} {% set ids = [task['task_id']] %}
{% module ActionForm(url=action_url, action='reset', label='Reset', ids=ids, id_field='task_ids', return_page='detail') %} {% module ActionForm(url=action_url, action='hard_reset', label='Hard Reset', ids=ids, id_field='task_ids', return_page='detail', confirm_msg='Hard reset this task?') %} {% module ActionForm(url=action_url, action='suspend', label='Suspend', ids=ids, id_field='task_ids', return_page='detail', confirm_msg='Suspend this task?') %} {% module ActionForm(url=action_url, action='delete_logs', label='Delete Logs', ids=ids, id_field='task_ids', return_page='detail', confirm_msg='Delete all logs for this task? This cannot be undone.') %}
{% end %}
{% if task_stats %}

task stats

{{ '
'.join(escape(json_encode(task_stats, indent=2).replace('\r','')).replace(' ',' ').split('\n')) }}
{% end %}
{% if 'stdlog' in logs %}
stdlog {% for i,log in enumerate(logs['stdlog'][1:10]) %} {{ i+2 }} {% end %} {% if len(logs['stdlog']) > 10 %} (+ {{ len(logs['stdlog'])-10 }} more) {% end %} {% if not (('stdout' in logs and logs['stdout'][0]['data']) or ('stderr' in logs and logs['stderr'][0]['data'])) %}
{{ '
'.join(map(escape,logs['stdlog'][0]['data'].replace('\r','').split('\n')[-20:])) }}
{% end %}
{% end %} {% if 'stdout' in logs %}
stdout {% for i,log in enumerate(logs['stdout'][1:10]) %} {{ i+2 }} {% end %} {% if len(logs['stdout']) > 10 %} (+ {{ len(logs['stdout'])-10 }} more) {% end %}
{{ '
'.join(map(escape,logs['stdout'][0]['data'].replace('\r','').split('\n')[-20:])) }}
{% end %} {% if 'stderr' in logs %}
stderr {% for i,log in enumerate(logs['stderr'][1:10]) %} {{ i+2 }} {% end %} {% if len(logs['stderr']) > 10 %} (+ {{ len(logs['stderr'])-10 }} more) {% end %}
{{ '
'.join(map(escape,logs['stderr'][0]['data'].replace('\r','').split('\n')[-20:])) }}
{% end %} {% for name in logs %} {% if name not in ('stdlog', 'stdout', 'stderr') %}
{{ escape(name) }} {% for i,log in enumerate(logs[name][1:10]) %} {{ i+2 }} {% end %} {% if len(logs[name]) > 10 %} (+ {{ len(logs[name])-10 }} more) {% end %}
{{ '
'.join(map(escape,logs[name][0]['data'].replace('\r','').split('\n')[-10:])) }}
{% end %} {% end %}
{% end %}