feat: Add new tools and configurations for Castle platform
- Introduced `uv.lock` for dependency management with various packages including `pytest`, `colorama`, and `pluggy`. - Added `pyrightconfig.json` for Python type checking configuration. - Expanded `recommendations.md` with detailed scaling recommendations and project management strategies. - Created shared `ruff.toml` for consistent linting across projects. - Developed `Castle Tools` with various utilities including Android backup, browser automation, document conversion, and search tools. - Implemented `backup-collect` and `schedule` tools for system administration tasks. - Enhanced `search` functionality with indexing and querying capabilities using Tantivy. - Added comprehensive documentation for each tool, including usage examples and installation instructions.
This commit is contained in:
32
dashboard/src/components/HealthBadge.tsx
Normal file
32
dashboard/src/components/HealthBadge.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
interface HealthBadgeProps {
|
||||
status: "up" | "down" | "unknown"
|
||||
latency?: number | null
|
||||
}
|
||||
|
||||
export function HealthBadge({ status, latency }: HealthBadgeProps) {
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"inline-flex items-center gap-1.5 text-xs px-2 py-0.5 rounded-full",
|
||||
status === "up" && "bg-green-800/50 text-green-300",
|
||||
status === "down" && "bg-red-800/50 text-red-300",
|
||||
status === "unknown" && "bg-gray-700/50 text-gray-400",
|
||||
)}
|
||||
>
|
||||
<span
|
||||
className={cn(
|
||||
"w-1.5 h-1.5 rounded-full",
|
||||
status === "up" && "bg-green-400",
|
||||
status === "down" && "bg-red-400",
|
||||
status === "unknown" && "bg-gray-500",
|
||||
)}
|
||||
/>
|
||||
{status}
|
||||
{latency != null && status === "up" && (
|
||||
<span className="text-gray-500 ml-0.5">{latency}ms</span>
|
||||
)}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user