Improved progress display

Previously, the progress bar updated only after completing an entire table.

For large tables such as LIBARC, this could make the application appear to have stopped responding.

Phase 10 updates the interface while rows are being exported.
This commit is contained in:
Mark Gregory
2026-10-18 11:23:58 +01:00
parent b3cc8b7463
commit 40386134a8
2 changed files with 66 additions and 9 deletions
+47 -9
View File
@@ -2553,15 +2553,52 @@ struct WorkbenchAdministrationView: View {
private var resultContent: some View {
switch page {
case .serverStatus, .dashboard:
// Both destinations are genuine charts-only dashboards. No KPI tile
// view can appear in either route.
ScrollView(.vertical) {
WorkbenchInlinePerformanceDashboard(samples: diagnosticSamples)
.frame(maxWidth: .infinity, alignment: .topLeading)
.padding(18)
// Phase 49: preserve the verified Phase 48 line charts, while
// restoring the server overview in its own scrollable lower pane.
GeometryReader { available in
let chartHeight = min(155.0, max(85.0, (available.size.height - 270.0) / 3.0))
VStack(alignment: .leading, spacing: 0) {
WorkbenchInlinePerformanceDashboard(
samples: diagnosticSamples,
chartHeight: chartHeight
)
.padding(.horizontal, 18)
.padding(.top, 12)
.padding(.bottom, 8)
.fixedSize(horizontal: false, vertical: true)
.layoutPriority(1)
.accessibilityIdentifier("live-mysql-line-graphs-phase49")
Divider()
ScrollView(.vertical) {
VStack(alignment: .leading, spacing: 14) {
Label("Server overview", systemImage: "server.rack")
.font(.title3.bold())
WorkbenchServerOverview(rows: filteredRows)
if page == .serverStatus {
Divider()
HStack {
Text("Server status metrics").font(.headline)
Spacer()
Text("\(filteredRows.count) metrics")
.font(.caption).foregroundStyle(.secondary)
}
WorkbenchColouredCounterTable(
columns: ["Metric", "Value"], rows: filteredRows
)
.frame(height: 300)
}
}
.padding(18)
.frame(maxWidth: .infinity, alignment: .leading)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.accessibilityIdentifier("scrollable-server-overview-phase49")
}
.frame(width: available.size.width, height: available.size.height, alignment: .topLeading)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.accessibilityIdentifier("real-live-charts-phase48")
case .serverCounters, .connectionStatistics, .innodbMetrics:
WorkbenchLiveMonitorScreen(
page: page,
@@ -4086,6 +4123,7 @@ private struct WorkbenchAccountManagerView: View {
private struct WorkbenchInlinePerformanceDashboard: View {
let samples: [DiagnosticSample]
var chartHeight: CGFloat = 205
private struct Reading: Identifiable {
let id: Int
@@ -4137,7 +4175,7 @@ private struct WorkbenchInlinePerformanceDashboard: View {
.foregroundStyle(tint)
}
.chartYAxis { AxisMarks(position: .leading) }
.frame(height: 205)
.frame(height: chartHeight)
.accessibilityLabel("Live time-series graph for \(title)")
}
.padding(14)
@@ -4149,7 +4187,7 @@ private struct WorkbenchInlinePerformanceDashboard: View {
var body: some View {
VStack(alignment: .leading, spacing: 12) {
HStack {
Label("Live MySQL Line Graphs · Phase 48", systemImage: "waveform.path.ecg")
Label("Live MySQL Line Graphs", systemImage: "waveform.path.ecg")
.font(.title2.bold())
Spacer()
Text("\(samples.count) samples · refreshes every 5 seconds")