mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
chore: lint
This commit is contained in:
@@ -3,7 +3,7 @@ import { Input } from "@/components/ui/input";
|
|||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
import { Download as DownloadIcon, Loader2 } from "lucide-react";
|
import { Download as DownloadIcon, Loader2 } from "lucide-react";
|
||||||
import React, { useEffect, useRef } from "react";
|
import React, { useEffect, useRef } from "react";
|
||||||
import { SinceLogsFilter } from "./since-logs-filter";
|
import { SinceLogsFilter, type TimeFilter } from "./since-logs-filter";
|
||||||
import { StatusLogsFilter } from "./status-logs-filter";
|
import { StatusLogsFilter } from "./status-logs-filter";
|
||||||
import { TerminalLine } from "./terminal-line";
|
import { TerminalLine } from "./terminal-line";
|
||||||
import { type LogLine, getLogType, parseLogs } from "./utils";
|
import { type LogLine, getLogType, parseLogs } from "./utils";
|
||||||
@@ -13,8 +13,6 @@ interface Props {
|
|||||||
serverId?: string | null;
|
serverId?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
type TimeFilter = "all" | "timestamp" | "1h" | "6h" | "24h" | "168h" | "720h";
|
|
||||||
|
|
||||||
export const priorities = [
|
export const priorities = [
|
||||||
{
|
{
|
||||||
label: "Info",
|
label: "Info",
|
||||||
@@ -84,14 +82,10 @@ export const DockerLogsId: React.FC<Props> = ({ containerId, serverId }) => {
|
|||||||
setLines(Number(e.target.value) || 1);
|
setLines(Number(e.target.value) || 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSince = (value: string) => {
|
const handleSince = (value: TimeFilter) => {
|
||||||
if (value === "timestamp") {
|
setRawLogs("");
|
||||||
setShowTimestamp(!showTimestamp);
|
setFilteredLogs([]);
|
||||||
} else {
|
setSince(value);
|
||||||
setRawLogs("");
|
|
||||||
setFilteredLogs([]);
|
|
||||||
setSince(value);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ import { cn } from "@/lib/utils";
|
|||||||
import { CheckIcon } from "lucide-react";
|
import { CheckIcon } from "lucide-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
type TimeFilter = "all" | "1h" | "6h" | "24h" | "168h" | "720h";
|
export type TimeFilter = "all" | "1h" | "6h" | "24h" | "168h" | "720h";
|
||||||
|
|
||||||
const timeRanges = [
|
const timeRanges: Array<{ label: string; value: TimeFilter }> = [
|
||||||
{
|
{
|
||||||
label: "All time",
|
label: "All time",
|
||||||
value: "all",
|
value: "all",
|
||||||
@@ -44,7 +44,7 @@ const timeRanges = [
|
|||||||
label: "Last 30 days",
|
label: "Last 30 days",
|
||||||
value: "720h",
|
value: "720h",
|
||||||
},
|
},
|
||||||
];
|
] as const;
|
||||||
|
|
||||||
interface SinceLogsFilterProps {
|
interface SinceLogsFilterProps {
|
||||||
value: string;
|
value: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user