mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
#591 - sites [wip]
This commit is contained in:
3
resources/js/types/backup-file.d.ts
vendored
3
resources/js/types/backup-file.d.ts
vendored
@ -1,6 +1,9 @@
|
||||
import { Backup } from '@/types/backup';
|
||||
|
||||
export interface BackupFile {
|
||||
id: number;
|
||||
backup_id: number;
|
||||
backup: Backup;
|
||||
server_id: number;
|
||||
name: string;
|
||||
size: number;
|
||||
|
9
resources/js/types/dynamic-field-config.d.ts
vendored
Normal file
9
resources/js/types/dynamic-field-config.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
export interface DynamicFieldConfig {
|
||||
type: 'text' | 'select' | 'checkbox' | 'component';
|
||||
name: string;
|
||||
options?: string[];
|
||||
placeholder?: string;
|
||||
description?: string;
|
||||
label?: string;
|
||||
default?: string | number | boolean;
|
||||
}
|
32
resources/js/types/index.d.ts
vendored
32
resources/js/types/index.d.ts
vendored
@ -3,6 +3,8 @@ import type { Config } from 'ziggy-js';
|
||||
import type { Server } from '@/types/server';
|
||||
import { Project } from '@/types/project';
|
||||
import { User } from '@/types/user';
|
||||
import { Site } from '@/types/site';
|
||||
import { DynamicFieldConfig } from './dynamic-field-config';
|
||||
|
||||
export interface Auth {
|
||||
user: User;
|
||||
@ -54,6 +56,10 @@ export interface Configs {
|
||||
webservers: string[];
|
||||
databases: string[];
|
||||
php_versions: string[];
|
||||
site_types: string[];
|
||||
site_types_custom_fields: {
|
||||
[type: string]: DynamicFieldConfig[];
|
||||
};
|
||||
cronjob_intervals: {
|
||||
[key: string]: string;
|
||||
};
|
||||
@ -69,7 +75,9 @@ export interface SharedData {
|
||||
sidebarOpen: boolean;
|
||||
configs: Configs;
|
||||
projectServers: Server[];
|
||||
serverSites?: Site[];
|
||||
server?: Server;
|
||||
site?: Site;
|
||||
publicKeyText: string;
|
||||
flash?: {
|
||||
success: string;
|
||||
@ -81,3 +89,27 @@ export interface SharedData {
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface PaginatedData<TData> {
|
||||
data: TData[];
|
||||
links: PaginationLinks;
|
||||
meta: PaginationMeta;
|
||||
}
|
||||
|
||||
export interface PaginationLinks {
|
||||
first: string | null;
|
||||
last: string | null;
|
||||
prev: string | null;
|
||||
next: string | null;
|
||||
}
|
||||
|
||||
export interface PaginationMeta {
|
||||
current_page: number;
|
||||
current_page_url: string;
|
||||
from: number | null;
|
||||
path: string;
|
||||
per_page: number;
|
||||
to: number | null;
|
||||
total?: number;
|
||||
last_page?: number;
|
||||
}
|
||||
|
26
resources/js/types/site.d.ts
vendored
Normal file
26
resources/js/types/site.d.ts
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
import { Server } from '@/types/server';
|
||||
|
||||
export interface Site {
|
||||
id: number;
|
||||
server_id: number;
|
||||
server?: Server;
|
||||
source_control_id: string;
|
||||
type: string;
|
||||
type_data: unknown;
|
||||
domain: string;
|
||||
aliases?: string[];
|
||||
web_directory: string;
|
||||
path: string;
|
||||
php_version: string;
|
||||
repository: string;
|
||||
branch: string;
|
||||
status: string;
|
||||
status_color: 'gray' | 'success' | 'info' | 'warning' | 'danger';
|
||||
port: number;
|
||||
user: string;
|
||||
url: string;
|
||||
progress: number;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
[key: string]: unknown;
|
||||
}
|
Reference in New Issue
Block a user