Skip to content

Commit

Permalink
✨ Added support of podname and container name in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
abdheshnayak committed Feb 5, 2024
1 parent 2006e0e commit ce81091
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tasks:
interactive: true
cmds:
- |
BASE_URL=devc.kloudlite.io
BASE_URL=dev.kloudlite.io
COOKIE_DOMAIN=".kloudlite.io"
GATEWAY_URL="http://gateway.kloudlite.svc.cluster.local"
case {{.app}} in
Expand Down Expand Up @@ -48,7 +48,7 @@ tasks:
esac
REMIX_DEV_ORIGIN="https://{{.app}}$URL_SUFFIX.devc.kloudlite.io"
REMIX_DEV_ORIGIN="https://{{.app}}$URL_SUFFIX.dev.kloudlite.io"
cp -r ./static/common/. ./public/
cp -r ./static/{{.app}}/. ./public/
Expand Down Expand Up @@ -121,12 +121,12 @@ tasks:
case $(whoami) in
"bikash")
BASE_URL=devc.kloudlite.io
BASE_URL=dev.kloudlite.io
URL_SUFFIX=1
;;
"vision")
BASE_URL=devc.kloudlite.io
BASE_URL=dev.kloudlite.io
URL_SUFFIX="-vision"
;;
Expand Down
6 changes: 5 additions & 1 deletion src/apps/console/components/logger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,10 @@ const useSocketLogs = ({ url, account, cluster, trackingId }: IuseLog) => {
const m: {
timestamp: string;
message: string;
spec: {
podName: string;
containerName: string;
};
type: 'update' | 'error' | 'info';
} = JSON.parse(msg.data as string);

Expand All @@ -592,7 +596,7 @@ const useSocketLogs = ({ url, account, cluster, trackingId }: IuseLog) => {
setLogs((s) => [
...s,
{
pod_name: 'main',
pod_name: `${m.spec.podName}:${m.spec.containerName}`,
message: m.message,
timestamp: m.timestamp,
},
Expand Down
2 changes: 1 addition & 1 deletion src/apps/console/routes/_a+/teams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const Accounts = () => {
const { isInvite, displayName, inviteToken } = account;
return (
<List.Row
{...(isInvite ? {} : { to: `/${name}/infra` })}
{...(isInvite ? {} : { to: `/${name}/projects` })}
key={name}
plain
className={cn(
Expand Down

0 comments on commit ce81091

Please sign in to comment.