Add Phase 4: gNMI streaming telemetry and traffic generator
- gNMI integration: NETCONF script to enable gRPC on all 9 routers,
Telegraf container with gnmi input plugin, InfluxDB for time-series
storage, 3 Grafana telemetry dashboards (utilization, errors, combined)
- Traffic generator: Scapy-based dual-mode container (sender/responder)
with Flask API, RFC 2544 test suite (throughput, latency, frame-loss,
back-to-back), Vue 3 web UI with flow builder, test runner, real-time
stats monitor, and results export
- docker-compose.yml updated with influxdb, telegraf, traffic-gen,
traffic-gen-ui services
- Full documentation in DOCS.md sections 15-16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:29:44 -07:00
|
|
|
<template>
|
|
|
|
|
<div class="flow-builder">
|
|
|
|
|
<h3>{{ editing ? 'Edit Flow' : 'Create Flow' }}</h3>
|
|
|
|
|
<form @submit.prevent="submit">
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<label>Name</label>
|
|
|
|
|
<input v-model="form.name" placeholder="My Flow" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<label>Destination IP *</label>
|
|
|
|
|
<input v-model="form.dst_ip" placeholder="10.100.0.100" required />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<label>Source IP</label>
|
|
|
|
|
<input v-model="form.src_ip" placeholder="auto (from interface)" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<label>Dst MAC</label>
|
|
|
|
|
<input v-model="form.dst_mac" placeholder="auto" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<label>Protocol</label>
|
|
|
|
|
<select v-model="form.protocol">
|
|
|
|
|
<option value="udp">UDP</option>
|
|
|
|
|
<option value="tcp">TCP</option>
|
|
|
|
|
<option value="icmp">ICMP</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="form.protocol !== 'icmp'" class="form-row-pair">
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<label>Src Port</label>
|
|
|
|
|
<input v-model.number="form.src_port" type="number" min="1" max="65535" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<label>Dst Port</label>
|
|
|
|
|
<input v-model.number="form.dst_port" type="number" min="1" max="65535" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-row-pair">
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<label>Frame Size (bytes)</label>
|
|
|
|
|
<input v-model.number="form.frame_size" type="number" min="64" max="9000" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-row">
|
2026-05-15 14:22:41 -07:00
|
|
|
<label>Rate</label>
|
|
|
|
|
<input v-model.number="form.rate_val" type="number" min="1" step="any" />
|
|
|
|
|
<select v-model="form.rate_unit" class="rate-unit-standalone">
|
|
|
|
|
<option value="pps">pps</option>
|
|
|
|
|
<option value="kbps">Kbps</option>
|
|
|
|
|
<option value="mbps">Mbps</option>
|
|
|
|
|
</select>
|
Add Phase 4: gNMI streaming telemetry and traffic generator
- gNMI integration: NETCONF script to enable gRPC on all 9 routers,
Telegraf container with gnmi input plugin, InfluxDB for time-series
storage, 3 Grafana telemetry dashboards (utilization, errors, combined)
- Traffic generator: Scapy-based dual-mode container (sender/responder)
with Flask API, RFC 2544 test suite (throughput, latency, frame-loss,
back-to-back), Vue 3 web UI with flow builder, test runner, real-time
stats monitor, and results export
- docker-compose.yml updated with influxdb, telegraf, traffic-gen,
traffic-gen-ui services
- Full documentation in DOCS.md sections 15-16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:29:44 -07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-row-pair">
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<label>Duration (sec)</label>
|
2026-05-15 14:22:41 -07:00
|
|
|
<input v-model.number="form.duration" type="number" min="0" :disabled="form.continuous" />
|
|
|
|
|
<label class="checkbox-inline">
|
|
|
|
|
<input type="checkbox" v-model="form.continuous" @change="onContinuousChange" />
|
|
|
|
|
Continuous
|
|
|
|
|
</label>
|
Add Phase 4: gNMI streaming telemetry and traffic generator
- gNMI integration: NETCONF script to enable gRPC on all 9 routers,
Telegraf container with gnmi input plugin, InfluxDB for time-series
storage, 3 Grafana telemetry dashboards (utilization, errors, combined)
- Traffic generator: Scapy-based dual-mode container (sender/responder)
with Flask API, RFC 2544 test suite (throughput, latency, frame-loss,
back-to-back), Vue 3 web UI with flow builder, test runner, real-time
stats monitor, and results export
- docker-compose.yml updated with influxdb, telegraf, traffic-gen,
traffic-gen-ui services
- Full documentation in DOCS.md sections 15-16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:29:44 -07:00
|
|
|
</div>
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<label>DSCP</label>
|
|
|
|
|
<input v-model.number="form.dscp" type="number" min="0" max="63" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<label>Responder URL (optional)</label>
|
|
|
|
|
<input v-model="form.responder_url" placeholder="http://host:5053" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-actions">
|
|
|
|
|
<button type="submit" class="btn btn-accent" :disabled="!form.dst_ip">
|
|
|
|
|
{{ editing ? 'Update' : 'Create Flow' }}
|
|
|
|
|
</button>
|
|
|
|
|
<button v-if="editing" type="button" class="btn btn-muted" @click="$emit('cancel')">Cancel</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2026-05-15 14:22:41 -07:00
|
|
|
import { reactive, computed } from 'vue'
|
Add Phase 4: gNMI streaming telemetry and traffic generator
- gNMI integration: NETCONF script to enable gRPC on all 9 routers,
Telegraf container with gnmi input plugin, InfluxDB for time-series
storage, 3 Grafana telemetry dashboards (utilization, errors, combined)
- Traffic generator: Scapy-based dual-mode container (sender/responder)
with Flask API, RFC 2544 test suite (throughput, latency, frame-loss,
back-to-back), Vue 3 web UI with flow builder, test runner, real-time
stats monitor, and results export
- docker-compose.yml updated with influxdb, telegraf, traffic-gen,
traffic-gen-ui services
- Full documentation in DOCS.md sections 15-16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:29:44 -07:00
|
|
|
import { api } from '../api.js'
|
|
|
|
|
|
|
|
|
|
const props = defineProps({ editFlow: Object })
|
|
|
|
|
const emit = defineEmits(['created', 'updated', 'cancel'])
|
|
|
|
|
|
2026-05-15 14:22:41 -07:00
|
|
|
const editing = computed(() => !!props.editFlow)
|
Add Phase 4: gNMI streaming telemetry and traffic generator
- gNMI integration: NETCONF script to enable gRPC on all 9 routers,
Telegraf container with gnmi input plugin, InfluxDB for time-series
storage, 3 Grafana telemetry dashboards (utilization, errors, combined)
- Traffic generator: Scapy-based dual-mode container (sender/responder)
with Flask API, RFC 2544 test suite (throughput, latency, frame-loss,
back-to-back), Vue 3 web UI with flow builder, test runner, real-time
stats monitor, and results export
- docker-compose.yml updated with influxdb, telegraf, traffic-gen,
traffic-gen-ui services
- Full documentation in DOCS.md sections 15-16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:29:44 -07:00
|
|
|
|
|
|
|
|
const defaults = {
|
|
|
|
|
name: '', dst_ip: '', src_ip: '', dst_mac: '',
|
|
|
|
|
protocol: 'udp', src_port: 50000, dst_port: 5001,
|
2026-05-15 14:22:41 -07:00
|
|
|
frame_size: 512, rate_val: 1000, rate_unit: 'pps', duration: 30,
|
|
|
|
|
dscp: 0, responder_url: '', continuous: false,
|
Add Phase 4: gNMI streaming telemetry and traffic generator
- gNMI integration: NETCONF script to enable gRPC on all 9 routers,
Telegraf container with gnmi input plugin, InfluxDB for time-series
storage, 3 Grafana telemetry dashboards (utilization, errors, combined)
- Traffic generator: Scapy-based dual-mode container (sender/responder)
with Flask API, RFC 2544 test suite (throughput, latency, frame-loss,
back-to-back), Vue 3 web UI with flow builder, test runner, real-time
stats monitor, and results export
- docker-compose.yml updated with influxdb, telegraf, traffic-gen,
traffic-gen-ui services
- Full documentation in DOCS.md sections 15-16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:29:44 -07:00
|
|
|
}
|
|
|
|
|
|
2026-05-15 14:22:41 -07:00
|
|
|
function ppsToDisplay(pps, frameSize) {
|
|
|
|
|
// Convert stored PPS to a friendlier unit if it was originally set that way
|
|
|
|
|
return { rate_val: pps, rate_unit: 'pps' }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const initData = props.editFlow
|
|
|
|
|
? { ...props.editFlow, continuous: props.editFlow.duration === 0, ...ppsToDisplay(props.editFlow.rate_pps, props.editFlow.frame_size) }
|
|
|
|
|
: {}
|
|
|
|
|
const form = reactive({ ...defaults, ...initData })
|
|
|
|
|
|
|
|
|
|
function onContinuousChange() { if (form.continuous) form.duration = 0 }
|
|
|
|
|
|
|
|
|
|
function computePps(val, unit, frameSize) {
|
|
|
|
|
if (unit === 'kbps') return Math.max(1, Math.round((val * 1000) / (frameSize * 8)))
|
|
|
|
|
if (unit === 'mbps') return Math.max(1, Math.round((val * 1_000_000) / (frameSize * 8)))
|
|
|
|
|
return Math.round(val)
|
|
|
|
|
}
|
Add Phase 4: gNMI streaming telemetry and traffic generator
- gNMI integration: NETCONF script to enable gRPC on all 9 routers,
Telegraf container with gnmi input plugin, InfluxDB for time-series
storage, 3 Grafana telemetry dashboards (utilization, errors, combined)
- Traffic generator: Scapy-based dual-mode container (sender/responder)
with Flask API, RFC 2544 test suite (throughput, latency, frame-loss,
back-to-back), Vue 3 web UI with flow builder, test runner, real-time
stats monitor, and results export
- docker-compose.yml updated with influxdb, telegraf, traffic-gen,
traffic-gen-ui services
- Full documentation in DOCS.md sections 15-16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:29:44 -07:00
|
|
|
|
|
|
|
|
async function submit() {
|
|
|
|
|
try {
|
|
|
|
|
const payload = { ...form }
|
2026-05-15 14:22:41 -07:00
|
|
|
payload.rate_pps = computePps(form.rate_val, form.rate_unit, form.frame_size)
|
|
|
|
|
delete payload.rate_val
|
|
|
|
|
delete payload.rate_unit
|
|
|
|
|
delete payload.continuous
|
|
|
|
|
if (form.continuous) payload.duration = 0
|
Add Phase 4: gNMI streaming telemetry and traffic generator
- gNMI integration: NETCONF script to enable gRPC on all 9 routers,
Telegraf container with gnmi input plugin, InfluxDB for time-series
storage, 3 Grafana telemetry dashboards (utilization, errors, combined)
- Traffic generator: Scapy-based dual-mode container (sender/responder)
with Flask API, RFC 2544 test suite (throughput, latency, frame-loss,
back-to-back), Vue 3 web UI with flow builder, test runner, real-time
stats monitor, and results export
- docker-compose.yml updated with influxdb, telegraf, traffic-gen,
traffic-gen-ui services
- Full documentation in DOCS.md sections 15-16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:29:44 -07:00
|
|
|
if (!payload.src_ip) delete payload.src_ip
|
|
|
|
|
if (!payload.dst_mac) delete payload.dst_mac
|
|
|
|
|
if (!payload.responder_url) delete payload.responder_url
|
|
|
|
|
if (!payload.name) payload.name = `${payload.protocol.toUpperCase()} -> ${payload.dst_ip}`
|
|
|
|
|
|
2026-05-15 14:22:41 -07:00
|
|
|
if (editing.value) {
|
Add Phase 4: gNMI streaming telemetry and traffic generator
- gNMI integration: NETCONF script to enable gRPC on all 9 routers,
Telegraf container with gnmi input plugin, InfluxDB for time-series
storage, 3 Grafana telemetry dashboards (utilization, errors, combined)
- Traffic generator: Scapy-based dual-mode container (sender/responder)
with Flask API, RFC 2544 test suite (throughput, latency, frame-loss,
back-to-back), Vue 3 web UI with flow builder, test runner, real-time
stats monitor, and results export
- docker-compose.yml updated with influxdb, telegraf, traffic-gen,
traffic-gen-ui services
- Full documentation in DOCS.md sections 15-16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:29:44 -07:00
|
|
|
await api.updateFlow(props.editFlow.id, payload)
|
|
|
|
|
emit('updated')
|
|
|
|
|
} else {
|
|
|
|
|
await api.createFlow(payload)
|
|
|
|
|
Object.assign(form, defaults)
|
|
|
|
|
emit('created')
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
alert('Error: ' + e.message)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.flow-builder { padding: 0; }
|
|
|
|
|
h3 { font-size: 15px; margin-bottom: 12px; color: var(--accent); }
|
|
|
|
|
.form-row { margin-bottom: 10px; }
|
|
|
|
|
.form-row label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.05em; }
|
|
|
|
|
.form-row input, .form-row select { width: 100%; }
|
|
|
|
|
.form-row-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
|
|
|
|
.form-actions { display: flex; gap: 8px; margin-top: 14px; }
|
|
|
|
|
.btn { padding: 8px 16px; font-weight: 600; font-size: 13px; }
|
|
|
|
|
.btn-accent { background: var(--accent); color: #fff; }
|
|
|
|
|
.btn-accent:hover { opacity: 0.9; }
|
|
|
|
|
.btn-accent:disabled { opacity: 0.4; }
|
|
|
|
|
.btn-muted { background: var(--border); color: var(--text); }
|
2026-05-15 14:22:41 -07:00
|
|
|
.rate-unit-standalone { width: 100%; margin-top: 4px; }
|
|
|
|
|
.checkbox-inline { display: inline-flex !important; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; cursor: pointer; }
|
|
|
|
|
.checkbox-inline input { width: auto; }
|
Add Phase 4: gNMI streaming telemetry and traffic generator
- gNMI integration: NETCONF script to enable gRPC on all 9 routers,
Telegraf container with gnmi input plugin, InfluxDB for time-series
storage, 3 Grafana telemetry dashboards (utilization, errors, combined)
- Traffic generator: Scapy-based dual-mode container (sender/responder)
with Flask API, RFC 2544 test suite (throughput, latency, frame-loss,
back-to-back), Vue 3 web UI with flow builder, test runner, real-time
stats monitor, and results export
- docker-compose.yml updated with influxdb, telegraf, traffic-gen,
traffic-gen-ui services
- Full documentation in DOCS.md sections 15-16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:29:44 -07:00
|
|
|
</style>
|