diff --git a/playground/frontend/lib/modules/editor/repository/code_repository/code_repository.dart b/playground/frontend/lib/modules/editor/repository/code_repository/code_repository.dart index 9e86f0103e63..8f354ce9e8d6 100644 --- a/playground/frontend/lib/modules/editor/repository/code_repository/code_repository.dart +++ b/playground/frontend/lib/modules/editor/repository/code_repository/code_repository.dart @@ -166,6 +166,7 @@ class CodeRepository { final log = responses[1]; final error = responses[2]; return RunCodeResult( + pipelineUuid: pipelineUuid, status: status, output: prevOutput + output.output + error.output, log: prevLog + log.output, diff --git a/playground/frontend/lib/pages/playground/states/playground_state.dart b/playground/frontend/lib/pages/playground/states/playground_state.dart index e57422bb24cd..e4df474975ea 100644 --- a/playground/frontend/lib/pages/playground/states/playground_state.dart +++ b/playground/frontend/lib/pages/playground/states/playground_state.dart @@ -34,6 +34,8 @@ const kTitle = 'Catalog'; const kExecutionCancelledText = '\nPipeline cancelled'; const kPipelineOptionsParseError = 'Failed to parse pipeline options, please check the format (example: --key1 value1 --key2 value2), only alphanumeric and ",*,/,-,:,;,\',. symbols are allowed'; +const kCachedResultsLog = + 'The results of this example are taken from the Apache Beam Playground cache.\n'; class PlaygroundState with ChangeNotifier { late SDK _sdk; @@ -180,10 +182,11 @@ class PlaygroundState with ChangeNotifier { notifyListeners(); // add a little delay to improve user experience await Future.delayed(kPrecompiledDelay); + String logs = _selectedExample!.logs ?? ''; _result = RunCodeResult( status: RunCodeStatus.finished, output: _selectedExample!.outputs, - log: _selectedExample!.logs, + log: kCachedResultsLog + logs, ); _executionTime?.close(); notifyListeners();