feat(app): pipeline rows show the last run's status glyph, as the web
This commit is contained in:
@@ -9,6 +9,7 @@ import '../../graph/layout/layout_models.dart';
|
||||
import '../../graph/routing/graph_edge_routing.dart';
|
||||
import '../../graph/routing/route_models.dart';
|
||||
import '../../graph/widgets/graph_canvas_style.dart';
|
||||
import '../../../ui/status/run_status_icon.dart';
|
||||
import '../pipeline_format.dart';
|
||||
import '../pipeline_models.dart';
|
||||
import '../pipeline_query.dart';
|
||||
@@ -243,8 +244,8 @@ class PipelineListPanel extends StatelessWidget {
|
||||
///
|
||||
/// Everything printed comes from recorded values: the identity, the stage
|
||||
/// count, the configured schedules and the parseable updated time. The run
|
||||
/// line keeps the web's state word and `row-meta` fragments
|
||||
/// (`Succeeded · 2h ago · 1m 5s · run 42`).
|
||||
/// line is the web's status glyph plus its `row-meta` fragments
|
||||
/// (`2h ago · 1m 5s · run 42`).
|
||||
Widget _rowMetadata(
|
||||
BuildContext context,
|
||||
PipelineSummary pipeline,
|
||||
@@ -261,11 +262,6 @@ class PipelineListPanel extends StatelessWidget {
|
||||
? controller.latestRuns[pipeline.id]
|
||||
: null;
|
||||
final badge = run == null ? null : runBadge(run, now);
|
||||
final runLine = controller.runsLoaded
|
||||
? badge == null
|
||||
? 'no runs recorded'
|
||||
: '${runStateLabel(badge.state)} · ${badge.metaLine}'
|
||||
: null;
|
||||
final shape = pipeline.shape;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -281,7 +277,29 @@ class PipelineListPanel extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(facts, style: style),
|
||||
if (runLine != null && runLine.isNotEmpty) Text(runLine, style: style),
|
||||
// As the web's `row-run`: the coloured status glyph (its tooltip and
|
||||
// accessible name are the state word), then `2d ago · 4m 12s · run 488`.
|
||||
if (controller.runsLoaded && badge == null)
|
||||
Text('no runs recorded', style: style),
|
||||
if (badge != null)
|
||||
Row(
|
||||
children: [
|
||||
RunStatusIcon(
|
||||
state: badge.state,
|
||||
label: runStateLabel(badge.state),
|
||||
size: 14,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: Text(
|
||||
badge.metaLine,
|
||||
style: style,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user