feat: integrate toast notifications in settings and layout components
- Added ToastService for managing toast notifications. - Replaced alert in settings component with toast notifications for success and error messages. - Included ToastComponent in layout for displaying notifications. - Created loading spinner component for better user experience. - Implemented domain detail component with detailed views for certificates, requirements, and services. - Added functionality to manage and display SSL certificates and their statuses. - Introduced a registry manager class for handling Docker registry operations.
This commit is contained in:
@@ -21,6 +21,13 @@ export interface Service {
|
||||
status: 'stopped' | 'starting' | 'running' | 'stopping' | 'failed';
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
// Onebox Registry fields
|
||||
useOneboxRegistry?: boolean;
|
||||
registryRepository?: string;
|
||||
registryToken?: string;
|
||||
registryImageTag?: string;
|
||||
autoUpdateOnPush?: boolean;
|
||||
imageDigest?: string;
|
||||
}
|
||||
|
||||
export interface Registry {
|
||||
@@ -106,6 +113,16 @@ export class ApiService {
|
||||
return this.http.get<ApiResponse<string>>(`${this.baseUrl}/services/${name}/logs`);
|
||||
}
|
||||
|
||||
updateService(name: string, updates: {
|
||||
image?: string;
|
||||
registry?: string;
|
||||
port?: number;
|
||||
domain?: string;
|
||||
envVars?: Record<string, string>;
|
||||
}): Observable<ApiResponse<Service>> {
|
||||
return this.http.put<ApiResponse<Service>>(`${this.baseUrl}/services/${name}`, updates);
|
||||
}
|
||||
|
||||
// Registries
|
||||
getRegistries(): Observable<ApiResponse<Registry[]>> {
|
||||
return this.http.get<ApiResponse<Registry[]>>(`${this.baseUrl}/registries`);
|
||||
@@ -132,6 +149,10 @@ export class ApiService {
|
||||
return this.http.delete<ApiResponse>(`${this.baseUrl}/dns/${domain}`);
|
||||
}
|
||||
|
||||
syncDnsRecords(): Observable<ApiResponse> {
|
||||
return this.http.post<ApiResponse>(`${this.baseUrl}/dns/sync`, {});
|
||||
}
|
||||
|
||||
// SSL
|
||||
getSslCertificates(): Observable<ApiResponse<any[]>> {
|
||||
return this.http.get<ApiResponse<any[]>>(`${this.baseUrl}/ssl`);
|
||||
@@ -141,6 +162,19 @@ export class ApiService {
|
||||
return this.http.post<ApiResponse>(`${this.baseUrl}/ssl/${domain}/renew`, {});
|
||||
}
|
||||
|
||||
// Domains
|
||||
getDomains(): Observable<ApiResponse<any[]>> {
|
||||
return this.http.get<ApiResponse<any[]>>(`${this.baseUrl}/domains`);
|
||||
}
|
||||
|
||||
getDomainDetail(domain: string): Observable<ApiResponse<any>> {
|
||||
return this.http.get<ApiResponse<any>>(`${this.baseUrl}/domains/${domain}`);
|
||||
}
|
||||
|
||||
syncCloudflareDomains(): Observable<ApiResponse> {
|
||||
return this.http.post<ApiResponse>(`${this.baseUrl}/domains/sync`, {});
|
||||
}
|
||||
|
||||
// Settings
|
||||
getSettings(): Observable<ApiResponse<Record<string, string>>> {
|
||||
return this.http.get<ApiResponse<Record<string, string>>>(`${this.baseUrl}/settings`);
|
||||
|
||||
Reference in New Issue
Block a user