Path: blob/main/components/dashboard/src/insights/WorkspaceSession.tsx
2500 views
/**1* Copyright (c) 2024 Gitpod GmbH. All rights reserved.2* Licensed under the GNU Affero General Public License (AGPL).3* See License.AGPL.txt in the project root for license information.4*/56import { WorkspacePhase_Phase, WorkspaceSession } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb";7import { displayTime } from "./WorkspaceSessionGroup";89type Props = {10session: WorkspaceSession;11};12export const WorkspaceSessionEntry = ({ session }: Props) => {13const isRunning = session?.workspace?.status?.phase?.name === WorkspacePhase_Phase.RUNNING;1415return (16<li className="text-sm text-gray-600 dark:text-gray-300">17{session.creationTime ? displayTime(session.creationTime) : "n/a"} (18{session.id.slice(0, 7) || "No instance ID"}){isRunning ? " - running" : ""}19</li>20);21};222324