doc-compiler-j2-pdf / app /templates /MapReduce.html.j2
JairoDanielMT's picture
templates actualizados y blindados
0324409
{% extends "base.html.j2" %}
{% import "components.html.j2" as ui %}
{% block content %}
<header class="doc-header">
<h1>Map/Reduce 路 {{ doc.metadata.description or doc.metadata.script_type }}</h1>
<p class="doc-header-meta">
Pipeline de procesamiento por lotes (SuiteScript Map/Reduce).
</p>
<p class="muted">Procesos masivos, b煤squedas y operaciones sobre registros.</p>
</header>
{{ ui.metadata_block(doc.metadata) }}
{{ ui.summary_block(doc.summary) }}
{# ------------------------ getInputData ------------------------ #}
{% if doc.getInputData %}
<div class="section">
<h2>getInputData</h2>
{% if doc.getInputData.details %}
<p>{{ doc.getInputData.details }}</p>
{% endif %}
{% if doc.getInputData.filters %}
{{ ui.table_block("Filtros", doc.getInputData.filters, [
{"field": "field", "title": "Campo"},
{"field": "operator", "title": "Operador"},
{"field": "value", "title": "Valor"}
]) }}
{% endif %}
{% if doc.getInputData.columns %}
{{ ui.table_block("Columnas", doc.getInputData.columns, [
{"field": "name", "title": "Nombre"},
{"field": "label", "title": "Etiqueta"}
]) }}
{% endif %}
</div>
{% endif %}
{# ------------------------ map ------------------------ #}
{% if doc.map %}
<div class="section">
<h2>map</h2>
{% if doc.map.logic %}
<p>{{ doc.map.logic }}</p>
{% endif %}
{% if doc.map.fields_used %}
{{ ui.list_block("Campos utilizados", doc.map.fields_used) }}
{% endif %}
{% if doc.map.record_operations %}
{{ ui.table_block("Operaciones en registros (map)", doc.map.record_operations, [
{"field": "type", "title": "Operaci贸n"},
{"field": "recordType", "title": "Record"},
{"field": "fields", "title": "Campos"}
]) }}
{% endif %}
</div>
{% endif %}
{# ------------------------ reduce ------------------------ #}
{% if doc.reduce %}
<div class="section">
<h2>reduce</h2>
{% if doc.reduce.logic %}
<p>{{ doc.reduce.logic }}</p>
{% endif %}
{% if doc.reduce.aggregations %}
{{ ui.list_block("Agregaciones", doc.reduce.aggregations) }}
{% endif %}
{% if doc.reduce.record_operations %}
{{ ui.table_block("Operaciones en registros (reduce)", doc.reduce.record_operations, [
{"field": "type", "title": "Operaci贸n"},
{"field": "recordType", "title": "Record"},
{"field": "fields", "title": "Campos"}
]) }}
{% endif %}
</div>
{% endif %}
{# ------------------------ summarize ------------------------ #}
{% if doc.summarize %}
<div class="section">
<h2>summarize</h2>
{% if doc.summarize.usage %}
<p>{{ doc.summarize.usage }}</p>
{% endif %}
{% if doc.summarize.errors %}
{{ ui.list_block("Errores", doc.summarize.errors) }}
{% endif %}
{% if doc.summarize.final_actions %}
{{ ui.list_block("Acciones finales", doc.summarize.final_actions) }}
{% endif %}
</div>
{% endif %}
{# ------------------------ b煤squedas globales ------------------------ #}
{% if doc.searches %}
{{ ui.table_block("B煤squedas utilizadas", doc.searches, [
{"field": "id", "title": "ID"},
{"field": "filters", "title": "Filtros"},
{"field": "columns", "title": "Columnas"}
]) }}
{% endif %}
{# ------------------------ operaciones globales con registros ------------------------ #}
{% if doc.records %}
{{ ui.table_block("Operaciones con registros", doc.records, [
{"field": "type", "title": "Operaci贸n"},
{"field": "recordType", "title": "Record"},
{"field": "fields", "title": "Campos"}
]) }}
{% endif %}
{# ------------------------ side effects globales ------------------------ #}
{% if doc.side_effects %}
{{ ui.list_block("Side effects", doc.side_effects) }}
{% endif %}
{# ------------------------ errores globales ------------------------ #}
{% if doc.errors %}
{% if doc.errors is mapping %}
{{ ui.list_block("Errores", doc.errors.explicit_checks or []) }}
{{ ui.list_block("Manejo de excepciones", doc.errors.exception_handling or []) }}
{% else %}
{{ ui.table_block("Errores", doc.errors, [
{"field": "location", "title": "Ubicaci贸n"},
{"field": "description", "title": "Descripci贸n"}
]) }}
{% endif %}
{% endif %}
{% endblock %}