From 63c6d24363451a27ee19b9d2ca4ad09f5380180c Mon Sep 17 00:00:00 2001 From: Cameron Perera Date: Wed, 31 May 2023 15:01:12 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20message=20for=20cha?= =?UTF-8?q?nnels=20that=20cannot=20be=20played=20back=20(#302)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 🐛 Fix isAsciicast check ✅ Closes: ICU-9511 * fix: 🐛 add message for channels that cannot be played back * Update ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.hbs Co-authored-by: Zhihe Li * refactor: 💡 update not supported message --------- Co-authored-by: Zhihe Li --- addons/core/translations/resources/en-us.yaml | 3 ++ .../channels-by-connection/channel.hbs | 44 ++++++++++++------- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index fb38da18c..089f2dd42 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -252,6 +252,9 @@ session-recording: title: We can't play back this channel because the file is missing description: This likely means the connected storage bucket is misconfigured or the file was deleted. link: Retrieving lost session recordings + not-supported: + title: Playback is not supported for this channel + description: The contents of this channel cannot be replayed. player: back-navigation: Back to channels session: diff --git a/ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.hbs b/ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.hbs index 3786d0d3a..4c014e10e 100644 --- a/ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.hbs +++ b/ui/admin/app/templates/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.hbs @@ -36,7 +36,7 @@ {{#if (can 'getAsciicast channel-recording' @model.channelRecording) }} - {{! Was not able to downlaod asciicast }} + {{! Was not able to download asciicast }} {{else}} - {{! Not authorized to downlaod asciicast }} - - + {{#if @model.channelRecording.isAsciicast}} + {{! Not authorized to download asciicast }} + + + {{else}} + {{! Playback not supported }} + + + {{/if}} {{/if}} {{/if}}