Skip to content

Commit 975dca5

Browse files
committed
layout adjustments for representing managed agents consumption
1 parent 10fa73f commit 975dca5

File tree

1 file changed

+12
-35
lines changed

1 file changed

+12
-35
lines changed

site/src/pages/DeploymentSettingsPage/LicensesSettingsPage/ManagedAgentsConsumption.tsx

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const ManagedAgentsConsumption: FC<ManagedAgentsConsumptionProps> = ({
3131
endDate,
3232
enabled = true,
3333
}) => {
34-
// If feature is disabled, show disabled state
34+
3535
if (!enabled) {
3636
return (
3737
<div css={styles.disabledRoot}>
@@ -52,7 +52,6 @@ export const ManagedAgentsConsumption: FC<ManagedAgentsConsumptionProps> = ({
5252
);
5353
}
5454

55-
// Calculate percentages for the progress bar
5655
const usagePercentage = Math.min((usage / limit) * 100, 100);
5756
const includedPercentage = Math.min((included / limit) * 100, 100);
5857
const remainingPercentage = Math.max(100 - includedPercentage, 0);
@@ -88,16 +87,15 @@ export const ManagedAgentsConsumption: FC<ManagedAgentsConsumptionProps> = ({
8887
`}
8988
>
9089
<p>
91-
Managed agents are counted based on active agent connections during the billing period.
92-
Each unique agent that connects to your deployment consumes one managed agent seat.
90+
Managed agents are counted based on the amount of started workspaces with an AI agent.
9391
</p>
9492
<ul>
9593
<li className="flex items-center gap-2">
9694
<div
9795
className="rounded-[2px] bg-highlight-green size-3 inline-block"
9896
aria-label="Legend for current usage in the chart"
9997
/>
100-
Current usage represents active managed agents during this period.
98+
Amount of started workspaces with an AI agent.
10199
</li>
102100
<li className="flex items-center gap-2">
103101
<div
@@ -113,50 +111,25 @@ export const ManagedAgentsConsumption: FC<ManagedAgentsConsumptionProps> = ({
113111
>
114112
<div className="w-full border-b-1 border-t-1 border-dashed border-content-disabled" />
115113
</div>
116-
Total limit including any additional purchased capacity.
114+
Total limit after which the feature will be disabled.
117115
</li>
118116
</ul>
119-
<div>
120-
You might also check:
121-
<ul>
122-
<li>
123-
<Link asChild>
124-
<RouterLink to="/deployment/overview">
125-
Deployment overview
126-
</RouterLink>
127-
</Link>
128-
</li>
129-
<li>
130-
<Link
131-
href={docs("/admin/managed-agents")}
132-
target="_blank"
133-
rel="noreferrer"
134-
>
135-
More details on managed agents
136-
</Link>
137-
</li>
138-
</ul>
139-
</div>
140117
</CollapsibleContent>
141118
</Collapsible>
142119
</div>
143120

144121
<div className="p-6 border-0 border-t border-solid">
145-
{/* Date range */}
146122
<div className="flex justify-between text-sm text-content-secondary mb-4">
147123
<span>{startDate ? dayjs(startDate).format("MMMM D, YYYY") : ""}</span>
148124
<span>{endDate ? dayjs(endDate).format("MMMM D, YYYY") : ""}</span>
149125
</div>
150126

151-
{/* Progress bar container */}
152127
<div className="relative h-6 bg-surface-secondary rounded overflow-hidden">
153-
{/* Usage bar (green) */}
154128
<div
155129
className="absolute top-0 left-0 h-full bg-highlight-green transition-all duration-300"
156130
style={{ width: `${usagePercentage}%` }}
157131
/>
158132

159-
{/* Included allowance background (darker) */}
160133
<div
161134
className="absolute top-0 h-full bg-content-disabled opacity-30"
162135
style={{
@@ -166,16 +139,20 @@ export const ManagedAgentsConsumption: FC<ManagedAgentsConsumptionProps> = ({
166139
/>
167140
</div>
168141

169-
{/* Labels */}
170-
<div className="flex justify-between mt-4 text-sm">
142+
<div className="relative flex justify-between mt-4 text-sm">
171143
<div className="flex flex-col items-start">
172-
<span className="text-content-secondary">Usage:</span>
144+
<span className="text-content-secondary">Actual:</span>
173145
<span className="font-medium">{usage.toLocaleString()}</span>
174146
</div>
175-
<div className="flex flex-col items-center">
147+
148+
<div
149+
className="absolute flex flex-col items-center transform -translate-x-1/2"
150+
style={{ left: `${Math.max(Math.min(includedPercentage, 90), 10)}%` }}
151+
>
176152
<span className="text-content-secondary">Included:</span>
177153
<span className="font-medium">{included.toLocaleString()}</span>
178154
</div>
155+
179156
<div className="flex flex-col items-end">
180157
<span className="text-content-secondary">Limit:</span>
181158
<span className="font-medium">{limit.toLocaleString()}</span>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy