Skip to content

Commit

Permalink
view without data
Browse files Browse the repository at this point in the history
  • Loading branch information
laushinka committed Jul 22, 2022
1 parent 3aa56e6 commit 16d27a5
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions components/dashboard/src/teams/TeamUsage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,30 +163,34 @@ function TeamUsage() {
</ItemField>
<ItemField className="my-auto" />
</Item>
{currentPaginatedResults.map((usage) => (
<div
key={usage.instanceId}
className="flex p-3 grid grid-cols-5 justify-between transition ease-in-out rounded-xl focus:bg-gitpod-kumquat-light"
>
<div className="my-auto">
<span>{getType(usage.workspaceType)}</span>
</div>
<div className="my-auto">
<span className="text-gray-400">{usage.workspaceClass}</span>
</div>
<div className="my-auto">
<span className="text-gray-700">{getMinutes(usage)}</span>
</div>
<div className="my-auto">
<span className="text-gray-700">{usage.credits.toFixed(1)}</span>
</div>
<div className="my-auto">
<span className="text-gray-400">
{moment(new Date(usage.startTime).toDateString()).fromNow()}
</span>
{currentPaginatedResults.length === 0 && (
<div>No sessions found. Have you started any workspaces?</div>
)}
{currentPaginatedResults &&
currentPaginatedResults.map((usage) => (
<div
key={usage.instanceId}
className="flex p-3 grid grid-cols-5 justify-between transition ease-in-out rounded-xl focus:bg-gitpod-kumquat-light"
>
<div className="my-auto">
<span>{getType(usage.workspaceType)}</span>
</div>
<div className="my-auto">
<span className="text-gray-400">{usage.workspaceClass}</span>
</div>
<div className="my-auto">
<span className="text-gray-700">{getMinutes(usage)}</span>
</div>
<div className="my-auto">
<span className="text-gray-700">{usage.credits.toFixed(1)}</span>
</div>
<div className="my-auto">
<span className="text-gray-400">
{moment(new Date(usage.startTime).toDateString()).fromNow()}
</span>
</div>
</div>
</div>
))}
))}
</ItemsList>
{billedUsage.length > resultsPerPage && (
<Pagination
Expand Down

0 comments on commit 16d27a5

Please sign in to comment.