feat: 🎸 add no channels message for empty connections (#287)
✅ Closes: ICU-9443
This commit is contained in:
1 parent
bf13b71807
commit
33afb64476
3 files changed
+89
-71
No files matched your search
@@ -232,6 +232,8 @@ session-recording:
|
||||
label: Summary
|
||||
channels-by-connection:
|
||||
title: Channels by connection
|
||||
messages:
|
||||
no-channels: There are no channels for this connection
|
||||
channel:
|
||||
title: Channel
|
||||
title_index: Channel {index}
|
||||
|
||||
@@ -934,6 +934,10 @@
|
||||
&-connection-header {
|
||||
padding: 0.875rem 1rem;
|
||||
}
|
||||
|
||||
.no-channels-message {
|
||||
padding: 0 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Channel
|
||||
|
||||
+83
-71
@@ -31,82 +31,94 @@
|
||||
<code>{{connection.id}}</code>
|
||||
</Copyable>
|
||||
</div>
|
||||
<Hds::Table
|
||||
@model={{connection.channel_recordings}}
|
||||
@density='tall'
|
||||
@columns={{array
|
||||
(hash
|
||||
label=(t
|
||||
'resources.session-recording.connection.form.channel.label'
|
||||
{{#if connection.channel_recordings}}
|
||||
<Hds::Table
|
||||
@model={{connection.channel_recordings}}
|
||||
@density='tall'
|
||||
@columns={{array
|
||||
(hash
|
||||
label=(t
|
||||
'resources.session-recording.connection.form.channel.label'
|
||||
)
|
||||
)
|
||||
)
|
||||
(hash
|
||||
label=(t
|
||||
'resources.session-recording.connection.form.summary.label'
|
||||
(hash
|
||||
label=(t
|
||||
'resources.session-recording.connection.form.summary.label'
|
||||
)
|
||||
)
|
||||
)
|
||||
(hash label=(t 'form.id.label'))
|
||||
(hash label='' align='right')
|
||||
}}
|
||||
>
|
||||
<:body as |B|>
|
||||
<B.Tr>
|
||||
<B.Td>
|
||||
<span>
|
||||
{{indexed-display-name
|
||||
'resources.session-recording.channel.title_index'
|
||||
connection.channel_recordings
|
||||
B.data
|
||||
}}
|
||||
</span>
|
||||
</B.Td>
|
||||
<B.Td>
|
||||
<MetadataList as |list|>
|
||||
{{! Bytes up }}
|
||||
<list.Item @icon='arrow-up' @color='success'>
|
||||
{{t
|
||||
'resources.session-recording.up'
|
||||
bytes=(format-bytes-size B.data.bytes_up)
|
||||
(hash label=(t 'form.id.label'))
|
||||
(hash label='' align='right')
|
||||
}}
|
||||
>
|
||||
<:body as |B|>
|
||||
<B.Tr>
|
||||
<B.Td>
|
||||
<span>
|
||||
{{indexed-display-name
|
||||
'resources.session-recording.channel.title_index'
|
||||
connection.channel_recordings
|
||||
B.data
|
||||
}}
|
||||
</list.Item>
|
||||
{{! Bytes down }}
|
||||
<list.Item @icon='arrow-down' @color='action'>
|
||||
{{t
|
||||
'resources.session-recording.down'
|
||||
bytes=(format-bytes-size B.data.bytes_down)
|
||||
}}
|
||||
</list.Item>
|
||||
{{! Duration }}
|
||||
{{#if B.data.duration}}
|
||||
<list.Item @icon='clock' @color='faint'>
|
||||
{{format-time-duration B.data.duration}}
|
||||
</span>
|
||||
</B.Td>
|
||||
<B.Td>
|
||||
<MetadataList as |list|>
|
||||
{{! Bytes up }}
|
||||
<list.Item @icon='arrow-up' @color='success'>
|
||||
{{t
|
||||
'resources.session-recording.up'
|
||||
bytes=(format-bytes-size B.data.bytes_up)
|
||||
}}
|
||||
</list.Item>
|
||||
{{! Bytes down }}
|
||||
<list.Item @icon='arrow-down' @color='action'>
|
||||
{{t
|
||||
'resources.session-recording.down'
|
||||
bytes=(format-bytes-size B.data.bytes_down)
|
||||
}}
|
||||
</list.Item>
|
||||
{{! Duration }}
|
||||
{{#if B.data.duration}}
|
||||
<list.Item @icon='clock' @color='faint'>
|
||||
{{format-time-duration B.data.duration}}
|
||||
</list.Item>
|
||||
{{/if}}
|
||||
</MetadataList>
|
||||
</B.Td>
|
||||
<B.Td>
|
||||
<Copyable
|
||||
@text={{B.data.id}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{B.data.id}}</code>
|
||||
</Copyable>
|
||||
</B.Td>
|
||||
<B.Td align='right'>
|
||||
{{#if @model.sessionRecording.isAvailable}}
|
||||
<Hds::Button
|
||||
@icon='play'
|
||||
@color='secondary'
|
||||
@text={{t 'actions.play'}}
|
||||
@route='scopes.scope.session-recordings.session-recording.channels-by-connection.channel'
|
||||
@model={{B.data.id}}
|
||||
/>
|
||||
{{/if}}
|
||||
</MetadataList>
|
||||
</B.Td>
|
||||
<B.Td>
|
||||
<Copyable
|
||||
@text={{B.data.id}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{B.data.id}}</code>
|
||||
</Copyable>
|
||||
</B.Td>
|
||||
<B.Td align='right'>
|
||||
{{#if @model.sessionRecording.isAvailable}}
|
||||
<Hds::Button
|
||||
@icon='play'
|
||||
@color='secondary'
|
||||
@text={{t 'actions.play'}}
|
||||
@route='scopes.scope.session-recordings.session-recording.channels-by-connection.channel'
|
||||
@model={{B.data.id}}
|
||||
/>
|
||||
{{/if}}
|
||||
</B.Td>
|
||||
</B.Tr>
|
||||
</:body>
|
||||
</Hds::Table>
|
||||
</B.Td>
|
||||
</B.Tr>
|
||||
</:body>
|
||||
</Hds::Table>
|
||||
{{else}}
|
||||
<div class='no-channels-message'>
|
||||
<Hds::Alert @type='compact' as |A|>
|
||||
<A.Description>
|
||||
{{t
|
||||
'resources.session-recording.channels-by-connection.messages.no-channels'
|
||||
}}
|
||||
</A.Description>
|
||||
</Hds::Alert>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</sb.Body>
|
||||
<sb.Sidebar>
|
||||
|
||||
Reference in new issue
Block a user