wip(app): runs-pipeline-url (retained from the cancelled overrun lane)
This commit is contained in:
@@ -28,6 +28,7 @@ class PipelinesScreen extends StatefulWidget {
|
||||
this.embedded = false,
|
||||
this.syncToken = 0,
|
||||
this.onRunStarted,
|
||||
this.onViewPipelineRuns,
|
||||
this.initialPipelineId,
|
||||
this.initialVersion = 0,
|
||||
this.initialStageKey,
|
||||
@@ -45,6 +46,7 @@ class PipelinesScreen extends StatefulWidget {
|
||||
/// Receives the run id an accepted launch names, so the composition can open
|
||||
/// the existing run route. The feature never navigates on its own.
|
||||
final ValueChanged<int>? onRunStarted;
|
||||
final ValueChanged<int>? onViewPipelineRuns;
|
||||
|
||||
/// The pipeline a deep link names, opened after the list read starts.
|
||||
final int? initialPipelineId;
|
||||
@@ -170,6 +172,7 @@ class _PipelinesScreenState extends State<PipelinesScreen> {
|
||||
gateway: widget.gateway,
|
||||
showBack: true,
|
||||
onRunStarted: widget.onRunStarted,
|
||||
onViewPipelineRuns: widget.onViewPipelineRuns,
|
||||
stageKey: stageKey,
|
||||
stagePipelineId: widget.initialPipelineId,
|
||||
stageVersion: widget.initialVersion,
|
||||
@@ -192,6 +195,7 @@ class _PipelinesScreenState extends State<PipelinesScreen> {
|
||||
gateway: widget.gateway,
|
||||
showBack: false,
|
||||
onRunStarted: widget.onRunStarted,
|
||||
onViewPipelineRuns: widget.onViewPipelineRuns,
|
||||
stageKey: stageKey,
|
||||
stagePipelineId: widget.initialPipelineId,
|
||||
stageVersion: widget.initialVersion,
|
||||
|
||||
@@ -30,6 +30,7 @@ class PipelineDetailPanel extends StatefulWidget {
|
||||
required this.gateway,
|
||||
required this.showBack,
|
||||
this.onRunStarted,
|
||||
this.onViewPipelineRuns,
|
||||
this.stageKey,
|
||||
this.stagePipelineId,
|
||||
this.stageVersion = 0,
|
||||
@@ -45,6 +46,7 @@ class PipelineDetailPanel extends StatefulWidget {
|
||||
|
||||
/// A run started from this detail's Run action; receives the server's id.
|
||||
final ValueChanged<int>? onRunStarted;
|
||||
final ValueChanged<int>? onViewPipelineRuns;
|
||||
|
||||
/// The stage the route names for this detail, or null when it names none.
|
||||
final String? stageKey;
|
||||
@@ -337,6 +339,25 @@ class _PipelineDetailPanelState extends State<PipelineDetailPanel> {
|
||||
onRunStarted: widget.onRunStarted,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
child: Semantics(
|
||||
button: true,
|
||||
label: detail.name.trim().isEmpty
|
||||
? 'View runs of this pipeline'
|
||||
: 'View runs of ${detail.name}',
|
||||
child: ExcludeSemantics(
|
||||
child: TextButton.icon(
|
||||
onPressed: widget.onViewPipelineRuns == null
|
||||
? null
|
||||
: () => widget.onViewPipelineRuns!(detail.id),
|
||||
icon: const Icon(Icons.list_alt),
|
||||
label: const Text('Runs'),
|
||||
key: const Key('pipeline-view-runs'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user