mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-04 07:22:34 +00:00
Plugins base (#613)
* wip * wip * cleanup * notification channels * phpstan * services * remove server types * refactoring * refactoring
This commit is contained in:
2
resources/js/types/dynamic-field-config.d.ts
vendored
2
resources/js/types/dynamic-field-config.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
export interface DynamicFieldConfig {
|
||||
type: 'text' | 'select' | 'checkbox' | 'component';
|
||||
type: 'text' | 'select' | 'checkbox' | 'component' | 'alert';
|
||||
name: string;
|
||||
options?: string[];
|
||||
placeholder?: string;
|
||||
|
94
resources/js/types/index.d.ts
vendored
94
resources/js/types/index.d.ts
vendored
@ -3,7 +3,7 @@ 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 { Site, SiteType } from '@/types/site';
|
||||
import { DynamicFieldConfig } from './dynamic-field-config';
|
||||
|
||||
export interface Auth {
|
||||
@ -34,42 +34,69 @@ export interface NavItem {
|
||||
}
|
||||
|
||||
export interface Configs {
|
||||
server_providers: string[];
|
||||
server_providers_custom_fields: {
|
||||
[provider: string]: string[];
|
||||
};
|
||||
source_control_providers: string[];
|
||||
source_control_providers_custom_fields: {
|
||||
[provider: string]: string[];
|
||||
};
|
||||
storage_providers: string[];
|
||||
storage_providers_custom_fields: {
|
||||
[provider: string]: string[];
|
||||
};
|
||||
notification_channels_providers: string[];
|
||||
notification_channels_providers_custom_fields: {
|
||||
[provider: string]: string[];
|
||||
};
|
||||
operating_systems: string[];
|
||||
service_versions: {
|
||||
[service: string]: string[];
|
||||
};
|
||||
service_types: {
|
||||
[service: string]: string;
|
||||
};
|
||||
colors: string[];
|
||||
webservers: string[];
|
||||
databases: string[];
|
||||
php_versions: string[];
|
||||
site_types: string[];
|
||||
site_types_custom_fields: {
|
||||
[type: string]: DynamicFieldConfig[];
|
||||
};
|
||||
cronjob_intervals: {
|
||||
[key: string]: string;
|
||||
};
|
||||
metrics_periods: string[];
|
||||
php_extensions: string[];
|
||||
|
||||
server_provider: {
|
||||
providers: {
|
||||
[provider: string]: {
|
||||
label: string;
|
||||
handler: string;
|
||||
form?: DynamicFieldConfig[];
|
||||
};
|
||||
};
|
||||
};
|
||||
storage_provider: {
|
||||
providers: {
|
||||
[provider: string]: {
|
||||
label: string;
|
||||
handler: string;
|
||||
form?: DynamicFieldConfig[];
|
||||
};
|
||||
};
|
||||
};
|
||||
source_control: {
|
||||
providers: {
|
||||
[provider: string]: {
|
||||
label: string;
|
||||
handler: string;
|
||||
form?: DynamicFieldConfig[];
|
||||
};
|
||||
};
|
||||
};
|
||||
notification_channel: {
|
||||
providers: {
|
||||
[channel: string]: {
|
||||
label: string;
|
||||
handler: string;
|
||||
form?: DynamicFieldConfig[];
|
||||
};
|
||||
};
|
||||
};
|
||||
service: {
|
||||
services: {
|
||||
[name: string]: {
|
||||
label: string;
|
||||
type: string;
|
||||
handler: string;
|
||||
form?: DynamicFieldConfig[];
|
||||
versions: string[];
|
||||
data?: {
|
||||
extensions?: string[];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
site: {
|
||||
types: {
|
||||
[type: string]: SiteType;
|
||||
};
|
||||
};
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
@ -79,13 +106,12 @@ export interface SharedData {
|
||||
quote: { message: string; author: string };
|
||||
auth: Auth;
|
||||
ziggy: Config & { location: string };
|
||||
sidebarOpen: boolean;
|
||||
configs: Configs;
|
||||
projectServers: Server[];
|
||||
serverSites?: Site[];
|
||||
project_servers: Server[];
|
||||
server_sites?: Site[];
|
||||
server?: Server;
|
||||
site?: Site;
|
||||
publicKeyText: string;
|
||||
public_key_text: string;
|
||||
flash?: {
|
||||
success: string;
|
||||
error: string;
|
||||
|
24
resources/js/types/site.d.ts
vendored
24
resources/js/types/site.d.ts
vendored
@ -1,4 +1,5 @@
|
||||
import { Server } from '@/types/server';
|
||||
import { DynamicFieldConfig } from '@/types/dynamic-field-config';
|
||||
|
||||
export interface Site {
|
||||
id: number;
|
||||
@ -10,7 +11,6 @@ export interface Site {
|
||||
method?: 'round-robin' | 'least-connections' | 'ip-hash';
|
||||
[key: string]: unknown;
|
||||
};
|
||||
features: string[];
|
||||
domain: string;
|
||||
aliases?: string[];
|
||||
web_directory: string;
|
||||
@ -32,3 +32,25 @@ export interface Site {
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface SiteType {
|
||||
label: string;
|
||||
handler: string;
|
||||
form?: DynamicFieldConfig[];
|
||||
features?: SiteFeature[];
|
||||
}
|
||||
|
||||
export interface SiteFeature {
|
||||
label: string;
|
||||
description?: string;
|
||||
actions?: {
|
||||
[key: string]: SiteFeatureAction;
|
||||
};
|
||||
}
|
||||
|
||||
export interface SiteFeatureAction {
|
||||
label: string;
|
||||
handler: string;
|
||||
form?: DynamicFieldConfig[];
|
||||
active?: boolean;
|
||||
}
|
||||
|
1
resources/js/types/worker.d.ts
vendored
1
resources/js/types/worker.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
export interface Worker {
|
||||
id: number;
|
||||
server_id: number;
|
||||
name: string;
|
||||
command: string;
|
||||
user: string;
|
||||
auto_start: boolean;
|
||||
|
Reference in New Issue
Block a user