From 1b5eb6c01f8d9df45fbaa27a0e5e7a04099e5f6a Mon Sep 17 00:00:00 2001 From: Cameron Perera Date: Tue, 7 Mar 2023 11:04:33 -0600 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20manually=20build=20a?= =?UTF-8?q?scii=20cast=20data=20for=20player=20(#104)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../channels-by-connection/channel.js | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/ui/admin/app/routes/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.js b/ui/admin/app/routes/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.js index 0db1b6ae4..2765d6c69 100644 --- a/ui/admin/app/routes/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.js +++ b/ui/admin/app/routes/scopes/scope/session-recordings/session-recording/channels-by-connection/channel.js @@ -2,8 +2,24 @@ import Route from '@ember/routing/route'; export default class ScopesScopeSessionRecordingsSessionRecordingChannelsByConnectionChannelRoute extends Route { async model() { - const response = await fetch('/session.cast'); - const asciicast = await response.text(); + // building ascii cast here to make player availabe until API is ready + const castConfig = { + version: 2, + width: 124, + height: 36, + timestamp: 1670352594, + env: { SHELL: '/bin/zsh', TERM: 'xterm-256color' }, + }; + const asciicast = `${JSON.stringify(castConfig)} +[2.676444, "o", "y"] +[2.788653, "o", "a"] +[2.868652, "o", "r"] +[3.001764, "o", "n"] +[3.167636, "o", " "] +[3.313668, "o", "t"] +[3.460527, "o", "e"] +[3.561983, "o", "s"] +[3.63678, "o", "t"]`; return { scope_id: 'srcc_1234567890', asciicast: asciicast,