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 { Download as DownloadIcon, Loader2 } from "lucide-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 { TerminalLine } from "./terminal-line";
|
||||
import { type LogLine, getLogType, parseLogs } from "./utils";
|
||||
@@ -13,8 +13,6 @@ interface Props {
|
||||
serverId?: string | null;
|
||||
}
|
||||
|
||||
type TimeFilter = "all" | "timestamp" | "1h" | "6h" | "24h" | "168h" | "720h";
|
||||
|
||||
export const priorities = [
|
||||
{
|
||||
label: "Info",
|
||||
@@ -84,14 +82,10 @@ export const DockerLogsId: React.FC<Props> = ({ containerId, serverId }) => {
|
||||
setLines(Number(e.target.value) || 1);
|
||||
};
|
||||
|
||||
const handleSince = (value: string) => {
|
||||
if (value === "timestamp") {
|
||||
setShowTimestamp(!showTimestamp);
|
||||
} else {
|
||||
setRawLogs("");
|
||||
setFilteredLogs([]);
|
||||
setSince(value);
|
||||
}
|
||||
const handleSince = (value: TimeFilter) => {
|
||||
setRawLogs("");
|
||||
setFilteredLogs([]);
|
||||
setSince(value);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -17,9 +17,9 @@ import { cn } from "@/lib/utils";
|
||||
import { CheckIcon } from "lucide-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",
|
||||
value: "all",
|
||||
@@ -44,7 +44,7 @@ const timeRanges = [
|
||||
label: "Last 30 days",
|
||||
value: "720h",
|
||||
},
|
||||
];
|
||||
] as const;
|
||||
|
||||
interface SinceLogsFilterProps {
|
||||
value: string;
|
||||
|
||||
Reference in New Issue
Block a user