meyi-backup-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +2 -0
- package/dist/components/Layout.d.ts +1 -0
- package/dist/components/forms/CustomSourceDialog.d.ts +7 -0
- package/dist/components/forms/JobForm.d.ts +3 -0
- package/dist/components/forms/SourceForm.d.ts +3 -0
- package/dist/components/forms/TargetForm.d.ts +1 -0
- package/dist/components/pages/Dashboard.d.ts +1 -0
- package/dist/components/pages/JobDetail.d.ts +1 -0
- package/dist/components/pages/Jobs.d.ts +1 -0
- package/dist/components/pages/RunHistory.d.ts +1 -0
- package/dist/components/pages/Snapshots.d.ts +1 -0
- package/dist/components/pages/Sources.d.ts +1 -0
- package/dist/components/pages/Targets.d.ts +1 -0
- package/dist/components/ui/SessionTimeoutDialog.d.ts +6 -0
- package/dist/components/ui/alert-dialog.d.ts +14 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/avatar-group.d.ts +11 -0
- package/dist/components/ui/avatar.d.ts +6 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/calendar.d.ts +8 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/copy-button.d.ts +5 -0
- package/dist/components/ui/dialog.d.ts +15 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/form.d.ts +26 -0
- package/dist/components/ui/input-otp.d.ts +11 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/multi-select.d.ts +13 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/scroll-area.d.ts +8 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/sheet.d.ts +13 -0
- package/dist/components/ui/sidebar.d.ts +69 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/sonner.d.ts +2 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/env.d.ts +3 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +101 -0
- package/dist/index.mjs +19532 -0
- package/dist/lib/cookies.d.ts +3 -0
- package/dist/lib/handle-server-error.d.ts +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/main.d.ts +0 -0
- package/dist/meyi-backup-ui.css +1 -0
- package/dist/router.d.ts +27 -0
- package/dist/services/api.d.ts +24 -0
- package/dist/services/connector.d.ts +26 -0
- package/dist/services/job.d.ts +18 -0
- package/dist/services/source.d.ts +9 -0
- package/dist/services/target.d.ts +10 -0
- package/dist/services/utils.d.ts +80 -0
- package/dist/state/auth.d.ts +20 -0
- package/dist/state/theme.d.ts +9 -0
- package/dist/store/hooks.d.ts +9 -0
- package/dist/store/index.d.ts +15 -0
- package/dist/store/slices/authSlice.d.ts +6 -0
- package/dist/store/slices/jobSlice.d.ts +20 -0
- package/dist/store/slices/sourceSlice.d.ts +18 -0
- package/dist/store/slices/targetSlice.d.ts +20 -0
- package/dist/types.d.ts +109 -0
- package/dist/ui/MeyiBackupPage.d.ts +7 -0
- package/dist/ui/components/AppLayout.d.ts +1 -0
- package/dist/ui/components/AppSidebar.d.ts +1 -0
- package/dist/ui/pages/DashboardPage.d.ts +1 -0
- package/dist/ui/pages/JobDetailPage.d.ts +3 -0
- package/dist/ui/pages/JobFormPage.d.ts +1 -0
- package/dist/ui/pages/JobsPage.d.ts +1 -0
- package/dist/ui/pages/RunHistoryPage.d.ts +1 -0
- package/dist/ui/pages/SettingsPage.d.ts +1 -0
- package/dist/ui/pages/SnapshotsPage.d.ts +3 -0
- package/dist/ui/pages/SourceFormPage.d.ts +1 -0
- package/dist/ui/pages/SourcesPage.d.ts +1 -0
- package/dist/ui/pages/TargetFormPage.d.ts +1 -0
- package/dist/ui/pages/TargetsPage.d.ts +1 -0
- package/dist/ui/utils/cn.d.ts +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Target, Snapshot } from '../../types';
|
|
2
|
+
export interface TargetState {
|
|
3
|
+
list: Target[];
|
|
4
|
+
current: Target | null;
|
|
5
|
+
snapshots: Snapshot[];
|
|
6
|
+
loading: boolean;
|
|
7
|
+
error: string | null;
|
|
8
|
+
}
|
|
9
|
+
export declare const fetchTargets: import('@reduxjs/toolkit').AsyncThunk<Target[], void, import('@reduxjs/toolkit').AsyncThunkConfig>;
|
|
10
|
+
export declare const fetchTarget: import('@reduxjs/toolkit').AsyncThunk<Target, string, import('@reduxjs/toolkit').AsyncThunkConfig>;
|
|
11
|
+
export declare const createTarget: import('@reduxjs/toolkit').AsyncThunk<Target, Omit<Target, "id">, import('@reduxjs/toolkit').AsyncThunkConfig>;
|
|
12
|
+
export declare const updateTarget: import('@reduxjs/toolkit').AsyncThunk<Target, {
|
|
13
|
+
id: string;
|
|
14
|
+
data: Partial<Target>;
|
|
15
|
+
}, import('@reduxjs/toolkit').AsyncThunkConfig>;
|
|
16
|
+
export declare const deleteTarget: import('@reduxjs/toolkit').AsyncThunk<string, string, import('@reduxjs/toolkit').AsyncThunkConfig>;
|
|
17
|
+
export declare const initRepo: import('@reduxjs/toolkit').AsyncThunk<import('axios').AxiosResponse<any, any, {}>, string, import('@reduxjs/toolkit').AsyncThunkConfig>;
|
|
18
|
+
export declare const fetchSnapshots: import('@reduxjs/toolkit').AsyncThunk<Snapshot[], string, import('@reduxjs/toolkit').AsyncThunkConfig>;
|
|
19
|
+
declare const _default: import('redux').Reducer<TargetState>;
|
|
20
|
+
export default _default;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export type SourceType = 'postgresql' | 'mysql' | 'mongodb' | 'filesystem' | 's3' | 'ec2' | 'ssh_host';
|
|
2
|
+
export interface Source {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: SourceType;
|
|
6
|
+
scopeType?: 'all' | 'partial' | 'specific';
|
|
7
|
+
scope_type?: 'all' | 'partial' | 'specific';
|
|
8
|
+
scopeConfig?: Record<string, unknown>;
|
|
9
|
+
scope_config?: Record<string, unknown>;
|
|
10
|
+
config: Record<string, unknown>;
|
|
11
|
+
credentials?: Record<string, unknown>;
|
|
12
|
+
created_at?: string;
|
|
13
|
+
updated_at?: string;
|
|
14
|
+
}
|
|
15
|
+
export type TargetType = 'local' | 's3' | 'b2' | 'sftp' | 'rest' | 'azure' | 'gs';
|
|
16
|
+
export interface Target {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
type: TargetType;
|
|
20
|
+
config: Record<string, unknown>;
|
|
21
|
+
credentials?: Record<string, unknown>;
|
|
22
|
+
resticPassword?: string;
|
|
23
|
+
restic_password?: string;
|
|
24
|
+
created_at?: string;
|
|
25
|
+
updated_at?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface Snapshot {
|
|
28
|
+
id: string;
|
|
29
|
+
short_id: string;
|
|
30
|
+
time: string;
|
|
31
|
+
hostname?: string;
|
|
32
|
+
tags?: string[];
|
|
33
|
+
paths?: string[];
|
|
34
|
+
tree?: string;
|
|
35
|
+
parent?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface Job {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
sourceId?: string;
|
|
41
|
+
source_id?: string;
|
|
42
|
+
sourceName?: string;
|
|
43
|
+
source_name?: string;
|
|
44
|
+
sourceType?: SourceType;
|
|
45
|
+
source_type?: SourceType;
|
|
46
|
+
targetId?: string;
|
|
47
|
+
target_id?: string;
|
|
48
|
+
targetName?: string;
|
|
49
|
+
target_name?: string;
|
|
50
|
+
targetType?: TargetType;
|
|
51
|
+
target_type?: TargetType;
|
|
52
|
+
schedule?: string;
|
|
53
|
+
retention?: RetentionPolicy;
|
|
54
|
+
retentionPolicy?: RetentionPolicy;
|
|
55
|
+
retention_policy?: RetentionPolicy;
|
|
56
|
+
tags?: string[];
|
|
57
|
+
backupMode?: string;
|
|
58
|
+
backup_mode?: string;
|
|
59
|
+
backupScope?: 'full' | 'specific';
|
|
60
|
+
backup_scope?: 'full' | 'specific';
|
|
61
|
+
backupIncludePaths?: string[];
|
|
62
|
+
backup_include_paths?: string[];
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
lastRun?: Run;
|
|
65
|
+
last_run?: Run;
|
|
66
|
+
created_at?: string;
|
|
67
|
+
updated_at?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface RetentionPolicy {
|
|
70
|
+
keep_last?: number;
|
|
71
|
+
keep_hourly?: number;
|
|
72
|
+
keep_daily?: number;
|
|
73
|
+
keep_weekly?: number;
|
|
74
|
+
keep_monthly?: number;
|
|
75
|
+
keep_yearly?: number;
|
|
76
|
+
}
|
|
77
|
+
export type RunStatus = 'success' | 'failed' | 'running' | 'pending' | 'cancelled';
|
|
78
|
+
export interface Run {
|
|
79
|
+
id: string;
|
|
80
|
+
jobId?: string;
|
|
81
|
+
job_id?: string;
|
|
82
|
+
jobName?: string;
|
|
83
|
+
job_name?: string;
|
|
84
|
+
status: RunStatus;
|
|
85
|
+
startedAt?: string;
|
|
86
|
+
started_at?: string;
|
|
87
|
+
finishedAt?: string;
|
|
88
|
+
finished_at?: string;
|
|
89
|
+
dataAddedBytes?: number;
|
|
90
|
+
data_added_bytes?: number;
|
|
91
|
+
snapshotId?: string;
|
|
92
|
+
snapshot_id?: string;
|
|
93
|
+
totalFilesProcessed?: number;
|
|
94
|
+
total_files_processed?: number;
|
|
95
|
+
error_message?: string;
|
|
96
|
+
errorMessage?: string;
|
|
97
|
+
logs?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface DashboardStats {
|
|
100
|
+
jobs: {
|
|
101
|
+
total: number;
|
|
102
|
+
enabled: number;
|
|
103
|
+
};
|
|
104
|
+
runs: {
|
|
105
|
+
success_7d: number;
|
|
106
|
+
failed_7d: number;
|
|
107
|
+
bytes_7d: number;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AppLayout(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AppSidebar(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function DashboardPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as JobFormPage } from '../../components/forms/JobForm.jsx';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function JobsPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function RunHistoryPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SettingsPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SourceFormPage } from '../../components/forms/SourceForm.jsx';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SourcesPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TargetFormPage } from '../../components/forms/TargetForm.jsx';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function TargetsPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function cn(...inputs: unknown[]): string;
|
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "meyi-backup-ui",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite --host 0.0.0.0",
|
|
7
|
+
"build": "vite build",
|
|
8
|
+
"preview": "vite preview",
|
|
9
|
+
"typecheck": "tsc --noEmit",
|
|
10
|
+
"prepublishOnly": "npm run build"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@hookform/resolvers": "^5.2.2",
|
|
14
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
15
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
16
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
17
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
18
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
19
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
20
|
+
"@radix-ui/react-separator": "^1.1.7",
|
|
21
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
22
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
23
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
24
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
25
|
+
"@reduxjs/toolkit": "^2.10.1",
|
|
26
|
+
"@tailwindcss/vite": "^4.1.14",
|
|
27
|
+
"@tanstack/react-query": "^5.90.2",
|
|
28
|
+
"@tanstack/react-router": "^1.132.47",
|
|
29
|
+
"@tanstack/react-table": "^8.21.3",
|
|
30
|
+
"axios": "^1.12.2",
|
|
31
|
+
"class-variance-authority": "^0.7.1",
|
|
32
|
+
"clsx": "^2.1.1",
|
|
33
|
+
"date-fns": "^4.1.0",
|
|
34
|
+
"lucide-react": "^0.545.0",
|
|
35
|
+
"react": "^19.2.0",
|
|
36
|
+
"react-dom": "^19.2.0",
|
|
37
|
+
"react-hook-form": "^7.71.1",
|
|
38
|
+
"react-redux": "^9.2.0",
|
|
39
|
+
"sonner": "^2.0.7",
|
|
40
|
+
"tailwind-merge": "^3.3.1",
|
|
41
|
+
"tailwindcss": "^4.1.14",
|
|
42
|
+
"tw-animate-css": "^1.4.0",
|
|
43
|
+
"zod": "^4.1.12",
|
|
44
|
+
"zustand": "^5.0.8"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@tailwindcss/postcss": "^4.1.8",
|
|
48
|
+
"@types/node": "^24.7.0",
|
|
49
|
+
"@types/react": "^19.2.2",
|
|
50
|
+
"@types/react-dom": "^19.2.1",
|
|
51
|
+
"@vitejs/plugin-react-swc": "^4.1.0",
|
|
52
|
+
"autoprefixer": "^10.4.17",
|
|
53
|
+
"postcss": "^8.4.35",
|
|
54
|
+
"typescript": "~5.9.3",
|
|
55
|
+
"vite": "^7.1.11",
|
|
56
|
+
"vite-plugin-dts": "^4.5.4"
|
|
57
|
+
},
|
|
58
|
+
"private": false,
|
|
59
|
+
"main": "./dist/index.js",
|
|
60
|
+
"module": "./dist/index.mjs",
|
|
61
|
+
"types": "./dist/index.d.ts",
|
|
62
|
+
"files": [
|
|
63
|
+
"dist"
|
|
64
|
+
],
|
|
65
|
+
"exports": {
|
|
66
|
+
".": {
|
|
67
|
+
"types": "./dist/index.d.ts",
|
|
68
|
+
"import": "./dist/index.mjs",
|
|
69
|
+
"require": "./dist/index.js"
|
|
70
|
+
},
|
|
71
|
+
"./style.css": "./dist/meyi-backup-ui.css"
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"react": "^19.2.0",
|
|
75
|
+
"react-dom": "^19.2.0"
|
|
76
|
+
}
|
|
77
|
+
}
|