Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ui/src/components/ai-chat/ai-chatbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ export function AIChatbox({
<div className="flex items-end gap-2">
<textarea
ref={inputRef}
className="flex-1 min-w-0 resize-none rounded-md border bg-background px-3 py-2 text-sm leading-5 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
className="flex-1 min-w-0 resize-none rounded-md border bg-background px-3 py-2 text-base leading-5 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring md:text-sm"
placeholder="Ask about your cluster..."
rows={1}
value={input}
Expand Down
7 changes: 5 additions & 2 deletions ui/src/components/container-info-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,10 @@ export function ContainerInfoCard({
</Label>
<div className="mt-2 space-y-1">
{container.volumeMounts.map((mount, i) => (
<div key={i} className="flex items-center gap-2 text-xs">
<div
key={i}
className="flex flex-wrap items-center gap-2 text-xs"
>
<Badge variant="outline" className="text-xs font-mono">
{mount.name}
</Badge>
Expand Down Expand Up @@ -378,7 +381,7 @@ export function ContainerInfoCard({
(container.resources.requests || container.resources.limits) && (
<div className="border-t pt-3">
<Label className={sectionLabelClassName}>Resources</Label>
<div className="mt-2 grid grid-cols-2 gap-4 text-sm">
<div className="mt-2 grid grid-cols-1 gap-4 text-sm sm:grid-cols-2">
{container.resources.requests && (
<div>
<div className="text-xs font-medium text-green-600 dark:text-green-400 mb-1">
Expand Down
22 changes: 12 additions & 10 deletions ui/src/components/editors/deployment-create-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ export function DeploymentCreateDialog({
case 2:
return (
<div className="space-y-4">
<div className="flex items-center justify-between">
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between">
<Label>Volume</Label>
<Button
type="button"
Expand Down Expand Up @@ -740,7 +740,7 @@ export function DeploymentCreateDialog({
case 3:
return (
<div className="space-y-6">
<div className="flex items-center justify-between">
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between">
<Label className="text-lg font-medium">Containers</Label>
<Button
type="button"
Expand All @@ -755,7 +755,7 @@ export function DeploymentCreateDialog({
{formData.containers.map((containerConfig, containerIndex) => (
<Card key={containerIndex}>
<CardHeader className="pb-3">
<div className="flex items-center justify-between">
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between">
<CardTitle className="text-base">
Container {containerIndex + 1}
</CardTitle>
Expand All @@ -765,14 +765,15 @@ export function DeploymentCreateDialog({
variant="outline"
size="sm"
onClick={() => removeContainer(containerIndex)}
aria-label={`Remove container ${containerIndex + 1}`}
>
<Trash2 className="w-4 h-4" />
</Button>
)}
</div>
</CardHeader>
<CardContent className="space-y-4">
<div className="grid grid-cols-2 gap-4">
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<div className="space-y-2">
<ImageEditor
container={containerConfig.container}
Expand Down Expand Up @@ -811,7 +812,7 @@ export function DeploymentCreateDialog({

<div className="space-y-2">
<Label>Resources (optional)</Label>
<div className="grid grid-cols-2 gap-4">
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<div className="space-y-2">
<Label className="text-sm text-muted-foreground">
Requests
Expand Down Expand Up @@ -904,7 +905,7 @@ export function DeploymentCreateDialog({
/>
</div>

<div className="grid grid-cols-2 gap-4">
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<div className="space-y-2">
<Label htmlFor={`port-${containerIndex}`}>
Container Port (optional)
Expand Down Expand Up @@ -955,7 +956,7 @@ export function DeploymentCreateDialog({
</div>
{(formData.podSpec?.volumes?.length || 0) > 0 && (
<div className="space-y-2">
<div className="flex items-center justify-between">
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between">
<Label>Volume Mounts</Label>
<Button
type="button"
Expand Down Expand Up @@ -990,7 +991,7 @@ export function DeploymentCreateDialog({
(mount, mountIndex) => (
<div
key={mountIndex}
className="flex gap-2 items-center"
className="flex flex-col items-stretch gap-2 sm:flex-row sm:items-center"
>
<Select
value={mount.name}
Expand All @@ -1007,7 +1008,7 @@ export function DeploymentCreateDialog({
})
}}
>
<SelectTrigger className="w-[160px]">
<SelectTrigger className="w-full sm:w-[160px]">
<SelectValue placeholder="Volume name" />
</SelectTrigger>
<SelectContent>
Expand Down Expand Up @@ -1071,7 +1072,7 @@ export function DeploymentCreateDialog({
})
}}
>
<SelectTrigger className="w-[160px]">
<SelectTrigger className="w-full sm:w-[160px]">
<SelectValue />
</SelectTrigger>
<SelectContent>
Expand All @@ -1085,6 +1086,7 @@ export function DeploymentCreateDialog({
variant="outline"
size="icon"
className="w-7 h-7"
aria-label={`Remove volume mount ${mountIndex + 1}`}
onClick={() => {
const updatedMounts =
containerConfig.volumeMounts?.filter(
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/editors/environment-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ export function EnvironmentEditor({
)}

{env.valueFrom.resourceFieldRef && (
<div className="grid grid-cols-2 gap-2">
<div className="grid grid-cols-1 gap-2 sm:grid-cols-2">
<div>
<Label className="text-xs text-muted-foreground">
Resource
Expand Down
6 changes: 3 additions & 3 deletions ui/src/components/node-monitoring.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export function NodeMonitoring({ name }: NodeMonitoringProps) {
return (
<div className="space-y-6">
{/* Controls */}
<div className="flex flex-col sm:flex-row gap-4">
<div className="space-y-2">
<div className="flex flex-col gap-4 md:flex-row">
<div className="w-full space-y-2 md:w-auto">
<Select value={timeRange} onValueChange={setTimeRange}>
<SelectTrigger className="w-[200px]">
<SelectTrigger className="w-full md:w-[200px]">
<SelectValue placeholder="Select time range" />
</SelectTrigger>
<SelectContent>
Expand Down
14 changes: 7 additions & 7 deletions ui/src/components/pod-monitoring.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ export function PodMonitoring({
return (
<div className="space-y-6">
{/* Controls */}
<div className="flex flex-col sm:flex-row gap-4">
<div className="space-y-2">
<div className="flex flex-col gap-4 md:flex-row md:flex-wrap">
<div className="w-full space-y-2 md:w-auto">
<Select value={timeRange} onValueChange={setTimeRange}>
<SelectTrigger className="w-[200px]">
<SelectTrigger className="w-full md:w-[200px]">
<SelectValue placeholder="Select time range" />
</SelectTrigger>
<SelectContent>
Expand All @@ -103,12 +103,12 @@ export function PodMonitoring({
</Select>
</div>

<div className="space-y-2">
<div className="w-full space-y-2 md:w-auto">
<Select
value={refreshInterval.toString()}
onValueChange={(value) => setRefreshInterval(Number(value))}
>
<SelectTrigger className="w-[200px]">
<SelectTrigger className="w-full md:w-[200px]">
<SelectValue placeholder="Select refresh interval" />
</SelectTrigger>
<SelectContent>
Expand All @@ -121,15 +121,15 @@ export function PodMonitoring({
</Select>
</div>

<div className="space-y-2">
<div className="w-full space-y-2 md:w-auto md:min-w-[220px]">
<ContainerSelector
containers={containers}
selectedContainer={selectedContainer}
onContainerChange={setSelectedContainer}
/>
</div>
{pods && pods.length > 1 && (
<div className="space-y-2">
<div className="w-full space-y-2 md:w-auto md:min-w-[220px]">
{/* Pod Selector */}
<PodSelector
pods={pods}
Expand Down
10 changes: 7 additions & 3 deletions ui/src/components/related-resource-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,22 @@ function RelatedResourceCell({ rs }: { rs: RelatedResources }) {
<DialogTrigger asChild>
<div className="font-medium app-link cursor-pointer">{rs.name}</div>
</DialogTrigger>
<DialogContent className="!max-w-[60%] !h-[80%] flex flex-col">
<DialogContent className="!h-[calc(100dvh-1rem)] !max-w-[calc(100vw-1rem)] flex min-h-0 flex-col md:!h-[80%] md:!max-w-[60%]">
<DialogHeader className="flex flex-row justify-between items-center">
<DialogTitle className="capitalize">{rs.type}</DialogTitle>
<a href={withSubPath(path)} target="_blank" rel="noopener noreferrer">
<Button variant="outline" size="icon">
<Button
variant="outline"
size="icon"
aria-label="Open resource in new tab"
>
<IconExternalLink size={12} />
</Button>
</a>
</DialogHeader>
<iframe
src={`${withSubPath(path)}?iframe=true`}
className="w-full flex-grow border-none"
className="min-h-0 w-full flex-grow border-none"
/>
</DialogContent>
</Dialog>
Expand Down
12 changes: 6 additions & 6 deletions ui/src/components/resource-table-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function ResourceTableView<T>({
isLoading,
data,
allPageSize,
maxBodyHeightClassName = 'max-h-[calc(100vh-210px)]',
maxBodyHeightClassName = 'max-h-[calc(100dvh-210px)]',
containerClassName = 'flex flex-col gap-3',
emptyState,
hasActiveFilters,
Expand Down Expand Up @@ -151,7 +151,7 @@ export function ResourceTableView<T>({
</div>

{dataLength > 0 && (
<div className="flex items-center justify-between px-2 py-1">
<div className="flex flex-col gap-3 px-2 py-1 sm:flex-row sm:items-center sm:justify-between">
<div className="text-muted-foreground hidden flex-1 text-sm lg:flex">
{hasActiveFilters ? (
<>
Expand All @@ -164,8 +164,8 @@ export function ResourceTableView<T>({
`${totalRowCount} row(s) total.`
)}
</div>
<div className="flex w-full items-center gap-4 lg:w-fit">
<div className="flex items-center gap-2">
<div className="flex w-full flex-col gap-3 sm:flex-row sm:items-center sm:gap-4 lg:w-fit">
<div className="flex items-center justify-between gap-2 sm:justify-start">
<span className="text-sm text-muted-foreground">
Rows per page:
</span>
Expand Down Expand Up @@ -196,10 +196,10 @@ export function ResourceTableView<T>({
</SelectContent>
</Select>
</div>
<div className="flex w-fit items-center justify-center text-sm font-medium">
<div className="flex items-center justify-center text-sm font-medium">
Page {pagination.pageIndex + 1} of {table.getPageCount() || 1}
</div>
<div className="ml-auto flex items-center gap-2 lg:ml-0">
<div className="flex items-center justify-end gap-2 sm:justify-start lg:ml-0">
<Button
variant="outline"
className="size-8"
Expand Down
Loading
Loading