Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 💡 change channel app state title & add alert msg #2489

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions addons/core/translations/resources/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,9 @@ session-recording:
messages:
none:
title: Channel Playback
missing:
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.
error:
title: Playback error
description: This may mean the connected storage bucket is misconfigured, the file was deleted, or integrity validation failed.
link: Retrieving lost session recordings
not-supported:
title: Playback is not supported for this channel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { inject as service } from '@ember/service';
export default class ScopesScopeSessionRecordingsSessionRecordingChannelsByConnectionChannelIndexRoute extends Route {
// =services
@service can;
@service flashMessages;

// =methods
/**
Expand All @@ -24,7 +25,13 @@ export default class ScopesScopeSessionRecordingsSessionRecordingChannelsByConne
try {
asciicast = await channelRecording.getAsciicast();
} catch (e) {
// no op
// Alert user of error occurred during download.
const error = e.errors[0];
lisbet-alvarez marked this conversation as resolved.
Show resolved Hide resolved
this.flashMessages.danger(error.detail, {
notificationType: 'error',
sticky: true,
dismiss: (flash) => flash.destroyMessage(),
});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,17 @@
{{#if (can 'getAsciicast channel-recording' @model.channelRecording)}}
{{! Was not able to download asciicast }}
<A.Header
@title={{t
'resources.session-recording.channel.messages.missing.title'
}}
@title={{t 'resources.session-recording.channel.messages.error.title'}}
/>
<A.Body
@text={{t
'resources.session-recording.channel.messages.missing.description'
'resources.session-recording.channel.messages.error.description'
}}
/>
<A.Footer as |F|>
<F.LinkStandalone
@icon='learn-link'
@text={{t
'resources.session-recording.channel.messages.missing.link'
}}
@text={{t 'resources.session-recording.channel.messages.error.link'}}
@href={{doc-url 'session-recording.retrieve-lost-session-recordings'}}
/>
</A.Footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ module(

// if there was an error player will not render
assert.dom('.session-recording-player').doesNotExist();
assert.dom('.hds-application-state__title').hasText('Playback error');
assert
.dom('.hds-application-state__title')
.hasText("We can't play back this channel because the file is missing");
.dom('.rose-notification-body')
.includesText('rpc error: code = Unknown');
});

test('user can navigate back to session recording screen', async function (assert) {
Expand All @@ -146,7 +147,7 @@ module(
assert.strictEqual(currentURL(), urls.sessionRecording);
});

test('users can navigate to channel recording and incorrect url autocorrects', async function (assert) {
test('users can navigate to channel recording and incorrect url auto corrects', async function (assert) {
featuresService.enable('ssh-session-recording');
const sessionRecording = this.server.create('session-recording', {
scope: instances.scopes.global,
Expand Down