mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Make all corners less rounded on mobile (#11068)
* make corners less rounded on mobile * fix live dashboard classes
This commit is contained in:
parent
ba3930ab02
commit
d6e93d039d
@ -40,7 +40,7 @@ export default function CameraImage({
|
|||||||
{enabled ? (
|
{enabled ? (
|
||||||
<img
|
<img
|
||||||
ref={imgRef}
|
ref={imgRef}
|
||||||
className="object-contain rounded-2xl"
|
className="object-contain rounded-lg md:rounded-2xl"
|
||||||
onLoad={() => {
|
onLoad={() => {
|
||||||
setHasLoaded(true);
|
setHasLoaded(true);
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ export default function CameraImage({
|
|||||||
>
|
>
|
||||||
{enabled ? (
|
{enabled ? (
|
||||||
<canvas
|
<canvas
|
||||||
className="rounded-2xl"
|
className="rounded-lg md:rounded-2xl"
|
||||||
data-testid="cameraimage-canvas"
|
data-testid="cameraimage-canvas"
|
||||||
height={scaledHeight}
|
height={scaledHeight}
|
||||||
ref={canvasRef}
|
ref={canvasRef}
|
||||||
|
@ -63,7 +63,7 @@ export function AnimatedEventCard({ event }: AnimatedEventCardProps) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="size-full rounded cursor-pointer overflow-hidden"
|
className="size-full rounded md:rounded-lg cursor-pointer overflow-hidden"
|
||||||
onClick={onOpenReview}
|
onClick={onOpenReview}
|
||||||
>
|
>
|
||||||
{previews ? (
|
{previews ? (
|
||||||
|
@ -104,7 +104,7 @@ export default function ExportCard({
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className={`relative aspect-video bg-black rounded-2xl flex justify-center items-center ${className}`}
|
className={`relative aspect-video bg-black rounded-lg md:rounded-2xl flex justify-center items-center ${className}`}
|
||||||
onMouseEnter={
|
onMouseEnter={
|
||||||
isDesktop && !exportedRecording.in_progress
|
isDesktop && !exportedRecording.in_progress
|
||||||
? () => setHovered(true)
|
? () => setHovered(true)
|
||||||
@ -123,7 +123,7 @@ export default function ExportCard({
|
|||||||
>
|
>
|
||||||
{hovered && (
|
{hovered && (
|
||||||
<>
|
<>
|
||||||
<div className="absolute inset-0 z-10 bg-black bg-opacity-60 rounded-2xl" />
|
<div className="absolute inset-0 z-10 bg-black bg-opacity-60 rounded-lg md:rounded-2xl" />
|
||||||
<div className="absolute top-1 right-1 flex items-center gap-2">
|
<div className="absolute top-1 right-1 flex items-center gap-2">
|
||||||
<a
|
<a
|
||||||
className="z-20"
|
className="z-20"
|
||||||
@ -172,19 +172,19 @@ export default function ExportCard({
|
|||||||
<>
|
<>
|
||||||
{exportedRecording.thumb_path.length > 0 ? (
|
{exportedRecording.thumb_path.length > 0 ? (
|
||||||
<img
|
<img
|
||||||
className="size-full absolute inset-0 object-contain aspect-video rounded-2xl"
|
className="size-full absolute inset-0 object-contain aspect-video rounded-lg md:rounded-2xl"
|
||||||
src={exportedRecording.thumb_path.replace("/media/frigate", "")}
|
src={exportedRecording.thumb_path.replace("/media/frigate", "")}
|
||||||
onLoad={() => setLoading(false)}
|
onLoad={() => setLoading(false)}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="absolute inset-0 bg-secondary rounded-2xl" />
|
<div className="absolute inset-0 bg-secondary rounded-lg md:rounded-2xl" />
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{loading && (
|
{loading && (
|
||||||
<Skeleton className="absolute inset-0 aspect-video rounded-2xl" />
|
<Skeleton className="absolute inset-0 aspect-video rounded-lg md:rounded-2xl" />
|
||||||
)}
|
)}
|
||||||
<div className="absolute bottom-0 inset-x-0 rounded-b-l z-10 h-[20%] bg-gradient-to-t from-black/60 to-transparent pointer-events-none rounded-2xl">
|
<div className="absolute bottom-0 inset-x-0 rounded-b-l z-10 h-[20%] bg-gradient-to-t from-black/60 to-transparent pointer-events-none rounded-lg md:rounded-2xl">
|
||||||
<div className="flex h-full justify-between items-end mx-3 pb-1 text-white text-sm capitalize">
|
<div className="flex h-full justify-between items-end mx-3 pb-1 text-white text-sm capitalize">
|
||||||
{exportedRecording.name.replaceAll("_", " ")}
|
{exportedRecording.name.replaceAll("_", " ")}
|
||||||
</div>
|
</div>
|
||||||
|
@ -210,7 +210,9 @@ export default function GeneralSettings({ className }: GeneralSettings) {
|
|||||||
</SubItemTrigger>
|
</SubItemTrigger>
|
||||||
<Portal>
|
<Portal>
|
||||||
<SubItemContent
|
<SubItemContent
|
||||||
className={isDesktop ? "" : "w-[92%] rounded-2xl"}
|
className={
|
||||||
|
isDesktop ? "" : "w-[92%] rounded-lg md:rounded-2xl"
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<span tabIndex={0} className="sr-only" />
|
<span tabIndex={0} className="sr-only" />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
@ -280,7 +282,9 @@ export default function GeneralSettings({ className }: GeneralSettings) {
|
|||||||
</SubItemTrigger>
|
</SubItemTrigger>
|
||||||
<Portal>
|
<Portal>
|
||||||
<SubItemContent
|
<SubItemContent
|
||||||
className={isDesktop ? "" : "w-[92%] rounded-2xl"}
|
className={
|
||||||
|
isDesktop ? "" : "w-[92%] rounded-lg md:rounded-2xl"
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<span tabIndex={0} className="sr-only" />
|
<span tabIndex={0} className="sr-only" />
|
||||||
{colorSchemes.map((scheme) => (
|
{colorSchemes.map((scheme) => (
|
||||||
|
@ -130,7 +130,9 @@ export default function ExportDialog({
|
|||||||
</Trigger>
|
</Trigger>
|
||||||
<Content
|
<Content
|
||||||
className={
|
className={
|
||||||
isDesktop ? "sm:rounded-2xl" : "px-4 pb-4 mx-4 rounded-2xl"
|
isDesktop
|
||||||
|
? "sm:rounded-lg md:rounded-2xl"
|
||||||
|
: "px-4 pb-4 mx-4 rounded-lg md:rounded-2xl"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<ExportContent
|
<ExportContent
|
||||||
|
@ -21,12 +21,18 @@ export default function BirdseyeLivePlayer({
|
|||||||
let player;
|
let player;
|
||||||
if (liveMode == "webrtc") {
|
if (liveMode == "webrtc") {
|
||||||
player = (
|
player = (
|
||||||
<WebRtcPlayer className={`rounded-2xl size-full`} camera="birdseye" />
|
<WebRtcPlayer
|
||||||
|
className={`rounded-lg md:rounded-2xl size-full`}
|
||||||
|
camera="birdseye"
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
} else if (liveMode == "mse") {
|
} else if (liveMode == "mse") {
|
||||||
if ("MediaSource" in window || "ManagedMediaSource" in window) {
|
if ("MediaSource" in window || "ManagedMediaSource" in window) {
|
||||||
player = (
|
player = (
|
||||||
<MSEPlayer className={`rounded-2xl size-full`} camera="birdseye" />
|
<MSEPlayer
|
||||||
|
className={`rounded-lg md:rounded-2xl size-full`}
|
||||||
|
camera="birdseye"
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
player = (
|
player = (
|
||||||
@ -39,7 +45,7 @@ export default function BirdseyeLivePlayer({
|
|||||||
} else if (liveMode == "jsmpeg") {
|
} else if (liveMode == "jsmpeg") {
|
||||||
player = (
|
player = (
|
||||||
<JSMpegPlayer
|
<JSMpegPlayer
|
||||||
className="size-full flex justify-center rounded-2xl overflow-hidden"
|
className="size-full flex justify-center rounded-lg md:rounded-2xl overflow-hidden"
|
||||||
camera="birdseye"
|
camera="birdseye"
|
||||||
width={birdseyeConfig.width}
|
width={birdseyeConfig.width}
|
||||||
height={birdseyeConfig.height}
|
height={birdseyeConfig.height}
|
||||||
@ -54,8 +60,8 @@ export default function BirdseyeLivePlayer({
|
|||||||
className={`relative flex justify-center w-full cursor-pointer ${className ?? ""}`}
|
className={`relative flex justify-center w-full cursor-pointer ${className ?? ""}`}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
<div className="absolute top-0 inset-x-0 rounded-2xl z-10 w-full h-[30%] bg-gradient-to-b from-black/20 to-transparent pointer-events-none"></div>
|
<div className="absolute top-0 inset-x-0 rounded-lg md:rounded-2xl z-10 w-full h-[30%] bg-gradient-to-b from-black/20 to-transparent pointer-events-none"></div>
|
||||||
<div className="absolute bottom-0 inset-x-0 rounded-2xl z-10 w-full h-[10%] bg-gradient-to-t from-black/20 to-transparent pointer-events-none"></div>
|
<div className="absolute bottom-0 inset-x-0 rounded-lg md:rounded-2xl z-10 w-full h-[10%] bg-gradient-to-t from-black/20 to-transparent pointer-events-none"></div>
|
||||||
<div className="size-full">{player}</div>
|
<div className="size-full">{player}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -164,7 +164,7 @@ export default function HlsVideoPlayer({
|
|||||||
>
|
>
|
||||||
<video
|
<video
|
||||||
ref={videoRef}
|
ref={videoRef}
|
||||||
className={`size-full bg-black rounded-2xl ${loadedMetadata ? "" : "invisible"}`}
|
className={`size-full bg-black rounded-lg md:rounded-2xl ${loadedMetadata ? "" : "invisible"}`}
|
||||||
preload="auto"
|
preload="auto"
|
||||||
autoPlay
|
autoPlay
|
||||||
controls={false}
|
controls={false}
|
||||||
|
@ -95,7 +95,7 @@ export default function LivePlayer({
|
|||||||
if (liveMode == "webrtc") {
|
if (liveMode == "webrtc") {
|
||||||
player = (
|
player = (
|
||||||
<WebRtcPlayer
|
<WebRtcPlayer
|
||||||
className={`rounded-2xl size-full ${liveReady ? "" : "hidden"}`}
|
className={`rounded-lg md:rounded-2xl size-full ${liveReady ? "" : "hidden"}`}
|
||||||
camera={cameraConfig.live.stream_name}
|
camera={cameraConfig.live.stream_name}
|
||||||
playbackEnabled={cameraActive}
|
playbackEnabled={cameraActive}
|
||||||
audioEnabled={playAudio}
|
audioEnabled={playAudio}
|
||||||
@ -109,7 +109,7 @@ export default function LivePlayer({
|
|||||||
if ("MediaSource" in window || "ManagedMediaSource" in window) {
|
if ("MediaSource" in window || "ManagedMediaSource" in window) {
|
||||||
player = (
|
player = (
|
||||||
<MSEPlayer
|
<MSEPlayer
|
||||||
className={`rounded-2xl size-full ${liveReady ? "" : "hidden"}`}
|
className={`rounded-lg md:rounded-2xl size-full ${liveReady ? "" : "hidden"}`}
|
||||||
camera={cameraConfig.name}
|
camera={cameraConfig.name}
|
||||||
playbackEnabled={cameraActive}
|
playbackEnabled={cameraActive}
|
||||||
audioEnabled={playAudio}
|
audioEnabled={playAudio}
|
||||||
@ -128,7 +128,7 @@ export default function LivePlayer({
|
|||||||
} else if (liveMode == "jsmpeg") {
|
} else if (liveMode == "jsmpeg") {
|
||||||
player = (
|
player = (
|
||||||
<JSMpegPlayer
|
<JSMpegPlayer
|
||||||
className="size-full flex justify-center rounded-2xl overflow-hidden"
|
className="size-full flex justify-center rounded-lg md:rounded-2xl overflow-hidden"
|
||||||
camera={cameraConfig.name}
|
camera={cameraConfig.name}
|
||||||
width={cameraConfig.detect.width}
|
width={cameraConfig.detect.width}
|
||||||
height={cameraConfig.detect.height}
|
height={cameraConfig.detect.height}
|
||||||
@ -144,13 +144,13 @@ export default function LivePlayer({
|
|||||||
data-camera={cameraConfig.name}
|
data-camera={cameraConfig.name}
|
||||||
className={`relative flex justify-center ${liveMode == "jsmpeg" ? "size-full" : "w-full"} outline cursor-pointer ${
|
className={`relative flex justify-center ${liveMode == "jsmpeg" ? "size-full" : "w-full"} outline cursor-pointer ${
|
||||||
activeTracking
|
activeTracking
|
||||||
? "outline-severity_alert outline-3 rounded-2xl shadow-severity_alert"
|
? "outline-severity_alert outline-3 rounded-lg md:rounded-2xl shadow-severity_alert"
|
||||||
: "outline-0 outline-background"
|
: "outline-0 outline-background"
|
||||||
} transition-all duration-500 ${className}`}
|
} transition-all duration-500 ${className}`}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
<div className="absolute top-0 inset-x-0 rounded-2xl z-10 w-full h-[30%] bg-gradient-to-b from-black/20 to-transparent pointer-events-none"></div>
|
<div className="absolute top-0 inset-x-0 rounded-lg md:rounded-2xl z-10 w-full h-[30%] bg-gradient-to-b from-black/20 to-transparent pointer-events-none"></div>
|
||||||
<div className="absolute bottom-0 inset-x-0 rounded-2xl z-10 w-full h-[10%] bg-gradient-to-t from-black/20 to-transparent pointer-events-none"></div>
|
<div className="absolute bottom-0 inset-x-0 rounded-lg md:rounded-2xl z-10 w-full h-[10%] bg-gradient-to-t from-black/20 to-transparent pointer-events-none"></div>
|
||||||
{player}
|
{player}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
@ -238,7 +238,7 @@ function PreviewVideoPlayer({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`relative rounded-2xl w-full flex justify-center bg-black overflow-hidden ${onClick ? "cursor-pointer" : ""} ${className ?? ""}`}
|
className={`relative rounded-lg md:rounded-2xl w-full flex justify-center bg-black overflow-hidden ${onClick ? "cursor-pointer" : ""} ${className ?? ""}`}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
@ -283,7 +283,7 @@ function PreviewVideoPlayer({
|
|||||||
)}
|
)}
|
||||||
</video>
|
</video>
|
||||||
{cameraPreviews && !currentPreview && (
|
{cameraPreviews && !currentPreview && (
|
||||||
<div className="absolute inset-0 text-white rounded-2xl flex justify-center items-center">
|
<div className="absolute inset-0 text-white rounded-lg md:rounded-2xl flex justify-center items-center">
|
||||||
No Preview Found
|
No Preview Found
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -481,11 +481,11 @@ function PreviewFramesPlayer({
|
|||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
ref={imgRef}
|
ref={imgRef}
|
||||||
className={`size-full object-contain rounded-2xl bg-black`}
|
className={`size-full object-contain rounded-lg md:rounded-2xl bg-black`}
|
||||||
onLoad={onImageLoaded}
|
onLoad={onImageLoaded}
|
||||||
/>
|
/>
|
||||||
{previewFrames?.length === 0 && (
|
{previewFrames?.length === 0 && (
|
||||||
<div className="absolute inset-x-0 top-1/2 -y-translate-1/2 bg-black text-white rounded-2xl align-center text-center">
|
<div className="absolute inset-x-0 top-1/2 -y-translate-1/2 bg-black text-white rounded-lg md:rounded-2xl align-center text-center">
|
||||||
No Preview Found
|
No Preview Found
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -308,7 +308,7 @@ export default function MotionTuner({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<Skeleton className="size-full rounded-2xl" />
|
<Skeleton className="size-full rounded-lg md:rounded-2xl" />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -247,7 +247,7 @@ export function EventSegment({
|
|||||||
</HoverCardTrigger>
|
</HoverCardTrigger>
|
||||||
<HoverCardPortal>
|
<HoverCardPortal>
|
||||||
<HoverCardContent
|
<HoverCardContent
|
||||||
className="rounded-2xl w-[250px] p-2"
|
className="rounded-lg md:rounded-2xl w-[250px] p-2"
|
||||||
side="left"
|
side="left"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
|
@ -113,7 +113,7 @@ function Exports() {
|
|||||||
<DialogContent className="max-w-7xl">
|
<DialogContent className="max-w-7xl">
|
||||||
<DialogTitle>{selected?.name}</DialogTitle>
|
<DialogTitle>{selected?.name}</DialogTitle>
|
||||||
<video
|
<video
|
||||||
className="size-full rounded-2xl"
|
className="size-full rounded-lg md:rounded-2xl"
|
||||||
playsInline
|
playsInline
|
||||||
preload="auto"
|
preload="auto"
|
||||||
autoPlay
|
autoPlay
|
||||||
|
@ -182,11 +182,11 @@ export default function SubmitPlus() {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={event.id}
|
key={event.id}
|
||||||
className="w-full rounded-2xl aspect-video flex justify-center items-center bg-black cursor-pointer"
|
className="w-full rounded-lg md:rounded-2xl aspect-video flex justify-center items-center bg-black cursor-pointer"
|
||||||
onClick={() => setUpload(event)}
|
onClick={() => setUpload(event)}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
className="aspect-video h-full object-contain rounded-2xl"
|
className="aspect-video h-full object-contain rounded-lg md:rounded-2xl"
|
||||||
src={`${baseUrl}api/events/${event.id}/snapshot.jpg`}
|
src={`${baseUrl}api/events/${event.id}/snapshot.jpg`}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
|
@ -249,7 +249,7 @@ export default function EventView({
|
|||||||
</div>
|
</div>
|
||||||
</ToggleGroupItem>
|
</ToggleGroupItem>
|
||||||
<ToggleGroupItem
|
<ToggleGroupItem
|
||||||
className={`px-3 py-4 rounded-2xl ${
|
className={`px-3 py-4 rounded-lg ${
|
||||||
severityToggle == "significant_motion"
|
severityToggle == "significant_motion"
|
||||||
? ""
|
? ""
|
||||||
: "text-muted-foreground"
|
: "text-muted-foreground"
|
||||||
@ -891,7 +891,7 @@ function MotionReview({
|
|||||||
{motionData ? (
|
{motionData ? (
|
||||||
<>
|
<>
|
||||||
<PreviewPlayer
|
<PreviewPlayer
|
||||||
className={`rounded-2xl ${spans} ${grow}`}
|
className={`rounded-lg md:rounded-2xl ${spans} ${grow}`}
|
||||||
camera={camera.name}
|
camera={camera.name}
|
||||||
timeRange={currentTimeRange}
|
timeRange={currentTimeRange}
|
||||||
startTime={previewStart}
|
startTime={previewStart}
|
||||||
@ -917,7 +917,7 @@ function MotionReview({
|
|||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<Skeleton
|
<Skeleton
|
||||||
className={`rounded-2xl size-full ${spans} ${grow}`}
|
className={`rounded-lg md:rounded-2xl size-full ${spans} ${grow}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -175,7 +175,7 @@ export default function LiveDashboardView({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className={`mt-2 px-2 grid ${layout == "grid" ? "grid-cols-2 xl:grid-cols-3 3xl:grid-cols-4" : ""} gap-2 md:gap-4 *:rounded-2xl *:bg-black`}
|
className={`mt-2 px-2 grid ${layout == "grid" ? "grid-cols-2 xl:grid-cols-3 3xl:grid-cols-4" : ""} gap-2 md:gap-4`}
|
||||||
>
|
>
|
||||||
{includeBirdseye && birdseyeConfig?.enabled && (
|
{includeBirdseye && birdseyeConfig?.enabled && (
|
||||||
<BirdseyeLivePlayer
|
<BirdseyeLivePlayer
|
||||||
@ -198,7 +198,7 @@ export default function LiveDashboardView({
|
|||||||
<LivePlayer
|
<LivePlayer
|
||||||
cameraRef={cameraRef}
|
cameraRef={cameraRef}
|
||||||
key={camera.name}
|
key={camera.name}
|
||||||
className={grow}
|
className={`${grow} rounded-lg md:rounded-2xl bg-black`}
|
||||||
windowVisible={
|
windowVisible={
|
||||||
windowVisible && visibleCameras.includes(camera.name)
|
windowVisible && visibleCameras.includes(camera.name)
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ export default function CameraMetrics({
|
|||||||
<div className="text-muted-foreground text-sm font-medium">Overview</div>
|
<div className="text-muted-foreground text-sm font-medium">Overview</div>
|
||||||
<div className="grid grid-cols-1 md:grid-cols-3">
|
<div className="grid grid-cols-1 md:grid-cols-3">
|
||||||
{statsHistory.length != 0 ? (
|
{statsHistory.length != 0 ? (
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl">
|
||||||
<div className="mb-5">DPS</div>
|
<div className="mb-5">DPS</div>
|
||||||
<CameraLineGraph
|
<CameraLineGraph
|
||||||
graphId="overall-stats"
|
graphId="overall-stats"
|
||||||
@ -200,7 +200,7 @@ export default function CameraMetrics({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<Skeleton className="w-full h-32" />
|
<Skeleton className="w-full rounded-lg md:rounded-2xl h-32" />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||||
@ -214,7 +214,7 @@ export default function CameraMetrics({
|
|||||||
</div>
|
</div>
|
||||||
<div key={camera.name} className="grid sm:grid-cols-2 gap-2">
|
<div key={camera.name} className="grid sm:grid-cols-2 gap-2">
|
||||||
{Object.keys(cameraCpuSeries).includes(camera.name) ? (
|
{Object.keys(cameraCpuSeries).includes(camera.name) ? (
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl">
|
||||||
<div className="mb-5">CPU</div>
|
<div className="mb-5">CPU</div>
|
||||||
<CameraLineGraph
|
<CameraLineGraph
|
||||||
graphId={`${camera.name}-cpu`}
|
graphId={`${camera.name}-cpu`}
|
||||||
@ -230,7 +230,7 @@ export default function CameraMetrics({
|
|||||||
<Skeleton className="size-full aspect-video" />
|
<Skeleton className="size-full aspect-video" />
|
||||||
)}
|
)}
|
||||||
{Object.keys(cameraFpsSeries).includes(camera.name) ? (
|
{Object.keys(cameraFpsSeries).includes(camera.name) ? (
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl">
|
||||||
<div className="mb-5">DPS</div>
|
<div className="mb-5">DPS</div>
|
||||||
<CameraLineGraph
|
<CameraLineGraph
|
||||||
graphId={`${camera.name}-dps`}
|
graphId={`${camera.name}-dps`}
|
||||||
|
@ -334,7 +334,7 @@ export default function GeneralMetrics({
|
|||||||
className={`w-full mt-4 grid grid-cols-1 gap-2 ${detTempSeries == undefined ? "sm:grid-cols-3" : "sm:grid-cols-4"}`}
|
className={`w-full mt-4 grid grid-cols-1 gap-2 ${detTempSeries == undefined ? "sm:grid-cols-3" : "sm:grid-cols-4"}`}
|
||||||
>
|
>
|
||||||
{statsHistory.length != 0 ? (
|
{statsHistory.length != 0 ? (
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl">
|
||||||
<div className="mb-5">Detector Inference Speed</div>
|
<div className="mb-5">Detector Inference Speed</div>
|
||||||
{detInferenceTimeSeries.map((series) => (
|
{detInferenceTimeSeries.map((series) => (
|
||||||
<ThresholdBarGraph
|
<ThresholdBarGraph
|
||||||
@ -349,12 +349,12 @@ export default function GeneralMetrics({
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<Skeleton className="w-full aspect-video" />
|
<Skeleton className="w-full rounded-lg md:rounded-2xl aspect-video" />
|
||||||
)}
|
)}
|
||||||
{statsHistory.length != 0 ? (
|
{statsHistory.length != 0 ? (
|
||||||
<>
|
<>
|
||||||
{detTempSeries && (
|
{detTempSeries && (
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl">
|
||||||
<div className="mb-5">Detector Temperature</div>
|
<div className="mb-5">Detector Temperature</div>
|
||||||
{detTempSeries.map((series) => (
|
{detTempSeries.map((series) => (
|
||||||
<ThresholdBarGraph
|
<ThresholdBarGraph
|
||||||
@ -374,7 +374,7 @@ export default function GeneralMetrics({
|
|||||||
<Skeleton className="w-full aspect-video" />
|
<Skeleton className="w-full aspect-video" />
|
||||||
)}
|
)}
|
||||||
{statsHistory.length != 0 ? (
|
{statsHistory.length != 0 ? (
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl">
|
||||||
<div className="mb-5">Detector CPU Usage</div>
|
<div className="mb-5">Detector CPU Usage</div>
|
||||||
{detCpuSeries.map((series) => (
|
{detCpuSeries.map((series) => (
|
||||||
<ThresholdBarGraph
|
<ThresholdBarGraph
|
||||||
@ -392,7 +392,7 @@ export default function GeneralMetrics({
|
|||||||
<Skeleton className="w-full aspect-video" />
|
<Skeleton className="w-full aspect-video" />
|
||||||
)}
|
)}
|
||||||
{statsHistory.length != 0 ? (
|
{statsHistory.length != 0 ? (
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl">
|
||||||
<div className="mb-5">Detector Memory Usage</div>
|
<div className="mb-5">Detector Memory Usage</div>
|
||||||
{detMemSeries.map((series) => (
|
{detMemSeries.map((series) => (
|
||||||
<ThresholdBarGraph
|
<ThresholdBarGraph
|
||||||
@ -429,7 +429,7 @@ export default function GeneralMetrics({
|
|||||||
</div>
|
</div>
|
||||||
<div className=" mt-4 grid grid-cols-1 sm:grid-cols-2 gap-2">
|
<div className=" mt-4 grid grid-cols-1 sm:grid-cols-2 gap-2">
|
||||||
{statsHistory.length != 0 ? (
|
{statsHistory.length != 0 ? (
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl">
|
||||||
<div className="mb-5">GPU Usage</div>
|
<div className="mb-5">GPU Usage</div>
|
||||||
{gpuSeries.map((series) => (
|
{gpuSeries.map((series) => (
|
||||||
<ThresholdBarGraph
|
<ThresholdBarGraph
|
||||||
@ -449,7 +449,7 @@ export default function GeneralMetrics({
|
|||||||
{statsHistory.length != 0 ? (
|
{statsHistory.length != 0 ? (
|
||||||
<>
|
<>
|
||||||
{gpuMemSeries && (
|
{gpuMemSeries && (
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl">
|
||||||
<div className="mb-5">GPU Memory</div>
|
<div className="mb-5">GPU Memory</div>
|
||||||
{gpuMemSeries.map((series) => (
|
{gpuMemSeries.map((series) => (
|
||||||
<ThresholdBarGraph
|
<ThresholdBarGraph
|
||||||
@ -477,7 +477,7 @@ export default function GeneralMetrics({
|
|||||||
</div>
|
</div>
|
||||||
<div className="mt-4 grid grid-cols-1 sm:grid-cols-2 gap-2">
|
<div className="mt-4 grid grid-cols-1 sm:grid-cols-2 gap-2">
|
||||||
{statsHistory.length != 0 ? (
|
{statsHistory.length != 0 ? (
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl">
|
||||||
<div className="mb-5">Process CPU Usage</div>
|
<div className="mb-5">Process CPU Usage</div>
|
||||||
{otherProcessCpuSeries.map((series) => (
|
{otherProcessCpuSeries.map((series) => (
|
||||||
<ThresholdBarGraph
|
<ThresholdBarGraph
|
||||||
@ -495,7 +495,7 @@ export default function GeneralMetrics({
|
|||||||
<Skeleton className="w-full aspect-tall" />
|
<Skeleton className="w-full aspect-tall" />
|
||||||
)}
|
)}
|
||||||
{statsHistory.length != 0 ? (
|
{statsHistory.length != 0 ? (
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl">
|
||||||
<div className="mb-5">Process Memory Usage</div>
|
<div className="mb-5">Process Memory Usage</div>
|
||||||
{otherProcessMemSeries.map((series) => (
|
{otherProcessMemSeries.map((series) => (
|
||||||
<ThresholdBarGraph
|
<ThresholdBarGraph
|
||||||
|
@ -45,7 +45,7 @@ export default function StorageMetrics({
|
|||||||
<div className="size-full mt-4 flex flex-col overflow-y-auto">
|
<div className="size-full mt-4 flex flex-col overflow-y-auto">
|
||||||
<div className="text-muted-foreground text-sm font-medium">Overview</div>
|
<div className="text-muted-foreground text-sm font-medium">Overview</div>
|
||||||
<div className="mt-4 grid grid-cols-1 sm:grid-cols-3 gap-2">
|
<div className="mt-4 grid grid-cols-1 sm:grid-cols-3 gap-2">
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl flex-col">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl flex-col">
|
||||||
<div className="mb-5">Recordings</div>
|
<div className="mb-5">Recordings</div>
|
||||||
<StorageGraph
|
<StorageGraph
|
||||||
graphId="general-recordings"
|
graphId="general-recordings"
|
||||||
@ -53,7 +53,7 @@ export default function StorageMetrics({
|
|||||||
total={totalStorage.total}
|
total={totalStorage.total}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl flex-col">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl flex-col">
|
||||||
<div className="mb-5">/tmp/cache</div>
|
<div className="mb-5">/tmp/cache</div>
|
||||||
<StorageGraph
|
<StorageGraph
|
||||||
graphId="general-cache"
|
graphId="general-cache"
|
||||||
@ -61,7 +61,7 @@ export default function StorageMetrics({
|
|||||||
total={stats.service.storage["/tmp/cache"]["total"]}
|
total={stats.service.storage["/tmp/cache"]["total"]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl flex-col">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl flex-col">
|
||||||
<div className="mb-5">/dev/shm</div>
|
<div className="mb-5">/dev/shm</div>
|
||||||
<StorageGraph
|
<StorageGraph
|
||||||
graphId="general-shared-memory"
|
graphId="general-shared-memory"
|
||||||
@ -75,7 +75,7 @@ export default function StorageMetrics({
|
|||||||
</div>
|
</div>
|
||||||
<div className="mt-4 grid grid-cols-1 sm:grid-cols-3 gap-2">
|
<div className="mt-4 grid grid-cols-1 sm:grid-cols-3 gap-2">
|
||||||
{Object.keys(cameraStorage).map((camera) => (
|
{Object.keys(cameraStorage).map((camera) => (
|
||||||
<div className="p-2.5 bg-background_alt rounded-2xl flex-col">
|
<div className="p-2.5 bg-background_alt rounded-lg md:rounded-2xl flex-col">
|
||||||
<div className="mb-5 capitalize">{camera.replaceAll("_", " ")}</div>
|
<div className="mb-5 capitalize">{camera.replaceAll("_", " ")}</div>
|
||||||
<StorageGraph
|
<StorageGraph
|
||||||
graphId={`${camera}-storage`}
|
graphId={`${camera}-storage`}
|
||||||
|
Loading…
Reference in New Issue
Block a user