integration layer; merge work on indicators from forks with existing ingestion pipeline
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
<section
|
||||
class="canvas"
|
||||
cdkDropList
|
||||
cdkDropListSortingDisabled
|
||||
[cdkDropListEnterPredicate]="onlyTables"
|
||||
(cdkDropListDropped)="onDrop($event)"
|
||||
aria-labelledby="canvas-title"
|
||||
>
|
||||
<header class="canvas__header">
|
||||
<h2 id="canvas-title">Flujos de carga</h2>
|
||||
<span class="canvas__caption">
|
||||
{{ store.flows().length }} flujo(s) · cada uno lleva una tabla de origen a una tabla de la base
|
||||
</span>
|
||||
</header>
|
||||
|
||||
<div class="canvas__grid">
|
||||
@for (flow of store.flows(); track flow.id) {
|
||||
<mat-card
|
||||
appearance="outlined"
|
||||
class="flow-card"
|
||||
[class.flow-card--selected]="store.selectedFlow() === flow"
|
||||
(click)="store.select(flow)"
|
||||
tabindex="0"
|
||||
(keydown.enter)="store.select(flow)"
|
||||
role="button"
|
||||
[attr.aria-pressed]="store.selectedFlow() === flow"
|
||||
>
|
||||
<div class="flow-card__route">
|
||||
<span class="flow-card__end">
|
||||
<mat-icon aria-hidden="true">{{ flow.table.icon }}</mat-icon>
|
||||
<span class="flow-card__name" [title]="flow.label">{{ flow.table.name }}</span>
|
||||
</span>
|
||||
<mat-icon class="flow-card__arrow" aria-hidden="true">arrow_right_alt</mat-icon>
|
||||
<span class="flow-card__end flow-card__end--target">
|
||||
<mat-icon aria-hidden="true">table_chart</mat-icon>
|
||||
<span class="flow-card__name">{{ flow.target.table }}</span>
|
||||
</span>
|
||||
<button
|
||||
mat-icon-button
|
||||
type="button"
|
||||
class="flow-card__menu"
|
||||
[matMenuTriggerFor]="menu"
|
||||
(click)="$event.stopPropagation()"
|
||||
[attr.aria-label]="'Acciones del flujo ' + flow.label"
|
||||
>
|
||||
<mat-icon aria-hidden="true">more_vert</mat-icon>
|
||||
</button>
|
||||
<mat-menu #menu="matMenu">
|
||||
<button mat-menu-item type="button" (click)="store.reloadFlow(flow)">
|
||||
<mat-icon aria-hidden="true">refresh</mat-icon>Volver a leer la fuente
|
||||
</button>
|
||||
<button mat-menu-item type="button" (click)="store.removeFlow(flow)">
|
||||
<mat-icon aria-hidden="true">delete</mat-icon>Quitar flujo
|
||||
</button>
|
||||
</mat-menu>
|
||||
</div>
|
||||
|
||||
<p class="flow-card__source" [title]="flow.label">{{ flow.table.connection.label }}</p>
|
||||
|
||||
<mat-progress-bar
|
||||
mode="determinate"
|
||||
[value]="coverage(flow)"
|
||||
[attr.aria-label]="'Campos asignados: ' + coverage(flow) + '%'"
|
||||
></mat-progress-bar>
|
||||
|
||||
<div class="flow-card__facts">
|
||||
<app-flow-status [status]="flow.status()"></app-flow-status>
|
||||
<span matTooltip="Campos de destino con columna o valor por defecto">
|
||||
{{ mappedFields(flow) }}/{{ flow.target.fields.length }} campos
|
||||
</span>
|
||||
@if (flow.totalRows() !== null) {
|
||||
<span>{{ flow.totalRows() | number }} filas</span>
|
||||
}
|
||||
@if (flow.validation(); as validation) {
|
||||
@if (validation.error_count > 0) {
|
||||
<span class="flow-card__errors">{{ validation.error_count | number }} con errores</span>
|
||||
}
|
||||
}
|
||||
@if (flow.result(); as result) {
|
||||
<span class="flow-card__loaded">+{{ result.created }} / ↻{{ result.updated }}</span>
|
||||
}
|
||||
</div>
|
||||
</mat-card>
|
||||
}
|
||||
|
||||
<div class="canvas__drop" [class.canvas__drop--alone]="store.flows().length === 0">
|
||||
<mat-icon aria-hidden="true">move_to_inbox</mat-icon>
|
||||
<p>
|
||||
@if (store.connections().length === 0) {
|
||||
Agrega una conexión y arrastra sus tablas aquí para componer tu carga.
|
||||
} @else {
|
||||
Arrastra aquí una tabla de «Conexiones» — o usa su botón <mat-icon inline aria-hidden="true">arrow_forward</mat-icon>.
|
||||
}
|
||||
</p>
|
||||
@if (store.connections().length === 0) {
|
||||
<button mat-flat-button type="button" (click)="addConnection.emit()">
|
||||
<mat-icon aria-hidden="true">add</mat-icon>Obtener datos
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user