Icons for every run menu action; omit an unknown pipeline version
This commit is contained in:
@@ -17,8 +17,8 @@ String runChatReference(JsonMap run) {
|
||||
final version = '${run['pipeline_version'] ?? run['version'] ?? ''}'.trim();
|
||||
final status = '${run['status'] ?? ''}'.trim();
|
||||
return 'About Pipelines run #$id "${title.isEmpty ? 'Run $id' : title}" '
|
||||
'(pipeline "${pipeline.isEmpty ? 'unknown' : pipeline}" '
|
||||
'v${version.isEmpty ? '?' : version}, status $status). '
|
||||
'(pipeline "${pipeline.isEmpty ? 'unknown' : pipeline}"'
|
||||
'${version.isEmpty ? '' : ' v$version'}, status $status). '
|
||||
'Inspect it with `pipelines inspect $id`.';
|
||||
}
|
||||
|
||||
|
||||
@@ -145,9 +145,13 @@ class _RunMoreMenuState extends State<RunMoreMenu> {
|
||||
key: _keyOf(item),
|
||||
value: item,
|
||||
label: label,
|
||||
icon: item == _RunMoreItem.openInChat
|
||||
? Icons.chat_bubble_outline
|
||||
: null,
|
||||
icon: switch (item) {
|
||||
_RunMoreItem.retry => Icons.replay,
|
||||
_RunMoreItem.rename => Icons.edit_outlined,
|
||||
_RunMoreItem.schedule => Icons.schedule,
|
||||
_RunMoreItem.delete => Icons.delete_outline,
|
||||
_RunMoreItem.openInChat => Icons.chat_bubble_outline,
|
||||
},
|
||||
destructive: item == _RunMoreItem.delete,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -38,6 +38,12 @@ void main() {
|
||||
'status': 'succeeded',
|
||||
});
|
||||
expect(untitled, contains('run #8 "Run 8" (pipeline "release" v3'));
|
||||
final unversioned = runChatReference({
|
||||
'id': 9,
|
||||
'name': 'release',
|
||||
'status': 'running',
|
||||
});
|
||||
expect(unversioned, contains('(pipeline "release", status running)'));
|
||||
});
|
||||
|
||||
test('run references contain the exact inspect command', () {
|
||||
|
||||
Reference in New Issue
Block a user