demo D213
Fleet and network in Angular
Address, data-size and rate types, latency long-tailed so p99 bites
type: ipv4 · bytes · bitrate
This is a fleet and network sheet with address, data-size and rate types, and latency that is long-tailed so the p99 really bites. It shows infrastructure metrics with the right types and the tail statistic that matters for reliability.
This is the Angular version. A standalone component takes the whole configuration through one config input, surfaces grid events as outputs, and exposes the live grid on a getter for anything the inputs do not cover.
The configuration
import { Component } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import { createGrid } from '@toclocoinc/lattice-grid';
import '@toclocoinc/lattice-grid/css';
import { LatticeGridComponent, provideLattice } from '@toclocoinc/lattice-grid/angular';
@Component({
selector: 'app-root',
standalone: true,
imports: [LatticeGridComponent],
template: '<lattice-grid [config]="grid" style="display:block;height:480px"></lattice-grid>',
})
export class AppComponent {
grid = {
rowKey: 'id',
columnDefaults: { filter: true },
toolPanel: { side: 'left', panels: ['columns', 'filters', 'statistics'] },
columns: [
{ field: 'host', title: 'Host', layout: { pin: 'start', width: 140 } },
{ field: 'rack', title: 'Rack', filter: { type: 'set' } },
{ field: 'address', title: 'Address', type: 'ipv4' },
{ field: 'disk', title: 'Disk', type: 'bytes', total: 'sum' },
{ field: 'link', title: 'Link', type: 'bitrate', total: 'sum' },
{ field: 'latency', title: 'Latency', type: 'milliseconds', total: 'p99' },
{ field: 'cpu', title: 'CPU', type: 'percentRate', total: 'avg' },
{ field: 'draw', title: 'Power', type: 'kilowatts', total: 'sum' },
],
formatting: {
latency: [
{ id: 'l-top', when: { op: 'topPercent', value: 5 }, style: { background: '#fbeceb' } },
{ id: 'l-med', when: { op: 'aboveMedian' }, style: { color: '#a4262c' } },
],
},
rows: [/* hosts: host, rack, address, disk, link, latency, cpu, draw */],
};
}
bootstrapApplication(AppComponent, {
providers: [provideLattice({ createGrid })],
});