mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-11 09:27:30 +00:00
fix(frontend): imports are unused
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import React from "react";
|
|
||||||
import { Route, Routes } from "react-router-dom";
|
import { Route, Routes } from "react-router-dom";
|
||||||
import FirstTimeAdminSetup from "./components/FirstTimeAdminSetup";
|
import FirstTimeAdminSetup from "./components/FirstTimeAdminSetup";
|
||||||
import Layout from "./components/Layout";
|
import Layout from "./components/Layout";
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import {
|
|||||||
Settings as SettingsIcon,
|
Settings as SettingsIcon,
|
||||||
X,
|
X,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import React, { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useTheme } from "../contexts/ThemeContext";
|
import { useTheme } from "../contexts/ThemeContext";
|
||||||
import { dashboardPreferencesAPI } from "../utils/api";
|
import { dashboardPreferencesAPI } from "../utils/api";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { AlertCircle, CheckCircle, Shield, UserPlus } from "lucide-react";
|
import { AlertCircle, CheckCircle, Shield, UserPlus } from "lucide-react";
|
||||||
import React, { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useAuth } from "../contexts/AuthContext";
|
import { useAuth } from "../contexts/AuthContext";
|
||||||
|
|
||||||
const FirstTimeAdminSetup = () => {
|
const FirstTimeAdminSetup = () => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Check, Edit2, X } from "lucide-react";
|
import { Check, Edit2, X } from "lucide-react";
|
||||||
import React, { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
const InlineEdit = ({
|
const InlineEdit = ({
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
import { Check, ChevronDown, Edit2, X } from "lucide-react";
|
import { Check, ChevronDown, Edit2, X } from "lucide-react";
|
||||||
import React, {
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
useCallback,
|
|
||||||
useEffect,
|
|
||||||
useMemo,
|
|
||||||
useRef,
|
|
||||||
useState,
|
|
||||||
} from "react";
|
|
||||||
|
|
||||||
const InlineGroupEdit = ({
|
const InlineGroupEdit = ({
|
||||||
value,
|
value,
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import {
|
|||||||
ChevronLeft,
|
ChevronLeft,
|
||||||
ChevronRight,
|
ChevronRight,
|
||||||
Clock,
|
Clock,
|
||||||
Cog,
|
|
||||||
Container,
|
|
||||||
FileText,
|
|
||||||
GitBranch,
|
|
||||||
Github,
|
Github,
|
||||||
Globe,
|
Globe,
|
||||||
Home,
|
Home,
|
||||||
@@ -23,17 +19,16 @@ import {
|
|||||||
Settings,
|
Settings,
|
||||||
Shield,
|
Shield,
|
||||||
Star,
|
Star,
|
||||||
User,
|
|
||||||
UserCircle,
|
UserCircle,
|
||||||
Users,
|
Users,
|
||||||
Wrench,
|
Wrench,
|
||||||
X,
|
X,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import React, { useCallback, useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import { Link, useLocation } from "react-router-dom";
|
import { Link, useLocation } from "react-router-dom";
|
||||||
import { useAuth } from "../contexts/AuthContext";
|
import { useAuth } from "../contexts/AuthContext";
|
||||||
import { useUpdateNotification } from "../contexts/UpdateNotificationContext";
|
import { useUpdateNotification } from "../contexts/UpdateNotificationContext";
|
||||||
import { dashboardAPI, formatRelativeTime, versionAPI } from "../utils/api";
|
import { dashboardAPI, versionAPI } from "../utils/api";
|
||||||
import UpgradeNotificationIcon from "./UpgradeNotificationIcon";
|
import UpgradeNotificationIcon from "./UpgradeNotificationIcon";
|
||||||
|
|
||||||
const Layout = ({ children }) => {
|
const Layout = ({ children }) => {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import React from "react";
|
|
||||||
import { Navigate } from "react-router-dom";
|
import { Navigate } from "react-router-dom";
|
||||||
import { useAuth } from "../contexts/AuthContext";
|
import { useAuth } from "../contexts/AuthContext";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { ArrowUpCircle } from "lucide-react";
|
import { ArrowUpCircle } from "lucide-react";
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
const UpgradeNotificationIcon = ({ className = "h-4 w-4", show = true }) => {
|
const UpgradeNotificationIcon = ({ className = "h-4 w-4", show = true }) => {
|
||||||
if (!show) return null;
|
if (!show) return null;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, {
|
import {
|
||||||
createContext,
|
createContext,
|
||||||
useCallback,
|
useCallback,
|
||||||
useContext,
|
useContext,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { createContext, useContext, useEffect, useState } from "react";
|
import { createContext, useContext, useEffect, useState } from "react";
|
||||||
|
|
||||||
const ThemeContext = createContext();
|
const ThemeContext = createContext();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import React, { createContext, useContext, useState } from "react";
|
import { createContext, useContext, useState } from "react";
|
||||||
import { settingsAPI, versionAPI } from "../utils/api";
|
import { settingsAPI, versionAPI } from "../utils/api";
|
||||||
import { useAuth } from "./AuthContext";
|
import { useAuth } from "./AuthContext";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||||
import React from "react";
|
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from "react-dom/client";
|
||||||
import { BrowserRouter } from "react-router-dom";
|
import { BrowserRouter } from "react-router-dom";
|
||||||
import App from "./App.jsx";
|
import App from "./App.jsx";
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import {
|
|||||||
} from "chart.js";
|
} from "chart.js";
|
||||||
import {
|
import {
|
||||||
AlertTriangle,
|
AlertTriangle,
|
||||||
Clock,
|
|
||||||
Folder,
|
Folder,
|
||||||
GitBranch,
|
GitBranch,
|
||||||
Package,
|
Package,
|
||||||
@@ -23,7 +22,7 @@ import {
|
|||||||
Users,
|
Users,
|
||||||
WifiOff,
|
WifiOff,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import React, { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Bar, Pie } from "react-chartjs-2";
|
import { Bar, Pie } from "react-chartjs-2";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import DashboardSettingsModal from "../components/DashboardSettingsModal";
|
import DashboardSettingsModal from "../components/DashboardSettingsModal";
|
||||||
|
|||||||
@@ -4,18 +4,14 @@ import {
|
|||||||
AlertTriangle,
|
AlertTriangle,
|
||||||
ArrowLeft,
|
ArrowLeft,
|
||||||
Calendar,
|
Calendar,
|
||||||
Check,
|
|
||||||
CheckCircle,
|
CheckCircle,
|
||||||
ChevronDown,
|
ChevronDown,
|
||||||
ChevronUp,
|
ChevronUp,
|
||||||
Clock,
|
Clock,
|
||||||
Code,
|
|
||||||
Copy,
|
Copy,
|
||||||
Cpu,
|
Cpu,
|
||||||
Edit,
|
|
||||||
Eye,
|
Eye,
|
||||||
EyeOff,
|
EyeOff,
|
||||||
Globe,
|
|
||||||
HardDrive,
|
HardDrive,
|
||||||
Key,
|
Key,
|
||||||
MemoryStick,
|
MemoryStick,
|
||||||
@@ -25,13 +21,11 @@ import {
|
|||||||
Server,
|
Server,
|
||||||
Shield,
|
Shield,
|
||||||
Terminal,
|
Terminal,
|
||||||
ToggleLeft,
|
|
||||||
ToggleRight,
|
|
||||||
Trash2,
|
Trash2,
|
||||||
Wifi,
|
Wifi,
|
||||||
X,
|
X,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import React, { useId, useState } from "react";
|
import { useId, useState } from "react";
|
||||||
import { Link, useNavigate, useParams } from "react-router-dom";
|
import { Link, useNavigate, useParams } from "react-router-dom";
|
||||||
import InlineEdit from "../components/InlineEdit";
|
import InlineEdit from "../components/InlineEdit";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,14 +1,6 @@
|
|||||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
import {
|
import { AlertTriangle, Edit, Plus, Server, Trash2 } from "lucide-react";
|
||||||
AlertTriangle,
|
import { useId, useState } from "react";
|
||||||
CheckCircle,
|
|
||||||
Edit,
|
|
||||||
Plus,
|
|
||||||
Server,
|
|
||||||
Trash2,
|
|
||||||
Users,
|
|
||||||
} from "lucide-react";
|
|
||||||
import React, { useId, useState } from "react";
|
|
||||||
import { hostGroupsAPI } from "../utils/api";
|
import { hostGroupsAPI } from "../utils/api";
|
||||||
|
|
||||||
const HostGroups = () => {
|
const HostGroups = () => {
|
||||||
|
|||||||
@@ -17,18 +17,16 @@ import {
|
|||||||
EyeOff as EyeOffIcon,
|
EyeOff as EyeOffIcon,
|
||||||
Filter,
|
Filter,
|
||||||
GripVertical,
|
GripVertical,
|
||||||
Key,
|
|
||||||
Plus,
|
Plus,
|
||||||
RefreshCw,
|
RefreshCw,
|
||||||
Search,
|
Search,
|
||||||
Server,
|
Server,
|
||||||
Settings,
|
|
||||||
Square,
|
Square,
|
||||||
Trash2,
|
Trash2,
|
||||||
Users,
|
Users,
|
||||||
X,
|
X,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import React, { useEffect, useId, useState } from "react";
|
import { useEffect, useId, useState } from "react";
|
||||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
||||||
import InlineEdit from "../components/InlineEdit";
|
import InlineEdit from "../components/InlineEdit";
|
||||||
import InlineGroupEdit from "../components/InlineGroupEdit";
|
import InlineGroupEdit from "../components/InlineGroupEdit";
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
User,
|
User,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
|
||||||
import React, { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { useAuth } from "../contexts/AuthContext";
|
import { useAuth } from "../contexts/AuthContext";
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
import {
|
import {
|
||||||
AlertTriangle,
|
AlertTriangle,
|
||||||
CheckCircle,
|
|
||||||
Edit,
|
Edit,
|
||||||
Plus,
|
Plus,
|
||||||
Server,
|
Server,
|
||||||
@@ -9,7 +8,7 @@ import {
|
|||||||
Trash2,
|
Trash2,
|
||||||
Users,
|
Users,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import React, { useId, useState } from "react";
|
import { useId, useState } from "react";
|
||||||
import { hostGroupsAPI } from "../utils/api";
|
import { hostGroupsAPI } from "../utils/api";
|
||||||
|
|
||||||
const Options = () => {
|
const Options = () => {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { Package } from "lucide-react";
|
import { Package } from "lucide-react";
|
||||||
import React from "react";
|
|
||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
|
|
||||||
const PackageDetail = () => {
|
const PackageDetail = () => {
|
||||||
|
|||||||
@@ -4,23 +4,19 @@ import {
|
|||||||
ArrowDown,
|
ArrowDown,
|
||||||
ArrowUp,
|
ArrowUp,
|
||||||
ArrowUpDown,
|
ArrowUpDown,
|
||||||
ChevronDown,
|
|
||||||
Columns,
|
Columns,
|
||||||
ExternalLink,
|
|
||||||
Eye as EyeIcon,
|
Eye as EyeIcon,
|
||||||
EyeOff as EyeOffIcon,
|
EyeOff as EyeOffIcon,
|
||||||
Filter,
|
|
||||||
GripVertical,
|
GripVertical,
|
||||||
Package,
|
Package,
|
||||||
RefreshCw,
|
RefreshCw,
|
||||||
Search,
|
Search,
|
||||||
Server,
|
Server,
|
||||||
Settings,
|
|
||||||
Shield,
|
Shield,
|
||||||
X,
|
X,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import React, { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||||
import { dashboardAPI } from "../utils/api";
|
import { dashboardAPI } from "../utils/api";
|
||||||
|
|
||||||
const Packages = () => {
|
const Packages = () => {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import {
|
|||||||
BarChart3,
|
BarChart3,
|
||||||
Download,
|
Download,
|
||||||
Edit,
|
Edit,
|
||||||
Eye,
|
|
||||||
Package,
|
Package,
|
||||||
Plus,
|
Plus,
|
||||||
RefreshCw,
|
RefreshCw,
|
||||||
@@ -16,7 +15,7 @@ import {
|
|||||||
Users,
|
Users,
|
||||||
X,
|
X,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import React, { useEffect, useId, useState } from "react";
|
import { useEffect, useId, useState } from "react";
|
||||||
import { useAuth } from "../contexts/AuthContext";
|
import { useAuth } from "../contexts/AuthContext";
|
||||||
import { permissionsAPI } from "../utils/api";
|
import { permissionsAPI } from "../utils/api";
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import {
|
|||||||
Key,
|
Key,
|
||||||
Mail,
|
Mail,
|
||||||
Moon,
|
Moon,
|
||||||
QrCode,
|
|
||||||
RefreshCw,
|
RefreshCw,
|
||||||
Save,
|
Save,
|
||||||
Settings,
|
Settings,
|
||||||
@@ -20,7 +19,7 @@ import {
|
|||||||
User,
|
User,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
|
||||||
import React, { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import { useAuth } from "../contexts/AuthContext";
|
import { useAuth } from "../contexts/AuthContext";
|
||||||
import { useTheme } from "../contexts/ThemeContext";
|
import { useTheme } from "../contexts/ThemeContext";
|
||||||
@@ -34,10 +33,8 @@ const Profile = () => {
|
|||||||
const currentPasswordId = useId();
|
const currentPasswordId = useId();
|
||||||
const newPasswordId = useId();
|
const newPasswordId = useId();
|
||||||
const confirmPasswordId = useId();
|
const confirmPasswordId = useId();
|
||||||
const verificationTokenId = useId();
|
|
||||||
const disablePasswordId = useId();
|
|
||||||
const { user, updateProfile, changePassword } = useAuth();
|
const { user, updateProfile, changePassword } = useAuth();
|
||||||
const { theme, toggleTheme, isDark } = useTheme();
|
const { toggleTheme, isDark } = useTheme();
|
||||||
const [activeTab, setActiveTab] = useState("profile");
|
const [activeTab, setActiveTab] = useState("profile");
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const [message, setMessage] = useState({ type: "", text: "" });
|
const [message, setMessage] = useState({ type: "", text: "" });
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import {
|
|||||||
Columns,
|
Columns,
|
||||||
Database,
|
Database,
|
||||||
Eye,
|
Eye,
|
||||||
Globe,
|
|
||||||
GripVertical,
|
GripVertical,
|
||||||
Lock,
|
Lock,
|
||||||
RefreshCw,
|
RefreshCw,
|
||||||
@@ -20,7 +19,7 @@ import {
|
|||||||
Users,
|
Users,
|
||||||
X,
|
X,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import React, { useMemo, useState } from "react";
|
import { useMemo, useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { repositoryAPI } from "../utils/api";
|
import { repositoryAPI } from "../utils/api";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
import {
|
import {
|
||||||
Activity,
|
|
||||||
AlertTriangle,
|
AlertTriangle,
|
||||||
ArrowLeft,
|
ArrowLeft,
|
||||||
Calendar,
|
Calendar,
|
||||||
@@ -14,7 +13,7 @@ import {
|
|||||||
Users,
|
Users,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
|
||||||
import React, { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import { Link, useParams } from "react-router-dom";
|
import { Link, useParams } from "react-router-dom";
|
||||||
import { repositoryAPI } from "../utils/api";
|
import { repositoryAPI } from "../utils/api";
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
X,
|
X,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
|
||||||
import React, { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import UpgradeNotificationIcon from "../components/UpgradeNotificationIcon";
|
import UpgradeNotificationIcon from "../components/UpgradeNotificationIcon";
|
||||||
import { useUpdateNotification } from "../contexts/UpdateNotificationContext";
|
import { useUpdateNotification } from "../contexts/UpdateNotificationContext";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
User,
|
User,
|
||||||
XCircle,
|
XCircle,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import React, { useId, useState } from "react";
|
import { useId, useState } from "react";
|
||||||
import { useAuth } from "../contexts/AuthContext";
|
import { useAuth } from "../contexts/AuthContext";
|
||||||
import { adminUsersAPI, permissionsAPI } from "../utils/api";
|
import { adminUsersAPI, permissionsAPI } from "../utils/api";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user